Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Is Perl available for PalmOS?

by scottj (Monk)
on Mar 04, 2004 at 05:37 UTC ( #333792=perlquestion: print w/replies, xml ) Need Help??
scottj has asked for the wisdom of the Perl Monks concerning the following question:

In a recent node, it was mentioned by tachyon and dragonchild that perl has been ported to PalmOS. As a happy new owner of a Handspring Treo 600, this sounds rather appealing to me. But when I turned to Google and Super Search for more info, I found an empty sourceforge project and nothing more. CPAN , however, disagreed:
No known ports for Inferno | OS1100 | PalmOS | PRIMOS | VxWorks
So since a couple of folks here disagree with a quick Google search, I'm just going to throw this one out there: Does a Palm port exist? If so, please let me know where I can find it, as I'm very eager to get to work with it. Thanks!

Replies are listed 'Best First'.
Re: Is Perl available for PalmOS?
by DrHyde (Prior) on Mar 04, 2004 at 10:29 UTC
    There is no Palm Perl. Nor is there likely to be a full perl port (a limited subset would perhaps be workable), at least for Palm OS 4 and below, because (approximately) it would first involve writing a Unix-ish environment on the Palm. From a Unix point of view, the Win32 and VMS environments look familiar compared to Palm OS.

    I've not looked at Palm OS 5 and higher, but my understanding is that OS 5 is very similar to OS 4 architecturally.

    There *are* a few languages you can put on your Palm if you need to write code on there. I like Quartus Forth, and Lispme. There is also a limited Python port, as well as various BASICs and Small C.

        Thanks, larsen. While it's not the palmperl I was hoping for, the site you linked to has many interesting options for non-C Palm development. That should keep me busy for a while. :)
Re: Is Perl available for PalmOS?
by tachyon (Chancellor) on Mar 04, 2004 at 12:59 UTC

    I actually said windows CE and palmtops, ie in the generic meaning handheld dinky computers. This was in the context of how much power do you need to run perl (not a lot). Sorry for the confusion.



Re: Is Perl available for PalmOS?
by halley (Prior) on Mar 04, 2004 at 14:17 UTC
    Perl runs fine on my Sharp Zaurus SL-5500 (which runs Linux and a Busybox shell, not any form of PalmOS). There are several more-powerful versions of the Zaurus, as well. Last I looked, there's not much in the way of GUI toolkit access, but they may be working on support for the Qt which runs on Zaurus.

    [ e d @ h a l l e y . c c ]

Re: Is Perl available for PalmOS?
by elwarren (Curate) on Mar 04, 2004 at 15:15 UTC
    You'll find more info about this by searching for "microperl" It's there in theory, but I haven't found anything that worked. Mostly you'll find discussions explaining why, which basically boils down to perl being too big for Palm's memory. Searching perlmonks for "pda" or "perlce" will turn up some nodes discussing it and basically WindowsCE/PocketPC or a Linux device are your only choices.

    For what it's worth, I've only gotten Raineir's perl to work on my ipaq, the more current 5.8 perlce wouldn't run last time I investigated it. I'd like to run POE on my ipaq, eventually.

    ps: python, lisp, and java have all been ported to palm in some way or another. You'd think that would be motivation enough for us perl folks to build a better shoehorn :-)

      I have much the same problem, looking for a perl port I can install on my iPaq.

      I did a google search for your "Raineir's perl", but looks like that was a typo mate :-). Closest thing I found was this (Thanks to google's typo-detecting abilities).

      So does anyone have experience with this on an iPaq? Any help much appreciated

        Oops, I was close. I suggest Rainer's site to any techie with a CE device. He's ported some useful stuff to CE: wget, flite, ftp, a command line, perl, apache, tk, stunnel and more. I used stunnel to get an IMAPS connect before the inbox client supported, but IMAPS is now supported in WindowsMobile2003 or whatever they call it now...

        I have loaded both Perl56 from Rainer and Perl58 from PerlCE.

        Perl56 worked and I was able to grab a file via http. It supports Socket, Win32::OLE, Win32::Com, and Win32::API. You can do GUI stuff with Tk. The website says people have successfully talked to a SQLCE db.

        I loaded Perl58 but couldn't get it to run, wasted half a day on it and had to put it aside. Unsure if I corrupted the binary or if there's a dll conflict. I followed the instructions but some areas were vague... There are screenshots, so *somebody* has had it working :-)

        The site says it has better compatibility and working PerlIO. It also warns that the prebuilt binaries are heavy on the memory side because they have Unicode and debugging in there. I don't have access to MSVisualC++ so I cannot build my own port.

        I'm interested in using Perl for database access using tools like Win32::OLE for a local db with SQLCE or preferably OracleLite, but I'm also interested in exploring other access paths like DBD::Proxy for serverside db or even SOAP if the XML overhead isn't too much. I'm thinking about a daemon the runs constantly so as to avoid the startup penalty, something like POE that could handle requests in a single thread without forking...
