Better HN
topnewbestaskshowjobs
Log inSign up

sideeffffect

318 karma · joined Jan 5, 2019 (7y ago) · 168 submissions

Submissions

comment 13h ago · link · parent

Zulip

comment 3w ago · link · parent

> Ridiculous performance, near-instant startup, radically less memory consumption.

It seems like your use case is rather not a good fit for Java.

Java shines best with large applications, where more abstract source code is desired and when you care more about typical performance, not the worst case performance. And if you can afford the cost of all those benefits, which is higher RAM usage.

At least that's the theory :)

comment 3w ago · link · parent

> Deployment of Java applications continues to be a mess

If it could help you, we're using JIB. We're on Scala and so we're using sbt-jib. Zero issues, works like a charm, deployment (on k8s) is just not a problem for us. But I would expect that it should work well for Java too.

comment 1mo ago · link · parent

> Java continues to try and catch up to Kotlin

Does it, really? Java has had pattern matching since 21 (2023). Kotlin still, to this day, the year of our Lord 2026, doesn't...

comment 1mo ago · link · parent

> pretend that dynamically typed languages have no types whatsoever

Indeed, everybody knows they have just one type (:

https://www.google.com/search?q=%22dynamic%22+programming+la...

https://cs.stackexchange.com/questions/63533/untyped-vs-unit...

https://semantic-domain.blogspot.com/2022/01/static-typing-v...

comment 1mo ago · link · parent

Bob Martin uses that already for tests. And I think it's a much better analogy for that.

That being said, I myself do prefer types over tests. I just don't know of a better analogy...

comment 3mo ago · link · parent

The official VS Code extension from Oracle with an LSP server:

https://marketplace.visualstudio.com/items?itemName=Oracle.o...

comment 5mo ago · link · parent

If you're interested in this, then you should check out https://github.com/golemcloud/golem

Golem is a durable workflow platform and can run any wasm.

comment 8mo ago · link · parent

Or maybe you can solve it like I did -- by using a font that does the (IMHO) right thing with regards to ligatures

https://github.com/0xType/0xProto#4-ligatures-that-dont-defo...

I can't recommend 0xProto enough, the only thing I'm sorry about is that I didn't find it sooner :)

comment 9mo ago · link · parent

React Native Skia seems abandoned. But maybe this will make React Native on Linux viable

https://github.com/gtkx-org/gtkx

comment 9mo ago · link · parent

https://reactnative.dev/docs/out-of-tree-platforms says otherwise

React Native Skia allegedly runs on Linux too

comment 1y ago · link · parent

If you'd like to see Bob Harper's take on programming languages, have a look at the short video series Practical Foundations for Programming Languages

https://www.youtube.com/playlist?list=PL0DsGHMPLUWVy9PjI9jOS...

comment 1y ago · link · parent

How does programming with Clojure targeting multiple platforms (JVM, JS, CLR, LLVM, ...) work?

Are there Clojure libraries that don't use JVM(/JS/...)-specific stuff that works on any Clojure platform/dialect? Can such libraries be used on Jank out of the box? Or do library authors have to do something explicit in their libraries to enable their use in specific platforms/dialects?

comment 1y ago · link · parent

https://dotty-bench.epfl.ch/

comment 1y ago · link · parent

I doubt it. For Capture Catching of Capabilities to work, you need some of the unique sauce practically only Scala has. E.g. Contextual functions or path-dependent types. Java almost certainly won't adopt these.

comment 1y ago · link · parent

The first five points are fixed by using Mill

https://mill-build.org/mill/comparisons/why-mill.html#_perfo...

comment 1y ago · link · parent

Go has proven that people want cheap threads. If it didn't have it, it wouldn't get anywhere.

Now even Java has cheap threads (Loom).

And Go even has generics. Just 20-ish years later than Java. And it's likely that more features that now Java has will trickle into Go. If Go wants to survive.

All this to say that there is no space in the market for another language which is a stupid simple Algol. Go already occupies that space. And even Go will have to add features developers want/need, if it doesn't want to get cornered out of the market.

It's not only Scala that must evolve.

comment 1y ago · link · parent

All these languages may work very well for many people for the described use cases.

But one of Scala's strength is versatility. You could use it quite well for all the listed use cases too. With just one language. (Maybe with the exception of system programming -- Scala Native still requires a tracing GC.)

Also, it's worth noting that Scala is more popular/mainstream/supported/has bigger community than Julia, Zig and Elixir / gleam. And if Red Monk is to be trusted, even more than Rust https://redmonk.com/sogrady/2024/09/12/language-rankings-6-2... That comes with many benefits.

> if you don’t need JVM / Java interop

OpenJDK is also very good, even if it's not a strict requirement to use it. Battle-tested, easily debugable, etc... AOT compilation is possible via GaalVM's native-image.

Or you can try Scala.js or Scala Native (which don't have anything to do with JVM).

comment 1y ago · link · parent

> But something happened

Oracle started heavily investing into Java. And Google picked Kotlin as the language for Android.

But Scala hasn't stagnated since. And as the blog post suggest, plans on moving further still. For example, https://docs.scala-lang.org/scala3/reference/experimental/cc... may be one of the most impactful developments in the language's history.

comment 1y ago · link · parent

> Compile times are crazy

This is also heavily influenced by the build too you use. Don't use sbt or Maven or Gradle. Use the good stuff. Use Mill.

https://mill-build.org/mill/comparisons/why-mill.html#_perfo...

Or Bleep, if you're feeling more experimental https://bleep.build/ .

comment 1y ago · link · parent

I think the proprietary variant of GraalVM comes with more optimizations in the compiler.

But the AOT compilation (native-image) is available in the GPL community variant.

comment 1y ago · link · parent

> Kotlin is also much more popular than Scala.

That's not what (at least some) numbers say. Both Scala and Kotlin are 14th.

https://redmonk.com/sogrady/2024/09/12/language-rankings-6-2...

Kotlin may be more popular, but not much. It's nowhere near the mainstream languages like Java, Python, JavaScript, C# or PHP. Not even close to TypeScript.

comment 1y ago · link · parent

Probably never. It's very slow to move.

Yes, Java has been getting a lot of features Scala has had since (more or less) always. But it's a continuing process, and not all such features are yet fully fleshed out and polished in Java.

Also, Java will probably never get many of important features Scala has (or will have). It may not be some esoteric things, like higher-kinded types. But things like meta-programming/macros. Or features which may be advanced from theoretical point of view, but are actually easy from user point of view (because they lead to a simpler code), like Capture Catching.

comment 1y ago · link · parent

> > Another common request is to “stop implementing features”.

> Yes, it's a very common one shared by virtually all Scala 3 developers. Stop. At least for a couple of years.

I, for one, think Capture Catching can't arrive soon enough. It will allow us to write much simpler programs, getting an edge over modern Java & co. I'm very much looking forward to it.

Don't use experimental Scala features in production code. They may change or be removed. And they will likely lack support in IDEs. But that is a common sense.

comment 1y ago · link · parent

> 1) The language is too unstable

Thankfully not anymore. They got their act together and have been maintaining compatibility since Scala 3.0.0 has been released in May 2021, which is almost 4 years and counting.

https://github.com/scala/scala3/releases/tag/3.0.0

Scala 3.x is to remain compatible for the whole 3.x series (think of semantic versioning). There's no Scala 4 (breaking with Scala 3) in sight.

Also, Scala 3 and Scala 2.13 JARs are also compatible with each other, which helped with the transition.

> 2) The tooling around it is not the best

