lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
dotemacs 2017-09-11T06:17:27.000120Z

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

anmonteiro 2017-09-11T15:46:02.000192Z

@dotemacs sure can but you're then paying the lein startup cost

anmonteiro 2017-09-11T15:46:30.000533Z

Kinda defeats the purpose of having a fast starting REPL

richiardiandrea 2017-09-11T17:33:51.000185Z

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

stbgz 2017-09-11T17:35:26.000691Z

@dotemacs see https://github.com/eginez/calvin

dominicm 2017-09-11T17:50:32.000277Z

If I knew someone who could use intellij, I'd get them to figure out where the actual code was

anmonteiro 2017-09-11T18:27:12.000071Z

I have IntelliJ installed

anmonteiro 2017-09-11T18:27:19.000429Z

but I never opened it

metametadata 2017-09-11T18:32:51.000393Z

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

anmonteiro 2017-09-11T18:39:24.000096Z

@metametadata can you give me a concrete example of what you’re trying to achieve?

metametadata 2017-09-11T18:42:17.000379Z

@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

anmonteiro 2017-09-11T18:43:58.000419Z

@metametadata you may be able to do what you want with lumo.core/eval

metametadata 2017-09-11T18:45:01.000595Z

hm, indeed

anmonteiro 2017-09-11T18:45:13.000249Z

e.g.

(def my-ns 'clojure.set)
(lumo.core/eval `(require '~my-ns))

metametadata 2017-09-11T18:46:40.000294Z

awesome, thanks!

metametadata 2017-09-11T18:47:28.000278Z

plus I saw some functions to list files in lumo's bundled/ folder. Hopefully these can be combined

anmonteiro 2017-09-11T18:47:49.000144Z

sure

anmonteiro 2017-09-11T18:47:55.000062Z

there’s a file-seq somewhere

metametadata 2017-09-11T18:48:03.000024Z

right

anmonteiro 2017-09-11T18:48:10.000159Z

just require that namespace if you know what you’re doing

anmonteiro 2017-09-11T18:48:17.000487Z

they’re bundled with Lumo but not in the snapshot

anmonteiro 2017-09-11T18:48:25.000227Z

@metametadata curious to hear what you’re using Lumo for

anmonteiro 2017-09-11T18:48:34.000420Z

I’ve had a couple cool testimonials at ClojuTRE

metametadata 2017-09-11T18:49:21.000671Z

at the moment it's about automating Kubernetes deployments from Jenkins

anmonteiro 2017-09-11T18:49:32.000307Z

💥

metametadata 2017-09-11T18:50:17.000324Z

yeah, it's much better than bash 🙂

metametadata 2017-09-11T18:51:18.000189Z

also I used it here as a simplistic alternative to pyinvoke/makefile: https://github.com/metametadata/clj-fakes/blob/master/tasks.cljs

anmonteiro 2017-09-11T18:52:07.000199Z

nice!

anmonteiro 2017-09-11T18:52:18.000200Z

I love hearing about these, keep me updated

😊 1
john 2017-09-12T19:49:04.000060Z

I whipped up a lumo script to automatically append pivotal IDs to git commit messages. Works like a charm 🙂

anmonteiro 2017-09-11T18:53:23.000324Z

@metametadata also, I’ve been quite busy recently, but I know those __filename and SIGINT issues are annoying

anmonteiro 2017-09-11T18:53:27.000029Z

I’ll have a look at them soon

metametadata 2017-09-11T18:54:38.000638Z

thanks! they're not blocking for me but would be nice to have

2017-09-11T20:07:36.000157Z

Hola! Great work on lumo! I made a toy script to try it out and works great!

2017-09-11T20:07:56.000519Z

I would love to run the tests for the script I wrote also

2017-09-11T20:08:10.000312Z

is there a way to run tests directly with lumo?

richiardiandrea 2017-09-11T20:08:37.000401Z

@kidpollo lumo can run clojure.test directly

richiardiandrea 2017-09-11T20:08:48.000007Z

standard clojure api (`run-tests`)

2017-09-11T20:14:26.000001Z

ahhh not but not cljs.test/run-tests ?

2017-09-11T20:15:29.000238Z

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

2017-09-11T20:17:42.000434Z

(clojure.test/run-tests) isnt there either

richiardiandrea 2017-09-11T20:28:20.000210Z

@kidpollo it is odd, did you require it with :require-macros?

richiardiandrea 2017-09-11T20:28:53.000405Z

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=> 

2017-09-11T20:29:35.000321Z

yeah I am doing something weird

richiardiandrea 2017-09-11T20:31:08.000325Z

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

anmonteiro 2017-09-11T20:48:12.000206Z

^ this should work at the REPL currently

2017-09-11T20:58:08.000110Z

yeah I had a couple typos

2017-09-11T20:58:18.000315Z

it works just fine nvm 😄

2017-09-11T20:58:53.000070Z

this is a game changer! thanks so much @anmonteiro

anmonteiro 2017-09-11T21:00:59.000206Z

glad you enjoy it

anmonteiro 2017-09-11T21:01:07.000104Z

@kidpollo how did you come to know about Lumo?

2017-09-11T21:02:54.000009Z

Heard about it first from @kenny since I was already experimenting with cljs node and boot apps.

2017-09-11T21:03:20.000121Z

also saw the clojure tre talk

2017-09-11T21:03:59.000075Z

ended up using Lumo repo as inspiration for the test runner lumo -c test:src scripts/test.cljs

2017-09-11T21:04:20.000581Z

works fine

2017-09-11T21:06:12.000176Z

Hey @anmonteiro does lumo provide a way to compile scripts into binaries much like itself?

anmonteiro 2017-09-11T21:06:25.000086Z

does not

2017-09-11T21:06:52.000309Z

Is it a feature worth exploring? I think it is 😛

anmonteiro 2017-09-11T21:06:56.000506Z

there might be a way of achieving that in the future

2017-09-11T21:07:05.000216Z

awesome

anmonteiro 2017-09-11T21:07:17.000101Z

just don’t expect it anytime soon

anmonteiro 2017-09-11T21:07:22.000383Z

unless someone works on it

anmonteiro 2017-09-11T21:07:26.000129Z

I won’t