1PHILOSOPHY(1) User Contributed Perl Documentation PHILOSOPHY(1)
2
3
4
6 PDL::Philosophy -- what's behind PDL?
7
9 This is an attempt to summarize some of the common spirit between pdl
10 developers in order to answer the question "Why PDL"? If you are a PDL
11 developer and I haven't caught your favorite ideas about PDL, please
12 let me know!
13
14 An often-asked question is: Why not settle for some of the existing
15 systems like Matlab or IDL or GnuPlot or whatever?
16
17 Major ideas
18 The first tenet of our philosophy is the "free software" idea: software
19 being free has several advantages (less bugs because more people see
20 the code, you can have the source and port it to your own working
21 environment with you, ... and of course, that you don't need to pay
22 anything).
23
24 The second idea is a pet peeve of many: many languages like matlab are
25 pretty well suited for their specific tasks but for a different
26 application, you need to change to an entirely different tool and
27 regear yourself mentally. Not to speak about doing an application that
28 does two things at once... Because we use Perl, we have the power and
29 ease of perl syntax, regular expressions, hash tables etc at our
30 fingertips at all times. By extending an existing language, we start
31 from a much healthier base than languages like matlab which have grown
32 into existence from a very small functionality at first and expanded
33 little by little, making things look badly planned. We stand by the
34 Perl sayings: "simple things should be simple but complicated things
35 should be possible" and "There is more than one way to do it"
36 (TIMTOWTDI).
37
38 The third idea is interoperability: we want to be able to use PDL to
39 drive as many tools as possible, we can connect to OpenGL or Mesa for
40 graphics or whatever. There isn't anything out there that's really
41 satisfactory as a tool and can do everything we want easily. And be
42 portable.
43
44 The fourth idea is related to PDL::PP and is Tuomas's personal
45 favorite: code should only specify as little as possible redundant
46 info. If you find yourself writing very similar-looking code much of
47 the time, all that code could probably be generated by a simple perl
48 script. The PDL C preprocessor takes this to an extreme.
49
50 Minor goals and purposes
51 We want speed. Optimally, it should ultimately (e.g. with the Perl
52 compiler) be possible to compile PDL::PP subs to C and obtain the top
53 vectorized speeds on supercomputers. Also, we want to be able to
54 calculate things at near top speed from inside perl, by using dataflow
55 to avoid memory allocation and deallocation (the overhead should
56 ultimately be only a little over one indirect function call plus couple
57 of ifs per function in the pipe).
58
59 We want handy syntax. Want to do something and cannot do it easily?
60 Tell us about it...
61
62 We want lots of goodies. A good mathematical library etc.
63
65 Copyright(C) 1997 Tuomas J. Lukka (lukka@fas.harvard.edu).
66 Redistribution in the same form is allowed but reprinting requires a
67 permission from the author.
68
69
70
71perl v5.12.3 2009-10-17 PHILOSOPHY(1)