Clojurians
#lumo
<
2017-04-03
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

anmonteiro16:04:13

@dominicm I was toying a little bit yesterday with requiring asciidoctor.js

anmonteiro16:04:44

I managed to make require work just fine, but I had a problem running their “Hello, world” example

dominicm16:04:59

Interesting. Odd. I imagine opal is pretty funky.

anmonteiro16:04:28

anything that messes with global scope is weird :confused:

anmonteiro16:04:39

I had the same problem with google-closure-compiler-js

anmonteiro16:04:50

interestingly enough, I forget how I solved it

anmonteiro16:04:17

@jonpither btw your “add to classpath” change is out in Lumo 1.3.0

dominicm16:04:49

That means we don't need to copy around his scary binary and can deploy from anywhere! Yay!

dominicm16:04:56

I need to get myself an rss feed on that.

jonpither16:04:57

Thanks @anmonteiro

anmonteiro17:04:22

@dominicm if you watch the Lumo repo you’ll probably get emails for new releases

anmonteiro17:04:32

the downside is you’ll also get emails for every issue/comment/PR

dominicm17:04:40

Yeah. There is an atom feed available, but you have to type it in manually, it's not in the meta

stbgz18:04:47

@cfleming to manage dependencies you could use https://github.com/eginez/calvin

jonpither18:04:16

Mach can also suck in dependencies (shells out to boot for now) https://github.com/juxt/mach#using-clojurescript-dependencies

jonpither18:04:31

as of Lumo 1.3.0 :slightly_smiling_face:

richiardiandrea18:04:38

:point_up: this is very awesome!

anmonteiro21:04:33

@dominicm also thinking about adding an explicit command line option to Lumo to disable strict mode

anmonteiro21:04:48

looks like an useful enough shortcut

dominicm21:04:52

@anmonteiro it seems to come up a lot :slightly_smiling_face: For sure.

dominicm21:04:39

What does lumo do, differently than compiling cljs with the target of nodejs? Is the differences we see in compiled code the result of differences between bootstrapped cljs & jvm cljs?

anmonteiro21:04:12

sorry what do you mean?

anmonteiro21:04:31

the self-hosted compiler and the JVM compiler’s code emission should be the same

dominicm21:04:09

Oh. I was wondering what lumo did differently that adoc.js worked via node output.js vs lumo …

anmonteiro21:04:33

@dominicm so that’s probably because of the custom startup snapshot thingy

anmonteiro21:04:53

the Lumo startup snapshots mess with the global scope

dominicm21:04:09

@anmonteiro What is that, & what's it's purpose? (Mostly just curious here, don't spend too much time on me)

anmonteiro21:04:38

I’m more than happy to answer

anmonteiro21:04:00

the purpose of the startup snapshots are to make Lumo’s startup time really fast

anmonteiro21:04:21

they need to be in the global scope because that’s where goog stuff is written

anmonteiro21:04:21

@dominicm ^ they’re a V8 feature, you can read more about it here

anmonteiro21:04:36

that’s basically the secret sauce for why Lumo can boot so fast

anmonteiro21:04:14

let me know if you need me to clarify it further

anmonteiro21:04:33

I love discussing this stuff

anmonteiro21:04:44

also just submitted a Lumo talk to EuroClojure, hoping we get to chat in person in July!

dominicm21:04:02

@anmonteiro So, how do the snapshots conflict with other libraries (breaking their global scope?)? Must snapshots mess with global scope, or could you create a single LUMO_ONLY_PLZ var with a map in?

anmonteiro21:04:24

so the snapshot we pass to V8 is the result of compiling CLJS

anmonteiro21:04:38

everything ends up in the global scope: goog, cljs, lumo

dominicm21:04:00

It sounds like you get excited by this like how I do with general tooling (I love discussing how nrepl does X, or why tools.namespace does Y). I look forward to seeing you in July. Lumo is big enough to get a talk, I expect!

anmonteiro21:04:46

Probably worth exploring more options wrt. startup snapshots

anmonteiro21:04:49

but that shit is crazy

anmonteiro21:04:03

It took me at least 1 week to get it working before November

anmonteiro21:04:10

and once it did I didn’t touch it anymore

anmonteiro21:04:19

also the feedback loop is really slow

dominicm21:04:08

Heh, that makes sense then. I know that kind of fear :smile:. The closure compiler has a lot of global state, I often forget that, I'm always amazed by the ability to pull out vars from the browser.

anmonteiro22:04:11

@dominicm yeah. I vaguely recall messing with :output-wrapper true but that didn’t work because V8 does lazy parsing of functions

anmonteiro22:04:21

which means it didn’t shave any startup time

richiardiandrea22:04:42

Are you guys going to EuroClojure :smile: I will be in Europe and already planning a visit to Berlin!

anmonteiro22:04:06

I’ll go if my talk gets accepted

anmonteiro22:04:09

can’t justify the trip otherwise

anmonteiro22:04:39

it’s crazy that I lived in Germany until December 2016 and they decide to host EuroClojure in Berlin just after I move :disappointed:

dominicm22:04:18

I'm certain it will. Lumo is just too cool!

dominicm22:04:28

Looking forward to seeing you both.

cfleming22:04:16

@stbgz Thanks! I’ll see how hard that would be to support. What’s its uptake like among people using Lumo/Planck?

stbgz22:04:08

@cfleming growing, there are still many things left to be done, but I haven’t had the time lately :confused:

cfleming22:04:03

@stbgz Looks interesting - how does the dep resolution work?

cfleming22:04:58

That’s a brave project :slightly_smiling_face:

cfleming22:04:11

Dep resolution is a hard problem

cfleming22:04:26

Cool to see someone taking it on though

stbgz22:04:18

it’s far from complete but it’s functional

richiardiandrea22:04:50

regarding the above I actually wanted to contribute some resolved data taken with pomegranate or even directly with Maven, in order to validate the tool

cfleming22:04:36

The really complicated part is the override resolution, I think.

cfleming22:04:53

And how it combines with exclusions etc.

richiardiandrea23:04:16

Totally, I wonder if nobody actually tried, in the JS world, to just copy maven's behavior

dominicm23:04:05

I looked. Nope.

dominicm23:04:35

That's a mountain to climb. Doesn't fit into 10 lines

stbgz23:04:01

the other route is to use the same tools google closure uses to crosscompile java to js

stbgz23:04:34

and cross compile maven(or parts of it) to js

stbgz23:04:43

I wonder if we can leverage gradle somehow

richiardiandrea23:04:28

@stbgz GWT is pretty advanced, I wonder how accurate a transpilation would be

stbgz23:04:37

me too, I think it would be worth the try

stbgz23:04:22

The Javascript version of the Closure-Compiler is transpiled by GWT from the Java source. For more details on the differences in behavior see the super sourced files in the main repo. 
from the google closure-compiler-js project

stbgz23:04:42

arguably the google-closure compiler is more complex than maven