sbt may not be good. But Mill is much better than either Maven or Gradle. Especially Gradle. Bleep is also promising.

Scalafmt is widely used and liked. Scalafix -- the linter/fixer -- is used a bit less, but still of a good quality.

comment 1y ago · link · parent

* Immutable-first

* Immutable/persistent collections in standard library

* Machinery to "modify" immutable deeply nested case classes/sealed traits. You have the copy method, you have lens libraries. Very easy and comfortable to use.

* Expression oriented. if/try/etc expression can be bound to a variable

* less characters to write the same idea/program, while not losing readability

* better tooling: Scalafmt is ubiquitously used, supported in IntelliJ and is very good. Scalafix (a linter which can also fix some issues automatically) is used a little bit less, but is also good.

* build tools: while I don't like sbt, Mill is a so much better build tool than Maven or, even worse, Gradle. Then there is also scala-cli, which is not a build tool, but can work like it, if you have a simple, single-module project (i.e. no sub-projects/sub-modules).

comment 1y ago · link · parent

I think it's actually used more to develop more or less ordinary backends. Or some tools/frameworks like Spark or Akka/Pekko.

But you can (and people mostly do) use Spark from Python. And Akka/Pekko from Java (but I'm not sure how that is common).

And the job market is there:

https://functional.works-hub.com/jobs/?remote=true&tags=scal...

https://scalajobs.com/locations/remote/

https://remoteok.com/remote-scala-jobs

https://betterremotejobs.com/search?title=scala

https://readytotouch.com/organizers/scala/vacancies?remote=1

https://www.levels.fyi/jobs?searchText=Scala&workArrangement...

https://www.linkedin.com/mwlite/search/jobs?keyword=Scala&lo...

https://discord.com/channels/629491597070827530/629546253381...

https://discord.com/channels/632277896739946517/840255868096...

comment 1y ago · link · parent

> Clojurescript for frontend, Rust for portability

If Clojure and Rust work well for you, more power to you. But at least in theory, you could very well use just Scala for these purposes

Scala can compile to JS https://www.scala-js.org/ if you target frontend.

And if you want portability, you can compile a Scala program with GraalVM's native-image and statically link everything with musl libc https://www.graalvm.org/latest/reference-manual/native-image...

And if you want both frontend and portability everywhere, Scala will soon have a support for compiling to WASM (with WASI, etc) https://github.com/scala-wasm/scala-wasm/ (to be integrated into Scala.js after developed)

123456