This is probably not a problem that affects many people... As I understand it, I cannot compile a function in ClojureScript and have it integrated into the current ClojureScript compiled image (if I'm wrong, please tell me so. I'd really, really like to be wrong).
I have a web app which allows people to write rules for a cellular automaton, and watch them run (you can see it here http://www.journeyman.cc/microworld/ if you're interested). The problem is that all the computation happens server side, so it doesn't scale. I need to move as much as possible of the computation to client side. A key feature of the application is that users can edit the rules - in fact, they're encouraged to. That's what it's about. When the rules are edited they're compiled into Clojure functions, which then run. I can move all the function of the application client side except (at this stage) compiling the rules. So I'm envisaging a version of the app which, when the user edits the rules, the parsing happens client side and any parser errors are shown to the user immediately, but when they decide to commit their changes, the generated Clojure text is sent back to the server, where it is compiled with the rest of the CLJC code into a new app.js JavaScript image and served back to the client. The state of the world can be cached in HTML5 local storage while this is being done. The problem I see is this: if Alice and Bob are both using the system at the same time, both edit rules, I don't want Alice getting an image with Bob's rules in it (or vice versa). So I'm going to need to compile separate copies of app.js for each client that connects, and serve the right one to the right client. Has anyone else tried anything like this? Did it work? What were the problems? Cheers Simon -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/clojurescript.
