Fork me on GitHub
#clojurescript
<
2017-11-07
>
jikuja05:11:03

What are the reasons why optimization can not be whitespace when targeting for nodejs?

borkdude11:11:22

Aha: [object NodeList] is not ISeqable

borkdude11:11:15

I’m trying to add classes to svg elements manually, because our older jquery version doesn’t work here. Maybe there is something in goog.dom I could use to add classes to a list of elements

rauh11:11:37

@borkdude IIRC (prim-seq some-node-list) works

rauh11:11:44

It's cheating though, and if that function one day receives a {:pre (array? prim)} it'll start failing

mihailt11:11:38

Hi guys, can anyone suggest learning materials for ClojureScript development? Ideally in course form.

madstap12:11:30

@borkdude You could try goog.array/toArray. I've used that before to make some list-ish js thing seqable.

borkdude12:11:54

I’ve already used .forEach now which works on a node-list

vemv12:11:02

@mihailt assuming prior Clojure (language) knowledge or not?

mihailt12:11:27

@vemv some minimal, bet pretty decent in js

vemv12:11:27

haven't watched courses myself, don't know if one could reasonably jump from some minimal clj to following this vid

ericnormand13:11:36

@mihailt hey there! What kind of stuff are you looking to learn?

ericnormand13:11:06

syntax/semantics? ClojureScript setup?

mihailt13:11:25

something like quick from zero to hero stuff 😄 syntax, dom, ajax, om, reagent etc. and some setup stuff like lein, boot, figwheel etc.

ericnormand13:11:18

I'm working on something like that

ericnormand13:11:23

but it's nowhere near ready

ericnormand13:11:41

right now focused on Re-frame

ericnormand13:11:06

where are you at in terms of syntax?

ericnormand13:11:36

This one is good for learning the syntax

mihailt13:11:54

thanks will check it out

mihailt13:11:16

not sure if it's up to date though

ericnormand13:11:37

yeah, not sure

ericnormand13:11:46

things haven't changed quite that much since 2015

ericnormand13:11:57

so maybe it's okay

mihailt13:11:46

@ericnormand also Re-frame sounds great, what is your timeline on the release?

ericnormand13:11:56

I'll probably do a pre-sale next week

ericnormand13:11:28

it's going to be a big course, so it will probably be finished in December

hlolli13:11:13

someone had conflicts with embedding cljs code to a site that uses requirejs, I'm hitting this error Uncaught Error: Mismatched anonymous define() module: function and then it states that React isn't a variable. I'm guessing it's coming from react, looking at the advanced compield code

var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND"

hlolli13:11:14

ah it's coming from a react plugin I'm useing, https://github.com/wwayne/react-tooltip/blob/1daef49365f5aa9532826d22efe591498beac9f8/standalone/react-tooltip.js#L1 why are they doing this, pff, I remove it.

hlolli15:11:21

for what it's worth, https://stackoverflow.com/questions/24746175/how-can-i-disable-require-js-at-runtime prepending and appending this js code works like charm and requirejs shuts up.

nfisher16:11:12

It’s tiny but fierce. lein-nashtest for testing CLJS without namespace pollution. 🙂 https://github.com/nfisher/lein-nashtest

orestis18:11:43

Naive question: if I don't care about startup time and download size, do I gain anything else by doing the advanced optimizations of Closure? Or can I just ship exactly what I have in dev?

orestis18:11:14

E.g. Electron apps.

rauh18:11:59

@orestis It's also much slower. Production builds are 3-4x faster in execution

orestis18:11:55

@rauh Thanks, this is what I was looking for. So optimizations are indeed required.

orestis18:11:30

BTW, are there any good examples of Electron+ClojureScript apps?

derpocious19:11:02

I would really like to take a course on re-frame, just sayin.

maleghast21:11:32

Anyone about..? I have a weird issue… I have created a 3-form component in my Reagent code so that I can embed LeafletJS maps into other Reagent components. The problem is that the first time I use it it does not appear to have access to my app-state ratom. It feels as though there must be a weird order of precedence thing that I just don’t get here, but anyway… Can anyone help?

manutter5122:11:31

@maleghast you might want to post this in the #reagent channel

maleghast22:11:10

@manutter51 - Thanks, that’s a good point!

uwo22:11:13

trying to build a minimal reproduction. what’s the best way to bring in a dependency like, for instance, [org.clojure/test.check "0.9.0"]?. until now I was just working with the cljs.jar on the classpath