Clojurians
#lumo
<
2017-03-17
>

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

timrichardt09:03:21

hi, i have a problem with module loading, in node

var xlsx = require('xlsx');
works while in lumo i get
osp+.trace=> (def xlsx (cljs.nodejs/require "xlsx"))
ReferenceError: cptable is not defined
any ideas?

timrichardt09:03:47

ah, i had to disable the strict loading

(.setFlagsFromString v8 "--no-use_strict")

dominicm11:03:46

Yeah, I've had to do that a couple times

timrichardt11:03:21

do you have a solution in case you want to keep the strict loading?

timrichardt11:03:08

(def cptable (js/require "xlsx/dist/cpexcel"))
still causes the ReferenceError

timrichardt11:03:21

i never did anything with node before, i have no idea how this module loading works :slightly_smiling_face:

anmonteiro15:03:10

@timrichardt if you wanna keep strict mode you have to get the issue fixed upstream in the library you're using

vikeri16:03:26

A question about scripting in lumo, planck has a bunch of helper functions built in that makes scripting easier such as parsing command line input and working with the shell etc. I know this can be done from node, but without libraries it’s very low level. Are there any facilities already in lumo for this or is it planned?

anmonteiro16:03:05

@vikeri it’s definitely a goal to have all that stuff

anmonteiro16:03:46

that said, my time is very limited, so I appreciate every bit of help I can get :slightly_smiling_face:

vikeri16:03:10

Ok, is there a lumo ns already? Sorry, haven’t looked at the code at all.

vikeri16:03:23

Could probably make a stab at some functionality.

anmonteiro16:03:32

there are several Lumo NSes

anmonteiro16:03:37

which one are you looking for?

vikeri16:03:12

Ok, no just wondering if there is a ns to add helper functions to

anmonteiro16:03:45

@vikeri hrm there are no lumo.shell or lumo.http NSes currently

anmonteiro16:03:55

there’s a but it has very limited functionality

anmonteiro16:03:25

also very specific to what I needed for compiling CLJS projects

vikeri16:03:11

Ok, I was vague, are they accesible from within the repl?

vikeri16:03:25

(require '[]) fails for me

anmonteiro16:03:02

@vikeri you may be on a previous version

vikeri16:03:49

Lumo 1.1.0

anmonteiro16:03:08

:slightly_smiling_face:

anmonteiro16:03:10

upgrade to 1.2.0

vikeri16:03:38

Weird, brew upgrade lumo gives me Error: lumo 1.1.0 already installed

anmonteiro16:03:56

I couldn’t get Lumo 1.2.0 in Homebrew

anmonteiro16:03:02

there was a problem compiling Node.js

anmonteiro16:03:18

and I’ve wanted to get 1.3.0 out but I haven’t had the time

anmonteiro16:03:16

@vikeri can you do this for now?

brew uninstall lumo
brew install --HEAD lumo

vikeri17:03:10

The install has taken about 15 minutes now and still hasn’t completed and I have to leave so I’ll skip it for now. Installing node took a looong time and the boot release command has also been going for ages. I’m on a 2014 MBP for the record.

anmonteiro17:03:47

that’s normal

anmonteiro17:03:36

we compile the entire Node.js project which takes a long time

mfikes17:03:02

Another avenue is to flesh out https://github.com/abiocljs but, TBH, there doesn't appear to be much interest in it

anmonteiro18:03:12

@mfikes I think there’s just not enough time right now

anmonteiro18:03:17

I’d love to flesh it out actually

mfikes20:03:50

Yeah, I feel the same way. It's something I'd like, but hard to find time.

richiardiandrea20:03:00

Oh nice that is good stuff

hlolli23:03:41

not sure if related to lumo, but Im getting strange macro behaviour. Dont understand this message

> {:message Could not require panaeolus.macros in file panaeolus/macros.cljs, :data {:tag :cljs/analysis-error}, :cause #object[RangeError RangeError: Maximum call stack size exceeded]}

hlolli23:03:38

ahhh, this is cyclic dependency, I think.

anmonteiro23:03:02

@hlolli also, if it’s a macros namespace it shouldn’t be .cljs

anmonteiro23:03:12

and definitely not named panaeolus.macros$macros

anmonteiro23:03:21

CLJS will insert the $macros for you

hlolli23:03:14

ok, that's exacly what I did :slightly_smiling_face:

anmonteiro23:03:16

I know, I saw the repo

hlolli23:03:43

would you use .cljc ?

anmonteiro23:03:04

you can also use cljc