[ClojureScript] Re: Dependent picklists using Reagent
On Sunday, August 3, 2014 5:48:14 AM UTC+10, Jonathon McKitrick wrote: I have three select components (picklists) which are dependent. The first determines the values of the second, and so on to the third. I'm able to get the first pair working, but the second pair has been tricky. Has anyone implemented something similar? Do you mean you want to implement something like this example (of 5 dependent pickers): http://www.minddigital.com/wp-content/uploads/2013/12/sample-Image.jpg -- Mike -- 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: map with anonymous function
As others have said, #() is like a function body, so the first item in its list must be callable or a macro. But no one mentioned you can use do: #(do [:th %]) On Sunday, August 3, 2014 7:53:47 AM UTC-5, Paul Cowan wrote: I am using om and soblano and I have a map function that works when I declare at like this, on the last line of the function below: (defn ical [data] (reify om/IDisplayName (display-name [_] (or (:react-name opts) calendar)) om/IRender (render [this] (html/html [:div [:div.calendar-toolbar [:div.btn-group.pull-right [:a.right {:href #} Right] [:a.left {:href #} Left]] [:h3 August 2014]] [:table.table [:thead [:tr (map (fn [day] [:th day]) weekdays) But when I try and use the map with the anonymous function syntax like this: [:table.table [:thead [:tr (map ([:th %]) weekdays) I get the following error: Uncaught Error: Invalid arity: 1 Cheers Paul Cowan Cutting-Edge Solutions (Scotland) blog: http://thesoftwaresimpleton.com/ website: http://www.cuttingedgesolutionsscotland.com/ -- 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] Silk, an isomorphic routing library for Clojure and ClojureScript
Awesome work. It's fantastic to see a library that's interested in targeting both the front-end and the back-end. This is the type of attitude I would love to see more often in the Clojure community. OTOH, it would have been awesome to have heard your thoughts WRT the concept of isomorphic routing on the Secretary issue tracker. You said you couldn't find something suitable, why didn't you complain or suggest a patch? We would have been happy to have supported your endeavor in making that possible and your ideas. In fact, we would have been willing to make breaking changes for them! Many of us want this! Originally, several people - myself included - were interested in seeing Clout be the library that everyone used both on the client and on the server. Unfortunately, James never merged the pull requests (two of them) for ClojureScript support. AFAICT it was because he wasn't clear on the role it would serve. James is also a busy man. :-) I'm not trying to call you out; the work you have done is fantastic (there's already a few things I'd like to steal!). Rather, I am trying to bring up a more important issue within our community WRT this topic: routing. We now have at least 4 libraries designed for this task (most of them targeting the server). We should not burden the community with dozens of choices. Instead we should enrich the community by working together to improve it. Fewer, well designed choices surely outweigh many okay solutions. So enough talk. Personally, I would love to work together on the issue of an isomorphic router. Secretary is a well known choice for the client and I think together we could make it better by supporting the server. We have three core team members on Secretary, and speaking for the team, I think we would love to bring an end to this saturation of routers in the ClojureScript world. Would you be interested in joining our team and help us work toward this goal? I don't mean to put you on the spot publicly but this is, partly, a public NIH issue and a tweet won't hold this. Email me privately if you desire. :-) -- 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] package moment.js for clojars
Hoplon has vendor and contrib library support: momentjs is in there MomentJS: https://github.com/tailrecursion/hoplon/tree/master/vendor/momentjs Vendor libs: https://github.com/tailrecursion/hoplon/tree/master/vendor Boot automatically incorporates them into your compiled JS in correct dependency order, with externs and so forth, with no configuration needed other than adding the dependency to your `build.boot` script. An example of how this is used in your application can be found in the jquery daterange picker demo: https://github.com/tailrecursion/hoplon-demos/tree/master/jquery-date-picker The demo depends on `io.hoplon/jquery.daterangepicker` in clojars, which in turn depends on the `io.hoplon.vendor/jquery.daterangepicker` dependency, which itself depends on `io.hoplon.vendor/jquery` and `io.hoplon.vendor/momentjs`. On Monday, August 4, 2014 11:56:48 AM UTC-4, Paul Cowan wrote: OK, great. That makes sense. I noticed in the OM repo that you reference the preamble and not the externs for the test cljsbuild: :cljsbuild { :builds [{:id test :source-paths [src test] :compiler { :preamble [react/react.min.js] :output-to script/tests.simple.js :output-dir script/out :source-map script/tests.simple.js.map :output-wrapper false :optimizations :simple}} Why did you not reference the externs in this case? Cheers Paul Cowan Cutting-Edge Solutions (Scotland) blog: http://thesoftwaresimpleton.com/ website: http://www.cuttingedgesolutionsscotland.com/ On 4 August 2014 16:50, David Nolen dnolen...@gmail.com wrote: externs are resolved via the Java classpath. So for the React JAR I packaged: :externs [react/externs/react.js] David On Mon, Aug 4, 2014 at 11:22 AM, Paul Cowan dag...@scotalt.net wrote: and why is the externs key not pointing to the externs/react.js file? What is his in reference to I mean that in your react-cljs repo, the path to the externs file is src/react/externs/react.js. I think I'm missing to what the :externs key actually points to. Cheers Paul Cowan Cutting-Edge Solutions (Scotland) blog: http://thesoftwaresimpleton.com/ website: http://www.cuttingedgesolutionsscotland.com/ On 4 August 2014 15:22, David Nolen dnolen...@gmail.com wrote: :preamble simply prepends some file to the front to create the final concatenated output. and why is the externs key not pointing to the externs/react.js file? What is this in reference to? David On Mon, Aug 4, 2014 at 9:59 AM, Paul Cowan dag...@scotalt.net wrote: What does the preamble key mean, where does it point to and why is the externs key not pointing to the externs/react.js file? Cheers Paul Cowan Cutting-Edge Solutions (Scotland) blog: http://thesoftwaresimpleton.com/ website: http://www.cuttingedgesolutionsscotland.com/ On 4 August 2014 13:38, David Nolen dnolen...@gmail.com wrote: Note that this is not guaranteed to work and indeed for many libraries it does not. On Monday, August 4, 2014, Paul Butcher pa...@paulbutcher.com wrote: Something else that you might find useful is this: http://swannodette.github.io/2014/03/14/externs-got-you-down/ Which will enable you to use the .js file itself as its own externs file, rather than having to create one yourself. -- paul.butcher-msgCount++ Silverstone, Brands Hatch, Donington Park... Who says I have a one track mind? http://www.paulbutcher.com/ LinkedIn: http://www.linkedin.com/in/paulbutcher Skype: paulrabutcher Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel http://pragprog.com/book/pb7con On 4 August 2014 at 13:03:37, Eduard Bondarenko (edb...@gmail.com) wrote: Hello Paul, Take a look at dnolen's react package - https://github.com/swannodette/react-cljs Best regards, Eduard On Mon, Aug 4, 2014 at 2:25 PM, Paul Cowan dag...@scotalt.net wrote: I have created this https://clojars.org/com.momentjs/moment package but I am struggling to find documentation/examples on what exactly the preamble key does or how I should reference this in my project. -- 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 clojurescrip...@googlegroups.com.
[ClojureScript] Advanced compilation file size increase/regression
The compiled output size for samples/hello project has increased since I last played around clojurescript. It's currently 62k with advanced compilation, without gzip. I ran a git bisect and found that the following commit bloated the hello world file size from 14k to 56k: commit 29c8597a2c818fb8fee6fb6d725e450ccffe9b71 Author: David Nolen ... Date: Wed May 8 00:47:27 2013 -0400 bring back toString on the core collections, include a new lower level `pr-str*` which doesn't bring in all the other printing machinery As a side note, the Closure compiler jar api has changed, so I rolled it back to https://closure-compiler.googlecode.com/files/compiler-20130411.zip. -- 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.