On Sep 12, 10:12 am, "Simon Ask Ulsnes" <[EMAIL PROTECTED]> wrote: > Hey all, > > I would like to know if anyone here but me is interested in the > prospect of a general standard library for JavaScript, that would > finally make JavaScript available as a general-purpose programming > language? > > V8 is obviously well-suited for applications outside the browser > space, and performance-wise it's already way ahead of other popular > scripting languages. > > The only things that are needed are: > > *) A well-defined interpreter driver (shell.cc is a good starting point) > *) A general-purpose standard library (IO, threads, sockets, etc.) > > I have a nearly complete implementation of a shell and an IO library > (still POSIX-only). > > Does anyone know of similar endeavours? > If not, would anyone care to join me in the epic quest to turn > JavaScript general? :-P
Hi Simon, There is v8r (http://code.google.com/p/v8r/) which seems to have something usable already. I've written one myself, as part of v8onpython (http://www.bitbucket.org/dfdeshom/v8onpython/src/). It has history, colors, command search via Ctrl+R, and tab completion. $ python repl.py [v8onpython Javascript console. Press Ctrl+D to exit] v8onpy > var x=234 v8onpy > x[TAB] x x.toExponential x.toFixed x.toLocaleString x.toPrecision x.toString v8onpy > x.toString() 234 v8onpy > Array.[TAB] Array.constructor Array.isPrototypeOf Array.propertyIsEnumerable Array.toString Array.hasOwnProperty Array.length Array.toLocaleString Array.valueOf The dependencies for building v8onpython are Python and Cython. For the general library, you might want to check out Peter Michaux's xjs, he has an example of using it here: http://peter.michaux.ca/article/7823 > > If there is interest, I can publish my work on github or similar. The more the merrier. There is apparently a shell in the works from the Google V8 team but that hasn't stopped any of us :) didier --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
