[HN Gopher] Clojure: A Lisp that wants to spread ___________________________________________________________________ Clojure: A Lisp that wants to spread Author : simonpure Score : 76 points Date : 2020-03-01 19:49 UTC (3 hours ago) (HTM) web link (simongray.github.io) (TXT) w3m dump (simongray.github.io) | Random_ernest wrote: | I really like Clojure, it's a well designed language and one can | get quite productive, surprisingly fast. | | My core criticism that is not really mentioned in the article is | the error messages. At the beginning I often felt lost and had no | idea where to look if something went wrong. | lbj wrote: | Thats last few sentences make no sense. The argument is that | uptake is stunted by the JVM's slow startup time, making it | unsuitable for commandline utils or desktop apps. However thats | easily fixed which was never more hillariously stated than when | Rich Hickey did it a decade ago. A blogpost went viral and it was | a thunderous critique of Clojure, focused on this single point of | slow start up. In the comment section was only 1 reply from Rich: | | time java -client -jar clojure.jar helloworld.clj | | > system time 0.0001s | | The -client param makes all the difference :) | simongray wrote: | This is what I am referring to: http://clojure-goes- | fast.com/blog/clojures-slow-start/ | | > As it turns out, Clojure start time is a complicated and | multi-dimensional topic. Clojure projects are slow to start not | only because of JVM -- JVM itself starts in ~50 ms -- but | because of JVM specifics the classes are loaded slowly. Clojure | projects are slow to start not only because of Clojure -- | Clojure itself starts in ~1 second -- but because of Clojure | specifics, the namespaces, especially not AOT-compiled one, are | loaded slowly. And so on. | michaelmrose wrote: | Running a simple cli application written in clojure with the | help switch ensuring it doesn't do much beyond print text. | | With and without -client 1 second | | Built with graal 22 ms | finalfantasia wrote: | According to the latest status update from a member of the | Clojure core team [1], we may see improvements in startup time | with the next version of Clojure (1.11). | | [1] https://insideclojure.org/2020/02/28/journal/ | rubyn00bie wrote: | For anyone else wondering, "holy crap, WTF does -client do?" | here you go: https://stackoverflow.com/a/198651/931209 | | And to save folks a click: | | > The Client VM compiler does not try to execute many of the | more complex optimizations performed by the compiler in the | Server VM, but in exchange, it requires less time to analyze | and compile a piece of code. This means the Client VM can start | up faster and requires a smaller memory footprint. | | There's literally so many just insane things about the JVM and | its variants, I totally get why some folks are like "JAVA OR | DEATH." I just wish I had started learning it 20 years ago, | like a lot of 'em, so it wasn't such a gigantic wall of | pedantic knowledge to acquire. | zerr wrote: | While we are at it - how do you refactor a mid-sized/large | Clojure project? | pjmlp wrote: | By making use of nice tooling like Cursive. | crispinb wrote: | To add to your question: does spec help here? | gentleman11 wrote: | Why don't lisp fans use older lisp implementations like Common | Lisp or scheme? Is it just a lack of libraries and frameworks? | agumonkey wrote: | Who knows what the lisp crowd is ? | | I'd like to have a broad view of how many lispers working with | one. | | the few I know: | | - scheme had a coma period due to specs issues (scheme small | and large standard) | | - commonlisp .. no idea but it seems quicklisp is enough for | anybody to work, and there are many libs. Maybe not java/python | levels .. but many. It's just out of the radar. | simongray wrote: | Clojure is functional to the core and innovates a lot of areas, | while other Lisps are more multi-paradigm and slant towards an | OOP style. If you want to work universally with persistent data | structures in your code and the libraries you use, Clojure is | really the only option. Clojure also modernises Lisp syntax | slightly (and a bit controversially) by getting rid of lots of | parentheses and introducing new styles of parens for the core | built-in data structures: ( ) [ ] { } #{ }. There's a bunch of | other stuff, but really, Clojure is significantly different | from other lisps. | bgorman wrote: | Clojure lets you leverage all libraries of the host language | e.g. Java, Javascript or C#. | btcinfo wrote: | Clojure wants to spread all right, like the disease it is. ___________________________________________________________________ (page generated 2020-03-01 23:00 UTC)