D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Portable programming

 

On Mon, 08 Jan 2007 19:28:04 +0000
Simon Waters <simon@xxxxxxxxxxxxxx> wrote:

> Neil Williams wrote:
> >
> > <devils-advocate>Nah, that means working with a proprietary API (on the
> > phone). You can run free software on a chip-and-pin terminal now so why
> > not ditch the proprietary rubbish and put a decent OS on the
> > device.</devils-advocate>
>
> Besides I thought Java was flavour of the free software month,

My continuing dislike of Java has nothing to do with the licencing
issues, I just don't like the language, I don't like the VM and I don't
like the widgets. Worst of all, I hate the speed penalty - my main
tasks involve devices with very limited resources, Java just cannot
deliver enough bangs for each byte.

Even Perl is out - these devices will not rely on any interpreted
languages, including python. If it isn't compiled to a native binary,
it is removed from the emdebian package. It may exist as an optional
binding but the package needs to work just with the compiled code.

Interpreted languages (all of them) have one insurmountable problem:
They have to carry the entire interpreter around with them onto any and
every device that needs to run even the tiniest program.

That's like C programs carrying around a copy of gcc and all the
required -dev packages, just to execute. Precompiled binaries
dramatically cut the amount of code required to support a simple
program.

Compiling / interpreting takes time and resources and those are two
things embedded devices do not have. Wasting time wastes battery life,
wasting resources simply means the package doesn't make it onto the
device in the first place. That's not exactly portable. ;-)

That said, the scripts that create the emdebian packages are all Perl -
cross-building needs LOTS and LOTS of resources, making Perl and even
Java look insignificant. Some of my cross-builds consume gigabytes of
disc space without so much as a by-your-leave.

(And I've got a few thousand packages to cross-build . . . )
:-(

It's about division of labour - the more powerful machine does the
cross-build so that the embedded device can only have the bytes it
actually needs. In theory . . .

--


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpKYsJ12HMqP.pgp
Description: PGP signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html