4 ms·
Jvm is bloated. So no closure for me. I prefer Go
by Go0the0gophers 8y ago
Jvm is bloated. So no closure for me. I prefer Go
- yogthos 8y agoThe claims regarding JVM bloat are largely exaggerated, especially now that the JVM introduced modules. However, if it's not your thing it's worth noting that ClojureScript happily runs on Node. Here's an example of how easy it is to get up and running with https://github.com/yogthos/mastodon-bot https://github.com/yogthos/mastodon-bot
- dancek 8y agoI'm working on my first Clojure project and find JVM to be painful (it starts very slowly and eats lots of RAM). I'd appreciate any tips on making JVM non-bloated.
- jtr_47 8y agoLogically, don't use Clojure & the JVM if you want to avoid bloat. Try LFE, Lisp Flavored Erlang: http://lfe.io/ http://lfe.io/ or SBCL: http://sbcl.org/ http://sbcl.org/ Just a recommendation if you want to avoid the JVM bloat issues, which are real and have existed since the JVM was developed peace
- cutler 8y agoDon't underestimate Erlang's capacity for eating-up all the RAM on a machine in very quick time. Those lightweight processes start to add up if left unchecked. At least the JVM establishes an upper limit on memory use from the outset.
- fnordsensei 8y agoIf start time and memory usage is important to you, go with ClojureScript on Node instead. If you do stick with the JVM, it tends to trade memory for speed, unless you tune it otherwise. For startup speed, start it once, connect a REPL, and keep it running. A started REPL on a JVM instance can be flushed very quickly when you need a blank slate.
- markc 8y agoDon't know about bloat fixes, but what does your workflow look like that JVM starts are annoying? My Emacs CIDER REPL comes up in 4 seconds (MB Pro 16G) and it's often many hours (even days sometimes) between restarts. But yes, slow starts are annoying if you're starting a JVM frequently. Can you change your workflow so that's not needed? Check out Component, Mount or Integrant.
- dancek 8y agoThis is a relevant answer. Thank you. We're using Integrant already so yes, I can mostly work in a REPL without restarting. But the restarts are more like 15 seconds. I'll have to measure and see what's so slow. My rdev platform is Cursive on a 16G MBP. And while I'm commenting, yes, we have a reason to run on JVM (a lot of legacy Java code we probably want to interface with later on). So thanks to other commenters for suggesting Node.js and Common Lisp, but not possible. :)
- vindarel 8y agoHey go with Common Lisp :D
- fnordsensei 8y agoAnd it seems to be working on Graal, though people are trying to find a way around limitations related to reflection, so I understand.