lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wednesday 11 August 2004 20:52, Adrian Sietsma wrote:
> Has anyone got further with this ?
>
> I have seen PIC's with onboard (minimal) BASIC interpreters - i wish to
> explore Lua for this arena : 8/16 bit, minimal memory (<<64k).
> It could lose the floating point stuff, and most of math & string, but
> would need some hard i/o (set bit, test bit, etc)
> The idea would be a tiny core, with the hardware stuff as chip-specific
> libraries.

Well, unless you can lose the heap, then you're not going to be able to get 
away without a garbage collector. Which means that you can't have real-time 
capabilities, because you never know when you might run out of heap space. 
The Java people have been fighting this for years; there just does not seem 
to be any theoretical way out of it.

If you get rid of the heap, you'd lose tables, function closures, probably 
strings although that's less awkward... hmm. What's left would be very 
limited. What you'd have is a very simple Lua-like language with it's own 
compiler and run-time.

(If you were willing to introduce some non-standard features --- such as table 
creation only being valid as a top-level statement, integer indices only, no 
dynamically resized tables --- then you might be able to get some dynamic 
memory allocation without needing the garbage collector, but it would be 
tricky. The result might still be useful, though.)

-- 
+- David Given --McQ-+ 
|  dg@cowlark.com    | Quidquid latine dictum sit, altum viditur.
| (dg@tao-group.com) | 
+- www.cowlark.com --+