Fork me on GitHub
#shadow-cljs
<
2017-12-22
>
Jon02:12:09

things are different on this side in ClojureScript. when I was using CoffeeScript, it compiles to JavaScript and everything runs in JavaScript, most of the tools are fast(except for Webpack), we just start processes and kill processes like we did in Unix. That was mentally very easy.

Jon02:12:12

I still can't fit into Java world, to found Clojure starts so slowly, and ClojureScript compilation takes so much time. Again I know the author of BuckleScript, who put emphasis on performance in building his compiler.

Jon02:12:20

since it's reality that compilation takes time, I would eventually accept that fact, and change my scripts to reduce the cost in time.

Jon02:12:29

since there's cli release with a decent documentation, I would like to take a spin and see if that works in my case: replacing my npm scripts.

Jon02:12:35

clj command takes about 2s to run in my machine, that's acceptable. And it's much better than Boot visually.

Jon02:12:47

shadow-cljs takes long time to start too. It's reasonable to start a compiler with so much time, but not fast enough for scripts.

Jon02:12:21

you see, quick startup might not be significant for your cases, but it matters when someone does want to get result very quickly, like for beginners when they are learning Clojure or exploring new features. Or even for people like us, writing ClojureScript in the fractional time during job, I need to switch quickly..

Jon02:12:32

plus, I think maintaining my projects with on languages lows the mental barrier. so just trying clj to see if there's any good ideas.

Jon02:12:11

how much time doe it take to yarn install shadow-cljs on your side?

bolasblack04:12:08

I offen use lumo when I writing simple script XD

thheller08:12:31

@jiyinyiyong so my “solution” to this is just having a server running. just do a comparison. a) time yarn your-scripts b) run yarn shadow-cljs server, in another terminal time yarn your scripts. The difference should be substantial when the server is running since you only pay for startup once.

thheller08:12:48

server management itself is a bit annoying at the moment but I’m working on improving that

thheller08:12:04

so there might be a shadow-cljs start|stop|restart at some point which starts a background server so you could modify your scripts to first call start, then do all the rest, then call stop.

thheller08:12:41

alternate option is to run do everything using clojure, but I do understand the desire to use npm scripts.

thheller08:12:05

besides that I can make shadow-cljs clj-run start as fast as clj, it is slow since it wants to provide easy access to shadow-cljs itself. as soon as you are going to use anything you are going to pay for that startup time again. UNLESS you are using the server instance …

thheller08:12:21

the server instance just needs to be easier and all the problems are solved IMHO

thheller08:12:00

installing shadow-cljs takes about 20sec for me with the new AOT enabled, less than 5sec without

mhuebert14:12:01

I can’t remember… is there a way to specify :compiler-options for :release? I’d like to set :devcards true but only for dev

thheller22:12:44

yeah, {:dev {:compiler-options {:devcards true}}}

davidst16:12:02

I am getting warnings when running shadow-cljs release app from com.cognitect/transit-cljs

davidst16:12:42

version 2.0.122 of shadow-cljs and "0.8.243" of transit-cljs (the latest versions currently)