11 comments

[ 3.8 ms ] story [ 18.5 ms ] thread
This is pretty neat, and I hope it will get networking support soon. I've also been keeping track of the NodeJS "equivalents", and am looking forward to being able to use ClojureScript at the CLI...
You can already do basic networking by utilizing the planck.sh namespace, which allows you to run shell commands and get the results back. Thus you can use it to call curl. Not perfect, but with a thin wrapper you can easily GET or POST to services.
I was thinking more along the lines of creating a listening socket. There's already some form of URI access in the source.
Ah. Yeah, should have figured that out through the NodeJS keyword.
Yep, the ability to directly create network connections will ultimately land in Planck.
If this were built on top of Node instead of JavaScriptCore, wouldn't a lot of the host integration come for free? Is there a benefit that building on JavaScriptCore yields?

Of course, being a fun project to work on is benefit enough. Just trying to make sure I'm not missing something.

Planck’s main benefits compared to Node.js seem to be the fast startup time for small bash-like scripts, and the potential to be embedded in C-based apps: https://gist.github.com/mfikes/c7da1e7dfded26c7ceb9
(comment deleted)
Agreed. One interesting direction the project could go in is building as a framework to be embeddable into OS X apps. Cocoa already makes it trivial to expose Objective-C objects to JSC. This would just extend that to being able to script Cocoa apps in Clojure(Script).
This is an extension of Ambly [0], which is basically the same thing but for iOS. I believe Ambly was developed because Clojurescript's startup time makes it more practical than clojure on a mobile device. David Nolen has posted benchmarks showing jsc runs clojurescript faster than v8 but I don't believe that was the primary motivation here.

[0] https://github.com/omcljs/ambly