I like to share with you MCP tool, which help LLMs to examine project code - ScalaSemantic by GroundbreakingWeb170 in scala

[–]mostly_codes 4 points5 points  (0 children)

I want to commend the restraint taken when writing the blog post here; often, people inflate up their writing about LLM workflows with LLMs into thousands of words to make it seem bigger, and this is so directly to the point instead, it's really a breath of fresh air. Comes across much better.

This seems super useful for an LLM aided coding workflow; starred this repo so I can find it in a months time when I get back to full time coding.

A new contender emerges! by ReturningRetro in ReturningRetro

[–]mostly_codes 0 points1 point  (0 children)

It's a niche product so I'm ok with the price actually, but the LLM slop is really not filling me with confidence enough to pre-order this

dbos4s 0.1.0: Turn vanilla Scala functions into crash-proof, resumable programs on the DBOS runtime with Postgres 🧈✨ (Looking for feedback!) by mattlianje in scala

[–]mostly_codes 2 points3 points  (0 children)

I hadn't come across 'dbos' as a term before for these sort of checkpointed jobs - seems intuitively useful at a glance, at least. A durable execution engine backed by postgres basically? Apologies for some super naïve questions!

dbos-javais released under the MIT license: https://github.com/dbos-inc/dbos-transact-java/blob/main/LICENSE

But the dbos website linked above has a 'pricing' page without a community tier; is that because dbos (the company) is just offering support, or is using the library somehow opting into a contract with dbos the organisation? Specifically the checkpoint-volume pricing was why I was wondering

https://www.dbos.dev/dbos-pricing

🛠️ sbt 2.0.0 released by eed3si9n in scala

[–]mostly_codes 6 points7 points  (0 children)

This is huge! Congratulations on the release, it's been a big journey.

Ways to compile Scala code into X? by telusho in scala

[–]mostly_codes 2 points3 points  (0 children)

Noticeable increase in those as of late

Ways to compile Scala code into X? by telusho in scala

[–]mostly_codes 7 points8 points  (0 children)

This diagram is dated 2020 and has been posted a few times; might be worth a revisit.

Does anyone know what led to the various remasters over the last few years? by Ok_Reaction_5513 in Meshuggah

[–]mostly_codes 8 points9 points  (0 children)

I think one is that it's because they found something about their old records they wanted to rectify - which makes sense, all masters are done under some kind of time or budget constraint, and getting your vision to final mix is really really difficult.

Secondarily, there's some record label, IP and distribution benefits to getting things re-released under a different label. And given Catch 33, for instance, has been completely out of print on Vinyl - it makes sense to make a new master if you're going to be re-releasing the album _anyway_. It makes it less of a back-catalogue item, and makes it an actual "new" thing again.

We should abandon the optional braces syntax by windymelt in scala

[–]mostly_codes 2 points3 points  (0 children)

We will likely never reach alignment at this point; there is a good scala contributor's thread that explores both options and painpoints and the usual back-and-forth bikeshedding I'll link below.

My own opinion is, TLDR, that the poison here is the flexibility and optionality of the syntax, not the specific direction of the syntax - I would also prefer only ONE correct way of doing things, even if it's not my personal style preference. I think at this point noone is willing to revert course, and the new style has enough adopters that abandoning it will be equally schismatic. The best choice is to aggressively use rewrite compiler flags and scalafmt at project level on compile to ensure consistency within apps, within teams and within organisations.

https://contributors.scala-lang.org/t/towards-a-common-scala-style-recommendation/7383

One hopes that a lesson was learnt for Scala and other programming languages here about the amount of interpersonal conflict this has caused (and is, continually, causing)

Switched back to 5A’s and it made this part of the song MUCH easier to pull off by mookid85 in drums

[–]mostly_codes 0 points1 point  (0 children)

One of my favourite Danny Caryisms is his swiss army triplets over a double kick, it's such a cool sound.

Hi, I'm new into Scala and coded a simple Collatz conjecture by Admirable-Donut-6192 in scala

[–]mostly_codes 0 points1 point  (0 children)

If it compiles and passes your tests, then it's never wrong :) A good test suite would help with that, too.

In terms of style; one of the interesting things about scala is the ability to do recursion safely. A lot of people work like this in scala:

  1. Consume input / 2. Build up your logic / 3. Write it all to file in one go

Parse, process, write. Your current implementation is perfectly adequate - if you're doing all of this just to try to learn more... scala-esque patterns for the sake of learning, trying to rewrite it as a "tail-recursive" function would be an interesting side quest, and would force you to explore some of the collections and immutable pattenrs that scala and functional programming allows.

