[MacRuby-devel] Ruby and JSCocoa — A bridge from Ruby to JavascriptCore too far?
Ernest N. Prabhakar, Ph.D.
prabhaka at apple.com
Wed Jun 9 07:41:50 PDT 2010
Hi all,
Okay, this is probably a completely insane idea brought on my WWDC/toddler-induced sleep deprivation, but...
Given all the hoopla around node.js lately, I've been playing around with JSCocoa to see what can be don with JavaScript on the Mac:
http://inexdo.com/JSCocoa
Alas, my ObjC skills have atrophied (or maybe just spoiled by Ruby), so I've looked with envy at various Ruby-in-JavaScript solutions:
cowboyd's therubyrhino at master - GitHub
therubyracer
jbarnette's johnson at master - GitHub
The simplest of these is Rhino, since it already "boxes" up JavaScript inside the Java object model, which bridges trivially to JRuby.
If I squint just right and don't think too hard, it seems like I should be able to do the same thing with JSCocoa from MacRuby. That is, use JSCocoa as a "JavaScript API to real objects" translator, then MacRuby to access those objects from there.
The tricky part is that JSCocoa still passes around a bunch of C structs (JS Data types). But presumably Bridge Support can take care of (most) of that for me? Or am I overlooking something profound?
-- Ernie P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100609/7e961a59/attachment.html>
More information about the MacRuby-devel
mailing list