This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-12
Channels
- # aatree (9)
- # admin-announcements (2)
- # alda (4)
- # announcements (2)
- # beginners (87)
- # boot (218)
- # braid-chat (14)
- # cbus (2)
- # cider (19)
- # cljs-dev (17)
- # cljsjs (1)
- # cljsrn (5)
- # clojure (84)
- # clojure-android (1)
- # clojure-czech (8)
- # clojure-ireland (3)
- # clojure-madison (20)
- # clojure-poland (22)
- # clojure-russia (54)
- # clojure-sanfrancisco (1)
- # clojurescript (81)
- # clojurewest (4)
- # community-development (94)
- # conf-proposals (5)
- # core-async (199)
- # css (3)
- # cursive (68)
- # datavis (2)
- # datomic (23)
- # dysphemism (138)
- # editors (7)
- # hoplon (8)
- # jobs (8)
- # jobs-discuss (7)
- # ldnclj (2)
- # liberator (6)
- # off-topic (32)
- # om (200)
- # omnext (2)
- # onyx (88)
- # proton (58)
- # re-frame (14)
- # reagent (1)
- # ring-swagger (26)
- # yada (14)
JavaScript emitted by the ClojureScript compiler causes warnings in SpiderMonkey like “test for equality (==) mistyped as assignment (=)?" due to code like if (c = cljs.core.seq(c))
in cljs.core.extend_object_BANG_
(for example). Is there any way to avoid that with compiler or Google Closure options ?
does anyone have a good resource for styling om component
You could check the #C06DT2YSY channel @dev-hartmann
sure, thanks
@superstructor: there should be a way to turn off such warnings in SpiderMonkey - that’s perfectly valid JavaScript
> way to turn off such warnings in SpiderMonkey we used to have our own error reporter hook for spidermonkey, where we ignored certain errors
@jiyinyiyong: we don't need no stinkin' parentheses
@echristopherson: I fought against parentheses for long, here's a demo in Chrome http://repo.cirru.org/editor/
If I wrap chunks of code in (when foo … )
and then set foo
to false
in :closure-defines
, will advanced compilation remove that whole chunk of code?
I have some dev-only code that I'd love to not even end up in the production build, just to keep it smaller
@jiyinyiyong: I'm not totally sure what it is. Your first pic looked like Clojure, but this looks like JS. Is it an indent-structured way of using various languages?
or an editor that automagically translates parens and braces <-> indents
@rauh: Is that saying that type-annotating the define as a boolean will allow Closure to remove the code when it's false?
Yes. I'm not 100% sure you still need it nowadays but last I checked you need the type hint
too many clo*ure names
Ah, you do need the type hint. It's because ClojureScript emits if(cljs.core.truth_(the_value)) { … }
without the hint, and if(the_value) { … }
with it.
If I write a macro for ClojureScript and I want to refer to js/Object, how would I do that?
In this particular case I would like to write a macro to generate an Om Next (defui SomeName Object (render [this] ...))
definition where the input would be SomeName
and a list of function bodies to add after Object
.
@jannis: Your macro will return a form which will then be evaluated in the context where it's called, as if you had written that form out by hand in your CLJS. So, in this case, you'll want your macro to use the symbol 'Object
.
It doesn't have to refer to anything in the macro code, just be a symbol which will mean something in the ClojureScript code after it's expanded.
If you syntax-quote it in the macro, it'll resolve to whatever Object
means in the macro (which will be java.lang.Object
).
Unfortunately, being aware of how quoting works and getting it to work right in any particular case do not appear to correlate as well as one would like.
That's a thing macros get for free that tells them about the context in which they're called
The notation for different arities is ([...] ...) ([...] ...)
, not ([...] ... [...] ...)
.
that's how it is a system open to future extension
(same for protocols)
is cljs always being developed with the idea of making it support everything from clj-jvm?
@echristopherson: everything excluding Java-isms and concurrency stuff yes
there are some things missing for implementation reasons but these are few and far between
oh, concurrency... hmm
@aria_: Clojure has quite a few built in concurrency things not really covered by core.async
Specifically, clojurescript does not have Refs, Agents, Futures, or threads.
The CLJS version of core.async has no thread-blocking operations like <!!
and >!!
man, those look like FORTH
Can anyone point me to the state of the art for building ClojureScript for Node.js (presumably Boot rather than Lein at this point). I see several projects on GitHub claiming to be "examples" but I am really looking for a canonical one.
low hanging fruit for contributors http://dev.clojure.org/jira/browse/CLJS-1129
Interesting
I see jira isn't responsive yet