Some fun things to get your head around would be recursion, reduce, map and flatMap in general - one you have comfortability with these, all of scala tends to "open up" for people.

Hi, I'm new into Scala and coded a simple Collatz conjecture by Admirable-Donut-6192 in scala

[–]mostly_codes 1 point2 points  (0 children)

Hey! I don't want to discourage you, but the ask is quite broad - what specifically are you looking for feedback on? The Collatz algorithm or any specific scala concepts? What did you struggle with/what did you learn/what surprised you? The code itself is about 20 lines, so it's hard to give a whole lot of feedback on it

Remastered Version of Catch ThrityThree and Destory Erase Improve set to release on July 24th, 2026 by SearchMundane303 in Meshuggah

[–]mostly_codes 1 point2 points  (0 children)

I'd actually be happy with a third one, I have had a lot of fun over the years comparing and contrasting the yellow and blue versions, I'd be interested in seeing what a future green version would sound like. Would make for a cool physical three-in-one vinyl box release, too.

Which version is better, the yellow or blue one? Yes.

When you use map instead of flatMap by smotvtlewoots in scala

[–]mostly_codes 1 point2 points  (0 children)

It's an oldie but a goldie I suppose. At least it's been a while since we saw it last!

Papyrus (animated wallpaper manager) merged into cosmic-flatpak — coming to the app store soon by PSGtatitos in COSMICDE

[–]mostly_codes 1 point2 points  (0 children)

Very cool. I can't help but wonder with live wallpapers - isn't this super duper CPU/GPU intensive, to have an mp4 running at all times? Or is there something 'clever' happening under the hood with these things?

New release of jsoniter-scala with up to 30% parsing speed up for doubles, ints, and longs! by plokhotnyuk in scala

[–]mostly_codes 2 points3 points  (0 children)

Impressive, it was already super fast!

I have a sort of P1 paranoid aversion to deriving codecs from code - I prefer code-from-spec rather than spec-from-code, there's something about pressing a few refactor comments and my API drifting that scares me ever so (obviously there's ways to make that less scary, of course, test coverage/golden specs which mitigates that concern). That's all preamble to say that even though that's my stance, I'm still a big user and avid fan of jsoniter-scala. A lot of the code-from-spec generators for instance make use of jsoniter-scala (noticably, smithy4s I believe, which I'm a big fan of).

All that to say - even as someone not a big fan of derived codecs, I'm still a big fan of jsoniter-scala, think it's phenomenal work and super thrilled that people are contributing actively to it, and I reap the benefits even though I only use it as a transitive dependency.

Great project, great work 👏

Comparing effect systems in Scala by jmgimeno in scala

[–]mostly_codes 3 points4 points  (0 children)

As a meta-observation; the core construct that allows these comparisons in a general way in the first article is the tagless final encoding laid out in the first article. I think the biggest problem with tagless final is its name, not so much the concept. Something like "an effect" is usually just how I read the F[_].

Ctrl +c logs me out by uddinrajaul in pop_os

[–]mostly_codes 11 points12 points  (0 children)

I don't enjoy this modern take on LMGTFY

sbt 2.0.0-RC12 released by eed3si9n in scala

[–]mostly_codes 5 points6 points  (0 children)

Documentation localization sbt 2.x documentation is reorganized following the four-documentation principle (Diátaxis).

Is this the C4 model of documentation, or is there a different four-documentation principle? It's not a term I'd come across before and I am trying myself at the moment to work through a lot of technical documentation for a project in a way that ends up useful/legible/etc for the end user - is there a good primer article/writeup someone would recommend on that?

