4 ms·
have you tried clojurescript
by irfn 14y ago
have you tried clojurescript
- klibertp 14y agoI did - I don't like Clojure (because I much, much prefer Scheme to CL) but it seemed very interesting. However, it felt very heavy, almost like GWT. There is something very similar for Racket[1], but even though it's Scheme it still feels much to heavyweight and I couldn't bring myself to use it. [1] http://hashcollision.org/whalesong/ http://hashcollision.org/whalesong/
- ynniv 14y agoI was very disappointed by whalesong. Instead of a source->source translator like parenscript, whalesong generates a bytecode level VM inside the browser. Doing so provides support for any racket language, but it does so at the cost of immense quantities of "pre-obfuscated" JavaScript. The genesis of whalesong was to support "World"[1] games on the web, and to that end it seems successful. I don't think it makes a good general purpose tool. Perhaps someone wants to port parenscript to scheme? [1 | http://world.cs.brown.edu/ http://world.cs.brown.edu/]
- batgaijin 14y agoHow slow is whalesong though? I know people like to say that js is slow, but it's really only the DOM manipulation that makes it so.
- wahnfrieden 14y agoI don't know whalesong. But if you include a giant runtime, the compilation and evaluation of it on every page load, and downloading it (there's evidence to show many hit CDNs with cold caches, probably screwed up firewalls or proxies that mess with caching) can make for a suboptimal experience that can't be optimized without rewriting in something that doesn't require a bytecode VM embedded in your JS.
- ynniv 14y agoWell, it's a 700k interpreter and runtime. It isn't slow for simple things, but only because JS is really fast now. Interpreters are usually 5 to 10 times slower than whatever they are running in. http://hashcollision.org/whalesong/examples/raphael-demo/raphael-demo.html http://hashcollision.org/whalesong/examples/raphael-demo/rap... isn't bad http://hashcollision.org/whalesong/examples/boid/boid.html http://hashcollision.org/whalesong/examples/boid/boid.html is a little slow compared to http://graphics.cs.wisc.edu/Courses/Games12/Tutorial1/Phase13/ http://graphics.cs.wisc.edu/Courses/Games12/Tutorial1/Phase1... Some of the low framerate could be frame timing (whalesong could be using setTimeout poorly), but they seem to use about the same CPU.
- batgaijin 14y agoHuh, didn't know that. For some reason I thought it compiled to JS.
- lucian1900 14y agoI would say Clojure is a lot closer to Scheme than CL. It is a Lisp-1 after all, and with a focus on immutable data structures.
- batgaijin 14y agoYeah, I'm pretty sure he meant it the other way (Scheme to CL) because I've heard a lot of Scheme people like Clojurescript, not CL people.