-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jorge Arellano Cid wrote:
Disclaimer: I'm a newbie on JavaScript. JavaScript is a very cool language. Don't believe anyone telling you otherwise ;)
Does anybody know about a lightweight javascript engine we can use with dillo?
From what I've seen, SEE (Simple ECMAScript Engine), looks like a good candidate. This depends entirely on your criteria :)
SEE spidermonkey google v8 sloc ~31000 ~91000 ~77000 language c c c++/c license bsd {m,g,lg}pl bsd 100000 objects / s 5.6 0.4 0.2 1000000 objects / s ? 3.3 1.3 Slocs counted via sloccount, tests run on my laptop (core2duo 1.6GHz) run multiple times and averaged using a quick glance. Test script for 1000000 objects attached. see-shell didn't complete the 1000000 object run within 5 minutes of burning my cpu so I killed it. And there are some more things to consider like feature completeness. The mozilla guys are doing some sexy stuff like E4X and JavaScript 1.7 comes with syntactic sugar like array comprehension. The SEE site specifies that they are JavaScript 1.5 compliant, and although it seems actively maintained (latest 3.0 snapshot is dated 2008-02-10) I am not sure if they can keep up with the latest developments. Googles V8 does some interesting tricks like avoiding costly property lookups and generating native machine code, but this reduces portability (not sure if code generation is necessary or an add-on). The site states that it runs on "Windows XP and Vista, Mac OS X 10.5 (Leopard), and Linux systems that use IA-32 or ARM". I built an 32bit executable on linux/x86_64 that worked fine. I would suggest to pick one engine based on the ease of embedding and to develop a clean interface for scripting languages while integrating the chosen engine into dillo. If this is doable (not sure it is, but one can hope) it should be relatively easy to use the very same interface for other implementations and or languages. How cool would it be to hand configure parameters like --with-language javascript:spidermonkey - --with-language lua --with-language python :) And who knows what the next big thing of the web 3.0 will be? Grusszeugs, Justus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI57OToPmwNWhsaZYRAhtDAJ41dDSliA6jcKSUhw+k2/OrhY1QTgCdFtAD BnM+CV8oujgZLHz7NjY9fqw= =D1fS -----END PGP SIGNATURE-----