Hacker News new | ask | show | jobs
by christophilus 2288 days ago
I’m spinning up a few new projects at the moment, and was sooo close to doing them in ClojureScript. I ended up going with JavaScript, Preact, and Rollup just because of familiarity allowing me to move faster. That, and my build times are sub-second, something that was not true of my previous Webpack and typescript projects. My total application bundle size is still smaller than React alone.

ClojureScript is really good, though, I gotta say. How are your production bundle sizes? Are you using shadowcljs? If not, what tooling are you using? Also, what editor? I’m a VSCode guy, and last time I used Clojure (a year or more ago), Calva wasn’t up to snuff. I wonder if that’s changed.

1 comments

> How are your production bundle sizes?

Application I'm working on is not that complex, 20 something different pages with multiple sub-sections themselves, bundle ends up being 1.5MB or something like that, 300kb gzipped. Main weight comes from using multimethods which pulls in a lot of cljs.core, so not using that would make it a lot smaller.

Also gonna start splitting the bundle per page but haven't yet.

> Are you using shadowcljs? If not, what tooling are you using?

No, using figwheel-main, project was started before shadowcljs starting to look as good as it looks today. Starting a project today I would probably look into shadow-cljs first. But we're not using any npm dependencies, but shadow-cljs seems to have better introspection properties than figwheel-main (like seeing partitions of bundle size easier, we're currently doing it by looking at the sourcemaps...)

> Also, what editor?

Using vim + fireplace which been working really well for me.

> Calva wasn’t up to snuff. I wonder if that’s changed

Haven't used Calva myself but tons of people in the community swear by it, so I'm thinking it's been improving since the last time you tried it.

I'm not sure when was the last time you tried Calva but Calva been in at least two Clojurists Together (https://www.clojuriststogether.org/) funding cycles, so if you tried it before mid-2019, give it a try again (and report back :) )

IntelliJ with Cursive is a very good Clojure IDE.
Tried it out before (and your comment actually triggered me to try it out again just to see) but I'm struggling to find anything it does that vim + fireplace doesn't do while vim is way faster and takes less screen-estate so I can have my browser + editor side-by-side.