lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
rberger 2017-08-10T00:47:26.821141Z

@richiardiandrea I was looking for an easy way to be able to select a buffer or an expression, evaluate it and have it run in another emacs window.

metametadata 2017-08-10T16:16:42.213563Z

Can Schema be used in Lumo? It produces a whole bunch of warnings:

ᐅ lumo --dependencies=prismatic/schema:1.1.6   
Lumo 1.6.0
ClojureScript 1.9.671
Node.js v8.1.3
 Docs: (doc function-name-here)
       (find-doc "part-of-name-here")
 Source: (source function-name-here)
 Exit: Control+D or :cljs/quit or exit

ljs.user=> (require 'schema.core)
                     ⬆
WARNING: Use of undeclared Var schema.utils$macros/class at line 25 schema/utils.clj
                     ⬆
WARNING: Use of undeclared Var schema.utils$macros/class at line 32 schema/utils.clj
                           ⬆
WARNING: Use of undeclared Var schema.utils$macros/format at line 36 schema/utils.clj
              ⬆
...
And what is the current recommended way to provide Maven deps to Lumo scripts?

anmonteiro 2017-08-10T16:16:59.224291Z

@metametadata never tried schema with lumo

anmonteiro 2017-08-10T16:17:20.238194Z

lumo -D prismatic/schema:1.1.6 myscript.cljs ?

metametadata 2017-08-10T16:18:42.289151Z

I see

metametadata 2017-08-10T16:19:25.314838Z

I hoped maybe there's already an easier way to specify deps (e.g. smt. akin to packages.json)

anmonteiro 2017-08-10T16:19:29.317592Z

there’s no story for downloading maven deps if that’s what you’re asking

metametadata 2017-08-10T16:19:34.320864Z

right

metametadata 2017-08-10T16:19:44.326571Z

well, I looked at Calvin and cljs/tool

anmonteiro 2017-08-10T16:19:54.332346Z

you can totally have a build.boot file

anmonteiro 2017-08-10T16:19:58.334633Z

with your dependencies

anmonteiro 2017-08-10T16:20:20.347882Z

and do boot show -c > cp.txt

metametadata 2017-08-10T16:20:33.355642Z

right, or lein cp

anmonteiro 2017-08-10T16:20:33.356329Z

then lumo -c $(cat cp.txt) ...

anmonteiro 2017-08-10T16:20:35.356933Z

yeah

metametadata 2017-08-10T16:21:46.399049Z

okay. And do you have any suspicions about why Schema would not work with Lumo?..

metametadata 2017-08-10T16:23:16.453587Z

hm, I guess I don't quite understand how the compilation is different in Lumo vs. "traditional" lein-cljsbuild-based one

anmonteiro 2017-08-10T16:23:25.459023Z

uh

anmonteiro 2017-08-10T16:23:30.461884Z

the problem is macros

anmonteiro 2017-08-10T16:23:39.467465Z

in JVM ClojureScript macros are expanded in Clojure

anmonteiro 2017-08-10T16:23:43.469949Z

in Lumo there’s no Java

anmonteiro 2017-08-10T16:23:53.475667Z

macros are expanded in ClojureScript

anmonteiro 2017-08-10T16:24:05.482807Z

@metametadata so as soon as you use some java library, you’re done

metametadata 2017-08-10T16:24:14.487926Z

haha, alright, now I get it

metametadata 2017-08-10T16:24:32.498748Z

so macros should be written in "self-hosted" style?

metametadata 2017-08-10T16:25:16.524743Z

okay I'll google that. And have you tried core.spec with Lumo?

metametadata 2017-08-10T16:28:46.652404Z

I've tried it. Good news is that at least it doesn't barf on requiring the ns:

cljs.user=> (require '[clojure.spec.alpha :as s])
nil

anmonteiro 2017-08-10T16:29:00.660647Z

yeah, spec should work great

anmonteiro 2017-08-10T16:29:07.665274Z

we put a lot of effort making spec self-host compatible

metametadata 2017-08-10T16:29:31.679597Z

that's awesome, then I'll probably use it instead of Schema. Thank you!

anmonteiro 2017-08-10T16:30:03.698910Z

cool