hi,
I'm curious to know how folks have fared in attempting to get things onto sundry embedded systems. E.g there are inexpensive-but-limited things like the Parallax Propeller which would be possibly neat to program via something like Termite.
thanks for any news.
Afficher les réponses par date
Raoul Duke wrote:
hi,
I'm curious to know how folks have fared in attempting to get things onto sundry embedded systems. E.g there are inexpensive-but-limited things like the Parallax Propeller which would be possibly neat to program via something like Termite.
thanks for any news.
There are two problems there:
1) Termite seems to be stagnant. Maybe stuff is going on behind the scenes, but it's not very visible.
2) DSGambit needs someone to pull it up to the latest version of Gambit.
Everybody would love to see it done, but nobody wants to do the work. ;)
If you want to give it a shot, we have a VMWare image of a Linux machine sitting around that has Linux, the DS development tools, and the patches up to 4.0b20 as a starting point. Just ask.
-a
hi,
Thanks for the info!
I'm definitely unfortunately not one with the luxury of extra time :-}
sincerely, the gad fly.
Raoul Duke wrote:
hi,
I'm curious to know how folks have fared in attempting to get things onto sundry embedded systems. E.g there are inexpensive-but-limited things like the Parallax Propeller which would be possibly neat to program via something like Termite.
You should probably describe more precisely what you want to do.
From what I read, the Parallax Propeller currently has 2KiB (512 32-bit words) of per-core memory, and 32KiB of global RAM which, if I understand correctly, is not directly executable by the cpu. (The next version of the Propeller is said to get 256KiB of global RAM.) This directly leads to two conclusions:
- you need to use an interpreter to be able to run bigger programs (i.e. run them from the global RAM (if you don't want to be copying position independent code chunkwise into the per-core memory)). So you need a mix of a fast and very small library (asm) routines, and interpreted code.
- I'm pretty sure you won't be able to squeeze the Gambit interpreter nor any other 'standard' Scheme interpreter into 2KiB RAM (including the necessary library routines like the GC, and stack memory); at least, you could probably get away with putting the heap into global memory.
- having to put the heap into global memory means that all cores have equally fast access to it. So that's already giving up on a multiprocessing approach where each process (or process group) has it's own copy of the data (to avoid synchronization overhead for heap accesses between the cpu's). You need to share the data because the only place big enough to hold it is shared ;). That means, you'd want a Scheme system which garbage collects a single heap which is being used by multiple cpu's. AFAIK there's currently no such Scheme system (they all use an approach where only one cpu is running the Scheme code at any one time and the same cpu is doing garbage collection; that's part of the reason why Termite and similar systems are interesting, they enable using multiple processors without requiring a global garbage collector).
So creating a Scheme system which is making good use of such chips will be the challenge here.
Maybe you wanted to suggest using multiple Propellers connected over an SPI bus and only run one Scheme system per Propeller and have them interoperate over SPI? Then the PICBIT Scheme system (*) may be the right starting point. (Of course you could then as well be using, say, multiple single-core PIC, AVR, ARM.. chips and interconnect them.)
(*) http://www.google.de/search?q=picbit+scheme
Also note the paper "Towards a Portable and Mobile Scheme Interpreter" by Adrien Piérard and Marc Feeley. That may provide a reference implementation (or maybe directly runnable on PICBIT) and a standard data encoding of Termite style multiprocessing (so you could send data and programs between a Propeller and a Scheme system running on a PC).
Of course you could be using Scheme for different tasks than run it directly on those chips, for example you could use a Scheme program to output assembler code instead of writing assembler manually (i.e. you could write a compiler for a small language of your choice in Scheme).
Christian.
On Jan 27, 2008 7:56 PM, Bob McIsaac bobmc@fcibroadband.com wrote:
Think of termite and ant colonies, and bee hives. Intelligence seems to arise from dumb little insects sharing smells with each other. So too you can create intelligence with a vast army of "termites" with Scheme running on a mini-itx or other single-board computer playing the "mother-ship" role. Of course, each object is simple so you can effectively model the system before building any hardware.
On the other hand, it took fat humans to discover lambda calculus and build computers.
Hmmm, getting an ant colony to perform lambda-term reduction in some way seems like a fun science project! Do you have kids, Bob? :)
--Jeff
Many thanks for the mail. PICBIT Scheme looks like a really neat thing!
sincerely.
I wrote:
(Of course you could then as well be using, say, multiple single-core PIC, AVR, ARM.. chips and interconnect them.)
It occurred to me that maybe the Propeller would best be used in the following way and could then potentially offer an advantage in the responsiveness area in comparison to single-core cpus:
dedicate: - one core (or more) to reading and interpreting byte code [and doing memory allocation] - one core to handling serialization requests and doing SPI writes - one core to handling SPI reads and deserialization and handing back the data to the interpreter core - one core to garbage collection (preferably in a way that never requires the above cores to stop processing [except possibly in out of memory situations]) - other cores to running asm library routines (triggered by the interpreter)
This way there may be enough per-core memory for each task, and the multiprocessing might actually speed things up a bit; the most interesting thing might be that since garbage collection would run concurrently all the time, iff the allocator is running in deterministic time, you'd get a Scheme system which would satisfy hard realtime requirements. (Well, you could get almost the same thing from a single-core cpu and a real-time operating system with a lower-priority thread dedicated to garbage collection [maybe with scheduling of the lower-priority thread postponed to safe points in the interpreter?]. The difference being the time required for the task switch (but that shouldn't be very relevant compared to the speed of an interpreter).) I don't know how to write a GC right now so that the interpreter can resume execution at any point in time, though (look into the incremental GC paper from Marc from a few years ago).
(Back to other work.)
Christian.
Christian Jaeger wrote:
While the BIT and PICBIT citations are nice, is the code actually online anywhere?
-a
Andrew Lentvorski wrote:
Christian Jaeger wrote:
While the BIT and PICBIT citations are nice, is the code actually online anywhere?
It's up to Marc or Danny to answer this question; what I did find some time ago was a "picobit" archive, not sure though whether this is really the same thing (maybe it's just something simpler along the same lines for educational purposes only):
http://www.iro.umontreal.ca/~feeley/cours/ift6232/
Christian.
On 30-Jan-08, at 5:05 AM, Christian Jaeger wrote:
Andrew Lentvorski wrote:
Christian Jaeger wrote:
While the BIT and PICBIT citations are nice, is the code actually online anywhere?
It's up to Marc or Danny to answer this question; what I did find some time ago was a "picobit" archive, not sure though whether this is really the same thing (maybe it's just something simpler along the same lines for educational purposes only):
BIT, PICBIT and PICOBIT are different small Scheme systems which have been designed for various space constraints. Roughly speaking BIT is the least compact (it requires 2.5KB RAM) and PICOBIT is the most compact (it can run programs with only 256 bytes of RAM and 4 to 8KB of ROM).
I'm considering making Snow packages out of these.
Marc
On 30-Jan-08, at 7:06 AM, Marc Feeley wrote:
BIT, PICBIT and PICOBIT are different small Scheme systems which have been designed for various space constraints. Roughly speaking BIT is the least compact (it requires 2.5KB RAM) and PICOBIT is the most compact (it can run programs with only 256 bytes of RAM and 4 to 8KB of ROM).
BTW, here's some info on those systems:
http://www.iro.umontreal.ca/~feeley/papers/ll3.pdf
Marc
Marc Feeley wrote:
BIT, PICBIT and PICOBIT are different small Scheme systems which have been designed for various space constraints. Roughly speaking BIT is the least compact (it requires 2.5KB RAM) and PICOBIT is the most compact (it can run programs with only 256 bytes of RAM and 4 to 8KB of ROM).
I'm considering making Snow packages out of these.
How about just throwing the code out there in tgz form? A snow package seems like a lot of work for a code with such a limited audience.
Besides, these are probably very useful from the point of view of pedagogy. As such, people are likely to want to dig into the actual code anyway.
Having a simple Scheme system to analyze is a very useful thing.
-a