Clojurians
#lumo
<
2017-08-10
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

rberger00:08:26

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

metametadata16:08:42

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?

anmonteiro16:08:59

@metametadata never tried schema with lumo

anmonteiro16:08:20

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

metametadata16:08:25

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

anmonteiro16:08:29

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

metametadata16:08:44

well, I looked at Calvin and cljs/tool

anmonteiro16:08:54

you can totally have a build.boot file

anmonteiro16:08:58

with your dependencies

anmonteiro16:08:20

and do boot show -c > cp.txt

metametadata16:08:33

right, or lein cp

anmonteiro16:08:33

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

metametadata16:08:46

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

metametadata16:08:16

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

anmonteiro16:08:30

the problem is macros

anmonteiro16:08:39

in JVM ClojureScript macros are expanded in Clojure

anmonteiro16:08:43

in Lumo there’s no Java

anmonteiro16:08:53

macros are expanded in ClojureScript

anmonteiro16:08:05

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

metametadata16:08:14

haha, alright, now I get it

metametadata16:08:32

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

metametadata16:08:16

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

metametadata16:08:46

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

anmonteiro16:08:00

yeah, spec should work great

anmonteiro16:08:07

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

metametadata16:08:31

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