Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Embedded REBOL (Re: Population of PDA Users)

 [1/11] from: brian::hawley::net at: 11-Apr-2001 16:38


Hi all! Ryan Cole wrote:
>Palms, thus Handsprings, are very limited. Though they tought 8 MB these >days, they only have 32K of fast RAM available for programs. The memory >to which they refer operates slowly and is intended for program storage >and records. You can still use this memory as you do RAM, but it is much >slower.
Actually, the RAM hardware the heap is in is no faster than the rest of the RAM. The reason it is 32k is because it is accessed using a 16-bit signed offset pointer. Other RAM needs a change of base pointer in addition to the offset, an operation that takes slightly longer. Palm OS is 16-bit, like MS-DOS. The speed difference is similar to that between .com and .exe programs on DOS. The only slower RAM in Palm-compatible handhelds is in the add-on flash cards that are available for Visors and Sonys.
>I am sure REBOL could work on the Palm, but it would crawl in >comparison to other ports.
Certainly, because it would run on 16-33 mhz processors.
>To further deter, they likely would have to do extensive porting, >since the Palm OS seems so much different than other operating >systems that I know.
Palm OS is pretty generous by embedded standards. REBOL just isn't structured by embedded standards. And yes, REBOL would need some minor rewriting to really fly on Palm OS, WinCE or in any other environment that is not based on the slow-disk, large-heap pattern. Palm OS and WinCE are based on a small- heap, in-memory database pattern. WinCE has a potentially larger heap (32-bit addressing) but can have a heap that is too small for traditional REBOL, as I think it does with the HP Jornada 620 when its RAM hasn't been updated. Of course Carl would be the one to ask about this, with his experience in OS design, but I'll give it a shot. What REBOL does now: 1 - Load the native core from the disk to the heap. 2 - Decompress (build?) the REBOL data into the heap. 3 - Run the interpreter. What other languages do on these platforms: 1 - Execute the native code from where it already is. 2 - Access the data directly from in-memory databases in the native format, without needing to put it in the heap. 3 - Run the interpreter. What REBOL would need to do to make this work: 1 - Make sure that as much of the native code as possible is reentrant, so that multiple REBOL instances can be run at the same time from the same code. This could improve the Windows and Linux ports as well, maybe. 2 - Structure the REBOL heap as an object-database, or perhaps several databases. One way would be for the system to get one read-only heap for the mezzanine and below, and one read-write heap for each session. Objects in the main heap changed in a session would be copied to the session heap and changed there. The existing REBOL code is somewhat anti-reentrant, so a little rewriting would be necessary to minimize the copying (and enable multi-threading as well). The database code could just be a wrapper around system database support on platforms that have such, like Palm and WinCE. You can even compress the code in the main heap with a REBOL-to-native compiler, and even store most of the native functions in it. 3 - Some of these platforms don't have an easy mapping to the program concept - on Palm a "program" is a database with native code in its records. They also don't necessarily have specific program opening and closing operations, basically picking up where they left off. The session concept would map quite well to this, allowing you to pause and resume multiple sessions, start new sessions, and even "stop" them by deleting the session database. I'm sure that there are other factors that I haven't thought of (Carl, chime in!), but that should cover the basic changes. The REBOL code should be mostly portable between Palm, WinCE, etc. The native code would be less portable but some careful planning and a REBOL compiler would relieve some of that.
>Keep in mind that the Palm was originally designed to be a >robust handheld organizer. I think, and many would agree, >that they are overdue for a new OS and hardware archetecture >to meet developers increasing desires.
I believe Palm OS 4.0 is supposed to be that. It is even said to be ported to the ARM architecture (I'll believe that when I see it).
>Maybe a cut down, compileable?, REBOL like language, for cell >phones and PDA's? A REBOL PDA dialect? Carl could probably >write it in a weekend. >: )
I could probably write it in two weeks (at least the basics), after several months of reading and research of course. :( Experience counts. I've been thinking about this, off and on, for a few months now. Carl has actually done things like this before (Amiga comes to mind)...
>Till then I will keep on using Satellite Forms, which I am skepticle is >more productive than C since I spend sooooo much time dealing with thier >interpeter's bugs. For now I can only hope Carl gets a PDA itch,
Me too! Brian Hawley

 [2/11] from: chrismorency:videotron:ca at: 11-Apr-2001 19:29


Hi all! Actually, the RAM hardware the heap is in is no faster than the rest of the RAM. The reason it is 32k is because it is accessed using a 16-bit signed offset pointer. Other RAM needs a change of base pointer in addition to the offset, an operation that takes slightly longer. Palm OS is 16-bit, like MS-DOS. The speed difference is similar to that between .com and .exe programs on DOS. I'm not sure, but I guess a good PalmPilot programmer could be able to pull this off... I might even know someone who'd be interested... Palm OS is pretty generous by embedded standards. REBOL just isn't structured by embedded standards. And yes, REBOL would need some minor rewriting to really fly on Palm OS, WinCE or in any other environment that is not based on the slow-disk, large-heap pattern. Palm OS and WinCE are based on a small- heap, in-memory database pattern. WinCE has a potentially larger heap (32-bit addressing) but can have a heap that is too small for traditional REBOL, as I think it does with the HP Jornada 620 when its RAM hasn't been updated. I personnally tried rebol (as opposed to use or abuse ;-) on three WindowsCE platforms, and it ran really good... Is there any benchmark script ? I'd like to see how it can manage with objects...
>Till then I will keep on using Satellite Forms, which I am skepticle is >more productive than C since I spend sooooo much time dealing with thier >interpeter's bugs. For now I can only hope Carl gets a PDA itch,
I did a multi-platform porting/recoding of a PalmOS application originally written in CodeWarrior for Windows/WindowsCE/PalmOS using VB, eMbedded Visual Basic and AppForge (VB for PalmOS) with a database being accessed either through ADO/ADOCE/AppForge PDB Library with a Conduit written in VB that was synchronising data using ODBC and building the MDB, CDB and PDB databases at once... overall, I reuse 90% of the code in all version (only byref object type where modified and the database access !). If Rebol/View existed on all three platforms, I'm sure we would have used it ! And could still use the scripts online to do the same !!! Rebol is a refreshing look in programming I'd like to see more in PDA and Mobile units... Last time I looked at Satellite Forms, the license fee was way overrated ! Chris

 [3/11] from: ryanc:iesco-dms at: 11-Apr-2001 16:34


<SNIP> > I could probably write it in two weeks (at least the basics), > after several months of reading and research of course. :( > > Experience counts. I've been thinking about this, off and > on, for a few months now. Carl has actually done things like > this before (Amiga comes to mind)...
</SNIP> I have considered it too. I actually went so far as to test some interpeter designs. I ended up producing something much simpler, more oriented towards data collection for now. Lately I have been really thinking about just s--- canning the Palm, and going with, well, something else that can run REBOL. I might getting one of those VR6's, just to see if I can get REBOL to run on it. --Ryan

 [4/11] from: jeff:rebol at: 11-Apr-2001 16:50


Howdy, Chris:
> I'm not sure, but I guess a good PalmPilot programmer could > be able to pull this off... I might even know someone who'd > be interested...
Yes, the REBOL Palm port lives in a border town next to the realm of "possibility". REBOL has even been compiled for Palm before, but the problem is that in order for REBOL to run (or even to boot) a segmentation paging scheme (virtual memory) has to be used. Under such a scheme, page faults would occur constantly. More time would be spent moving memory than in being an interpreter. As you approach the problem of a REBOL Palm port, it becomes increasingly infeasible. The other approach is to hack the memory protection of Palm OS. This isn't acceptable, though, because of the potential for accidentally hurting other apps or data on the pda. There's still more issues, from Palm's event model and how REBOL's works, potentially workable, but still an issue. And how do you write scripts -- in graffiti?? Storing and load scripts from the database? Anyhow, there were enough demonstrable problems with it that we scrapped consideration of the Palm -- to the disappointment of many. -jeff

 [5/11] from: chrismorency:videotron:ca at: 11-Apr-2001 21:25


Hi, Lately I have been really thinking about just s--- canning the Palm, and going with, well, something else that can run REBOL. I might getting one of those VR6's, just to see if I can get REBOL to run on it. Hmm, I know some people can't stand Microsoft's products... but there might be a compromise for someone considering buying a PDA. For instance, the Compaq iPaq (strongarm) running PocketPC out-of-the-box "can" and "is" currently flashed with Linux ! It host a 206 strongarm processor, quite enough to run some scripts ;-) Best, Chris

 [6/11] from: chrismorency:videotron:ca at: 11-Apr-2001 21:22


Hi, jeff wrote: Yes, the REBOL Palm port lives in a border town next to the realm of possibility". REBOL has even been compiled for Palm before, but the problem is that in order for REBOL to run (or even to boot) a segmentation paging scheme (virtual memory) has to be used. Under such a scheme, page faults would occur constantly. More time would be spent moving memory than in being an interpreter. As you approach the problem of a REBOL Palm port, it becomes increasingly infeasible. " Of course, I have to agree with you, the memory system in the Palm is surely a limit. I've had my share of dealing with it ;) The other approach is to hack the memory protection of Palm OS. This isn't acceptable, though, because of the potential for accidentally hurting other apps or data on the pda. Unless it'll be only used for Rebol... but then again, what is the point of having a Rebol-only PDA ? There's still more issues, from Palm's event model and how REBOL's works, potentially workable, but still an issue. Please don't elaborate more, I know about that event model, and that pseudo-multitasking behind a true-hackable-multitasking and I'll probably have nightmares tonight ;-) And how do you write scripts -- in graffiti?? Storing and load scripts from the database? Well I wouldn't write them using Graffiti that's for sure. But then again, one could write them on his desktop and load them on it's PDA. I've actually written several programs in OPL for the PsionS5 on the device itself and I have big hands ! Anyhow, there were enough demonstrable problems with it that we scrapped consideration of the Palm -- to the disappointment of many. Well, I can understand why the Rebol team has decided to put the development of Rebol for the Palm on hold, but why not under EPOC ! At least for those who can't stand owning a PDA running WindowsCE or any Microsoft's OS ;) Best, Chris -jeff

 [7/11] from: rishioswal::yahoo at: 11-Apr-2001 20:07


EPOC would be a good os to port rebol. Psion users are the type of people who would buy rebol/view/core/pro. The built in OPL language (basic like) is very popular... rishi --- Christian Morency <[chrismorency--videotron--ca]> wrote:

 [8/11] from: ryanc:iesco-dms at: 12-Apr-2001 11:41


Hey Chris, I have'nt made a decision, and I still have more research before I do. Putting Linux on a Pocket PC is interesting idea though. Actually CE is a possibility, and I would like to support it for those applications that just need 64 MB, those sworn to Microsoft, and a few other instances. The VR6 so far seems to fit my essential criteria quite nicely. Even if it was CE, it would be on top my list. However, I do personally dislike Microsoft and CE, so the fact its not CE is exciting. Of course previously I was'nt pleased that moving to REBOL meant moving to CE. --Ryan PS: Satellite Forms has no runtime licensing anymore. Christian Morency wrote:
> Hi, > "Lately I have been really thinking about just s--- canning the Palm, and
<<quoted lines omitted: 12>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400 I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world. -Einstein

 [9/11] from: kolla:nvg:ntnu:no at: 14-Apr-2001 3:30


On Wed, 11 Apr 2001, Brian Hawley wrote:
> What REBOL would need to do to make this work: > 1 - Make sure that as much of the native code as possible > is reentrant, so that multiple REBOL instances can be > run at the same time from the same code. This could > improve the Windows and Linux ports as well, maybe.
I remember asking about this on that IRC conference with Carl back when the very first rebol binaries went public, or rather more specificly back then, wether we could expect to see rebol as shared library or background engine like RexxMast on amiga. If my memory serves me right, the answer was positiv, ahm.. :) -- kolla

 [10/11] from: chrismorency:videotron:ca at: 12-Apr-2001 19:18


