Fork me on GitHub
#clojurescript
<
2016-11-04
>
mikekap00:11:35

@dnolen yea I figured that’s what should happen, but I’m not seeing where that would be enforced @ https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/compiler.cljc#L1438

dnolen00:11:19

@mikekap are you just curious or you’ve found a bug?

mikekap00:11:11

well i had a flaky build happen that said that cljs.test was missing symbols like report

dnolen00:11:35

seems unrelated

mikekap00:11:43

said build uses compile-root directly

dnolen00:11:07

right you’re on your own if you do stuff like that

dnolen00:11:42

just search cljs.closure for cljc, you’ll find code that chooses cljs over cljc

mikekap00:11:31

thanks - would it be worth filing the bug that compile-root doesn’t use those?

dnolen00:11:47

nothing in that namespace is public unless stated somewhere

dnolen00:11:21

if you want to see something be officially supported propose something for cljs.build.api

mikekap00:11:10

does cljs.compiler.api not qualify?

dnolen00:11:42

yes all the api namespaces qualify - you hadn’t said what you were using

dnolen00:11:21

also if you want this - a patch is most welcome 🙂

mikekap00:11:51

yes sorry - i am - the function is called compile-root in both api an non-api

dnolen00:11:33

yes compile-root is naive, just grabs everything

escherize05:11:43

Does cljs use vectors instead of clojure.lang.MapEntryies?

escherize05:11:53

This is part of the same question: is there a way (in cljs) to differentiate between (second {:a 1 :b 2}) and [:b 2]

escherize05:11:51

It appears that cljs uses cljs.core/PersistentVectors instead. So maybe they're indistinguishable?

pastafari09:11:50

@escherize isn’t that too low-level a distinction? In what way are you trying to differentiate between those two things?

dnolen12:11:37

@escherize not distinguishable - but not for any particular reason other then that was how it was originally implemented in CLJS

Pablo Fernandez15:11:11

How do I call new on something that’s not a symbol, such as (.-ec elliptic)?

dnolen15:11:54

@pupeno I thought we relaxed this in the latest releases

Pablo Fernandez15:11:24

I’m running 1.9.229

anmonteiro15:11:21

I thought I had opened a JIRA ticket for that, but I can't find it

anmonteiro15:11:46

@dnolen oh we talked about it but I never did do anything it seems. As per our previous discussion, I'm going to close this: http://dev.clojure.org/jira/browse/CLJS-693 and open a new ticket for relaxing the symbol constraint

anmonteiro15:11:22

that sound good?

dnolen15:11:21

@pupeno so you’ll just have to wait

Pablo Fernandez15:11:35

ok, no problem @dnolen 🙂

anmonteiro16:11:02

@pupeno: FWIW, a workaround is store the result of that in a local var and call new on that instead

rafaelzlisboa17:11:49

what’s the difference between (ns something.whatever (:require [this.between.brackets])) and (ns something.whatever (:require this.without.brackets))?

nberger18:11:22

@rafaelzlisboa there's no difference AFAIK. Well, as shown by Stuart Sierra in https://stuartsierra.com/2016/clojure-how-to-ns.html there is a visual difference so vector is usually preferred :) > Put every :require’d namespace in a vector (square brackets) even if it doesn't have an :as or :refer. This makes visual scanning and sorting easier.

dnolen19:11:43

@rafaelzlisboa yes, no difference