This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-02
Channels
- # aws-lambda (5)
- # bangalore-clj (1)
- # beginners (96)
- # boot (66)
- # cider (39)
- # cljsjs (2)
- # cljsrn (5)
- # clojure (265)
- # clojure-android (1)
- # clojure-france (1)
- # clojure-greece (32)
- # clojure-italy (4)
- # clojure-russia (2)
- # clojure-sg (1)
- # clojure-spec (27)
- # clojure-uk (25)
- # clojurescript (88)
- # cursive (4)
- # datomic (31)
- # emacs (96)
- # hoplon (10)
- # immutant (14)
- # jobs (2)
- # luminus (1)
- # lumo (66)
- # off-topic (128)
- # om (8)
- # om-next (2)
- # onyx (9)
- # parinfer (5)
- # re-frame (37)
- # reagent (16)
- # rum (9)
- # schema (3)
- # specter (34)
- # unrepl (8)
- # yada (21)
Built another tiny tool using lumo: https://github.com/pesterhazy/untree
such a relief not having to resort to python for something like that
speaking of which, is there a way to precompile the cljs for distribution with npm? I'd like to reduce startup time for this simple tool
$ time echo abc | untree
abc
echo abc 0.00s user 0.00s system 43% cpu 0.002 total
untree 1.86s user 0.18s system 120% cpu 1.697 total
basically the idea is to include the cljs compiler output in the npm package so that the binary only needs to run the bundle.js with node (which I imagine is significantly faster)
I'm assuming here that it's ok to ship compiled js on npm - but I'm guessing that's how much of the compile-to-js node world works (e.g. if you're using Babel/CoffeeScript/PureScript)
any pointers appreciated
@pesterhazy in true unix tradition: does it work with filepaths that have newlines in?
... looks like prepublish
is what I'm looking for? https://github.com/assaf/zombie/blob/master/package.json#L41
@dominicm emphatically not 🙂
I should add a -0
option for use with find
's -print0
option
although if you have newlines in your file names, you deserve all the broken trees in the world
@pesterhazy Calvin bundles the compiled js, you can look there for an example.
@plexus, ah cool
calvin starts in .8s so that's twice as fast
time node -e 'console.log(1 + 2)'
takes only 0.1 s so there's still room for improvement
calvin's binary is 2.1M, no wonder it takes some time to parse/run
Is there a way to use Lumo with a connected REPL via Cursive/IntelliJ? I’ve attempted to start lumo with a repl on a specific port and connect to it using a remote REPL config in IntelliJ but that doesn’t seem to work 😞
I don't think it'll work with Cursive yet, as Cursive uses nREPL as its protocol
lumo supports socket-repl, so you can connect to it via netcat or emacs's inf-clojure
No I confirm the above ☝️ it works for now only in inf-clojure
which is not an editor really 😀
Drat. Welp, thanks for confirming. What would it take to have lumo support nREPL?
@alex-dixon it would basically need to implement the nrepl protocol (which I think uses bencode for data)
I guess I should equally wonder what it would take for Cursive to support lumo’s protocol…but seems like nREPL is something like a standard in CLJ/CLJS?
I think @cfleming has looked at unrepl and might support it in the future
unrepl is a new protocol based on the socket-repl, and should eventually target lumo as welll
but it might still be a bit of work to get there
I’ve definitely talked to Colin about supporting Lumo
Lumo 1.4+ supports an undocumented --dump-sdk
option that dumps every bundled file to the filesystem
IIRC that’s everything he needed to start adding support for Lumo in Cursive
unrepl
should definitely be the supported protocol, moving things to socket repl has always been the long term target for Clojure anyways
best of all, unrepl is upgradable from socket repl, so should be a smooth addition
@pesterhazy you probably figured it out by now but still seemed a good topic for a quick blog post: https://lambdaisland.com/blog/02-05-2017-nodejs-scripts-clojurescript
perfect timing 🙂
by the way there are case-insensitive cljs regexs #"(i)e"
do you have og-tags?
so how do you write a regexp that starts with a capturing group that captures the letter i
?
sorry it's #"(?i)e"
capturing groups don't start with question marks
@alex-dixon @pesterhazy @richiardiandrea what about using tubular to connect cursive to lumo socket repl?
@cgrand, do you have a link?
hah cool, that could work
@cgrand, how's your unrepl-in-cljs work coming along?
@pesterhazy upgradable socket repl ✅
it's not here yet though right? https://github.com/cgrand/unrepl
The upgradable socket repl is in another castle repo. Lumo is supported. @mfikes got it working on a dev branch of Planck.
@pesterhazy What's missing is a cljs port of the unrepl printer.
so planck was missing a socket server altogether
lumo already had that
would this be a correct description: cljs-js-repl adds a nicer api for building unrepl on top of that?
I did see that, I guess I'm not understanding how things hang together
@pesterhazy switching to #unrepl
@dominicm how did you end up solving the shebang thing?
or was it @plexus
I don’t remember
I think this is what I’m looking for http://stackoverflow.com/a/26056686/3417023
#!/bin/sh
"exec" "/usr/bin/env" "lumo" "$0" "$@"
(println "hi" )
@alex-dixon @pesterhazy @anmonteiro Right, I definitely plan to support Lumo soon, but don’t yet sorry.
hey, no rush!