Fork me on GitHub
#lumo
<
2017-05-13
>
borkdude14:05:01

Is this the recommended way of reading stdin on ClojureScript/node?

dominicm14:05:42

@borkdude looks about right to me.

pesterhazy14:05:14

no need to require process

pesterhazy14:05:24

$ echo hi | lumo -e '(.readFileSync (js/require "fs") js/process.stdin.fd)'
#object[Buffer hi
]
? 🙂

borkdude15:05:16

There were some comments in the past about that approach: http://stackoverflow.com/a/9318276/6264

mozinator219:05:55

just have to say that Lumo is absolutely awesome ! great work everyone ! 🎉 upside_down_parrot

anmonteiro19:05:41

Thank you for using it, glad you find Lumo useful 🙂

mozinator219:05:27

looking forward to porting over my leiningen clojurescript projects to lumo

mozinator219:05:35

ditch the JVM 😛

anmonteiro19:05:46

might still be a long way out

mozinator219:05:21

it's getting there 🙂

mozinator219:05:40

this just blows my mind https://juxt.pro/blog/posts/native.html

npm i -g lumo-cljs
lumo -c src build.cljs
exp start

anmonteiro19:05:02

that’s pretty cool 🙂

dominicm19:05:36

#!/bin/bash
":" ;/# comment; exec /usr/bin/env lumo -k /tmp/.mycache "$0" "$@"

(js/console.log "hello from lumo")
^^ this works, but prints an annoying error message about not finding the path (because ;/ isn't a valid path, in node.js // is both a path and a comment!)