--
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.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Hey David,looks really interesting although I have to be a little critical of your benchmarks. Add a download of 200 todos via xhr and then do the render, you will most certainly lose to other JS Framework out there (especially if you choose EDN over JSON) cause of the extra overhead associated with going from mutable->persistent.
I quite like react/om and will certainly play with it although I have some worries concerning deeply nested data, since Clojure isn't exactly performant in that situation. Happy to be proven wrong though.Anyways, nice work. Curious to see/hear more.
--
--
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.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Very interesting to see such a different take on a React interface from my own humble attempt. I try to keep components as self contained as possible, where as you seem to like more of a top-down approach (if I understand your code correctly). I prefer to describe the output in plain ClojureScript data (and only convert to React components when necessary), where you call React directly with JS objects.
You also seem to call React asynchronously. That may be good for performance, but doesn't makes testing awfully cumbersome? Why not rely on React's own batching?
I tried to replicate your benchmark here (not sure I got it quite right), and results in the same ballpark (around 10ms for your "benchmark 2"):
https://github.com/holmsand/cloact/blob/benchmark/examples/todomvc/src/todomvc.cljs
Thanks for a good read. React is really cool (and ClojureScript even cooler...).
/dan
You also seem to call React asynchronously. That may be good for performance, but doesn't makes testing awfully cumbersome? Why not rely on React's own batching?
I tried to replicate your benchmark here (not sure I got it quite right), and results in the same ballpark (around 10ms for your "benchmark 2"):
https://github.com/holmsand/cloact/blob/benchmark/examples/todomvc/src/todomvc.cljs
Thanks for a good read. React is really cool (and ClojureScript even cooler...).
/dan
On Thu, Dec 19, 2013 at 5:02 PM, Dan Holmsand <holm...@gmail.com> wrote:You also seem to call React asynchronously. That may be good for performance, but doesn't makes testing awfully cumbersome? Why not rely on React's own batching?React's batching depends on setState, which I don't want to get involved in for many reasons. As far as testing, we could supply a flag to disable it.
I tried to replicate your benchmark here (not sure I got it quite right), and results in the same ballpark (around 10ms for your "benchmark 2"):
https://github.com/holmsand/cloact/blob/benchmark/examples/todomvc/src/todomvc.cljs
Thanks for a good read. React is really cool (and ClojureScript even cooler...).
/danYes you're likely able to leverage batching on setState.I think your design is perfectly valid but it's not one I'm particularly interested in investigating at the moment. I think treating the UI purely as EDN simplifies Om's implementation significantly and I have some other ideas like Datomic style Datalog queries to compute children in the works that will be simpler to implement with the Om design.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 a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/4wFYpXRGbqw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.
You should probably just use `lein install` like everyone else no?
`git pull && lein install`
Is there a typo or something? AFAIK, repl-listen doesn't have anything to do with serving up files (are you thinking of Ring?), but with providing a bridge for a REPL to execute cljs in the browser.
Hi Daniel- someone doctored up repl-listen to do double duty as a Dev server for clojurescript files. This is needed because a standard web server can't follow all the app dependencies to find the cljs files and source map files necessary for the fancy new source mapping stuff. If you follow the last few posts on David's blog it goes through this.
Egg on my face. Thanks.
cool work,
Just wondering, why in todomvc you rely so heavily onto #js literals, and prefer dsl-like syntax (dom/...) instead of some declarative markup like hiccup? Is it because of performance reasons?
Thanks!
I've been playing around with some basics. I'm still a relative n00b when it comes to functional programming, and I've never looked at React before.
Very cool stuff.
I managed to get Om+React to display a list of items that are sorted by a given key, and I have a content-editable span which updates the state of the owner with new value of that key for a given item, and voila! the list item moves to the correct position. (as expected)
Now here's the tricky part...
I want to implement a drag-list, where I can drag-drop items into a new position, and update the key based on the new position. I have that algorithm working in a different project (using goog.DragListGroup) , but React does not like you to manipulate the DOM outside it's knowledge.
I found this :
https://groups.google.com/forum/#!searchin/reactjs/sortable/reactjs/mHfBGI3Qwz4/rXSr-1QUcKwJ
which lead to
http://jsfiddle.net/LQxy7/
Unfortunately, I can't get this to work with Om. I am having trouble navigating the data structures.
How are "props" created/accessed? I followed the TodoMVC example, but that seems to be using "state", which I am given to understand should be kept as high in the hierarchy as possible (per the React recommendations). I tried something like (:value (om/get-props this)) from within IRender, but that doesn't work. Also : (om/get-props this [:items] ) (following the idiom established by get-state.
I'm probably missing something obvious, so I thought I'd pop in here to see if there's someone who can point me in the right direction.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to---
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Dave
Trying to build an om example. "lein cljsbuild once hello" throws java.lang.IllegalArgumentException: Duplicate key: org.clojure/clojure. Am I missing something? The todo example builds fine. Thanks.
Dave
--
Note that posts from new members are moderated - please be patient with your first post.
---
Project file is unchanged from Github.
Sorry, I wasn't clear. I'm building directly from om, i.e. https://github.com/swannodette/om/blob/master/project.clj.
I think this is a local lein problem, not something specific to the om project. Just created an empty project using "lein new mies", tried to build and got the same error. I'll try clearing out my local repo, please let me know if there are any other suggestions. Thanks.
Dave
Dave
--
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.
Updating to the latest version of lein fixed the problem. Om/React is very cool, looking forward to having some fun with it.
So... I'm trying to compile a cljs project with OM.
As in instructed above I've:
cloned the repo:
git clone https://github.com/swannodette/om.git
Installed:
lein install
(Output shown below)
Retrieving org/clojure/clojurescript/0.0-2138/clojurescript-0.0-2138.pom from central
Retrieving org/clojure/core.async/0.1.267.0-0d7780-alpha/core.async-0.1.267.0-0d7780-alpha.pom from central
Retrieving com/facebook/react/0.8.0.1/react-0.8.0.1.pom from clojars
Retrieving org/clojure/core.async/0.1.267.0-0d7780-alpha/core.async-0.1.267.0-0d7780-alpha.jar from central
Retrieving org/clojure/clojurescript/0.0-2138/clojurescript-0.0-2138.jar from central
Retrieving com/facebook/react/0.8.0.1/react-0.8.0.1.jar from clojars
Created G:\om\target\om-0.1.6-SNAPSHOT.jar
I then added to my projects cljs a dependency of [om "0.1.6"]
I still get the following error on compilation:
Could not find artifact om:om:jar:0.1.6 in central (http://repo1.maven.org/maven2/)
Could not find artifact om:om:jar:0.1.6 in clojars (https://clojars.org/repo/)
I'm clearly being terribly stupid.
Any suggestions?
--
Note that posts from new members are moderated - please be patient with your first post.
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/4wFYpXRGbqw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.