lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
mattford 2017-06-09T13:18:31.446693Z

Some beginner questions…

mattford 2017-06-09T13:18:36.448320Z

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

mattford 2017-06-09T13:19:00.455754Z

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

mattford 2017-06-09T13:19:11.459114Z

Not sure how to get the result of the promise?

2017-06-09T13:22:33.525648Z

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

mattford 2017-06-09T13:24:55.573114Z

er…I don’t know.

2017-06-09T13:26:44.610364Z

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

mattford 2017-06-09T13:28:12.639793Z

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

sb 2017-06-09T14:49:25.510805Z

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

sb 2017-06-09T14:50:03.526117Z

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

borkdude 2017-06-09T14:55:45.663021Z

@sb What do you get when you type which lumo

sb 2017-06-09T14:57:24.704298Z

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

borkdude 2017-06-09T14:58:06.722026Z

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

sb 2017-06-09T15:00:42.791185Z

Yes, I used this. Not works.

sb 2017-06-09T15:01:05.801738Z

I have a very quick question

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

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

borkdude 2017-06-09T15:01:13.805115Z

You had user instead of usr

sb 2017-06-09T15:01:38.816360Z

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

sb 2017-06-09T15:01:54.823548Z

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

sb 2017-06-09T15:02:19.834111Z

borkdude: ok, I check it!

borkdude 2017-06-09T15:03:04.853595Z

@sb You used a backtick instead of a normal quote

sb 2017-06-09T15:04:41.894159Z

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

sb 2017-06-09T15:06:17.934264Z

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

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

borkdude 2017-06-09T15:06:25.937645Z

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

borkdude 2017-06-09T15:06:32.940366Z

works for me

sb 2017-06-09T15:06:48.946479Z

I run with that command bin/birch hello

sb 2017-06-09T15:06:59.950953Z

in this case, that isn’t ok?

sb 2017-06-09T15:07:06.953743Z

I saw that in the tutorial

borkdude 2017-06-09T15:07:07.953973Z

I have no idea what birch is, sorry

sb 2017-06-09T15:07:16.957398Z

birch is the file name

sb 2017-06-09T15:07:21.959512Z

sorry, bin just a folder

borkdude 2017-06-09T15:08:04.976738Z

Can’t reproduce unless you create a git repo

sb 2017-06-09T15:08:56.997820Z

Ok, I create one repo for this.

sb 2017-06-09T15:09:10.003411Z

Mainly.. no more file here..

sb 2017-06-09T15:09:55.021388Z

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

sb 2017-06-09T15:11:29.058968Z

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

sb 2017-06-09T15:11:40.063134Z

Thanks for the help! 👍

borkdude 2017-06-09T15:12:42.087901Z

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

borkdude 2017-06-09T15:12:46.089380Z

good luck

sb 2017-06-09T15:12:56.093752Z

🙂

sb 2017-06-09T15:13:23.104543Z

Ok, I drop him a direct message. 🙂

borkdude 2017-06-09T15:13:58.118395Z

Seems there is a #lambdaisland channel for that

borkdude 2017-06-09T15:14:15.125563Z

Anyway, back to work…

sb 2017-06-09T15:16:20.176301Z

👍