Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Perl on Palm

by fpi (Monk)
on Mar 13, 2001 at 13:00 UTC ( #64087=perlquestion: print w/replies, xml ) Need Help??

fpi has asked for the wisdom of the Perl Monks concerning the following question:

This question is for those of you who understand how Perl works, as opposed to how to work Perl, and also for those with an understanding of the Palm OS...

Why has Perl never been ported to create applications for the Palm OS? Is it just not technically feasible? What would it take?

I can understand the current units probably don't have enough memory (except for the Sony's with the memory sticks) or maybe even processor power to install a full interpreted language, but how about a scaled down version with only specific modules?

In addition, I guess I can't expect there to be some sort of special compiler for palm apps, since the existing Perl compiler itself is still in it's experimental, mostly undocumented, stage.

Any insight on this?

How about the Agenda Computing Linux Handhelds - I've read that a Python port will be the first scripting language available for those units. Anybody hear of any Perl interest?

Replies are listed 'Best First'.
Re: Perl on Palm
by Dragonfly (Priest) on Mar 13, 2001 at 16:11 UTC
    I believe I overheard Larry Wall mention something (not in person ;-) about the Perl on Palm problem playing a role in deciding to start work on Perl 6.

    He also alluded to the fact that the reason why Pippy (Python on Palm) was possible is the fact that much of the Python language is itself written in Python, internally. This makes it more feasible to write the core portions of the language and keep it small enough to fit into the memory limitation, from what I could tell. So I guess part of the Perl 6 design is lifting some more of this concept and will fit more easily into devices that require small footprints.

    If anyone out there remembers where this interview with Larry Wall was, I'd appreciate the link, as it's late and I can't remember right now. ;-) Also, I'd like to take a moment to point out the fact that my above description may be completely erroneous due to a combination of ignorance and sleep deprivation. Please proceed accordingly.

Re: Perl on Palm
by dvergin (Monsignor) on Mar 13, 2001 at 13:33 UTC
    You won't see Perl on a Palm Pilot soon.

    But you can get Perl binaries for WinCE machines. Or how about the Psion.

    There are also procedures for loading Linux on WinCE-type devices (especially the Compaq iPAQ). Once you have Linux, Perl cannot be far behind. You might want to check here for some general information.

    Also this link which usually works but is down just at the moment tells about some folks who are putting together a palm-sized device called myLinux with impressive specs. They're doing it as a sort of hacker-community group project and expect to go into production later this year. They were soldering up the first board over the week-end. Update: here's a link to an animation showing this unit. They almost have the first two demo units soldered up. (And the links work now.) You can sign up for an email list to get announcements about this project here.

      As a sidenote, slashdot is announcing that Transmeta (the company Linus Torvalds now works for) is releasing Midori Linux specifically for small devices such as palms and internet apliances.

      Fates! We will know your pleasures: That we shall die, we know; 'Tis but the time, and drawing days out, that men stand upon. - Act III,I, Julius Caesar
Re: Perl on Palm
by LD2 (Curate) on Mar 13, 2001 at 13:46 UTC
    Actually, one can create perl applications for the PalmOS, in fact there are many modules on CPAN that relate to that area:
    .. Just to name a few. I'm not quite sure when or if one will be able to install and actually code on the PalmPilot or PalmOS. Then again, with the changing of technology and the advancement of both the language and the hardware - who knows, the future may not be that far away.

    Update: fpi and dvergin made excellent points, I had not looked closely enough. Erf, that's what I get for being tired and responding too soon. :)
      I saw those modules also, but after closer inspection, I believe they are modules to access the data in the palm database format - data that is synchronized onto your hard drive after a hot sync.

      In other words, those modules are for applications that exist on your desktop computer, not your palm.

      However, I found no modules for drawing PalmOS widgets, so I assumed it was not even remotely possible yet to write a Perl program to actually run on the palm....But I guess those existing modules will be used to access the data, should Perl on Palm ever become feasible.
      These are helpful modules. But just so no one is misled by the phrase 'one can create perl applications for the PalmOS, these each are tools for use on a PC for building or handling PalmOS compatable data. So they can be used to create applications that will work with data on a PC that can be swapped back and forth with a Palm. But the applications created in this way will not run on the Palm itself.

      Thanks for the references, LD2. I hadn't gotten around to seeing what was on CPAN along these lines.

Re: Perl on Palm
by gregor42 (Parson) on Mar 13, 2001 at 21:24 UTC
    As far as running interpreted languages goes, I already have Hot Paw Basic running on my Palm 7x. So obviously even a very limited implementation would be possible. The issue is more one of SIZE, since we're talking about 8Mb TOTAL, including whatever scripts you want to run. Codewarrior is available for Palm to build C apps. (?C++?) Since a lot of PERL is written in C, it would seem that it would be POSSIBLE. But it also seems like it would be a lot of frustration. Looking at the footprint that PERL takes up on my workstation, storage-wise, with modules & all I think the real problem will be storage space. In this I think PocketPC's will have PERL long before Palm ever does.
      Is the amount of available memory really the reason that there are no Palm ports of Perl? According to a 1998 article on "The Perl Machine" in The Perl Journal:
      On conventional computers, Perl has a large 'footprint' - the compiler is often more than a megabyte, which can take a large fraction of a second to load into memory.

      If the entire Perl compiler only has a memory footprint of a megabyte then it is hard for me to imagine that a port of Perl could not fit into four or five megabytes total.

      That would still leave three or four megabytes of memory for everything else. Until recently Palm Pilots only came with 2MB of RAM, so I think that Perl-lovers would be able to squeeze their other applications into a few megabytes and still have room left for a fat four or five MB Perl for the Palm distribution.

      I get the impression that what prevents a port of Perl is architecture-related, not memory-related. In addition to the perl source there is probably a lot of other C source code out there that does not port to the Palm for reasons that are related to the Palm OS.

Re: Perl on Palm
by LunaticLeo (Scribe) on Mar 13, 2001 at 22:52 UTC
    The python port to palm was made possible by "Stackless Python" and the fact that python has a slimmer code base. I think "stackless" refers to the python-program's stack being allocated from heap, and not shareing the real stack of the interpreter. The PERL is a beast. It has alot of features and alot of hackery, and the parser is deeply involved with the interpreter. It is huge. Palms have limited fixed size stacks and not alot of memory.
Re: Perl on Palm
by r.joseph (Hermit) on Mar 14, 2001 at 07:49 UTC
    This is a very good question, one that I have been wondering about since I bought my Sony Clie about a month ago. While sitting in class, I am always bored and would love to have even basic Perl interperter to screw around with on the Palm, and was fairly dismayed when I heard that it had been ported to WinCE and Psion, but not to Palm.

    Why exactly can it not be ported to Palm. It really doesn't make since, but then again, I really don't know all that much about Palm programming. How about that version of Python for the Palm (Pippy?). Is it any good?

    Violence is a last resort of the incompetant - Salvor Hardin, Foundation by Issac Asimov

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://64087]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-07-25 20:06 GMT
Find Nodes?
    Voting Booth?

    No recent polls found