Fork me on GitHub
#lumo
<
2017-08-31
>
hlolli12:08:12

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

aengelberg15:08:38

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

aengelberg15:08:53

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

hlolli17:08:30

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

hlolli17:08:28

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

hlolli17:08:52

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

aengelberg17:08:32

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

aengelberg17:08:34

is that possible?

hlolli17:08:22

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

hlolli17:08:09

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

aengelberg17:08:42

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

hlolli17:08:32

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.

hlolli17:08:58

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

hlolli20:08:04

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".