Recent submissions

Comment · 14 days ago
This is perhaps why the comment added "Just like Martin Odersky intended it to be!"

There are just too many ways to use Scala, and everyone thinks they're doing it "idiomatically".

Comment · 14 days ago
Pattern matching with only positional destructuring is a bad feature. I've written enough Scala to say this with confidence.
Comment · 1 month ago
>> state of the art GCs

> That just isn't true

Generational ZGC is free for everyone to use.

Comment · 1 month ago
>> Preemptive scheduling plus M:N mapping

AFAIK, in the current implementation, Java's virtual threads yields only when they block (cooperative). But the spec allows a JVM to implement them as preemptive.

Comment · 1 month ago
Kotlin's coroutines basically had the same API as Go's. But also the ability to confine some coroutines' execution into certain threads (e.g. UI main thread).

Then they added structured concurrency, which roughly solves the same problem as Go's context, arguably more elegantly.

Comment · 1 month ago
> it took like 2 weeks to ramp up

I worked on a purely functional Scala codebase (Cats). I joined after the original authors were gone.

Some new comers were not fluent in it after ~a year.

Comment · 2 months ago
Comment · 2 months ago
You are of course right about what the word "commons" refers to. Still, I want to quibble.

Maybe the definition covers both, but I still think it's worth distinguishing between incentives creating a bad equilibrium and simply antisocial behaviours. When I hear "tragedy of the commons", I think of the former.

Comment · 3 months ago
> stuck to why he thought it was bad for Bun to do this

Quite the opposite. "When Jarred announced the Rust rewrite, we were ecstatic."

> It’s definitionally an ad hominem against Jared.

Who Jarred is, as a CEO, definitely has an impact on how the company develops software - how Zig is used. And the argument is that Zig is used badly in Bun. Without that context, I, as a reader, would have to actually read through a lot of code to be convinced of that point.

Comment · 7 months ago
Coming from Scala to Kotlin, this is what I thought as well. Seeing `it` felt very wrong, then I got used to it.
Comment · 7 months ago
As noted in the article:

> This feature does have some limitations, for instance when we have multiple nested function calls, but in those cases an explicit lambda expression is always still possible.

I've also complained about that a while ago https://news.ycombinator.com/item?id=35707689

---

The solution is to delimit the level of expression the underscore (or dollar sign suggested in the article) belongs to. In Kotlin they use braces and `it`.

    { add(it, 3) } // Kotiln
    add(_, 3) // Scala
Then modifying the "hole in the expression" is easy. Suppose we want to subtract the first argument by 2 before passing that to `add`:

    { add(subtract(it, 2), 3) } // Kotlin
    // add(subtract(_, 2), 3) // no, this means adding 3 to the function `add(subtract(_, 2)`
    x => { add(subtract(x, 2), 3) } // Scala
Comment · 7 months ago
Comment · 7 months ago
The premise of this joke is dead since 2020, when ZGC was production ready.
Comment · 7 months ago
> ditch ORMs ... make good use of SQL

I think Java (or other JVM languages) are then best positioned, because of jooq. Still the best SQL generation library I've used.

Comment · 7 months ago
https://github.com/peterklijn/hammerspoon-shiftit

I use ShiftIt (a lovely project, but dead) reimplemented in Hammerspoon. It is very comprehensive.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton