Mark Allums wrote:
Joseph Garvin wrote:
I realize that interpreted languages are dog slow and probably not
appropriate for most applications for low speed/memory devices like
MP3 players, but I'm still curious how feasible or not it would be to
get a python interpreter (www.python.org <http://www.python.org>)
running on Rockbox. Python is written in ANSI C and there is an ARM
port, but I think it depends on POSIX. Also it would probably want to
dynamically allocate memory a lot. I realize it's a long shot.
Joe
If really want to do this crazy thing, consider IronPython and Mono as
your model. The interpreter is much faster (and so on) under Mono/.NET.
Your runtime library would have to be drastically trimmed.
Remember, the firmware runs on bare metal, no OS. It will need static
linking.
However, also consider a compiled, Python-*like* language, instead. For
a Sudoku plugin, you might get away with interpreting, but for real
work, there is no substitute for C.
Mark Allums
I realized after I wrote this (and reading a few posts) that there are
alternatives. Lua, as mentioned is one. Some kind of Scheme might be
another.
All of the above statements from my original post are, of course, highly
qualified, meaning there are a lot of assumptions I left out.
IronPython with Mono is not feasible at all. But as a model, it shows
one possible direction to go in. If you can go back to the days of
interpreted BASIC, and go small, maybe with abundant smatterings of
assembly, it would be just the thing.
Mark Allums