Re: Is Perl available for PalmOS?
by UberGeek (Scribe) on Mar 04, 2004 at 14:16 UTC
    Heh... I too have an alpha-geek phone (treo 600) and have been looking to expand into developing apps for it; only this morning I recalled reading *somewhere* about a Palm port, and began googling and scouring CPAN for details. I'd read the node referred to when it was posted, but it only percolated through to me a few minutes ago where it was exactly. Et voila! your node at the top of the heap. Hopefully you have better luck than I did in finding activity in this area...

    No freaking way it compiled on the first try...
Re: Is Perl available for PalmOS?
by nite_man (Deacon) on Mar 04, 2004 at 14:15 UTC
      True, true... last time i've been working with this port, it was just enough for me to write various CGI scripts for my Linux servers. I had to emulate some linux behavior but it worked fine, at least for me :-)
      I was using Psion 5mx with 16MB memory, perl version (can't remember) and PerlWebServer. Nice combination :-)

      Greetz, Tom.
Re: Is Perl available for PalmOS?
by rchiav (Deacon) on Mar 04, 2004 at 16:00 UTC
    I'm guessing that perl on palmOS is going to become more possible with Perl6. Or rather, it's going to be more possible to port parrot to PalmOS and therefore allow a subset of Perl6 to run on PalmOS.

    I'd think that a multi-language VM would end up with more support than a single language VM like Java.

      For that matter, developing things in PalmOS 6 should be easier... the OS is getting a rewrite, basically...

      No freaking way it compiled on the first try...
      Donning protective flame shield...

      I used to prefer Palm, but they haven't done anything to improve their hardware or OS. I think they'd be dead if Sony hadn't started to breath new life into the hardware line.

      When I switched to PocketPc there was no going back to Palm. Biggest reason: I want to multitask and do something else while I'm waiting for my email to download.
        While I agree with the statement that Palm hasn't done anything to improve their hardware or OS, Handspring most certainly has (and Palm recently bought them).

        Case in point: the Treo 600. I dropped my Palm Vx for this toy... then my cell phone... and my digital camera... pager... blackberry... MP3/Ogg player... and my watch.

        In the bargain, I got a decent web browser, mobile AIM/MSM/YIM/ICQ/Jabber/IRC clients, multiple server SMTP & POP3, and VPN & SSH from anywhere with GPRS service...

        No freaking way it compiled on the first try...
Perl for the Palm? Why Not?
by logan (Curate) on Mar 04, 2004 at 21:20 UTC
    OK, let's take the next step. Why can't perl be ported to the Palm OS? Surely perl has been successfully built for smaller machines. The Treo 600 has 32 MB RAM. Seems to me that that's a lot more memory than the original machines Perl 1.0 ran on.

    If we started by stripping out stuff that a PDA wouldn't need, we could probably get Perl down to a size that could comfortably run on a high-end Palm device. Then it becomes a problem of making Perl run on the Palm OS. I won't pretend to know what's involved in a port, but I refuse to believe that it's impossible.

    "What do I want? I'm an American. I want more."
      It boils down to the way the PalmOS was designed. (I'm no expert here, and I haven't touched palm since PalmOS 3, so this may no longer hold true. Chips are up to 400mhz these days, PalmOS will have to improve enventually. Evolve or die!)

      While the hardware has 32mb, PalmOS handles memory in 64k blocks called records. This is the biggest chunk of code you can execute, but not all ram in a palm is executable, it is also split into storage ram. Storage ram is executed in place and is not loaded into an executable space.

      Suppose you have an app that displays jpg files. Your app loads and runs in executable ram. It gets to the point where it wants to display your jpg. Instead of loading the image into ram and twiddling bits, the app points to the jpg in storage and the code runs through it. This is one of the tricks that allows palm to run in low amounts of ram.

      Back to perl, the parser is pretty big. I believe it's up to a few megs these days. Obviously this is too big for the 64k limit. Google for "microperl" and "palm" and you can read about what people are doing to work on it and how these limitations affect them.

      There exists a good paper discussing how the JavaVM was ported to Palm to build the KVM. Google for "j2me palm kvm" and I'm sure it will come up. It's not too heavy and goes over alot of design decisions and roadblocks they ran into. I don't remember, but I think they ended up chaining 64k blocks somehow. Other interesting bits like removing Unicode from the KVM libraries removed something like 21mb of bloat on hello world.

      Perl on Palm explains how python was able to be ported.

Re: Is Perl available for PalmOS?
by mkirank (Chaplain) on Mar 05, 2004 at 11:18 UTC
    Just for your info , There is a HandHeld called Simputer ,which has a linux OS

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://333792]
Approved by arden
Front-paged by broquaint
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2018-07-20 18:55 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (439 votes). Check out past polls.