[ClojureScript] defonce to undefined
(defonce foo js/undefined) => nil (defonce foo 1) => 1 I put my initialization code to init! and did (defonce _ (init!)) to be called only once. But incidentally, init! called a javascript function that returns nothing(undefined) as the last statement, and init! ran every time I evaluate it! Hope this post can save someone's precious time :) -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Best way to write React Native ui in cljs?
>From the man himself! If you can't spot the sucker at the table, it's you; >since I can't find it I guess I'm writing it :) -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Best way to write React Native ui in cljs?
Hey Daniel, My guess is that nobody is working on this yet, at least for use with Om. I'm also curious as to whether om.next will ultimately be required (and whether this matters). (So far, I've just made do with some very simple helper functions.) - Mike > On Jun 5, 2015, at 8:12 PM, Daniel Bell wrote: > > Hiccup/sablono has been the gold standard for html; is there anything similar > for React Native elements? If not, is anyone working on it? > > -- > Note that posts from new members are moderated - please be patient with your > first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] Best way to write React Native ui in cljs?
Hiccup/sablono has been the gold standard for html; is there anything similar for React Native elements? If not, is anyone working on it? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Filed in http://dev.clojure.org/jira/browse/CLJS-1299 Thanks for the quick feedback. On Fri, Jun 5, 2015 at 9:51 AM David Nolen wrote: > Please file a bug in JIRA for the first case. > > Thanks! > David > > On Fri, Jun 5, 2015 at 8:22 AM, Francis Avila > wrote: > >> Your first issue with cljs.reader looks like a bug. >> >> Your second issue is because clojure/java has a distinct char type but >> clojurescript/javascript does not. In cljs, the character literal syntax >> produces a one-character string, but in clj it produces a 16-bit unsigned >> int interpreted as a utf-16 character. >> >> -- >> Note that posts from new members are moderated - please be patient with >> your first post. >> --- >> You received this message because you are subscribed to the Google Groups >> "ClojureScript" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojurescript+unsubscr...@googlegroups.com. >> To post to this group, send email to clojurescript@googlegroups.com. >> Visit this group at http://groups.google.com/group/clojurescript. >> > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Please file a bug in JIRA for the first case. Thanks! David On Fri, Jun 5, 2015 at 8:22 AM, Francis Avila wrote: > Your first issue with cljs.reader looks like a bug. > > Your second issue is because clojure/java has a distinct char type but > clojurescript/javascript does not. In cljs, the character literal syntax > produces a one-character string, but in clj it produces a 16-bit unsigned > int interpreted as a utf-16 character. > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] Re: ANN: ClojureScript 0.0-3308, fixes & enhancements
On Monday, June 1, 2015 at 8:47:51 PM UTC+2, David Nolen wrote: > ClojureScript, the Clojure compiler that emits JavaScript source code. > > > README and source code: https://github.com/clojure/clojurescript > > > Leiningen dependency information: > > > [org.clojure/clojurescript "0.0-3308"] > > > This release bumps the Clojure dependecy to 1.7.0-RC1 and includes fixes and > minor > enhancements. > > > As always feedback welcome! > > > ## 0.0-3308 > > > ## Changes > * Clojure 1.7.0-RC1 dependency > * CLJS-1292: Add IPrintWithWriter implementation for TaggedLiteral > * add cljs.core/random-uuid > * flush immediately when forwarding Node process out & err > * CLJS-1256 cache UUID hash value > * CLJS-1226: Added the :end-run-test event to cljs.test and a dummy event > handler for it > > > ## Fixes > * CLJS-1200: compare behaves differently from Clojure > * CLJS-1293: Warning settings not conveyed via REPL > * CLJS-1291: pprint whitespace/letter checks are incomplete > * CLJS-1288: compiler doesn't emit "goog.require" for foreign library when > optimization level is not set > * check that we actually read something in cjls.repl.server/read-request > * clarify cljs.test/run-tests docstring > * CLJS-1285: load-file regression > * CLJS-1284: IndexedSeq -seq implementation incorrect for i >= alength of > internal array > * finish CLJS-1176, remove stray .isAlive method call > * add zero arity `newline` to match Clojure > * CLJS-1206: Images in HTML don't show up when served from localhost:9000 > * CLJS-1272: :include-macros description inaccurate in require > * CLJS-1275: Corrected :test-paths in project.clj > * CLJS-1270: Docstring for delay not printed by cljs.repl/doc > * CLJS-1268: cljc support for cljs.closure/compile-file > * CLJS-1269: realized? docstring refers to promise and future > * match Clojure behavior for get on string / array. Need to coerce key into > int. > * CLJS-1263: :libs regression, can no longer specify specific files > * CLJS-1209: Reduce produces additional final nil when used w/ eduction > * CLJS-1261: source fn fails for fns with conditional code Just upgraded to this release. Everything seems to work like expected! Thanks! -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] wanted to do om.core/transact! with -> form (newbee)
I was trying to use something like this (cond-> {:foo bar} bar (om.core/transact! data :state #(conj % {:foo bar})), the last map should be passed value, appreciate any help for doing it -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Your first issue with cljs.reader looks like a bug. Your second issue is because clojure/java has a distinct char type but clojurescript/javascript does not. In cljs, the character literal syntax produces a one-character string, but in clj it produces a 16-bit unsigned int interpreted as a utf-16 character. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Om usage questions regarding performance
Thank you David, so I take it that at some time in the future om can take advantage of transact! calls with more korks... If I use swap! on the app-state atom and compare the call to transact! by logging calls to render I can't validate that render methods are called on all components or any differences. Looking forward to om.next :) Kind regards, Leon. On Thursday, June 4, 2015 at 5:30:28 PM UTC+2, David Nolen wrote: > On Thu, Jun 4, 2015 at 10:59 AM, Leon Grapenthin wrote: > Thanks for replying so quickly. > > > > Ad 1. What do you mean by "full re-render"? I'd assume that render or > render-state is called on every component? But I could verify today that > seems not to be the case. > > > > That's what I mean we re-render from the root component. React will determine > what work actually needs to be done. render and render-state are mutually > exclusive and accomplish the same thing. > Ad 3. > > > > a: > > (om/update! cursor [:foo :a] 32) > > (om/update! cursor [:foo :b] 32) > > (om/update! cursor [:foo :c] 32) > > ;... > > > > b: > > (om/transact! cursor :foo #(merge % {:a 32 :b 32 :c 32 ;... > > })) > > > It doesn't matter. Nothing happens here except updating the application state > and scheduling a render. Currently we just re-render from the root. But > transact! supplies us enough information to do more which why it was always > recommend over swap! > > > However with Om Next underway such optimizations will likely not land in the > older version of Om. And there will probably be a migration path to allow > people to leverage the optimizations in the next version with older style > components. > > > David -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.