Fork me on GitHub
#clojurescript
<
2017-12-22
>
hagmonk03:12:48

phew, cljs.closure/build is quite the beast ...

mfikes13:12:03

If you have any perf-critical ClojureScript code which is driven by large outputs of iterate, repeat, or cycle, especially if reduce or transducers are used, please give this patch a try and report how it goes for you. https://dev.clojure.org/jira/browse/CLJS-2445

rauh14:12:10

@mfikes Just reviewing: Currently (realized (cycle [1 2])) returns false. In your test you now test this for true.

mfikes14:12:08

@rauh Yes, if that patch were accepted, it would be a change in behavior. It looks like Clojure addressed this here: https://github.com/clojure/clojure/commits/master/src/jvm/clojure/lang/Cycle.java I'll make a note in the ticket.

Jakub Holý (HolyJak)14:12:41

Follow-up of the previously shared article: http://techblog.telia.no/blog/from-javascript-to-clojure-script-writing-a-webshop-again/ I hope it can help others persuade their management to give Clojure(Script) a try. Feedback welcome!

koz15:12:27

@holyjak How has your experience been using NPM modules? Curious to what path you take - CLJSJS, :npm-deps, or something else?

Jakub Holý (HolyJak)15:12:33

We havent needed that yet, sorry :)

koz15:12:04

Cool, thanks for the reply. Would be interested to hear how that’s going when you get to that point.

dehli15:12:11

I’ve used both. It’s really easy to get new packages on cljsjs if you do run into any issues with :npm-deps (since it’s in very early stages)

koz15:12:49

@dehli Have often do you run into issues using :npm-deps? I’ve tried in the past and seem to have come across compilation errors pretty frequently (e.g. not being able to locate a module in node_modules) to the point where I had to revert to CLJSJS. Just wanted to get a take on some other people’s experiences, and if it’s widespread or if I’m just doing it wrong.

dehli15:12:28

Well this is my first time really using npm-deps 🙂 and none so far (but it’s a small library i’m writing with only two dependencies)

dehli15:12:03

I think cljsjs is the way to go rn for an easy development experience

koz15:12:17

Cool, thanks for your feedback!

tianshu15:12:24

which version of clojurescript support tag #Inf?

tianshu15:12:46

It's likely the newest version of core.async use this?

tianshu15:12:58

I met this when I try to play with om and figwheel.

----  Could not Read  resources/public/js/compiled/out/cljs/core/async/impl/protocols.cljs   line:988  column:14  ----

  No reader function for tag Inf

----  Reader Error : Please see resources/public/js/compiled/out/cljs/core/async/impl/protocols.cljs  ----
my dependencies are:
[[org.clojure/clojure "1.9.0"]
 [org.clojure/clojurescript "1.9.946"]
 [org.clojure/core.async  "0.3.465"]
 [org.omcljs/om "1.0.0-beta1"]
 [com.taoensso/sente "1.12.0"]]

tianshu15:12:00

It's likely this is caused by [org.clojure/clojurescript "1.9.946"], the ##Inf in cljs.core/hash function has a syntax error.😢

Jon16:12:30

@mfikes could you take a look on this?

mfikes16:12:55

@doglooksgood If you are using the latest ClojureScript you also need to ensure you are using the latest tools.reader

tianshu16:12:57

@mfikes how can I do that, by adding tools.reader as dependency?

dnolen16:12:12

@doglooksgood likely something is pulling in the wrong version

rauh16:12:23

@dnolen I wonder if it's worth it to do a little check when booting up to see if the reader understands ##Inf and then just print out a descriptive error on how to fix it. This will error will probably keep coming up for a while.

dnolen16:12:20

not really that interested

dnolen16:12:35

there’s so many different cryptic errors if you have the wrong versions of things

mfikes17:12:36

@doglooksgood Presuming you are using Leiningen, lein deps :tree will give you a sense for what's pulling things in. Then it is a matter of the Maven dependency resolution rules. You can likely either add an exclusion on the dep that is pulling in an older version or explicitly specify the dep. If you are not using Leiningen, I'd check to see how it controls deps.

rauh20:12:22

TIL: React devtools also has a "highlight updates". which flashes the elements every time they re-render. Which means I can retire my custom mixin I've had for years