lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
2017-08-31T12:52:12.000352Z

Yesterday I was able to run instaparse on lumo and added it to a clojar, if someone's interested to try it out https://clojars.org/instaparse-lumo

👍 2
aengelberg 2017-08-31T15:59:38.000500Z

@hlolli thanks for doing that. where is the code for that fork?

aengelberg 2017-08-31T15:59:53.000395Z

looks like the clojars page is still pointing to the regular instaparse project.

2017-08-31T17:33:30.000530Z

@aengelberg my bad, forgot to change to project.clj metadata. The fork is here https://github.com/hlolli/instaparse-lumo

aengelberg 2017-08-31T17:33:37.000436Z

cool

2017-08-31T17:34:28.000103Z

I removed some of the reader macros and clj side, very hard coded and rough

2017-08-31T17:34:52.000371Z

but should be possible to make the upstream lumo compatible...

aengelberg 2017-08-31T17:35:32.000551Z

maybe. it seems like the tough part is to write macros that behave differently on clj vs cljs

aengelberg 2017-08-31T17:35:34.000671Z

is that possible?

2017-08-31T17:38:22.000192Z

hmm, good question, I would guess on compilation time (or cache generation for lumo) then the reader macros are respected.

2017-08-31T17:39:09.000258Z

its still bit confuseing to me, how clojurescript treats clj macros and .clj files.

aengelberg 2017-08-31T17:40:42.000648Z

having instaparse work on all three platforms (clj, cljs, and bootstrapped cljs) is a difficult problem when macros are involved

2017-08-31T17:50:32.000026Z

I think it doesn't have to be, I think the macros dont need any reader macros like this one here https://github.com/Engelberg/instaparse/blob/master/src/instaparse/core.cljc#L274 not sure why this works in non-bootstraped clojurescript.

2017-08-31T17:52:58.000509Z

If I understand lumo correctly, it treats macros and clojure data the same and caches it, but will ignore all clojure reader macros.

2017-08-31T20:33:04.000235Z

Im haveing a problem that I can only describe, I'm using js/require like I do often without problems, but on a js file that I didn't write. From the namespace that the js/require call is made, everything works fine, as soon as I require that namespace from a 3rd party namespace, I start getting 'cannot read property of undefined' errors. Are there alternative ways to load js files, or ways to expose the file contents more "global".