Some beginner questions…
(require '[cljs.nodejs :as node])
(def github (node/require "github"))
(def api (github.))
(def repos (.-repos api))
(.getForUser repos (js-obj "username" "mattford63"))
That gives me back a promise whilst in a Lumo repl.
Not sure how to get the result of the promise?
you can change node/require
to js/require
. Isn't a callback parameter missing for this promise (last argument of .getForUser)?
er…I don’t know.
(.getForUser repos (js-obj "username" "mattford63") (fn [res] (println res)))
does this work?
It doesn’t work but does look like I need the callback.
hi guys, I’m new in Lumo. A very basic question, how can invoke Lumo on Mac osx? #!/user/bin/env lumo
not works
I got back /user/bin/env: bad interpreter: No such file or directory
@sb What do you get when you type which lumo
thanks! I totally forget to use which.. :s
Also you should probably write #!/usr/bin/env
Yes, I used this. Not works.
I have a very quick question
#!/usr/local/bin/lumo
(require `[lumo.core :refer [*command-line-args*]])
(println "-->" (first *command-line-args*))
You had user
instead of usr
I see the tutorial.. I got back bin/birch: line 5: syntax error: unexpected end of file
plus bin/birch: line 2: unexpected EOF while looking for matching
`‘`
borkdude: ok, I check it!
@sb You used a backtick instead of a normal quote
Yes, sorry.. I copied a wrong version .. I get a same message in first with a normal quote.
#!/usr/local/bin/lumo
(require '[lumo.core :refer [*command-line-args*]])
(println "-->" (first *command-line-args*))
-> original version$ lumo
Lumo 1.5.0
ClojureScript 1.9.542
Node.js v7.10.0
Docs: (doc function-name-here)
(find-doc “part-of-name-here”)
Source: (source function-name-here)
Exit: Control+D or :cljs/quit or exit
cljs.user=> (require ‘[lumo.core :refer [*command-line-args*]])
nil
cljs.user=> (println “-->” (first *command-line-args*))
--> nil
nil
cljs.user=>
works for me
I run with that command bin/birch hello
in this case, that isn’t ok?
I saw that in the tutorial
I have no idea what birch is, sorry
birch is the file name
sorry, bin just a folder
Can’t reproduce unless you create a git repo
Ok, I create one repo for this.
Mainly.. no more file here..
here is the tutorial link, that is better: https://github.com/lambdaisland/birch
and the video: https://lambdaisland.com/episodes/building-cli-apps-with-lumo-part-1
I will find out.. I think, that is too much work for you or anybody.
Thanks for the help! 👍
it’s behind a paywall. maybe you should ask @plexus for help 🙂
good luck
🙂
Ok, I drop him a direct message. 🙂
Seems there is a #lambdaisland channel for that
Anyway, back to work…
👍