Hi Ryan, Unfortunately Linux suffered major blows lately regarding PDAs in the news / reviews. Yes, although I have several WindowsCE/PalmOS/EPOC devices, I still hope Linux will find it's way on PDAs. As for the VR6, I don't know, you might be interested in reading what Brighthand.com had to say about the VR3 : http://www.brighthand.com/html/otherpdas/agenda_page1.html, doesn't sound good so far. Last I hear, Yopi was not going to see it through productions... and the only ones who seems to pull it off might be Compaq : http://www.handhelds.org/ with their linux-oriented PDA projects including flashing PocketPC iPaqs with Linux ;) but it's still a risk, you could loose your device in the process... But to get back at Rebol, I tried the Change Benchmark available at www.rebol.org and it (the script not revol) crashed with a stack overflow ??? I wanted to evaluated Rebol's speed under some WindowsCE devices... I'll have to take a look at the code and see what's the problem... Best, Chris

 [11/11] from: ryanc:iesco-dms at: 12-Apr-2001 18:13


Thanks Chris, Hopefully the finished product is nothing like the developers model. I am now in no hurry to get one for testing, though I still see alot of potential. No easy decision now, --Ryan Christian Morency wrote:
> Hi Ryan, > Unfortunately Linux suffered major blows lately regarding PDAs in the news /
<<quoted lines omitted: 75>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400 I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world. -Einstein

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted