Suggestions needed for scripting language

61 views
Skip to first unread message

LM

unread,
Feb 27, 2012, 7:53:25 AM2/27/12
to CommonJS
Would be very interested to hear what others recommend as a good
implementation of JavaScript to use as a cross-platform scripting
language. Would like to port some of my batch, bash and Perl scripts
over to one language, JavaScript. I've been checking through the
JavaScript implementations mentioned at the CommonJs wiki and some
other implementations as well. Am trying to find something that works
equally well on both Windows and Linux and that has much of the same
functionality as JavaScript in a browser (including basic DOM parsing
for XML files) plus the ability to read/write files and execute
applications and set environment variables. Would be very curious to
hear what implementations other developers are using for JavaScript
scripting. Thanks.

Wes Garland

unread,
Feb 27, 2012, 1:24:09 PM2/27/12
to comm...@googlegroups.com
We are using Mozilla's SpiderMonkey engine in the GPSEE environment to solve this exact set of problems in a production environment.

We don't currently support Windows, but would be happy to give porting advice.

Warning, Mozilla current supports E4X (ECMAScript 4 XML) which gives us an XML parser etc, but I have a feeling they will drop that within the next year.  We will probably embed libxml2 and throw on a light subset of DOM to manipulate it in the future.

Wes


--
You received this message because you are subscribed to the Google Groups "CommonJS" group.
To post to this group, send email to comm...@googlegroups.com.
To unsubscribe from this group, send email to commonjs+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/commonjs?hl=en.




--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

Salvador Ortiz

unread,
Feb 27, 2012, 7:54:39 PM2/27/12
to comm...@googlegroups.com
I you have experience with Perl, I recommend you take a look to JSPL (http://jspl.msg.mx), a cross-bindings between Mozilla's SpiderMonkey VM and Perl.
With it, a JavaScript developer can use most of CPAN to tailor the JS environment to his needs.
Both Linux and Windows are supported.

Salvador.

Nathan Stott

unread,
Mar 1, 2012, 4:46:40 PM3/1/12
to comm...@googlegroups.com
I use Node for this purpose.  You can find good DOM parsing modules.

Donny Viszneki

unread,
Mar 1, 2012, 5:14:14 PM3/1/12
to comm...@googlegroups.com
Theoretically any CommonJS environment you choose to use will support
dom.js, a pure Javascript-language implementation of the web browser
DOM:

https://github.com/tmpvar/jsdom

> --
> You received this message because you are subscribed to the Google Groups "CommonJS" group.
> To post to this group, send email to comm...@googlegroups.com.
> To unsubscribe from this group, send email to commonjs+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/commonjs?hl=en.
>

--
http://codebad.com/

Elijah Insua

unread,
Mar 1, 2012, 6:08:32 PM3/1/12
to comm...@googlegroups.com
On Thu, Mar 1, 2012 at 3:14 PM, Donny Viszneki <donny.v...@gmail.com> wrote:
Theoretically any CommonJS environment you choose to use will support
dom.js, a pure Javascript-language implementation of the web browser
DOM:

https://github.com/tmpvar/jsdom

Correction, jsdom is currently only available on node.js and currently works best with an additional binary addon.  dom.js (https://github.com/andreasgal/dom.js/) works on node and spidermonkey.

-- Elijah

Ondřej Žára

unread,
Mar 2, 2012, 1:58:10 AM3/2/12
to comm...@googlegroups.com
I use v8cgi (http://code.google.com/p/v8cgi/), naturally. There is a
DOM module available:
http://code.google.com/p/v8cgi/source/browse/trunk/lib/dom.js

</selfpromo>


Sincerely,
Ondrej Zara


2012/2/27 LM <lme...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages