News for hackers. Stuff that matters.
Re:ClojureScript 1.10.741 by christophilus on Saturday April 25, 2020 @08:19AM (#22977547)
How’s the bundle size coming along? Also, I’m curious what back end most of you are using? Node with CLJS, Clojure with???, Elixir, etc?

I’m spinning up a small side project, and started it out with vanilla JS and Node. Bundle sizes are tiny, startup times are fast, lots of concurrent connections, etc... But I really don’t enjoy the ecosystem or language, so am probably going to port it over to Clojure. Clojure has spoiled me. :/

Re:ClojureScript 1.10.741 by orestis on Saturday April 25, 2020 @09:09AM (#22977809)
ClojureScript has a baseline which you cannot go under. Can’t remember the exact number but it’s something like 250k (advanced compilation but not gzipped).

For this you get the immutable data structures, and a decent chunk of the standard library, which you would use anyway.

On top of that, everything else that you get from the ClojureScript ecosystem, which is run through the Google Closure Compiler, is added incrementally. Use only one function, pay only for one (and its dependencies).

Re:ClojureScript 1.10.741 by solbloch on Saturday April 25, 2020 @12:12PM (#22979116)
Re:ClojureScript 1.10.741 by orestis on Saturday April 25, 2020 @02:06PM (#22979928)
Well, sure, for hello world! But these days anything you do with CLJS will involve the data structures, which is what brings in the dependencies :)
Re:ClojureScript 1.10.741 by didibus on Saturday April 25, 2020 @02:48PM (#22980304)
Bundle sizes have never been an issue for me. You're not really supposed to use ClojureScript for trivial JavaScript. So for anything non-trivial, bundle size of ClojureScript and pure JavaScript start to even out.

Backend is Clojure off course , though ClojureScript on the backend is starting to shape up as well, in case you're already familiar with the Node standard library and ecosystem. It can be a good alternative.

If you intend to only have trivial JS mixer in with your HTML, then better to go for a pure Clojure server side rendering with a few embedded JS snippets. Similar to what you'd do if using Ruby on Rails or Django.