[e-lang] An E-like command line for the whole of the Web
Brian Warner
warner at lothar.com
Fri May 29 21:00:36 EDT 2009
On Fri, 29 May 2009 16:34:52 -0700
Tyler Close <tyler.close at gmail.com> wrote:
> I recently remembered that the Windows Script Host can run JavaScript
> code, but doesn't enforce the Same Origin Policy. So I setup the
> web_send.js code to run in cscript and voila... an E-like command line
> for using any JSON resource on the Web.
FYI, since it came up at the meeting, the linux equivalent of "cscript"
is probably the /usr/bin/smjs tool that comes with the SpiderMonkey
distribution. It has a read-eval-print loop that even does the
unfinished-statement-continuation trick that you had to implement by
hand. I assume it can be used as #!/usr/bin/smjs, but I haven't
confirmed that myself.
On debian/ubuntu systems, just install the "spidermonkey-bin" package.
Or build from source, I suppose, from somewhere on the mozilla site.
658:warner at luther% smjs
js> 1+2
3
js> (1+2+
3)
6
js>
cheers,
-Brian
More information about the e-lang
mailing list