[ClojureScript] Re: Advice on developing an immutable-style wrapper over the top of a mutable JS library

2016-01-30 Thread Elliot Bulmer
For anyone that is interested. I have found a great blog post describing this very problem: http://interstellarechidna.com/blog/programming/2014/11/13/react-beyond-the-dom-experiments-in-applying-react-to-pixi-js-three-js-and-web-audio.html Thankyou Izzimach! -- Note that posts from new member

[ClojureScript] Re: Advice on developing an immutable-style wrapper over the top of a mutable JS library

2016-01-24 Thread Elliot Bulmer
On Saturday, January 23, 2016 at 10:48:19 AM UTC+8, Elliot Bulmer wrote: > Hi everyone, > > I am interested in developing a nice CLJS wrapper for the Three.JS 3D > graphics library. I really like the design of Reagent and Hiccup and would > like to emulate it if possible.

[ClojureScript] Advice on developing an immutable-style wrapper over the top of a mutable JS library

2016-01-22 Thread Elliot Bulmer
Hi everyone, I am interested in developing a nice CLJS wrapper for the Three.JS 3D graphics library. I really like the design of Reagent and Hiccup and would like to emulate it if possible. This is what I envision a render call looking like: https://gist.github.com/sonelliot/23f38aa47579b30774a

[ClojureScript] Current state of 'deps.cljs' and other JS package managers

2015-09-21 Thread Elliot Bulmer
Hi everyone! My understanding is that you can use 'deps.cljs' to manage external JS libraries that are not compatible with advanced compilation like so: { :foreign-libs [{:file "react/react.js" :file-min "react/react.min.js" :provides ["com.facebook.React"]}

[ClojureScript] Re: Why doesn't this zipper function work for the last node?

2015-04-11 Thread Elliot Bulmer
(if (pred l) (recur (zip/next (func l))) (recur (zip/next l)) Since I'm not doing anything with the lazy sequence anyway I think I'll switch to this version. Still unsure why the other one didn't work for the last element. On Sunday, April 12, 2015 at 11:57:1

[ClojureScript] Why doesn't this zipper function work for the last node?

2015-04-11 Thread Elliot Bulmer
Hi guys, I'm writing a simple entity-component system for a game. An entity in this case is a vector of components and a component is just a map. Entities can be nested in a tree structure. I am using clojure.zip to traverse this tree and operate on the entities/components. https://gist.github

Re: [ClojureScript] "Unexpected token return" in a case form returning a function

2015-04-03 Thread Elliot Bulmer
t; David > > > On Thu, Apr 2, 2015 at 9:33 PM, Elliot Bulmer wrote: > I get this error when I try to define a case statement that is returning > function vars. See this gist for an example: > > > > https://gist.github.com/sonelliot/5beb9058460b49a7006a#file-unexpect

[ClojureScript] "Unexpected token return" in a case form returning a function

2015-04-02 Thread Elliot Bulmer
I get this error when I try to define a case statement that is returning function vars. See this gist for an example: https://gist.github.com/sonelliot/5beb9058460b49a7006a#file-unexpected-token-clj I like to return vars that get invoked rather than the entire function implementation. This is u