Fork me on GitHub
#clojurescript
<
2016-02-20
>
venantius01:02:20

I’m working on a ClojureScript book

venantius01:02:35

publisher claims it will be done in March but that is definitely not happening

venantius01:02:44

most likely publish date would be May, possibly June

richiardiandrea01:02:32

have you guys had any problem including a specific version of a lib with cljsbuild?

richiardiandrea01:02:48

in my case is tools.reader 1.0.0-alpha3

anmonteiro01:02:59

@richiardiandrea: pasting your lein deps :tree might help

anmonteiro01:02:12

what's the problem you're having?

richiardiandrea01:02:20

because lein deps :tree looks fine, only one dep (grepping)

anmonteiro01:02:59

weird. I think I had some problems with cljsbuild wrt to dependencies too but I haven't used it in a while

anmonteiro01:02:11

and I don't remember what it was or how I solved it

anmonteiro01:02:38

sorry for not being able to help

richiardiandrea01:02:53

Yeah today I tried to build with a script but had hard time with that too, especially for a big dep tree

richiardiandrea01:02:27

Oh don't say sorry man, thanks a lot 😉

richiardiandrea01:02:06

lein classpath helps a bit (i saw a neat trick in planck) but i was still missing something, the error is in cljs-dev and I kind of gave up

jdubie01:02:42

@jaredly: is there a version of https://jaredforsyth.com/reepl/ that runs through https://github.com/swannodette/lt-cljs-tutorial? i feel like i saw that at some point but can’t find it anywhere. maybe i’m going crazy

jdubie02:02:34

awesome - thanks

echristopherson03:02:51

Wait. @jaredly that tutorial uses reepl instead of light table? Or something else?

echristopherson03:02:30

Iiinteresting. I didn't know about reepl

echristopherson03:02:39

@jaredly: I find that 1280 pixels isn't wide enough to show the whole tutorial and reepl

echristopherson03:02:05

in fact, when I opened it with my preferred browser width (which is a little less than 1280), I couldn't see the reepl part at all

jaredly03:02:37

:// yeah some recent updates to the way flexbox works looks like it’s broken the rendering

jaredly03:02:54

I’ll try and fix it today or tomorrow

echristopherson03:02:20

ok. also the reepl page itself -- on my phone I could see that it had options for vim and parinfer and something else, but I can't see those on my computer even by scrolling

echristopherson03:02:14

in chrome os x 10.9 (I know, old OS). in safari it's fine

settinghead04:02:22

is it possible to require an npm module but use it in the browser, like how it’s done in webpack and browserify?

jbaiter10:02:21

anyone using re-frame? I have the weirdest issue at the moment... I store a map in my global atom that has a vec-field. like this : {:foos ["foo" "moo" "boo"]}. Now, when I update this field (via assoc) with a map that has a different value for :foos, some of the values in the vec suddenly become nil, even though they have a value in the passed-in map. The update happens in a handler and I can see the nils in the output of the debug middleware

val_waeselynck10:02:32

@jbaiter: I'd need to see some code simple_smile also, what makes you think that this has anything to do with re-frame ?

jbaiter10:02:03

@val_waeselynck: i think it could be a bug in the debug middleware. When I inspect the actual data in the atom, there are no nils, it's just the logging output

ul11:02:54

it's not a bu, it's how diff is shown

ul11:02:44

debug uses clojure.data/diff, which shows nils in unchanged vector slots

jbaiter11:02:40

oh, i see! thank you simple_smile

octahedrion12:02:36

hey I've got the stupidest bug that I just can't see: I'm doseqing over a lazy seq for side-effects, and if I println that seq before the doseq it prints one sequence, but if I println each element within the doseq, the above println prints a different sequence!

octahedrion12:02:44

(this is in Chrome btw, and I'm printlning the time also, and the messages are sequential, if that's relevant)

mfikes12:02:35

@octo221: perhaps statefulness with the way the elements in the lazy sequence are realized?

octahedrion12:02:48

@mfikes: how so ? how can I test for that ? The sequence is a sorted lazy seq of MapEntries (sort-by val mymap)

octahedrion12:02:46

oh! I should add, it does not do it if I use a test sequence that's just a vector

mfikes12:02:02

@octo221: Just a guess at the root cause. Can you provide a minimal example in a gist?

octahedrion13:02:35

- the actual code is longer and contains a lot of canvas drawing but I simplified it, it still does it

