Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: palm perl porting, problems?

by mvaline (Friar)
on Jul 24, 2001 at 18:00 UTC ( [id://99332]=note: print w/replies, xml ) Need Help??


in reply to palm perl porting, problems?

Aside from the difficulty in porting the C to the Palm OS due to the kludged or complete abscence of STL (I really mean standard library--Sorry) support, the changes you would have to make to the actual design of Perl are rather significant. At best, you would end up with a "Perl-like" program.

First, the Palm OS doesn't have STDIN, STDOUT or STDERR. Now, the MacPerl people overcame that rather creatively, but since the Palm OS doesn't have a filesystem (at least not in the traditional sense), not even the most basic functionality exists. What you would have to do, I suppose, is write some sort of complicated system wherein you created a large resource database and then wrote an interface to it that emulated traditional filesystem calls.

In the end, I don't understand how useful this would be. If you need a certain Perl-like functionality in a program, you would be better off trying to simply implement that functionality in a traditional Palm application.

Replies are listed 'Best First'.
Re: Re: palm perl porting, problems?
by strredwolf (Chaplain) on Jul 24, 2001 at 23:12 UTC
    Actually, PalmOS does have a file system, but it's more like Mac's old MFS file system, in which the directories are virtual. Think reading files on Macintosh.

    However, accessing a DOS formatted flash drive, either via compact flash or SMC, is availible.

    There is existing code to read Memopad files, "schlep'ed" files (normal files wrapped around Palm's pdb database format...) and PilotDOC format.

    But for a cheap (read: not free) scripting enviroment, you should look into PocketC http://www.orbworks.com. The only downside is that it doesn't have Internet connectivity, but thankfully is extendable.

    --
    $Stalag99{"URL"}="http://stalag99.keenspace.com";

Re: Re: palm perl porting, problems?
by dr_lambado (Hermit) on Jul 24, 2001 at 19:27 UTC

    If by a filesystem you mean a directory system for perl to live in. I don't know about the other stuff, but this just struck me....
    After looking at this page I had an idea. If there is a version of zlib for PalmOS and zip files can have filesystems (or at least directory structures) so why not have a PalmOS app that calls the zlib to dynamically unzip what you need, this would cut down on the physicaly space need for perl (but increasing the swapping needed in RAM, bite me).

    I have no idea at all how you would implement this, but it would be cool if it worked :)

    I know that Plucker, a perl app, uses zlib on the palm to load web pages downloaded from you PC.

    The Evil but Fickle Dr Lambado
    In the Kingdom of the Blind, the One Eyed Man is King

Re: Re: palm perl porting, problems?
by bikeNomad (Priest) on Jul 25, 2001 at 09:05 UTC
    I don't think that the C code for Perl uses the C++ STL.

    Aside from that, I can see cases where it might make sense to have Perl (in some form) available on the Palm. Your comment about "Perl-like" may be right on the money; for instance, imagine a byte-code interpreter that lacks string eval (and hence the compiler and its huge tables). This could work like a cross-compiler; you'd spit out bytecodes into a .PDB file, and there could be a minimal Perl VM in a .PRC that could interpret the bytecodes.

    As long as you don't use string eval (and this would rule out, for instance, having a Perl compiler or full-featured debugger that actually ran on the Palm), this might be a good way for Perl-fluent programmers to make Palm apps — when loaded with Palm-specific Perl modules so you can do something useful with the Palm databases, inter-process communication, and events.

    Much as I'd like to see a real language environment that I could program on the Palm (perhaps with an attached keyboard), having a quick way to knock off Palm apps would be a real win.

Re: Re: palm perl porting, problems?
by John M. Dlugosz (Monsignor) on Jul 24, 2001 at 19:48 UTC
    Doesn't have a filesystem?

    Then how does it store the add-on programs, text files and graphics, and all the stuff the PDA app uses?

    It needs some way to organize and find it again.

      It only has "databases", which are accessed record by record (as opposed to the Unix byte-stream model). I suppose you could use one of these to emulate files, but it wouldn't interact with anything, and so would not be useful.

      To make a Palm language useful, you have to provide access to the databases (as records, not as bytes). And ideally, you'd have some GUI layer so that you could interact and respond to the many PalmOS events (like being put to sleep).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://99332]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-03-28 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found