Fork me on GitHub

Not sure if this question goes here or in core-async, as the question is related to the cljs implementation of core.async: As there is only one thread in cljs, is it guaranteed that consecutive put! will keep the order of calling on the elements of the channel? E.g. In hasslet, the websocket client, I feel this line could cause out of order messages in clojure due to the multiple threads but maybe not in javascript? Or maybe in clojure either it wouldn’t cause out of order messages and I’m misunderstanding it?


Looking at <chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/> it seems I completely misunderstood it, and pending puts do actually keep ordering, I was confused with spawning multiple go blocks


do anyone know why (number? js/NaN) returns true? i'd expect otherwise


ask javascript. typeof(NaN) gives you "number"

🙂 6
Alex Miller (Clojure team)13:06:07

NaN is a valid IEEE 754 floating point number, just don't think about it too hard


It might also be a case of a mismatched name. Perhaps it would be better as "an undefined number".


thanks for the answers!


Ummm? Wtf?


You’re passing a single argument (a list) to distinct?


try (distinct? 1 2 3) and (distinct? 1 2 3 2)


whew, lol ok I knew there was something weird going on


Damn, how might I work something like this then? (distinct? (conj (range 10) 1))


It returns true, but I want it to process each item separately.


(apply distinct? (conj (range 10) 1))

👍 3

(or use a set if order is not important)

👍 6
☝️ 6
Jakub Šťastný21:06:55

Would garden be the "default" way of writing CSS in CLJS? I see it being mentioned a lot.


@jakub.stastny.pt_serv A lot of people just use whatever mainstream tool to write their CSS (less, sass, ...)

Jakub Šťastný22:06:34

@borkdude OK. I was using CSS modules in React. But I suppose that given the nature of garden, it has the CSS modules way of doing things included? By that I mean that there's no need to import styles from 'mystyles.css.modules; <p className={styles.showcase}>...</p>, because Garden being data, you simply pass variables around and you never get into naming problems (such as renaming a CSS class), because either it works and the compiler is happy, or if there's naming problem in a variable, then the compiler complains, so it can never go missed? So CSS modules is not a thing in Garden, because it implicitly supersedes it.


There’s a few CSS-in-JS approaches for CLJS as well. I think the modules stuff generally requires build tool support, which you can set up but is annoying in my experience