anmonteiro13:02:45

@octo221: you could probably get away with run! which is not lazy?

mfikes13:02:37

@octo221: I’d suggest a gist that is actually runnable. Meaning involving forms that can be evaluated in a REPL.

octahedrion13:02:54

hey but anyway aren't lazy sequences supposed to output the exact same sequence regardless of what forms use their elements ?

mfikes13:02:15

@octo221: I’d be suspicious if the lazy sequence elements themselves involve side effects that could affect their own generation

mfikes13:02:43

@octo221: What you are saying is perhaps true if everything is pure

octahedrion13:02:29

the elements of the sequence are MapEntrys which are keywords and doubles

octahedrion13:02:48

and the only side-effects are canvas draws (or printlns)

octahedrion13:02:25

can't see how reading these elements could possibly affect the sequence they come from

octahedrion13:02:44

and I thought the point of immutable data was that this sort of thing was impossible!

mfikes13:02:47

@octo221: Since reasoning about lazy sequences can be difficult, a minimal example that exhibits the issue helps

octahedrion13:02:11

working on it...

vputz13:02:37

Anyone using duct/component/figwheel/emacs/windows? I'm having a devil of a time either getting hawk to do automatic code reloading using figwheel-component OR getting a separate CLJS repl under cider.

vputz13:02:23

(I can get a cljs repl running within the main cider repl, but it gives an exception at every entry, plus I have to exit it to (reset) the system under the main repl since automatic code reloading is borked)

jimmy16:02:05

hi guys, does anyone know why when I use google closure html5 history lib, setToken does set the whole path with params but when I getToken, it doesn't include params

iwankaramazow16:02:56

@nxqd: same issue here, a while ago I couldn't get anything out of getToken but a ""

iwankaramazow16:02:15

tried a lot of things, but none worked...

jimmy16:02:02

hmm, it does that someone has the same problem as mine

jimmy16:02:21

@anmonteiro: may be you do know something about this ?

hi guys, does anyone know why when I use google closure html5 history lib, setToken does set the whole path with params but when I getToken, it doesn't include params

jimmy17:02:50

@iwankaramazow: I just debug the lib and found out that it returns the location.pathname by default. In order to return the full path with parameter ( window.location.search ) we need to implement custom transformer

jimmy17:02:01

goog.history.Html5History.prototype.getToken = function() {
  if (this.useFragment_) {
    return goog.asserts.assertString(this.getFragment_());
  } else {
    return this.transformer_ ?
        this.transformer_.retrieveToken(
            this.pathPrefix_, this.window_.location) :
        this.window_.location.pathname.substr(this.pathPrefix_.length);
  }
};

iwankaramazow17:02:48

@nxqd: I tried implementing a custom transformer, but I probably screwed that up 😄 😄

iwankaramazow17:02:30

@nxqd: If you got it working, could you show me some code?

jimmy17:02:44

sure it does work now, I got the code from frontend project of circleci

jrheard23:02:25

has anyone else ever run into this problem? when i run lein cljsbuild once a-build, i just see "Compiling ClojureScript..." and no other output, and nothing is compiled

jrheard23:02:51

i think this has happened on every toy project i've ever worked on - maybe an issue with my laptop's leiningen or something?

jrheard23:02:02

just throwing this out there in case someone else has seen this behavior and knows the cause off the top of their head

jrheard23:02:01

i can usually work around the issue by doing lein cljsbuild auto a-build and making a whitespace change, but it feels bad to do simple_smile i'm sure i must be doing something wrong

richiardiandrea23:02:35

@anmonteiro: if you like drama, it looks like my profile.clj is interfering with lein cljsbuild and injects a wrong version of tools.reader

jbaiter23:02:51

is there way to get a backtrace from the closure compiler? I'm currently tryring to uberjar my project and the google closure compiler complains that it can't create an ISeq from a keyword, but I have no clue where in my code the line that causes it is

anmonteiro23:02:55

I think you can run lein without a profile by specifying -?

richiardiandrea23:02:24

oh yes, this is a solution, but but but...unexpected

richiardiandrea23:02:40

@anmonteiro: boot has pod isolation that is why I am openly switching all my projects to it ...just better for my use case...also, my project.clj is getting big -> https://github.com/Lambda-X/replumb/blob/tools-reader-bug/project.clj

anmonteiro23:02:00

so does Boot solve your immediate problems?

anmonteiro23:02:35

and makes your configuration smaller?