Fork me on GitHub

@cgrand no, but it should be possible 1) compile the cljs into a bundle and then 2) use browserify or whatever to bundle that into a single self-standing js file


@pesterhazy I think the magic of Lumo is that it gets the cljs startup time into a reasonable boundary by using aggressive caching.


@dominicm it'll always be slower to run everything through the cljs compiler at runtime (via lumo) than compile ahead of time


I'm not 100% certain of that. Isn't there some serious v8 caching going on in lumo?


@dominicm isn’t this the same thing but one layer below? AOT Cljs to js is faster than JIT Cljs AOT js to native is faster than JIT js


@cgrand Lumo uses this to start cljs fast: and I think there's some work involved in getting cljs to play nicely with it.


@dominicm ok my “native” was a bit handwavy 🙂


lumo doesn’t snapshot everything


that’s why source code is split between bundled and snapshot directories.


No, sure. I was just of the impression that there was a lot more magic to it than being able to compile cljs->js aot & still be fast enough.


There may be. Snapshotting is definitely not a free lunch otherwise there wouldn’t be the split, everything would go into snaphsot


I think it's work to get code to be compatible. No free lunch, that's why we get to piggieback on Antonio's free work 😄


btw folks, there is a patch in progress on packing "executables" with lumo - would be really great to finish it up as library probably (if possible):


yup I'm going to make a seperate npm package for this code. I spent 2 weeks straight on this, was able to create binary but there are many details to think about. If one is serious about creating executeable then compileing cljs to js and take that code and pkg it would be the fastest and cleanest solution, but then we loose the cljs repl. The "problem" with my solution, is that it takes prod-npm deps (all :dependencies from package.json) and bundles it and patches the node module loader to read base64 and evaluate it. It works but is not clean. (beautiful thing about my code is that it only bundles the cljs aot's, so it should be from clean cljs code fast startup).


Awesome work! What was the exe size? Just curious simple_smile


Not counting the database file I embedded, then it was the size of lumo plus <2Mb