lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
swizzard 2017-11-25T19:11:04.000034Z

hey! i just started using lumo & i really like it

swizzard 2017-11-25T19:11:18.000006Z

but i'm uncertain how to add cljs dependencies to my project

mfikes 2017-11-25T19:20:33.000033Z

@swizzard They are handled just as with regular ClojureScript: Depend on JAR files on the classpath. Lumo has a -c / --classpath argument, as well as -D / --dependencies argument, which provides some sugar for specifying the classpath

swizzard 2017-11-25T19:20:54.000024Z

hm ok

swizzard 2017-11-25T19:21:40.000055Z

i've never done any cljs really, and i've only ever used lein

mfikes 2017-11-25T19:21:43.000014Z

Lumo is practically identical to Planck with respect to this, so much of the material at http://planck-repl.org/dependencies.html is likely relevant

swizzard 2017-11-25T19:27:02.000055Z

sorry to be kind of dense about this, but:

swizzard 2017-11-25T19:27:37.000093Z

i'm downloading boot so i can use boot -d as suggested by the planck docs

mfikes 2017-11-25T19:28:25.000064Z

Yeah, you can use boot, or if you are more comfortable doing so, you can use lein to download deps

mfikes 2017-11-25T19:28:45.000035Z

(boot just happens to have some nice syntax to do that directly on the command line)

swizzard 2017-11-25T19:29:03.000064Z

well it's not a bad time to learn boot i guess

mfikes 2017-11-25T19:29:39.000105Z

No need to learn all of boot, just to download a dep using it πŸ™‚

swizzard 2017-11-25T19:29:57.000043Z

well i'd like to have a documented/repeatable thing

swizzard 2017-11-25T19:30:19.000105Z

like lein has a project.clj where the deps go

swizzard 2017-11-25T19:30:58.000075Z

i'm not necessarily planning on distributing this as a library or even necessarily running it more than like once

swizzard 2017-11-25T19:31:08.000045Z

but it's good to like document stuff

swizzard 2017-11-25T19:32:01.000091Z

i'm a python guy at heart and feel uncomfortable without a requirements.txt-equivalent

swizzard 2017-11-25T20:13:38.000051Z

i'm sorry to keep being such a dummy, but

swizzard 2017-11-25T20:13:44.000032Z

i've downloaded specter using boot -d

swizzard 2017-11-25T20:14:38.000072Z

but i can't require it in my lumo repl

swizzard 2017-11-25T20:15:13.000007Z

because .m2/repository/com/rpl/specter/1.0.5 only has jars

swizzard 2017-11-25T20:16:05.000014Z

and the repl keeps asking for com/rpl/specter.cljs/`com/rpl/specter.cljc`

swizzard 2017-11-25T20:17:41.000056Z

should i just clone the source?

borkdude 2017-11-25T20:40:16.000086Z

@swizzard I’m not sure, but I think you should apply the same trick as with Planck here: https://blog.michielborkent.nl/blog/2016/10/19/one-off-clojure-libraries/

borkdude 2017-11-25T20:40:25.000014Z

(blog is a year old, so things may have changed)

borkdude 2017-11-25T20:43:00.000085Z

Seemed still valid a couple of months ago: https://clojurians-log.clojureverse.org/lumo/2017-06-15.html

swizzard 2017-11-25T20:49:44.000044Z

cljs.user=> (require '[com.rpl.specter :as s])
Could not require com.rpl.specter.navs in file com/rpl/specter.cljc
         (new)
         Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:1928:72)
         Function.cljs.analyzer.error.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2539:92)
         Function.cljs.js.require.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:5849:145)
         Function.cljs.js.load_deps.cljs$core$IFn$_invoke$arity$7 (NO_SOURCE_FILE <embedded>:5859:507)
         (NO_SOURCE_FILE <embedded>:5860:420)
         Function.cljs.js.require.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:5838:1)
         Function.cljs.js.load_deps.cljs$core$IFn$_invoke$arity$7 (NO_SOURCE_FILE <embedded>:5859:507)
         (NO_SOURCE_FILE <embedded>:5860:420)
         Function.cljs.js.require.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:5838:1)

Maximum call stack size exceeded
         Function.lumo.repl.print_error.cljs$core$IFn$_invoke$arity$2 (NO_SOURCE_FILE <embedded>:6385:96)
         Object.lumo.repl.handle_error (NO_SOURCE_FILE <embedded>:6390:60)
         (NO_SOURCE_FILE <embedded>:6515:177)
         (NO_SOURCE_FILE <embedded>:6014:340)
         (NO_SOURCE_FILE <embedded>:5904:425)
         (NO_SOURCE_FILE <embedded>:5918:218)
         (NO_SOURCE_FILE <embedded>:5863:211)
         (NO_SOURCE_FILE <embedded>:5842:36)
         (NO_SOURCE_FILE <embedded>:6014:340)
         (NO_SOURCE_FILE <embedded>:5904:425)

swizzard 2017-11-25T20:49:47.000026Z

😞

mfikes 2017-11-25T21:01:26.000025Z

@swizzard https://github.com/nathanmarz/specter/issues/72 There is an older version of Specter which worked with self-hosted ClojureScript IIRC

mfikes 2017-11-25T21:07:14.000074Z

@swizzard

$ lumo -qD com.rpl/specter:0.12.0
cljs.user=> (require '[com.rpl.specter :as s])
nil

swizzard 2017-11-25T21:07:30.000050Z

oof

swizzard 2017-11-25T21:07:44.000061Z

ok

swizzard 2017-11-25T21:08:09.000006Z

the latest version is 1.0.5

swizzard 2017-11-25T21:08:15.000071Z

πŸ˜•

mfikes 2017-11-25T21:08:48.000003Z

Yeah, but 0.12.0 was about a year ago, which is about the lifetime of self-hosted ClojureScript in the general scheme of things πŸ™‚

swizzard 2017-11-25T21:08:57.000061Z

alas

mfikes 2017-11-25T21:09:19.000008Z

In other words, 0.12.0 is probably OK if you are just messing around

swizzard 2017-11-25T21:09:26.000053Z

fair enough

mfikes 2017-11-25T21:10:02.000068Z

Or, once you've mastered this stuff, contribute the changes needed to make it work 😜

swizzard 2017-11-25T21:11:35.000053Z

all i wanted was to use brain.js to make names for a tracery-based nanogenmo project

anmonteiro 2017-11-25T21:30:48.000013Z

For people looking to help out in Lumo, there’s only 1 pending task to do before releasing 1.8

anmonteiro 2017-11-25T21:31:20.000052Z

I’d like to add a lumo.build.api/watch function. Should be the same as cljs.build.api/watch (just swapping out all the JVM APIs with Node.js’s)