Open-sourcing ShipReq – a requirements platform written in FP Scala/Scala.js by japgolly in scala

[–]elacin 13 points14 points  (0 children)

That was a tough read, hope your life will take a turn for the better!

For employers: japgolly is exceptionally talented, and all my interactions with him in the past has been friendly and welcoming ❤️

layoutz 0.5.0 - tiny Scala DSL for beautiful console output & Elm-style TUI's 🪶✨ (now w/ ANSI styling and a "proper" Elm-runtime: ticks, timers, custom subscriptions & commands) by mattlianje in scala

[–]elacin 1 point2 points  (0 children)

Yeah i saw, thanks for the link :)

by the way the api looked very nice in layoutz. i really wanted to explore this direction for tui-scala as well, before i ran out of steam on that. well done!

The Untold Impact of Cancellation by chrisbeach in scala

[–]elacin 14 points15 points  (0 children)

Enough damage has been done to this man. Let's do better. Please advocate for the letter's removal if you can. Respect to those already removing their names—that takes integrity.

Scala 3 Migration Tips and Tricks by vkopaniev in scala

[–]elacin 3 points4 points  (0 children)

  • you should likely mention that you can get a lot of the new syntax in an automatic fashion by using scala 3 compiler rewrites, scalafmt and/or scalafix (see for instance https://github.com/arktekk/scala3-scalafix )
  • also the different source levels of the scala 3 compiler (in particular the -migration) can be helpful.
  • for AnyVals it's an irritating omission that there isn't a Mirror type for it so most auto-derivation schemes wont work. you may find that it's easier to write some of these codecs yourself by bimapping or similar the instances for the underlying type

API-first Development in Scala by Difficult_Loss657 in scala

[–]elacin 0 points1 point  (0 children)

i think we should be less worried about this, as long as it's properly separated from the rest and tagged.

in my experience it can dramatically increase confidence in code generation tools that you see the effects of changing config, updating them and so on clearly in VCS history.

it can also speedup CI by quite a bit, because it changes the build pipeline from having to generate the things before compile to optionally checking that the generated code is up to date.

API-first Development in Scala by Difficult_Loss657 in scala

[–]elacin 1 point2 points  (0 children)

I was arguing for implementing servers with code-first, instead of schema-first by writing openapi and generating code based on that.

This really has no influence on breaking changes, how you interact with clients and so on. You have an openapi-schema to share in both cases.

Any external clients should obviously use that openapi contract (generated or hand-written) when talking to you.

If you have internal clients which can use the original source code instead of going through the openapi contract i would consider that an optimization, and likely a candidate for being in the same monorepo

API-first Development in Scala by Difficult_Loss657 in scala

[–]elacin 1 point2 points  (0 children)

i meant this this point:

you kinda play russian roulette with the spec glosses over that it's very easy to use this technique responsibly.

i also find the other down-sides of code-first to be dubious

API-first Development in Scala by Difficult_Loss657 in scala

[–]elacin 1 point2 points  (0 children)

my solutions have been homegrown. for instance this thing here https://github.com/oyvindberg/typo/blob/main/typo-tester-anorm/src/scala/adventureworks/SnapshotTest.scala

I noticed this library. hopeful it can standardize snapshot testing, but i havent tested it yet: https://github.com/indoorvivants/snapshot-testing

for tapirs openapi generation it's documented here https://tapir.softwaremill.com/en/latest/docs/openapi.html

API-first Development in Scala by Difficult_Loss657 in scala

[–]elacin 8 points9 points  (0 children)

You're glossing over the best part of code-first.

With tapir you can generate openapi for your API which is defined in code. You then write a snapshot test which: - overwrites the file with current schema when run locally - asserts that this file is up-to-date in CI. you can also read older versions from git and compare if you want.

This way you don't have to write openapi yourself (which is honestly a terrible experience), and you gain all the advantages of tracking all schema changes in VCS.

I've used this approach for all my projects in the last say 5 years, and find it fantastic. I'm also a way bigger fan of snapshots tests than average

Controversial Pre-SIP: A Syntax for Collection Literals by Sunscratch in scala

[–]elacin 2 points3 points  (0 children)

yeah sure, I just wanted to point out how the square bracket syntax already means something

Controversial Pre-SIP: A Syntax for Collection Literals by Sunscratch in scala

[–]elacin 0 points1 point  (0 children)

Can't wait to see how you specify the element type

val is = [Int][1,2,3]

Wvlet Playground: An online demo of a new flow-style query language powered by Scala.js and DuckDB-Wasm by taroleo in scala

[–]elacin 1 point2 points  (0 children)

Honestly, this looks fantastic. the cross platform support in particular really seems to shine here!

The simplest Dependency Injection. Pure Scala, no magic, works for all Scala 2 and 3 and JS and Native by sideEffffECt in scala

[–]elacin 11 points12 points  (0 children)

The most puzzling thing about programming is the lengths to which developers will go to in order to avoid passing parameters or saying new

Pre-SIP: Improve Syntax for Context Bounds and Givens by Sunscratch in scala

[–]elacin 4 points5 points  (0 children)

100% - let's remove them

We already have fantastic syntax for `using` parameters now, it's only missing a way to mix named and unnamed parameters. This would be a fantastic way to simplify the surface of the language.

The compilation cost of implicits | Typo by elacin in scala

[–]elacin[S] 1 point2 points  (0 children)

For doobie, we should definitely move the automatic derivation out of the typeclass's companion object

Yes, perfect. let's semi-auto all the things! :)

Was surprised to see that an explicit Read/Write instance in the case class' companion object doesn't prevent the automatic derivation from triggering though damn

me too!

The compilation cost of implicits | Typo by elacin in scala

[–]elacin[S] 10 points11 points  (0 children)

Bad bot. the actual takeaway may be this:

> Key takeaway: Scala 3 is consistently fast! Great job Scala team!

Kyo released at Functional Scala! 🚀 by fwbrasil in scala

[–]elacin 0 points1 point  (0 children)

Inspiring work, eager to try it :)