Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAMEPDL::Philosophy -- Why did we write PDL?
DESCRIPTIONSome history from the creator of
The Start of PDL
``Why is it that we entertain the belief that for every purpose odd numbers are the most effectual?'' - Pliny the Elder
Obviously many astronomers have dealt with these problems before, and a large amount of software has been constructed to facilitate their analysis. However, like many of my colleagues, I was constantly frustrated by the lack of generality and flexibility of these programs and the difficulty of doing anything out of the ordinary quickly and easily. What I wanted had a name: ``Data Language'', i.e. a language which allowed the manipulation of large amounts of data with simple arithmetic expressions. In fact some commercial software worked like this, and I was impressed with the capabilities but not with the price tag. And I thought I could do better.
As a fairly computer literate astronomer (read ``nerd'' or ``geek'' according to your local argot) I was very familiar with ``Perl'', a computer language which now seems to fill the shelves of many bookstores around the world. I was impressed by its power and flexibility, and especially its ease of use. I had even explored the depths of its internals and written an interface to allow graphics, the ease with which I could then create charts and graphs, for my papers, was refreshing.
Version 5 of Perl had just been released, and I was fascinated by the new features available. Especially the support of arbitrary data structures (or ``objects'' in modern parlance) and the ability to ``overload'' operators - i.e. make mathematical symbols like "+-*/" do whatever you felt like. It seemed to me it ought to be possible to write an extension to Perl where I could play with my data in a general way: for example using the maths operators manipulate whole images at once.
Well one slow night at an observatory I just thought I would try a little experiment. In a bored moment I fired up a text editor and started to create a file called `
Well people were fairly critical - among the most vocal were Tuomas Lukka and Christian Soeller. Unfortunately for them they were both Perl enthusiasts too and soon found themselves improving my code to implement all the features they thought
--- Karl Glazebook, the creator of
Major ideasThe first tenet of our philosophy is the ``free software'' idea: software being free has several advantages (less bugs because more people see the code, you can have the source and port it to your own working environment with you, ... and of course, that you don't need to pay anything).
The second idea is a pet peeve of many: many languages like Matlab are pretty well suited for their specific tasks but for a different application, you need to change to an entirely different tool and regear yourself mentally. Not to speak about doing an application that does two things at once... Because we use Perl, we have the power and ease of Perl syntax, regular expressions, hash tables, etc. at our fingertips at all times. By extending an existing language, we start from a much healthier base than languages like Matlab which have grown into existence from a very small functionality at first and expanded little by little, making things look badly planned. We stand by the Perl sayings: ``simple things should be simple but complicated things should be possible'' and ``There is more than one way to do it'' (
The third idea is interoperability: we want to be able to use
The fourth idea is related to "PDL::PP" and is Tuomas's personal favorite: code should only specify as little as possible redundant info. If you find yourself writing very similar-looking code much of the time, all that code could probably be generated by a simple Perl script. The
Minor goals and purposesWe want speed. Optimally, it should ultimately (e.g. with the Perl compiler) be possible to compile "PDL::PP" subs to C and obtain the top vectorized speeds on supercomputers. Also, we want to be able to calculate things at near top speed from inside Perl, by using dataflow to avoid memory allocation and deallocation (the overhead should ultimately be only a little over one indirect function call plus couple of ifs per function in the pipe).
Go on, try it!Well, that's the philosophy behind
AUTHORAdded Karl Glazebrook (2001) contributions by Matthew Kenworthy
Copyright(C) 1997 Tuomas J. Lukka (firstname.lastname@example.org).
Redistribution in the same form is allowed but reprinting requires a permission from the author.