Re:Why Clojure? (2010)
by WillPostForFood on Friday December 30, 2016 @02:44AM
(#13283146)
That a fair request, but the article doesn't say Clojure is faster than any other language, it just says it is fast. That caught my attention as well, because I don't think of it as being particularly fast (mostly due to startup time).
[ Parent
| on HN ]
> because I don't think of it as being particularly fast (mostly due to startup time).
Proposal: Fast for server use-cases?
Curiously, I was never really interested in the startup time of most of my code, probably because most of my code is long running where it doesn't matter if it takes a few seconds more to start.
Re:Why Clojure? (2010)
by fnordsensei on Friday December 30, 2016 @05:24AM
(#13283671)
There are a few efforts out there to provide something with near instant start up time. Can be useful for scripting, for example.
Planck, which runs on JavaScriptCore: http://planck-repl.org/
Lumo, which runs on V8: https://github.com/anmonteiro/lumo
I was not interested in that either until I had to start Java processes by hand. The initial version ran for 5 minutes. I then refactored the app to be a long running service instead of a fire-and-forget app and the run time changed from 300 seconds to 300 microseconds!
Five minutes? Ouch .. when I think of "slow" start of Java processes it is more in the range of 5 to 10 seconds. Maybe a minute tops for an application server, but five minutes sounds ugly. Especially when it is all just start time.
Startup of a single JVM was around 10secs but I had to start up a JVM for each operation (think of it like a JUnit test suite from the command line). If you have several of these processes the whole thing is no longer O(1) but O(n) and you begin to see the JVM startup overhead.
Re:Why Clojure? (2010)
by throwaway7645 on Friday December 30, 2016 @03:32AM
(#13283271)
Probably being compared to languages like Python, Ruby, and Perl. It should be pretty close to statically typed languages on the JVM like Scala. I think a real REPL is worth a little bit of performance.
Re:Why Clojure? (2010)
by RyanHamilton on Friday December 30, 2016 @04:26AM
(#13283457)
FYI http://jpad.io/ REPL for java