Re: [Inkscape-devel] Revisiting ECMA. Seriously, folks. :)
I will look at this. However, spec compliance is one of the things we need:
http://www.w3.org/TR/SVG11/escript.html
Bob
Charles Goodwin wrote:
For Vexi (www.vexi.org) we have a very small, efficient JS library that is far more lightweight than Mozilla Rhino. It's in Java, though, although GCJ compiles native binaries these days.
If you were looking for something with less cruft then it could be an option, but there are caveats.
Here's what Brian Alliet, the guy who wrote it, had to say:
(19:23:17) charlieg: balliet: how suitable would the JS engine be for anything other than ibex/vexi? (19:23:41) charlieg: specifically, the Inkscape guys want to integrate an ECMAscript engine to enhance their SVG compliance (19:24:02) balliet: very suitable. i've always kept ibex specific stuff out of org.ibex.js (19:24:48) balliet: does SVG compliance specificly require ECMA-262? (19:25:07) balliet: that could be a problem since org.ibex.js isn't (and doesn't intend to be) fully emca-262 compliant (19:25:53) balliet: however, if they're just looking for something to get 90% of the way there then org.ibex.js would be fine (19:26:14) balliet: if they really need full ecma-262 though they'll have to go with rhino (19:26:35) charlieg: what are the major compliance obstacles? (19:27:32) balliet: classes is the biggest one (19:27:57) charlieg: simply because we don't need them, right? (19:28:09) balliet: yeah, and they complicate things significantly (19:28:22) balliet: it would take major changes to org.ibex.js to suport them (19:28:36) balliet: then there are lots of other little things that would require major changes too. like in ecma-262 null isn't the same as undefined (19:29:04) charlieg: does rhino do that according to ecma-262, though? (19:29:17) balliet: yup (19:29:32) balliet: and its ridiculously complicated as a result of it :)
Charles Goodwin wrote:
For Vexi (www.vexi.org) we have a very small, efficient JS library that is far more lightweight than Mozilla Rhino. It's in Java, though, although GCJ compiles native binaries these days.
Most distributions include Mozilla, and if you use Epiphany you need to install Mozilla first.
If a user has Mozilla (Seamonkey, I'm a Firefox sceptic) installed does that mean they already have Mozilla Rhino? (If Gnome moves towards using more XUL presumably the mozilla javascript engine will be needed)
"Bloat" is not really an issue if users are very likely to already have the component and it is widely used.
Other solutions seem like they might run the risk of being more minority custom solutions and put a greater burden of maintaince. In the longer term a Mozilla solution looks safer but my rather obvious bias is for the long term survival of my favourite technologies Gnome desktop and Mozilla platforms, over any specific applications.
- Alan
participants (2)
-
Alan Horkan
-
Bob Jamison