In the early days Java was originally intended for those devices.

But yes I think it could run on very small devices - might be useful for robots too. Forth was originally developed for controlling telescopes and was easy to run on small devices with limited memory. Unfortunately it has not really escaped from its low-level legacy.
The strategy for the R$ project is to cross-breed Forth ideas with C Basic and XML, inheriting a few essential concepts from each:
Forth provides the stack machine and postfix notation
C provides types, strucures and pointers
Basic provides dynamic strings and string manipulation functions.
XML provides object structure, storage and expression.
These are tightly integrated into a language with a minimalist syntax, (and simple code!)
The main task is to make sure all the bits fit together nicely. For example:
"myprog.prg" load exec |
loads a program file onto the stack and executes it"mydata.dat" load |
puts mydata on to the stack"myfiledat.dat" file 10 seek 40 get |
opens a file a extracts a 40 byte section"myfile.dat" filein (in ... ) close |
opens a file reads the first line then closes it."myfile.txt" fileout |
output literal text
( $
Hello World !
Hello Sky!
$
)
close