OK Programming language from USB stick with no installation

本秂侑毒 提交于 2019-12-18 11:56:20

问题


I'm looking for a compiler or interpreter for a language with basic math support and File IO which can be executed directly from a memorystick in either Linux or Windows. Built in functionality for basic datastructures and sorting/searching would be a plus.

(I've read about movable python, but it only supports windows)

Thank you


回答1:


Not sure what are the issues there for the other languages, but I am pretty sure that Lua will work fine on such environment.

It is perfect for your requirements: basic I/O, math functions, excellent data structures (all based on numeric and associative array, with any kind of key/values, allowing the most complex operations).
Bonus: very simple to learn (for the bases, at least), readable, and powerful when you start to dig. And it starts to have a number of useful libraries, sockets, regexes and parsers, GUI, etc.

It is just a single binary file, no install at all, no registry access, no file access (beyond reading the binary and script!) if not requested, totally transparent: it is often used in embedded system, often memory constrained, on Roms, etc.




回答2:


There is a python distribution called Movable Python which is designed to do exactly that. It might do what you want. Also, MinGW/MSYS will run on Windows with no registry entries or other installation beyond placing the files in a directory tree - all you need to do is set up the relevant directories in the path, which can be done in a batch file.




回答3:


The Java JDK easily fits on a stick, and does not require installation; You can install it to a PC first and then just copy the install directory to the stick. I presume you can do the same for the Linux JDK.

And there's a ton of good text editors that don't require installation.




回答4:


Not sure if it still applies to current versions, but I have an ancient perl.exe (version 5.001, from 1994 or 1995) that still works perfectly fine as a no-installation single executable.




回答5:


If you can tolerate TCL, it's hard to beat a tclkit




回答6:


TCC (the Tiny C Compiler) is a full implementation of C in a really small package. You can even write shell scripts in C:

#!/usr/local/bin/tcc -run
#include <stdio.h>

int main() 
{
    printf("Hello World\n");
    return 0;
}

TCC is available for any Unix-like platform, and also for Windows.




回答7:


I've done exactly that with Ruby. Worked well.




回答8:


I'm way late for this party, but I thought I'd weigh in anyway.

I currently have a Windows-usable USB stick with the following installed on it (for Windows):

Languages

  • Java
  • Erlang
  • Fantom
  • Groovy
  • Haskell
  • jacl (JVM-based Tcl)
  • JavaFX
  • JRuby (JVM-based Ruby)
  • Jython (JVM-based Python)
  • NASM
  • nice
  • pnuts
  • Rexx
  • Scala
  • SISC (JVM-based Scheme)
  • Sleep
  • Tcl
  • Prolog
  • gawk (via GnuWin32 and MinGW/MSys)
  • jawk (JVM-based AWK)
  • ANTLR
  • Clojure
  • JBasic (JVM-based BASIC)
  • Tuprolog (JVM-based Prolog)
  • Rhino (JVM-based Javascript)
  • YASM
  • Lua
  • Kahlua (JVM-based Lua)
  • C (via GnuWin32 and MinGW/MSys)
  • C++ (via GnuWin32 and MinGW/MSys)
  • Fortran77 (via GnuWin32 and MinGW/MSys)
  • Ada (via GnuWin32 and MinGW/MSys)

Programming Tools

  • jEdit (JVM-based programmer's editor)
  • Ant (JVM-based build tool)
  • Maven 2 (JVM-based build tool)
  • vi (via GnuWin32 and MinGW/MSys)
  • Vim
  • CMake
  • gmake (via GnuWin32 and MinGW/MSys)
  • Leiningen
  • Subversion
  • Fossil
  • ANTLRworks
  • ctags/etags

Geek Toys

  • All SIMH emulators, with networking if available
  • Several operating systems, utilities, etc. for same

And a cast of dozens in key libraries, plus the Geronimo application server.

Yes, this is a single USB stick, and I probably missed an item here or there while making this list. It's amazing what you can run off of a USB stick these days.




回答9:


http://smallbasic.sourceforge.net/

Runs anywhere (even mobiles) and has everything you need.




回答10:


You could use DevCpp, it comes with Mingw 3.x or CodeLite (Mingw 4.x) for C/C++. For Pascal you can use DevPas, for Python web development try InstantDjango or better yet Web2py (very nice indeed!), for Ruby you have InstanRails, for Perl you got a complete enviroment (even a C compiler!) with StrawberryPerl. You could install cygwin on the USB drive. There are a lot more options out there. Interested in a LISP like portable/cross-platform and little language? Try newlisp (its a gem!). Also you could run almost anything (linux or windows based) on a portable VM under Portable VirtualBox/VMplayer or QEmu with a performance tax ;).




回答11:


Why not C++? You can statically link in any external librarys assuming there lisence allows it, and you won't have any external dependencies.



来源:https://stackoverflow.com/questions/383757/ok-programming-language-from-usb-stick-with-no-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!