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
19 The first tenet of our philosophy is the "free software" idea: software
20 being free has several advantages (less bugs because more people see
21 the code, you can have the source and port it to your own working envi‐
22 ronment with you, ... and of course, that you don't need to pay any‐
23 thing).
24
25 The second idea is a pet peeve of many: many languages like matlab are
26 pretty well suited for their specific tasks but for a different appli‐
27 cation, you need to change to an entirely different tool and regear
28 yourself mentally. Not to speak about doing an application that does
29 two things at once... Because we use Perl, we have the power and ease
30 of perl syntax, regular expressions, hash tables etc at our fingertips
31 at all times. By extending an existing language, we start from a much
32 healthier base than languages like matlab which have grown into exis‐
33 tence from a very small functionality at first and expanded little by
34 little, making things look badly planned. We stand by the Perl sayings:
35 "simple things should be simple but complicated things should be possi‐
36 ble" and "There is more than one way to do it" (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 sat‐
41 isfactory as a tool and can do everything we want easily. And be porta‐
42 ble.
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
52 We want speed. Optimally, it should ultimately (e.g. with the Perl com‐
53 piler) be possible to compile PDL::PP subs to C and obtain the top vec‐
54 torized speeds on supercomputers. Also, we want to be able to calculate
55 things at near top speed from inside perl, by using dataflow to avoid
56 memory allocation and deallocation (the overhead should ultimately be
57 only a little over one indirect function call plus couple of ifs per
58 function in the pipe).
59
60 We want handy syntax. Want to do something and cannot do it easily?
61 Tell us about it...
62
63 We want lots of goodies. A good mathematical library etc.
64
66 Copyright(C) 1997 Tuomas J. Lukka (lukka@fas.harvard.edu). Redistribu‐
67 tion in the same form is allowed but reprinting requires a permission
68 from the author.
69
70
71
72perl v5.8.8 2003-05-21 PHILOSOPHY(1)