Perl Data Language 2.4.10 released 94
First time accepted submitter tonique writes "Perl Data Language (PDL) 2.4.10 has been released. Highlights of the new release are automatic multi-thread support, support for data structures larger than 2 GB and POSIX threads support. Also available is the first draft of the new PDL book. PDL is especially suitable for scientists. For those not in the know, 'PDL gives standard Perl the ability to compactly store and speedily manipulate the large N-dimensional data arrays which are the bread and butter of scientific computing.' Commercial languages used for the same purpose include MATLAB and IDL."
Re: (Score:2)
Oh, don't worry - people who've never spent my time coding Perl will be by to bash sigils any time now.
Re: (Score:2, Interesting)
I've spent years coding the Perl; I'll be glad to bash the language as largely unsuitable for large scientific collaborations. The language wasn't really designed, but happened by urban sprawl and accretion over the years. The syntax is inconsistent and the code hard to read. Use something clean and designed well like Python.
Re: (Score:2, Insightful)
Say what you like about Perl, at least it doesn't shit itself if I accidentally configure my text editor to handles tabs the wrong way.
Re: (Score:2)
funny, I've never known anyone to have that problem in the last 12 years of using Python. You must be one unlucky S.O.B. Sorry.
Re: (Score:2)
funny, I've never known anyone to have that problem in the last 12 years of using Python. You must be one unlucky S.O.B. Sorry.
Funy, I've met tons of people who had that problem.
You must be one lucky S.O.B.
Re: (Score:1)
Re: (Score:3, Insightful)
eh. find replace "\t" with " " ? just a thought.
Works great until you inherit code from some moron that used tabs in some places and 8 spaces in others (including alternating between lines right next to each other), then it makes your life hell sorting it all out. Matters get further complicated when your editor has a different setting of tabs than someone else on the same project.
Using tabs for whitespace in code is the work of an angry little daemon, but writing a language that is dependent on whitespace (and accepts tabs) when "proper" white spacing h
Re: (Score:3, Informative)
will tell you all the line numbers where someone's mixed tabs and spaces. Or use M-x whitespace-mode (or your editor's equivalent) and clean them up yourself in whatever consistent style you'd prefer.
Python's design has plenty of annoyances, but its whitespace-based syntax is the among least of them.
Re: (Score:1)
Yes there are ways* to deal with cleaning them up, the point is that you shouldn't have to spend time dorking around with it. In any structured (not whitespace dependent) language I can vent my spleen if I disagree with someone's formatting and then move on (cleaning as I go or adhering to their standard) without damaging any logic or misunderstanding it due to different tab stops.
* - The main issue with any solution that I'm aware of is that until you get into complex regexes that are more than "a few key
Re: (Score:1)
Python doesn't care whether you're using tabs or spaces, so long as you use a consistent amount of it to denote blocks. The problem is that some editors don't show you the difference. Nobody complains about semicolon requirements in C code because an editor shows you where all the semicolons are in a given piece of code. I feel whitespace should be just as easy to follow. If someone's indented a block wrong or mixed in some tabs, that should be just as easy to spot - even if you're using a language wit
Re: (Score:1)
Python doesn't care whether you're using tabs or spaces, so long as you use a consistent amount of it to denote blocks.
The issue isn't if Python cares or not. The issue is what it does when multiple programmers have differing standards and work on the same file. The issue is more noticeable when you are taking over someone else's code, especially when the prior maintainer isn't available for initial guidance.
You still seem to fail to understand my point that you should not need a special editor to help you correctly understand what the code is doing. The code should read the same regardless of if I'm using the "super-duper
Re: (Score:1)
The code is doing exactly what the source code tells it to do. If you're having trouble reading what's in your source code - especially source code from someone else - there's plenty of tools available to make that job easier. If your editor made periods and commas look the same, it'd be hard to write C code and it'd be smart to switch. If your editor makes tab
Re: (Score:3, Insightful)
Using characters that are, by definition, not supposed to be displayed, is the single most stupid decision ever made in programming languages.
Re: (Score:2)
Someone please, PLEASE mod this up. It so deserves better than 0.
Re: (Score:1)
there. fixed it for ya.
Re: (Score:1)
Re: (Score:1)
To a certain degree, it is inevitable that programmers have to make allowances for the limitation of the machine in the way they express themselves. But to create a new language that forces the programmer to be rigid in formatting is just plain stupid. Not even BASIC was ever that bad. FORTRAN abandoned that notion in the 80's. Anyone who actually likes the straight-jacket that is Python should be fitted for a physical jacket.
I get it now. (Score:2)
So, essentially it's only a problem if you are a human being, or constantly interact with human beings.
Re: (Score:3)
Use something clean and designed well like Python.
Many scientific computing organizations can never get enough memory and that's a problem when coding large data structures in Python. Python has a nice design, but the runtime still needs improvement. Perl6 is in the same boat.
Re: (Score:3)
Re: (Score:3)
Memory usage is not a problem for python.
Ever! In no possible case, in no possible usage scenario, in the entire history of the galaxy, has memory usage ever been a problem for python.
Re: (Score:3)
The language wasn't really designed, but happened by urban sprawl and accretion over the years.
It's called "evolution". It works well for complex things.
Re: (Score:3)
Re: (Score:1)
Re: (Score:2)
I've spent years coding the Perl; I'll be glad to bash the language as largely unsuitable for large scientific collaborations. The language wasn't really designed, but happened by urban sprawl and accretion over the years. The syntax is inconsistent and the code hard to read. Use something clean and designed well like Python.
Hahahahahahahaha.
Funny man.
Re: (Score:2)
Re:first post? (Score:4, Informative)
Re: (Score:3)
Re: (Score:1)
Which is also why R for Python (RPy) [sourceforge.net] also exists.
Re: (Score:2)
No Perl is. Real scientist use the Python programming language [python.org] with Numpy [numpy.org] and MatPlotLib [sourceforge.net] :D
In my experience, scientists tend to use Excel VBA and incredibly convoluted batch files.
Disclaimer: I mostly met mad scientists.
Re: (Score:2)
At least in my field, putting out a figure that is obviously from Excel is a huge faux paus. Doesn't mean a lot of people don't do it, though. Especially the respected but crusty oldsters who can get away with it.
Re: (Score:2)
really... no other comments on this one? science is apparently ded.
Yes, because if there were still people interested in science, they'd obviously be all over a more-or-less homebrew project for which there are already well-established alternatives.
Quiz (Score:5, Funny)
PDL: the computational power of Matlab, octave, IDL and NumPy with the __________ of Perl!
Re:Quiz (Score:4, Funny)
flying purple unicorns
Re: (Score:2)
Tao?
Awesomeablity?
Parrot-eske?
Tim Toady?
Re: (Score:3, Insightful)
Re: (Score:2)
Haha :) Work smarter, not harder!
PS.. it's spelled laziness.
Re: (Score:1)
Re: (Score:2)
Oh, I see. Apparently it's called "Perlude" now.
Re: (Score:3)
That's a very Perl-like quiz as many different and apparently completely unrelated statements would fit the answer, possibly all conceivable statements, in fact.
Re: (Score:2)
Re: (Score:2)
What do you mean "missing word"? Looks like good ol perl to me.
Oh my's (Score:3)
with the TMTOWTDI [c2.com] of Perl!
with the fluidity of Perl!
with the my's and sigils of Perl!
Then again, Perl is an acquired taste even for me.
Re:Quiz (Score:5, Informative)
user base.
Most of the scientific community knows at least a *little* bit of Perl ... they might not know all of the idiosyncrasies (eg, I've found more than a fair share of '{IDL,Fortran,C} written in Perl'), but it's far greater than those who know any Python.
We don't have that many Matlab users in our department, and no Octave users that I'm aware of ... most use IDL, but IDL has the problem that you can't freely distribute your code for others to use. (There's a free runtime, but it can't open or write external files, which isn't so useful for writing tools for others to use)
We do have a small handful of GDL users, and a growing number of NumPy users (via SunPuy [sunpy.org]), but the problem they're running into is trying to get the scientists to learn Python -- there's enough odd conventions that it's a fair bit of hand-holding initially.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Oddly enough, PDL has more "computing power" than NumPy, in the sense that its threading engine works faster and it is less of a memory hog. It is also older than NumPy, having been first written in the late 1990s.
No need for comments (Score:2)
Usage information ? (Score:1)
Re: (Score:3)
Use the link in the summary to download the draft of the book, chapter 2 should give you enough of an overview to know at least some things you can do with PDL.
Re: (Score:2)
Perl I love you (Score:2)
Oh Perl, what CAN'T you do?!
Re: (Score:1)
Re: (Score:3)
Oh Perl, what CAN'T you do?!
Run in purely managed environments without support for dynamic typing, such as Windows Phone 7. (No native assemblies, no P/Invoke, no Emit.)
Re:Perl I love you (Score:5, Funny)
Thanks for the heads up. I was thinking of buying one of those discounted Windows 7 phones to run my PDL plasma confinement simulations for my tokamak, but it looks like that won't work out. I guess I'll look into an Anroid-based solution instead.
Re: (Score:2)
Re: (Score:2)
Or get a Raspberry Pi. You don't need a radio on your simulator.
Re:Perl I love you (Score:5, Funny)
Stay relevant.
Why PDL? (Score:5, Informative)
Obviously, I forgot to include a link to the the actual PDL site [perl.org]. Sorry about that.
I'm personally using PDL in the context of environmental noise measurements; I get long series of numbers and need to sum (and handle them in other ways) efficiently. Why, then, PDL and not numPy or something else? It stems from the fact that I had used Perl for scripting and text handling earlier. Also, I wasn't required to use something else. So laziness is a rather strong reason. Perhaps I was also a lost cause (that's perhaps a wrong phrase?) because I had started with Perl already.
I'm a firm believer in "use a tool suitable for the purpose", so I use R for statistical things. I shudder at all the things Excel, a prime example of a tool exploitable for multiple purposes, is used by my co-workers...
Re: (Score:2)
Re: (Score:2)
new Features (Score:1)
There's some new language syntax features. Here's what is looks like: %£T$%£$%"^%"
Re: (Score:2)
Obviously you haven't spent any time on #perl6.
The new features look like this:
none($/<dotted>.ast >>+&<< (255 <<+^<< $/<subnet_mask>.ast))
or fail("Address does not conform to subnet mask");
HDF5 (Score:1)
Personally I like HDF5. Compact, fast, can be read/written in parallel, bindings to many languages. A bit of a pain to learn at first, but well worth it.
IAMA PDL user (Score:5, Insightful)
I was happy to be reading /. on my lunch break and see PDL mentioned. I use PDL and am glad to see it get some notice.
I am disappointment in the comments so far though. The anti-Perl froth is strong in this thread and I am not sure why?
Here is my point of view:
-Use whatever programming language suits you and your task the best. Maximize for total productivity which is a function of both of these things in varying degrees.
-Perl suits me best, personally, as a comfortable tool This is kind of squishy...it just feels right to me. MANY MANY people agree with me. But maybe you don't. meh.
-My tasks involve (a) parsing data from a variety of sources and (b) number crunching. Perl is already fantastic at (a). PDL makes Perl fantastic at (b).
-The people behind PDL use it for even more numerically complex tasks than I. Check out the docs and mailing lost archives and see. http://pdl.perl.org/?page=mailing-lists
-If you are already writing code in C, Python, Fortran or whatever else than you should stick with it. Moving over to PDL just because it exists doesn't make any sense, of course.
Now, as a Perl and PDL user could someone please explain to me the string visceral reaction shown by people in these comment threads whenever it is mentioned? Did Larry Wall challenge you to a bar fight once or something? (Probably not, I met him once and he doesn't seem like a bar fight kind of guy.)
Re: (Score:2, Troll)
Some people lack the ability to understand Perl code, and fear what they do not understand.
Re:IAMA PDL user (Score:4, Insightful)
It is more like: Some people lack the ability to write clean Perl code, and fear the clean code as it might make look the job too easy.
Perl is indiscriminate at making things easy, even if that is writing crappy code.
Unreadable Perl code isn't the problem of the language, it is the problem of the developers. Trying to fixing it at the language level is wrong and redundant, because in the end it would become Visual Basic or Java or Python. And we already have them.
Re: (Score:2)
I think the main reason Perl has a bad reputation has nothing to do with the language syntax and everything to do with the dot com boom. All these companies were hiring people who knew nothing about web computing and who made things up as they went along. Perl was a hot language at the time, so the hordes of newbies ran with it. The end result is hundreds of millions of klugey, poorly organized, poorly documented, poorly
Re: (Score:2)
Yes, this is an ongoing problem, and it is what made Python the more popular solution. Perl is easy to write, but harder to write well -- the whole point of the language is that it is rich and expressive, without a lot of imposed structure. People who write Perl as they learn tend to write crappy, unmaintainable Perl. The result is that most students' first experience with Perl is of crappy, unmaintainable spaghetti-Perl. Those students often grow up to become Perl-haters.
Python is more novice-friendly
The Internet weeps... (Score:2)
For shortly it will bear the burden of millions upon millions of lines of FORTRAN written in Perl.