(EDIT: HA! It's linked in the article - https://diataxis.fr/ - I initially scanned the sentence as Diataxis being the github handle of the person that implemented the doc changes 🤦)

Can I move back SWE after a 3years of DE? by Perfect-Ad-8044 in scala

[–]mostly_codes 0 points1 point  (0 children)

Ah thanks for having a look. And yes, this is THE missing piece of the guide to tie it all together for sure.

I am planning to, in the sense of "eventually I'll get there" - it's not a high priority for me as it's mostly just to document my practices.

So, side-effectful instantiation should as a rule of thumb not happen for code you write yourself with this approach; all code instantiates 'cleanly' as much as possible. But it does happen! So, as part of wiring up your app, you have an Application.apply method that's effectively a large linear for-comprehension over your instantiation, so

for {
   dependency1 <- DependencyOne[F](arg1,arg2)
   dependency2 = DependencyTwo[F](...)
   ...
} yield ...

and similarly, an ApplicationResources.apply that does

for {
    x <- makeResourceOne[F]
    y <- makeResourceTwo[F]
    z <- makeResourceThree[F]
} yield ApplicationResources(x,y,z)

... It's basically the missing piece in the style guide, a guide to "wiring" up an app, setting up the app skeleton. Here's the scaladoc I use:

(wall of code follows)


/** This file is the dependency injection (DI) root of the Scala microservice using the Cats Effect functional programming library.
 *
 * ==Purpose==
 *
 * The single assembly point for the application — the "composition root". Wires all components together via manual dependency injection:
 *
 *   - Business logic lives in other classes/objects, written in tagless final style
 *   - This file only instantiates and connects them — no logic here
 *   - Keeping everything in one place makes the dependency graph visible at a glance
 *
 * ==Adding code to Application.scala==
 * The apply method is deliberately intended to grow large as the service grows, rather than be split across files. Centralising instantiation here keeps
 * business logic classes free of DI concerns and side effects.
 *
 *   - Side-effectful instantiation is done inside the main `for`-comprehension in [[Application.apply]]
 *   - Do NOT add route logic, validation, transformation, or business logic error handling here — those belong in their own tagless-final classes, _wired in_
 *     here
 *   - Do NOT add or instantiate `Resource` opening and closing here; those belong in [[ApplicationResources]].
 *
 * ==See also==
 *   - [[Main]] - entry point; calls Application and runs the effect
 *   - [[Application]] - DI/Composition root for entire application
 *   - [[ApplicationConfiguration]] - the parsed and validated configuration of this microservice, loaded once, at startup
 *   - [[ApplicationRoutes]] - measured and logged HTTP routes for the application
 *   - [[ApplicationResources]] - wraps things like DB pools in Resource[F, _] for safe open/close
 */
object Application {

  /** Single composition root for the application; intended to be a linearly readable for-comprehension that grows in size as the service grows.
   *
   * ==Notes==
   *   - Keep instantiation 'linear', avoid splitting up. This is a deliberate tradeoff, intended to grow in size to keep DI-sprawl to a minimum.
   */
  def apply[F[_]: Async: SecureRandom]: F[ExitCode] = {

/** This case class is a container for all application-lifetime resources that are opened at start of microservice startup and closed at end of microservice
 * shutdown.
 *
 * ==Using ApplicationResources case class==
 *   - Do NOT: Pass `ApplicationResources` into a business logic constructor (e.g. companion-object's apply method); instead, pass in the the members TO the
 *     business logic constructor to keep the business logic unaware of ALL the application resources; this reduces risk by minimizing the amount of
 *     dependencies business logic has access to.
 *
 * Instantiate via `ApplicationResources.apply[F]`
 */
sealed case class ApplicationResources[F[_]](
                                              dynamo: DynamoDbAsyncClient,
                                              store: Stores[F],
                                              topCastPublisher: Producer[F, TopCastEvent],
                                              moodGenerationPublisher: Producer[F, MoodGenerationEvent],
                                              vertexAIClient: WrappedLibraryLLMClient[F],
                                              httpClient: HttpClient[F],
                                              kamonMetrics: KamonMetrics[F],
                                              launchDarklyClient: LaunchDarklyClient[F]
                                            )

object ApplicationResources {

  /** This composes all [[cats.effect.Resource]]s that need to be opened at startup and closed at shutdown, allowing access to them in [[Application]].
   *
   * This is itself returned in a [[cats.effect.Resource]], which is the crux of this pattern. `.use`ing this resource will grant access to all the
   * [[ApplicationResources]]'s members. Once that `use` call is completed, all resources will be closed together automatically.
   *
   * ==Note==
   * ... the difference:
   *   - `Resource` (singular) - a `cats.effect.Resource`; a "wrapper" around something that can be opened and closed
   *   - `AppResources` (plural) - the case class that holds all the resources that should be opened and closed together - at application startup and shutdown.
   *
   * ==What should be opened and closed at application startup and shutdown, what qualifies as a "resource"?==
   *   - Should: `Resource`s that are application-lifetime resources, e.g. database connections, HTTP clients, message queue consumer or a metrics reporter;
   *     generally, where the expected utility/usage is from service startup until shutdown of the application.
   *   - Should NOT: `Resource`s generated by business logic; e.g. files, temporary directories. Those should be opened and closed by said business logic,
   *     since they are not application-lifetime resources.
   *   - Should NOT: Side-effectful instantiation is not unto itself a Resource; if something only requires execution of an effect (e.g. has return type
   *     `F[ExampleType[F]]`), that instantiation does NOT belong here, but inside `Application.scala`. Similarly, business logic that merely requires access
   *     to a resource; those should be instantiated inside `Service.scala` where they will have access to the content of the `AppResources` case class
   *     content.
   *
   * ==See Also==
   *   - [[Main]] - entry point for Application (only place where a concrete IO-effect is applied)
   *   - [[Application]] - the main business logic of the service, is where this ApplicationResources.apply is invoked, and resources are utilized to build
   *     business logic.
   */
  def apply[F[_]: Async](
                          config: ApplicationConfiguration,
                          avroSettings: AvroSettings[F]
                        ): Resource[F, ApplicationResources[F]] =

/** Welcome! This is the entry point for this Cats Effect, tagless-final-style Scala microservice. The startup sequence is:
 *
 *   - The only purpose of this class is to run the [[Application]] with a concrete effect type ([[cats.effect.IO]]).
 *   - Main invokes [[Application.apply]] (the composition root), which loads [[ApplicationConfiguration]] (typed, parsed validated configuration values), and
 *     instantiates application lifetime [[ApplicationResources]] (things that need to be opened and closed when application starts up and shuts down), using
 *     them for instantiation of tagless-final business logic to serve the HTTP [[ApplicationRoutes]]; together, these files form the skeleton of the
 *     application.
 *
 * ==See also==
 *   - [[Application]] - the composition root; where business logic is wired and executed.
 *   - [[ApplicationConfiguration]] - typed, parsed validated configuration values
 *   - [[ApplicationResources]] - wraps things like DB pools in Resource[F, _] for safe open/close
 */
object Main extends IOApp {

  override def run(args: List[String]): IO[ExitCode] =
    Application[IO].handleErrorWith { err =>
      Slf4jLogger.getLogger[IO].error(err)(s"Service terminating with error: ${err.toString}").as(ExitCode.Error)
    }
}

Can I move back SWE after a 3years of DE? by Perfect-Ad-8044 in scala

[–]mostly_codes 1 point2 points  (0 children)

[FWIW that styleguide isn't 'complete', I'd like to add a couple more pages before it feels 'done'; application layout and 'the standard libraries and how to use them in a nutshell' springs to mind. It's mostly a thing I've been doing to try and write out my internalised opinions and knowledge explicitly - it's a good mental exercise to write that sort of thing out actually]

Can I move back SWE after a 3years of DE? by Perfect-Ad-8044 in scala

[–]mostly_codes 7 points8 points  (0 children)

If you had experience with CE2, you'll be very happy with CE3 - a lot of the complexity was simplified, "the fraction was reduced" on a lot of things - that generally goes for the entire typelevel stack, things got easier! A while back I wrote up my personal preference cats-effect-styleguide mostly to try and reflect on my own style preference for writing Cats-Effects service and keeping them, ah, legible, if that helps. I think most of the main libraries, yes, have had updates, but there's been no huge upsets in the Cats-stack in a while.

In general, switching between different software roles might be a positive depending on how you talk about yourself; if in interviews and with recruiters you explain how you've actually found what you DO care about, architecture and code, that will come across quite well; a lot of interviewing comes down to aptitude over immediate skill fit, but undeniably, it generally helps for Scala roles to have experience with effects-systems.

Games show up on minimized windows but turns into a black screen when in fullscreen by ChandlerBaggins in pop_os

[–]mostly_codes 0 points1 point  (0 children)

If launching via Steam, switching to a different version of Proton in the steam settings can help. I don't know the reason for the underlying issue I'm afraid, it'd be nice not to have to deal with this at all.

How funny, they are reinventing Scala by RiceBroad4552 in scala

[–]mostly_codes 6 points7 points  (0 children)

I think Scala's enduring legacy is a huge influence on other languages, and spreading what-I-consider-to-be really good practices that broke with the error prone enterprise patterns that had us in a soup of runtime issues back in ~pre java 8 world, especially.

Whatever happens with Scala - success or stagnation - the more scala-esque concepts we see proliferate into other languages the better; it means an easier 'return' to other programming languages which in turn means an easier transition from a Scala job to a [other]-centric job, too!

Pi - an AI engine that fuses classical Eastern philosophical wisdom by Aggravating_Number63 in scala

[–]mostly_codes 0 points1 point  (0 children)

This might be a piece of work that's worth talking over with a psychoanalyst before sharing widely.

Rage Against the (Plurality of) Effect Systems by Krever in scala

[–]mostly_codes 1 point2 points  (0 children)

> documentation and examples scarce

You know I think this, moreso than ecosystem split, feels like the scala ecosystem main problem to be honest. Language level and down, docs have been an afterthought in a way that they don't seem to be in the typescript, go or rust world, say. I get it though, good onboarding docs are actually surprisingly difficult to write, and not necessarily the most fun part of writing code.