Since an embedded JavaScriptCore can be made to launch quickly, I've been pondering whether it is justified in converting Planck to be a portable (OS X, Linux, Windows) C-based wrapper around JavaScriptCore (so that it is more broadly useful). Right now Planck is not portable owing to the use of Cocoa/Foundation and Objective-C.
I think this partially boils down to wether the launch latency is faster than an equivalent based on Node.js (which is already portable and has a much richer ecosystem). That latency has to be significantly different, and I also think you'd need to be convinced that it is going to remain that way (perhaps V8 will be further optimized, but perhaps the outright launch speed of Node.js isn't a priority).
Here is my first attempt at a comparison, based on Joel Martin's work:
$ time echo '(map inc [1 2 3])' | cljs
cljs.user=> (map inc [1 2 3])
(2 3 4)
cljs.user=>
real 0m0.826s
user 0m0.748s
sys 0m0.093s
$ time echo '(map inc [1 2 3])' | ~/Projects/planck/build/Release/planck
(2 3 4)
real 0m0.385s
user 0m0.492s
sys 0m0.087s
Hey Mike,
The host is important. I think that Node and the rich availability of libraries that are now available would make for a compelling scripting environment. If that is what we are aiming for.
The main assumption being that getting system inter-op working is non-trivial, and maintaining it across platforms could be quite time consuming.
Plank maybe more suited as an embeddable scripting engine for various ios/osx projects. Maybe clearing a pathway for bridging with a nice bridging API.
I feel like I'm stating the obvious to someone who has put more thought into this than I have though....