This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-11
Channels
- # aleph (4)
- # beginners (68)
- # boot (21)
- # chestnut (1)
- # cljs-dev (72)
- # clojure (64)
- # clojure-austin (9)
- # clojure-dusseldorf (16)
- # clojure-gamedev (2)
- # clojure-italy (32)
- # clojure-russia (80)
- # clojure-spec (9)
- # clojure-uk (20)
- # clojurescript (105)
- # cursive (5)
- # data-science (5)
- # datomic (23)
- # defnpodcast (3)
- # emacs (22)
- # fulcro (2)
- # graphql (63)
- # hoplon (7)
- # lein-figwheel (17)
- # lumo (63)
- # mount (2)
- # nrepl (4)
- # off-topic (66)
- # om (6)
- # onyx (3)
- # portkey (54)
- # re-frame (12)
- # reagent (12)
- # specter (42)
- # uncomplicate (1)
- # unrepl (38)
- # vim (9)
- # yada (3)
Do you need to go for two step classpath specification:
$ lein classpath > cp.cljs
$ lumo -c `cat cp.txt` myscript.cljs
You can do it as one via:
$ lumo -c `lein classpath` myscript.cljs
@dotemacs sure can but you're then paying the lein startup cost
Kinda defeats the purpose of having a fast starting REPL
The huckleberry
project does that for you in non-JVM way. It is an alternative. @stbgz and I where talking about transpiring Aether but nobody has had the time so far
If I knew someone who could use intellij, I'd get them to figure out where the actual code was
I have IntelliJ installed
but I never opened it
Hi. Is there any way to require namespace dynamically? It looks like Lumo doesn't like (require ...)
not at the top of the file. I want to require all the namespaces from the specified path somehow (it's something like a folder of migration files written in CLJS).
@metametadata can you give me a concrete example of what you’re trying to achieve?
@anmonteiro Yes. Assuming there's a folder migrations/
: a.cljs, b.cljs, .... I want a function or a macro: (get-migrations "migrations/")
which would return me, say, the next vector: [migrations.a/up migrations.b/up ...]
. Here up
functions are assumed to be defined in every migration ns
@metametadata you may be able to do what you want with lumo.core/eval
hm, indeed
e.g.
(def my-ns 'clojure.set)
(lumo.core/eval `(require '~my-ns))
awesome, thanks!
plus I saw some functions to list files in lumo's bundled/ folder. Hopefully these can be combined
there’s a file-seq
somewhere
right
just require that namespace if you know what you’re doing
they’re bundled with Lumo but not in the snapshot
@metametadata curious to hear what you’re using Lumo for
I’ve had a couple cool testimonials at ClojuTRE
at the moment it's about automating Kubernetes deployments from Jenkins
yeah, it's much better than bash 🙂
also I used it here as a simplistic alternative to pyinvoke/makefile: https://github.com/metametadata/clj-fakes/blob/master/tasks.cljs
nice!
I love hearing about these, keep me updated
I whipped up a lumo script to automatically append pivotal IDs to git commit messages. Works like a charm 🙂
@metametadata also, I’ve been quite busy recently, but I know those __filename
and SIGINT issues are annoying
I’ll have a look at them soon
thanks! they're not blocking for me but would be nice to have
@kidpollo lumo can run clojure.test
directly
standard clojure api (`run-tests`)
cljs.user=> cljs.test/run-tests
:arrow_up:
WARNING: No such namespace: cljs.test, could not locate cljs/test.cljs, cljs/test.cljc, or JavaScript source providing "cljs.test" at line
@kidpollo it is odd, did you require it with :require-macros
?
Lumo 1.7.0
ClojureScript 1.9.924
Node.js v8.4.0
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Exit: Control+D or :cljs/quit or exit
cljs.user=> (require '[cljs.test :as t])
nil
cljs.user=> (t/run-tests)
Testing cljs.user
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
nil
cljs.user=>
also, if it is still not working maybe some fix is coming up, Antonio has been fixing things like crazy and some work might be either in progress or coming to master
^ this should work at the REPL currently
this is a game changer! thanks so much @anmonteiro
glad you enjoy it
@kidpollo how did you come to know about Lumo?
Heard about it first from @kenny since I was already experimenting with cljs node and boot apps.
ended up using Lumo
repo as inspiration for the test runner lumo -c test:src scripts/test.cljs
Hey @anmonteiro does lumo provide a way to compile scripts into binaries much like itself?
does not
there might be a way of achieving that in the future
just don’t expect it anytime soon
unless someone works on it
I won’t