4

Does anyone know of a scripting language that's included with most platforms (say Mac/Windows/Linux)? I haven't been able to find one. So far javascript in web browsers or compiled java are about it. Jython comes close.

My goal is to be able to download a file from the web or portable storage and just run it, without having to install something first, or have special user permissions, or edit it, or rename it, or give it executable privilages. It would give you access to generally accepted metaphors in computing: input, output, persistent storage, time, spawning tasks, sockets, fixed and floating point math, unicode, etc. Ideally it would abstract away minutia like line endings, endianness, and yielding for other processes.

I don't want to get into why having a universal language/virtual machine is important, or at the very least, useful. I feel that we are missing a middleware above the operating system level, something like POSIX but less esoteric, and without it, we all are forced to spend a disproportionate amount of time reinventing the wheel or writing special cases. For me, availability and a complete feature set are more important than speed (which could come later).

Thanks in advance for any insights you can provide,

Zack Morris

Zack Morris
  • 4,727
  • 2
  • 55
  • 83
  • Ease of deployment is a major reason why webapps have been so successful. JavaScript, Flash or perhaps even Java would be your best options if you don't need unlimited access to the client computer. – Martin Jan 20 '13 at 18:38
  • Ya that's the problem though, I'm looking for something like bash or wscript that can run anywhere. Use cases might be parsing a file for key-value pairs and saving it as xml or json, or reading a jpg and saving it as a grayscale png. So tasks that we think of as web-centric that users have trouble performing locally or sharing with peers. – Zack Morris Jan 20 '13 at 19:01
  • Jython won't work because you have to install the jython runtime. If you are going to do that, you might as well install pure C python. Java bytecode is available and that is about it, e.g. not the scripting language. – Berlin Brown Jan 20 '13 at 19:23

1 Answers1

0

You will be able to run carefully written sh scripts on almost all unix systems.

If you want to add Microsoft systems, then it is more difficult, but still possible to provide a single script file, that will "autodetect" the interpreter it's running on and select between a sh part and a command.com or whatever they have on Microsoft systems.

Once you can run a script on a known system you can further download or unpack and install automatically whatever software you need.

  • Ya that's sort of what I was thinking also, perhaps a script that can determine whether it's running in sh on Mac OS and Linux, or wscript in Windows. The main problem is that the script would need to be given executable privileges, but maybe there is a way to feed it to the interpreter instead. Then the script would provide something like a minimal lisp interpreter that a higher level scripting language could be built on. I picture a block of minified code at the top so that you can jump right into javascript/python/tcl etc. – Zack Morris Jan 20 '13 at 22:55