Being a purist, minimalist and a pedant, it has come to my attention that bringing a Perl interpretor to a PDA with very constrained memory requirements might prove useful, if the power of that interpretor could be leveraged to handle things outside the "norm" of the tool.

I am/was one of the lead developers of the "Bootable Business Card", a business-card sized Linux distribution on a bootable CD that includes hundreds of tools, utilities, and other things on a compressed ISO image (leveraged with cloop, BusyBox, -Os at build-time, etc). In this space and memory-constrained environment, we had to use a script for init, instead of a binary, stripped the --help strings from many of the common binaries to reduce size, and so on. I'm very familiar with trying to pare down the unnecessary cruft.

So I pose this question.. when dealing with a device that has no built-in filesystem (a PalmOS©-based PDA device), how much of Perl can be removed? PalmOS handheld devices don't have a filesystem or "directory" structure, so the code in the interpretor that deals with those things could be removed (there is "Virtual File System" (VFS), but it's only a "pseudo" filesystem). This may change when OS5.1 and later versions come out with native filesystem support on ARM devices, but current devices and the newest OS5 release will not contain this functionality.

Palm devices likely won't be able to take advantage of most of the external modules (File::Copy or IO::Socket for example), so those hooks in the perl interpretor could be removed, as well as most of the documentation (perldoc, et al). Strings inside the binary itself could be removed as well. Someone who is running Perl on their Palm PDA device is probably familiar enough with perl to be able to use it without onboard documentation (or documentation could be stored in HTML and viewed on the Palm in another app such as Plucker).

Is it feasible to get the binary down to ~200k? 300k? I'm looking for other ways to shave down the size, remove the parts that aren't needed, and still retain the functionality that I require. I'm looking to create a resource library, PerlLib.prc that can be called from other applications directly, similar to the MathLib and SysZLib libraries commonly in use.

Python has already been ported to the Palm in the form of Pippy, but I'd like to solicit ideas for ways to bring Perl to the PalmOS© PDA devices and still keep it as small as possible.


In reply to How much of Perl can be removed? by hacker

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.