lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
2017-08-21T14:43:08.000496Z

yes it looks like "unsafe-perm" didn't fix the sudo problem with global npm installation (like pointed out above)

2017-08-21T14:47:30.000205Z

attenzione: this command will succeed

sudo npm install -g lumo-cljs --unsafe-perm true 
so if someone wants to install lumo globally, this will work, as for why it didn't succeed between from the package.json config, it may be related to this https://stackoverflow.com/a/28787942/3714556

👍 1
pesterhazy 2017-08-21T17:22:50.000238Z

We're getting lumo download errors on CI maybe 20% of the time

pesterhazy 2017-08-21T17:23:24.000418Z

That's on Circle CI

richiardiandrea 2017-08-21T21:14:15.000198Z

should I be able to use the posix-getopt parser in lumo?

(def parser (new go/BasicParser "la" argv 2))
(parser.getopt)
Cannot read property 'gop_optind' of null
It looks like it does not see this? https://github.com/davepacheco/node-getopt/blob/master/lib/getopt.js#L166

richiardiandrea 2017-08-21T21:21:35.000267Z

Oh not a lumo problem I guess, this works:

(.getopt parser)
sorry for the noise

anmonteiro 2017-08-21T21:24:42.000078Z

@richiardiandrea btw Lumo ships posix-getopt

richiardiandrea 2017-08-21T21:24:49.000234Z

oh

richiardiandrea 2017-08-21T21:25:01.000231Z

good to know 😉

anmonteiro 2017-08-21T21:25:06.000125Z

or does it

anmonteiro 2017-08-21T21:25:08.000163Z

hrm

anmonteiro 2017-08-21T21:25:45.000038Z

maybe it’s not accessible anymore

richiardiandrea 2017-08-21T21:27:11.000098Z

I see it in `js.cljs` cli.js

anmonteiro 2017-08-21T21:31:36.000030Z

I know

anmonteiro 2017-08-21T21:31:37.000274Z

we use it

anmonteiro 2017-08-21T21:32:20.000106Z

but it’s probably hidden behind an IIFE wrapper at runtime so not accessible

richiardiandrea 2017-08-21T21:33:42.000324Z

kk

anmonteiro 2017-08-21T21:37:02.000037Z

I did that to prevent things from being accessible from the global scope

anmonteiro 2017-08-21T21:37:44.000478Z

anyway, if you’re looking for posix-getopt examples, feel free to check https://github.com/anmonteiro/lumo/blob/master/src/js/cli.js

richiardiandrea 2017-08-21T21:38:37.000016Z

ok thanks, that's a big opt string 😄 I was looking at https://github.com/anmonteiro/lumo/issues/235

richiardiandrea 2017-08-21T21:38:56.000462Z

and was wondering if I could pick that up

richiardiandrea 2017-08-21T21:39:26.000232Z

the problem I see is that if we want that to work the script needs to be evaluated

anmonteiro 2017-08-21T21:39:26.000314Z

definitely, should be fairly easy to tackle

anmonteiro 2017-08-21T21:39:57.000183Z

what do you mean “the script needs to be evaluated”

richiardiandrea 2017-08-21T21:40:39.000058Z

yep, I also digged into https://github.com/anmonteiro/lumo/blob/2fc9e82c6ba4116e0312687a1d6c3cfa27a91ba5/src/js/cljs.js#L435

richiardiandrea 2017-08-21T21:41:58.000107Z

yes I think I need an else there that calls the same run-main-cli-fn: https://github.com/mfikes/planck/commit/df609b182eb823dad4c531a3f16fe51f8847c598#diff-13fa1297261809d0414872aca47177beR997

richiardiandrea 2017-08-21T21:42:19.000352Z

trigger an eval basically from the else

richiardiandrea 2017-08-21T21:42:41.000144Z

would it be a good approach?