Live data from Hacker News

Scala isn't fun anymore

alexn.org

371–380 of 394 posts

Re: Scala isn't fun anymore

#371

Earlier quoted context omitted.

This is independent of OS threads or green threads. The problem is that with Loom the developer loses control whether they can execute something on one OS thread only or not. Whereas right now they conciously have to decide if they want to run something sync or async.

Nothing is stopping the developer from starting a single thread executor and using that to launch many virtual threads. Is that what you meant?

Well, that is something that is desired and also something we can already do in the JVM world.

What I mean is that semantics of existing code changes (and becomes harder to understand for future code).

Re: Scala isn't fun anymore

#372

Earlier quoted context omitted.

In short, a huge number of packaging problems come not from packaging, but from the way you install, configure and call python. Unfortunatly, everybody and their mother tell you how to do this, and you'll find 1000 articles to get you in trouble, but very few to tell you what you should actually do. The full story is pretty long and most people don't have the time and resources to learn everything about it. The easie…

My impression is Python packaging is stuck in a local maximum, and that any attempt to move out of it will be as disruptive as 2->3. Dropping support for conda et al will only split the ecosystem, hasten the rise of Julia, and make Python packaging more acrimonious. I like your simplified approach (and take a similar approach where I can), but much of the value of Python comes from its ability to be inserted without…

Not at all.

As I said, most packaging problems don't come from packaging itself, but for bootstrapping. Symptoms from a terrible bootstrapping situation creep up and they come out in packaging.

Unfortunaly the solution is of the worst nature possible for a FOSS project, because not technical: it's policital. This is the kryptonite of volunteer efforts.

The community has to get organised around one way to install, configure and run python. But it's really hard to do, and requires to synchronized a lot of different group of people, efforts, and make sure everyone are on the same page.

E.G, of a single point:

To chose which version of python to run, the installer for windows provides the "py" command, anaconda provides the conda prompt, but the windows store provides a suffixed command like most unix do. Most people are not aware of those differences, and when they attempt to follow a tutorial that has been written by somebody knowing only one of those combinations, the person will fail. Either with a "command not found", a broken install, "import error", a "syntax error" or installing things for one version of python and running the other version by mistake.

This will lead the person to believe packaging is broken, while it's not. The way we install and run python is broken.

But how do you solve this problem? By engaging in a long, frustrating and thankless talk with each of the parties involved. There will be debates, people will talk about taste, diversity, backward compatibility and so on. It will be a nightmare.

The alternative would be for the core devs to come up with a single recommended setup for all plateforms, with a unified configuration, and promote that massively. This will cause another huge political problem: you now have 10000 of tutorials that are referencing one of the old ways, and you will spend the next 20 years explaining to people any previous configuration are not supported. There will be a lot of complains from devs, and pressures from companies.

Either way, you end up with a load of work, and unhappy people, which nobody wants to sign for. It would be better on the long run, but nobody wants to sacrifice themself to be hated in the end.

And that's just one single point.

You still have to solve homebrew troubles, linux distro splitting python and limiting versions, bootstrapping tooling outside of venv, solving the uncanny valley of venv, and so on.

Note that we haven't even touched packaging yet.

Re: Scala isn't fun anymore

#373

Earlier quoted context omitted.

Clojure has massive amounts of ecosystem and toolchain pain, even though it is a cool language. Most common dev environment for it is a complex emacs tool chain. If you are seeking the simple joys of programming, Clojure is unlikely to be what you want.

> Clojure has massive amounts of ecosystem and toolchain pain Oh come on. Why do programmers like to exaggerate things in plain English? Maybe because naming variables using words like "massive", "colossal", or "monumental" won't fly in a programming language? There's no "massive amount of toolchain pain". Did you use Clojure last time in 2012 or something? You can literally just install Clojure and start writing Clo…

There's been a fair amount of churn in the ecosystem, even if the language itself has been very stable. Leiningen was ubiquitous 5-6 years ago, but if you switched to using deps for dependency management you lost the ability to run tests or build uberjars and had to manually re-create these on a per-project basis. Now there's tools.build, but that also requires you to manually write essentially the same tasks for basic functionality in each project. Leiningen and tools.deps also seem to resolve depedencies differently, so you can run into issues simply by migrating from one to the other.

Re: Scala isn't fun anymore

#374

Earlier quoted context omitted.

> Clojure has massive amounts of ecosystem and toolchain pain Oh come on. Why do programmers like to exaggerate things in plain English? Maybe because naming variables using words like "massive", "colossal", or "monumental" won't fly in a programming language? There's no "massive amount of toolchain pain". Did you use Clojure last time in 2012 or something? You can literally just install Clojure and start writing Clo…

There's been a fair amount of churn in the ecosystem, even if the language itself has been very stable. Leiningen was ubiquitous 5-6 years ago, but if you switched to using deps for dependency management you lost the ability to run tests or build uberjars and had to manually re-create these on a per-project basis. Now there's tools.build, but that also requires you to manually write essentially the same tasks for bas…

That's not "massive amounts of toolchain pain", this happens in every general-purpose language, I'd say: that's "business as usual".

