I can't believe that after all these years Java still didn't fix their startup time.
Try Clojure
151–160 of 404 posts
Re: Try Clojure
#152Re: Try Clojure
#153Earlier quoted context omitted.
Programming without immutability is so painful to me, no matter how many functional features a language adds.
It's painful for the compiler too, it has to turn the parents imperative code into SSA (essentially A-normal form) so it can optimise it!
The day that Haskell stops being 10x slower than languages providing mutable data is the day we can start to seriously entertain your claims.
Re: Try Clojure
#154Maybe online "learn lisp" repls should implement paredit keybindings in their editor and have a short section on how to manipulate s-expressions. Because you're gonna have to learn it to use the language, but it also helps people understand from the start that "oh, so using the language isn't actually complete shit". Instead, this fact always seems glossed over, and because of it anyone who spends 60 seconds writing…
It's surprisingly excellent! Sure, the "language" of paredit features more powerful text manipulation that just simple movement... but combined with the new "jumping" in the latest Helix release [1], it makes for a very impressive keyboard-based navigation system.
[0]: https://helix-editor.com [1]: https://helix-editor.com/news/release-24-03-highlights/
Re: Try Clojure
#155Clojure looks productive. What frameworks libraries do people use to build web apps? Like, replacement for Django view layer and ORM (not looking to debate orms thanks)?
webserver: ring-jetty9-adapter[0]
routing: reitit[1]
html templates: hiccup[2]
never used an ORM, but happily used HugSQL for making composable queries[3].
[0]https://github.com/sunng87/ring-jetty9-adapter [1]https://github.com/metosin/reitit [2]https://github.com/weavejester/hiccup [3]https://www.hugsql.org/
Re: Try Clojure
#156> unlike full-JVM Clojure it has a very fast startup time I can't believe that after all these years Java still didn't fix their startup time.
Re: Try Clojure
#157Earlier quoted context omitted.
Programming without immutability is so painful to me, no matter how many functional features a language adds.
In my experience jumping from a Clojure shop to a large Java shop a few years ago, the benefits of persistent data structures are overstated. Mutable collections are just as good for 99% of use cases. And they're a lot faster (in single threaded code) and occasionally mutation makes things easier. The selling point of Clojure is that persistent data structures prevent several classes of bugs (unintended mutation, loc…
Re: Try Clojure
#158> unlike full-JVM Clojure it has a very fast startup time I can't believe that after all these years Java still didn't fix their startup time.
But before Babashka, that was indeed a barrier to using Clojure in shell scripts. Now we have it all!
Re: Try Clojure
#159Earlier quoted context omitted.
And when you're ready to take the fun to the web, look no further than Biff: https://biffweb.com
I recently went through most of the Biff tutorial but found it seemed to be missing some parts later on that had me scratching my head. It was otherwise a very enjoyable experience and Biff seems like a great way to get a "batteries included" starting point for web (similar to something like Rails or Django, though maybe not as comprehensive as either of those).
Re: Try Clojure
#160Is there a version of Clojure that compiles to LLVM or something? Sort of like what Scala-native was supposed to be (but never materialized). I like functional programming but I can't abide the Java ecosystem in 2024, it's just too archaic for my taste.
the top comment as of writing this reply points to https://babashka.org/ , but it's GraalVM instead of LLVM (which shouldn't really bother you)
But: you can also build regular Clojure programs using GraalVM and create a fast-starting binary.