Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the available interactive languages that run in tiny memory? [closed]

People also ask

What language takes less memory?

Results. Implementations in C and C++ were fastest and used the least memory. Programs in these languages generally contained more lines of code. Java and C# appeared to be a compromise between the flexibility of Perl and Python and the fast performance of C and C++.

What are the different types of programming language?

There are three main kinds of programming language: Machine language. Assembly language. High-level language.

How many types of languages are there in computer?

Yes, there are over 300 programming languages, but you don't need to know them all, and you'll find that each language serves a specific purpose (or several). Compared to spoken languages, most are pretty easy to learn. Below are many of the top languages programmers are using.


A homebrew Forth runtime can be implemented in very little memory indeed. I know someone who made one on a Cosmac in the 1970s. The core runtime was just 30 bytes.


I hear that CHIP-8, XPL0, PicoC, and Objective Caml have been ported to graphing calculators. The Wikipedia "Lego Mindstorms" article lists a bunch of programming languages that allegedly run on the Lego RCX or Lego NXT platform. Do any of them meet your "live coding" criteria?

You might want to check out the other microcontroller Forths at the Forth wiki . It lists at least 4 Forths for the Atmel AVR: amforth (which you already mention), PFAVR, avrforth, and ByteForth.
(Links to those interpreters, as well as this StackOverflow question, are included in the "Embedded Systems" wikibook).


I would recommend LUA (or eLUA http://www.eluaproject.net/ ). I've "ported" LUA to a Cortex-M3 a while back. From the top of my head it had a flash size of 60~100KB and needed about 20KB RAM to run. I did strip down to the bare essentials, but depending on your application, that might be enough. There's still room for optimization, especially about RAM requirements, but I doubt you can run it comfortable in 8KB.


Some AVR interpreters/VMs:

  1. http://www.cqham.ru/tbcgroup/index_eng.htm
  2. http://www.jcwolfram.de/projekte/avr/chipbasic2/main.php
  3. http://www.jcwolfram.de/projekte/avr/chipbasic8/main.php
  4. http://www.jcwolfram.de/projekte/avr/main.php
  5. http://code.google.com/p/python-on-a-chip/
  6. http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_id=688&item_type=project
  7. http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_id=626&item_type=project
  8. http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_id=460&item_type=project
  9. http://www.harbaum.org/till/nanovm/index.shtml

Wren fits your criteria -- by default it's configured to use just 4k of RAM. AFAIK it hasn't seen any actual use, since the guy I wrote it for decided he didn't need an interpreter running wholly on the target system after all.

The language is influenced most obviously by ML and Forth.