Earlier quoted context omitted.
The main difference is that nbb lets you execute a .cljs file straight away, without a compilation step. As such, it doesn't need any JVM tooling. You can create an AWS Lambda with only a couple of lines of code: https://blog.michielborkent.nl/aws-lambda-nbb.html
What are the language differences. What's missing in SCI's subset? Just Java stuff like deftype?
Clojure Scripting on Node.js
21–30 of 35 posts
Re: Clojure Scripting on Node.js
#22Re: Clojure Scripting on Node.js
#23Just as an FYI for the interested, there is a self-hosted version of clojurescript now, it enables macros in the same runtime with some caveats but the main downside (AFAIK) is increased bundle size, which is less relevant for node.js.
Re: Clojure Scripting on Node.js
#24Re: Clojure Scripting on Node.js
#25What is this? What is Clojure and why do you need it in node?
Re: Clojure Scripting on Node.js
#26Just as an FYI for the interested, there is a self-hosted version of clojurescript now, it enables macros in the same runtime with some caveats but the main downside (AFAIK) is increased bundle size, which is less relevant for node.js.
There was a self-hosted CLJS project for Node.js which is now abandoned. It was called lumo. It came with a custom image of Node.js with lumo built-in for better startup times since the JS bundle of self-hosted CLJS is quite large resulting in not so great startup out of the box. Nbb is just a library that you can use with any Node.js version. That said, it might be worth revisiting the self-hosted CLJS approach at s…
Re: Clojure Scripting on Node.js
#27Re: Clojure Scripting on Node.js
#28I love babashka but always find nbb scripts hard because everything returns a promise which makes the normal REPL workflow tricky.. maybe I’m doing it wrong though
Re: Clojure Scripting on Node.js
#29Earlier quoted context omitted.
It's not a javascript compiler as Clojure is a hosted language.
Can anyone explain what a hosted language is?
Re: Clojure Scripting on Node.js
#30I love babashka but always find nbb scripts hard because everything returns a promise which makes the normal REPL workflow tricky.. maybe I’m doing it wrong though
I'm not sure if this applies to nbb, but there's a command line flag for the node repl (`--experimental-repl-await`) which allows you to use await in the repl, allowing you to kind of sidestep the normal annoyance of handling promises.