nbb

sher 2023-12-08T10:39:44.341049Z

@borkdude curiosity question Now that squint and nbb have been given much effort and performing well, can you share a shortcomings list of Node.js as a host, comparing to JVM?

borkdude 2023-12-08T10:41:17.523089Z

I think you could generalize the question to: what are the differences between JVM and Node.js? You could post this in the #off-topic channel and I'm sure many people will have opinions on this. Most will be in favor of JVM Clojure since that's just what most people use in Clojure-land

sher 2023-12-08T10:42:23.836419Z

thanks2 will ask in off-topic

sher 2023-12-08T10:44:19.504949Z

I was wondering about your findings.

borkdude 2023-12-08T10:54:18.697539Z

JVM is better suited for long running server processes since it has generally better performance, but with short running cloud functions, it doesn't matter that much for that specific use case and Node.js could be as viable for it, even more since it has better startup and memory usage than a full JVM (although GraalVM native-image and babashka solve that to some degree for JVM Clojure). For scripting, the light-weight-ness of Node.js and the big ecosystem is a nice environment, but async/await and the churn of JS library APIs can be discouraging for people who are used to Clojure's stability. I started nbb because sometimes in the bb ecosystem there aren't good libraries for some scripting tasks, and there's always a JS library. squint and cherry aim to give better performance + js-await and in this way, could try to be better than nbb.

sher 2023-12-08T11:04:49.495919Z

Right, Clojure community can find it difficult to adopt the havoc of JavaScript ecosystem with all the backwards incompatibility etc. Thank you for a comprehensive answer.

ray 2023-12-08T14:42:38.245859Z

My feedback - having used both - is that async programming, which is forced out into the open in JS, is infectious and uncomfortable.

☝️ 1
😅 1
Ed 2023-12-11T17:44:19.785549Z

in addition - be wary of js numbers. They are all floats, and will start to loose precision as you get to large numbers, for example.

1
borkdude 2023-12-11T18:48:14.412669Z

In squint async programming is a little easier due to js-await being supported

🎩 1