Like in Javascript, for example, any lib composed with CRA (Create React App) is painfully difficult to re-use in non-CRA apps. You constantly run into dependency resolution pain with Haskell; Python has toolchain resolution problems; .Net has its own challenges. Well, at least .Net folks don't have to run three different, incompatible versions of Visual Studio anymore to compile a single project. I do remember those days.

If I had to run multiple versions of Clojure, Leiningen, or CIDER on a single machine to compile different projects, or if Clojure folks had to invent something like pyenv, yeah, I'd agree that there is a problem.

You just can't make everyone happy. People either complain that "Clojure is dying" because some lib hasn't been updated since March, or "Clojure has too much churn" because Cognitect rolled out a new lib.

Clojure earned the fame of being very stable because you can pick any five-six years old project and it still would compile. Now you're complaining that you've decided to switch to a different build tool and saying it's painful?

Do you know what's painful? Having to migrate from Angular to React and to keep them both in the same .js project during the transition phase. Clojure has nothing of that sort. So many times we slowly moved from one thing to another with virtually zero downtime.

I can compare the frustration you seem to describe with my own experience building thing in different languages. Clojure by far is the least frustrating in that regard.

Re: Scala isn't fun anymore

#375
post #250

Earlier quoted context omitted.

I'd encourage you to try Go or Rust, great ecosystems, great communities and lots of problems of programming languages of the 2000s are solved in much saner ways (dependency management, type checking, etc). There has been tremendous progress in programming languages in the last 20 years, it would be a shame to not learn about them and be super excited about them.

Rust and golang are not really in the same space. Rust is more of a C++ competitor, while golang is somewhere between python/ruby and Java/C#. Furthermore, there really isn't anything that golang does that Java or C# don't, but the latter do it in a much more saner way, especially Java now with Loom on the way. Unless you really need to compile to binaries, but both ecosystems are getting solutions in the works (Graa…

Sure, Java is going to take off and rule the world ....

Re: Scala isn't fun anymore

#376

Earlier quoted context omitted.

That's beyond me. I guess I prefer to look at what can happen during my life-span. :)

Oh, I am working on that universal language right now. Shouldn't take more than 15 more years or so.

Ping me when you have something presentable!

Re: Scala isn't fun anymore

#378

Earlier quoted context omitted.

I'm not going to try to explain why developing and maintaining tooling takes resources. However, a few things: - Lightbend isn't involved in Scala 3. - Martin Odersky has taught students for decades and knows how to make Scala more accessible. He wasn't afraid of stirring controversy with new keywords and the brace-free syntax. He also has enough industry experience and connections to realize what matters for the eco…

> why developing and maintaining tooling takes resources. Developing and maintaining anything takes resources, tooling is not special at all. Yet, you still didn't say what exactly does Kotlin do that's so resource-intensive that it's impossible to replicate for Scala for the reason of lack of resources only. Do you know Kotlin's tooling? > Lightbend isn't involved in Scala 3. I don't get what you mean? I mean, so wh…

> All default (ie. used most often in idiomatic code) collections in Kotlin are immutable

That's not true. List, for example, is a read-only interface, but given that MutableList is a subtype of List, you have no actual guarantee that some other piece of code isn't modifying a list you think is immutable.

I haven't seen this leading to trouble so far because clearly the intent is to treat collections as immutable wherever possible, and because it's a tradeoff that makes Java interop easier, but it's not the same thing as true immutable collections in Scala.

Also, your comment about interoperability makes me think you haven't actually used Kotlin. Its Java interoperability is way better than Scala's (you don't have to cast collection types, for example), for better or worse (because it also inherits some of Java's flaws).

I think that Kotlin is more pragmatic and Scala is more elegant and idealistic, and both are valid goals.

Re: Scala isn't fun anymore

#379
post #345

Earlier quoted context omitted.

I don't see anything in the docs about cancelling a standard function. Maybe internally Go represents a function as some type of future but for all practical purposes, it looks to me like a function in Go is just as synchronous as as a function in say java.

There's a big difference. If you write to a file using the stdlib in java, you will block an OS thread. In Go you won't. That does not mean all Go calls are cancelable, they're not. If, in a Scala/Python/Rust async function you use a synchronous stdlib function, that call will block the whole OS thread with it. The following experiment will show you the difference: In Java, run 10 futures on a threadpool of 4 workers…

Yes I understand the difference between threads and fibers. That is a much different conversation than "All functions async by default and preemptible."

Re: Scala isn't fun anymore

#380

The big takeaway here for me is that Akka has changed license to BSL. It's almost crazy to me that such a fundamental and widely used project would switch to such a restrictive license. Some more details here: https://coralogix.com/blog/akka-license-change/ > Lightbend are operating on a “per core” model, with their base license starting at $1995 per core (defined as a thread or vCPU) > The license is only enforced i…

Am I the only one that doesn't think this is really all that bad? I'll admit that I've not ever written a line of Scala, but in principal it seems like the only people who have to follow this license will be those who can afford it. Sure, true FOSS is always better, bit the maintainers have to eat somehow. If you're making 25m+ ARR and are using their software, maybe you should be paying them something.

i am rewritting all of our projects (about 20 or so) to get off akka as we speak. Pain in the arse, but has to be done. It's a shame. Was fun while it lasted.
Post reply on HN