Clojurians
#lumo
<
2017-08-21
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

hlolli14:08:08

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

hlolli14:08:30

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

pesterhazy17:08:50

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

pesterhazy17:08:24

That's on Circle CI

richiardiandrea21:08:15

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

richiardiandrea21:08:35

Oh not a lumo problem I guess, this works:

(.getopt parser)
sorry for the noise

anmonteiro21:08:42

@richiardiandrea btw Lumo ships posix-getopt

richiardiandrea21:08:01

good to know :wink:

anmonteiro21:08:45

maybe it’s not accessible anymore

richiardiandrea21:08:11

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

anmonteiro21:08:20

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

anmonteiro21:08:02

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

anmonteiro21:08:44

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

richiardiandrea21:08:37

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

richiardiandrea21:08:56

and was wondering if I could pick that up

richiardiandrea21:08:26

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

anmonteiro21:08:26

definitely, should be fairly easy to tackle

anmonteiro21:08:57

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

richiardiandrea21:08:19

trigger an eval basically from the else

richiardiandrea21:08:41

would it be a good approach?