This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-27
Channels
- # bangalore-clj (1)
- # beginners (11)
- # boot (23)
- # business (2)
- # cider (43)
- # cljs-dev (65)
- # cljsjs (17)
- # cljsrn (4)
- # clojure (144)
- # clojure-austin (4)
- # clojure-berlin (3)
- # clojure-finland (4)
- # clojure-nl (2)
- # clojure-russia (13)
- # clojure-spec (73)
- # clojure-uk (42)
- # clojured (2)
- # clojurescript (166)
- # core-matrix (4)
- # cursive (24)
- # datomic (39)
- # dirac (8)
- # hoplon (97)
- # jobs (2)
- # jobs-rus (11)
- # juxt (16)
- # lein-figwheel (8)
- # leiningen (1)
- # luminus (5)
- # lumo (46)
- # off-topic (1)
- # om (39)
- # onyx (43)
- # overtone (1)
- # pedestal (3)
- # perun (6)
- # play-clj (3)
- # protorepl (14)
- # re-frame (21)
- # reagent (25)
- # remote-jobs (1)
- # ring (1)
- # robots (4)
- # rum (13)
- # specter (5)
- # untangled (72)
- # yada (62)
hi - having trouble building lumo - getting : ....> WARNING: src/node.js doesn't exist. Trying 'lib/internal/bootstrap_node.js' ....> WARNING: src/node.js doesn't exist. Trying 'lib/internal/bootstrap_node.js' ----> already patched http://node.cc ----> make Please use either Python 2.6 or 2.7 File "tools/getnodeversion.py", line 20 print '%(major)s.%(minor)s.%(patch)s'% locals() ^ SyntaxError: invalid syntax File "tools/getnodeversion.py", line 20 print '%(major)s.%(minor)s.%(patch)s'% locals() ^
@jonpither just understood what you meant previously about LUMO_ADD_CLASSPATH: I belive those are internals which already exist & are being exposed.
@jonpither The scripts may be pointing at #!/usr/bin/python
which on Arch is Python3, they may need changing to #!/usr/bin/env python2
for arch
@dominicm That's all you need right, to call addSourcePaths from inside the REPL and it would work
@jonpither If the PR is merged, yes
I wanna merge that PR eventually but it needs a ton of work
The directory structure changed recently, the Lumo globals too, and it needs tests
For the most basic functionality, yes
If it's not in the context globals, no
I'm happy to merge a PR adding just that while work on the other PR is still in progress
Even if you have a dynamic classpath, I'm struggling to 'require' symbols dynamically - I assume you can only do this at the top-level
If anyone on the channel has any ideas, let me know
I'm getting this error
@jonpither https://github.com/nexe/nexe/issues/280 looks like nexe downloads node & then executes some python to find the node version (yeah, okay). Anyway, on arch, that python is pointing at the wrong version!
https://github.com/nodejs/node/blob/master/tools/getnodeversion.py looks like python is found dynamically… https://github.com/nodejs/node/blob/813b312b0efaff3ff0301967075a8ad7ddc226a8/Makefile#L468
Try doing: alias python=python2
before running the scripts @jonpither
@malcolmsparks require
can only appear at the top of the file
TBH I think Lumo scripts could probably support dynamic require
s
but that's a Lumo capability, regular ClojureScript will never be able to support it
@anmonteiro To confirm: that does mean that even being able to modify the classpath dynamically, even just for now, doesn't mean that you can require new stuff yet?
Probably not from the same script that modifies the classpath
I didn't realize that this was your end goal, sorry
Now I'm extremely curious, what else could modifying the classpath be used for?! Also, you couldn't require another file after modifying the classpath could you?
@dominicm REPL sessions
1. Start Lumo; 2. Add something to the classpath; 3. Require it
People don't like leaving the REPL. Even if it only takes them another 200ms to start a new one 🙃
@anmonteiro raised a PR. Allows me to do the following: cljs.user=> (js/$$LUMO_GLOBALS.addSourcePaths ["aero-1.1.2.jar"]) nil cljs.user=> (require '[aero.core]) nil cljs.user=>
the goal isn't to do this like the above, but for tooling incorporating lumo to do it
looks good, will merge after CI runs
btw, anyone relying on js/$$LUMO_GLOBALS
should be aware these are internal APIs and subject to change in future versions of Lumo
ATM those are just a hack that allow me to use some functions without requiring Node stuff (because of custom startup snapshots)
@jonpither just realized that this may not fully work in some cases, esp. on windows
but that’s not your problem 🙂
we should be calling this for every source path that’s added https://github.com/anmonteiro/lumo/blob/master/src/js/util.js#L15
I’ll open an issue so that I don’t forget