This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-04
Channels
- # boot (41)
- # cljs-dev (1)
- # cljsrn (64)
- # clojure (63)
- # clojure-argentina (2)
- # clojure-austin (1)
- # clojure-russia (1)
- # clojure-spec (1)
- # clojure-uk (59)
- # clojurebridge (1)
- # clojurescript (45)
- # cursive (3)
- # datascript (7)
- # dirac (34)
- # emacs (15)
- # hoplon (1)
- # jobs-discuss (1)
- # jobs-rus (5)
- # klipse (180)
- # lumo (3)
- # om-next (1)
- # re-frame (7)
- # reagent (6)
- # ring (20)
- # specter (10)
- # testing (2)
- # uncomplicate (15)
- # untangled (39)
wrt node modules: Assuming a module exports just an object which other code expects as is. How is this supposed to handled in cljs given that modules map to namespaces which are not first class?
Hi guys! I'm pretty new to Clojure and Clojurescript, hoping to perform a switch from JS. Now it's time for me to try it out on a real project, so I've decided to take a shot with React Native and Re-Natal seems to be the best choice out there. Please cheer me up! 🙂 The Re-Natal channel is not so active as this one, so I guess I'll ask the question here, maybe someone can help... So here's the question. Re-Natal uses the 23 target android version by default, how to properly change it?
@markel, try #cljsrn
it's prtty active
learning cljs + learning reactive native together is like learning how to surf + learning how to juggle chainsaws together
yeah it'll be a nice challenge 🙂
Is this the smell of javascript at work here
(defmacro weird []
`(+ 1 (symbol "a"))) => "1a"
@pesterhazy Thanks, I'll try @qqq Well, the React Native seems to be just a set of components, magically turned into the native app... basically 🙂
How can we build better "first contact" experiences for new programmers and Clojurians? Our open source learning group is hosting the free online webinar Essential Klipse TODAY at 7 pm UTC (2 pm Eastern) to address that question. Everyone is welcome! http://discuss.thevalueoflearning.org/t/webinar-discussion-2-essential-klipse/39?u=jay
@hlolli check the transpiled output: http://app.klipse.tech/?cljs_in=(%2B%201%20%22a%22)%0A(%2B%201%20'a)
clojurescript is really just javascript with a few layers of parentheses on top
...and the power of Clojure and functional stuff, right? 🙂 I'm a big fan of FP, Haskell, Elm, Redux, etc. But I'm just bored of JS
yes of course, clojurescript is an amazing tool, but pretty soon you need to understand the host, warts and all
@hlolli I got:
cljs.user=> (+ 1 'a)
"1a"
WARNING: cljs.core/+, all arguments must be numbers, got [number cljs.core/Symbol] instead. at line 1
in lumo 🙂It's probably coming from here: https://github.com/clojure/clojurescript/blob/a3a242236e7757a179fd16dd9b86767a73a8cb5d/src/main/clojure/cljs/analyzer.cljc#L378 Let's see where that is thrown
Cljs and clj have different behavior here. Clojure lets incorrect arities or argument types pass at compile time but throws an exception at runtime, whereas Clojurescript warns about these mistakes at compile time (in static contexts) but doesn't usually throw at runtime (resulting in weak typing and padding of missing args with nils).
+
is both a macro and a function in ClojureScript
As @bronsa said, if you use the macro version you'll get that warning
However, if (+ 1 'a)
doesn't produce a warning in Lumo that's a bug
Pls open an issue :-)
We're probably not binding *print-err-fn*
no Lumo is behaving well here 🙂
lumo.repl=> (+ 1 'a)
"1a"
WARNING: cljs.core/+, all arguments must be numbers, got [number cljs.core/Symbol] instead. at line 1
Ah cool
No bug then!
So cljs.core/+
will be the function
If you use cljs.core$macros/+
you'll probably get the warning
@hlolli can you confirm that? Not at the computer atm
lumo.repl=> (cljs.core/+ 1 'a)
"1a"
WARNING: cljs.core/+, all arguments must be numbers, got [number cljs.core/Symbol] instead. at line 1
lumo.repl=> (+ 1 (symbol "a"))
"1a"
lumo.repl=>
lumo.repl=> (cljs.core$macros/+ 1 'a)
"1a"
WARNING: cljs.core$macros/+, all arguments must be numbers, got [number cljs.core/Symbol] instead. at line 1
lumo.repl=>
Thanks
A Node.js<—>CLJS interop problem I’ve asked about before but forgot the answer to, wasn’t in a position to try when I got the answer the first time I asked (now I am!), and which might be helpful for others currently who are banging their heads on related questions: If I want to write a JavaScript module in ClojureScript for interoperability with Node.js that would be consumed by standard JavaScript via ‘require' according to a loose plugin “protocol” whereby module.exports is defined as a JavaScript hash containing an implementation of specific key-value pairs (some of which resolve to functions), how might that look in my ClojureScript source code and be compiled for minimum friction? The one I have in mind requires initialize(), start() and stop() and a small number of optional priority level indicators — kind of like stuartsierra/component with benefits. Moreover this plugin framework knows nada about namespaces.