Fork me on GitHub
#cljs-dev
<
2017-04-22
>
richiardiandrea02:04:15

I have been asked the (provokative) question: why do Cljs even use Google Clojure Compiler for Node if it is explicitely stated that optimization :advanced is not necessary? I did not have an answer for that so I figured I could ask you folks here 😀

martinklepsch03:04:08

@richiardiandrea advanced optimizations are not only about filesize. In many cases it also has an impact on memory usage & overall speed

richiardiandrea05:04:05

@martinklepsch I am trying to defend myself against Reason/BuckleScript and it is tough, the js code it generates is very readable and clear, almost hand-taylored: > In BuckleScript, a Hello world program generates 20 bytes JS code They use GCP as well there. Anyways thanks for the clarification!

martinklepsch05:04:57

@richiardiandrea hah, also dipping my toes in there lately but quickly ran into some tooling issues… > In BuckleScript, a Hello world program generates 20 bytes JS code Is it not the same for CLJS?

richiardiandrea16:04:49

martinklepsch: do you remember the tooling issue you had, I am probably going to face the same I guess. So far it's been difficult to find things but once found they work.

richiardiandrea16:04:19

Oh nother thing to say is that I had to contribute the repl integration in emacs

martinklepsch16:04:24

I think it came down to using yarn instead of npm. Yarn isn’t supported.

richiardiandrea16:04:25

Oh ok, now I guess it is, at least for the few things I have started

martinklepsch16:04:38

@richiardiandrea really? I got the info that yarn isn’t supported like less than 48hrs ago

richiardiandrea16:04:06

Uhm...Maybe it depends on what you do

richiardiandrea16:04:35

I will try again, I basically started something more concrete yesterday afternoon

richiardiandrea16:04:39

In any case I gathered you should use opam mostly

richiardiandrea16:04:03

(talking about ReasonML)

anmonteiro06:04:31

it's not only the same for CLJS because the printing stuff can't be dead code eliminated once you enable-console-print!, AFAICT

anmonteiro06:04:41

so it ends up being like 90KB

anmonteiro06:04:04

but that's not a very good benchmark anyway IMHO

richiardiandrea16:04:53

Surely it is not a good benchmark

richiardiandrea16:04:31

Also another objection that I hear is that the output of Cljs is not readable: I guess I have also thought about this as "it is a compiler, I don't care what it spits out as long as I can debug it" Probably the JS world is more used to the notion of step by step and I am trying to say that in Clojure you don't need that.