Fork me on GitHub
#lumo
<
2017-06-09
>
mattford13:06:31

Some beginner questions…

mattford13:06:36

(require '[cljs.nodejs :as node])
(def github (node/require "github"))
(def api (github.))
(def repos (.-repos api))
(.getForUser repos (js-obj "username" "mattford63"))

mattford13:06:00

That gives me back a promise whilst in a Lumo repl.

mattford13:06:11

Not sure how to get the result of the promise?

hlolli13:06:33

you can change node/require to js/require. Isn't a callback parameter missing for this promise (last argument of .getForUser)?

mattford13:06:55

er…I don’t know.

hlolli13:06:44

(.getForUser repos (js-obj "username" "mattford63") (fn [res] (println res))) does this work?

mattford13:06:12

It doesn’t work but does look like I need the callback.

sb14:06:25

hi guys, I’m new in Lumo. A very basic question, how can invoke Lumo on Mac osx? #!/user/bin/env lumo not works

sb14:06:03

I got back /user/bin/env: bad interpreter: No such file or directory

borkdude14:06:45

@sb What do you get when you type which lumo

sb14:06:24

thanks! I totally forget to use which.. :s

borkdude14:06:06

Also you should probably write #!/usr/bin/env

sb15:06:42

Yes, I used this. Not works.

sb15:06:05

I have a very quick question

#!/usr/local/bin/lumo 
(require `[lumo.core :refer [*command-line-args*]])

(println "-->" (first *command-line-args*))

borkdude15:06:13

You had user instead of usr

sb15:06:19

borkdude: ok, I check it!

sb15:06:38

I see the tutorial.. I got back bin/birch: line 5: syntax error: unexpected end of file

sb15:06:54

plus bin/birch: line 2: unexpected EOF while looking for matching `‘`

borkdude15:06:04

@sb You used a backtick instead of a normal quote

sb15:06:41

Yes, sorry.. I copied a wrong version .. I get a same message in first with a normal quote.

sb15:06:17

#!/usr/local/bin/lumo 
(require '[lumo.core :refer [*command-line-args*]])

(println "-->" (first *command-line-args*))
-> original version

borkdude15:06:25

$ 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=>

borkdude15:06:32

works for me

sb15:06:48

I run with that command bin/birch hello

sb15:06:59

in this case, that isn’t ok?

sb15:06:06

I saw that in the tutorial

borkdude15:06:07

I have no idea what birch is, sorry

sb15:06:16

birch is the file name

sb15:06:21

sorry, bin just a folder

borkdude15:06:04

Can’t reproduce unless you create a git repo

sb15:06:56

Ok, I create one repo for this.

sb15:06:10

Mainly.. no more file here..

sb15:06:55

here is the tutorial link, that is better: https://github.com/lambdaisland/birch

sb15:06:29

I will find out.. I think, that is too much work for you or anybody.

sb15:06:40

Thanks for the help! 👍

borkdude15:06:42

it’s behind a paywall. maybe you should ask @plexus for help 🙂

sb15:06:23

Ok, I drop him a direct message. 🙂

borkdude15:06:58

Seems there is a #lambdaisland channel for that

borkdude15:06:15

Anyway, back to work…