Re: An E-like command line for the whole of the Web
Brian Warner <warner-rGj/[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <20090529180036.6b6030e2@luther> |
On Fri, 29 May 2009 16:34:52 -0700 Tyler Close <[email protected]> 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@luther% smjs js> 1+2 3 js> (1+2+ 3) 6 js> cheers, -Brian