Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Perl Data Language 2.4.10 released

samzenpus posted more than 2 years ago | from the check-it-out dept.

Math 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."

Sorry! There are no comments related to the filter you selected.

first post? (0)

Anonymous Coward | more than 2 years ago | (#38942147)

really... no other comments on this one? science is apparently ded.

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38942171)

Dunno. Were there a lot of posts when Perl Data Language 2.4.9 was released? I must have missed that earth shattering announcement, I'm sure.

I guess science is as "ded" as Perl.

Re:first post? (1)

bill_mcgonigle (4333) | more than 2 years ago | (#38942183)

Oh, don't worry - people who've never spent my time coding Perl will be by to bash sigils any time now.

Re:first post? (2, Interesting)

iggymanz (596061) | more than 2 years ago | (#38942283)

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:first post? (2, Insightful)

Anonymous Coward | more than 2 years ago | (#38942395)

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:first post? (1)

iggymanz (596061) | more than 2 years ago | (#38942801)

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:first post? (0)

Anonymous Coward | more than 2 years ago | (#38943921)

It's rarely a problem if you always edit your code in the same editor, as does everyone else you work with. But the moment one guy uses mixed-tabs and spaces edits code produced by someone with spaces-only configuration, you have a problem. If you're lucky, both sides have the same definition of the width of a tab and auto-convert from one version to the other, which just means your source repo change log will look a bit ugly (the white space changes everywhere when one person makes even a small change), but if you're unlucky, it won't convert at all or the conversion disagrees on the number of spaces in a tab (all tabs are converted to four space when they'd been used to produce eight space indents elsewhere).

I actually like both Perl and Python, but the fact that they didn't enforce any sort of whitespace system can cause some headaches on team projects.

Re:first post? (1)

X.25 (255792) | more than 2 years ago | (#38948727)

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:first post? (1)

Gripp (1969738) | more than 2 years ago | (#38942979)

eh. find replace "\t" with " " ? just a thought.

Re:first post? (3, Insightful)

iamgnat (1015755) | more than 2 years ago | (#38943781)

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 has been a religious war for decades prior to the birth of said language is the work of pure evil that makes Satan himself cringe.

Re:first post? (3, Informative)

tuffy (10202) | more than 2 years ago | (#38944129)

% pep8 file.py

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:first post? (1)

iamgnat (1015755) | more than 2 years ago | (#38944895)

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 strokes", is that none of them work in all cases (Gripp's example for instance would clobber tabs found in strings).

Honestly, if it wasn't for the whitespace dependence I would probably like Python. In fact I did enjoy (at some level) working with the multi-level abomination that is Jython. I want my compiler to smack me in the head when I do something blatantly stupid, but Python won't do that if I hit tab twice instead of once like I meant to end a block.

Re:first post? (1)

tuffy (10202) | more than 2 years ago | (#38945537)

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 without any whitespace restrictions at all.

My solution is to use ethan-wspace [github.com] which automatically highlights tabs in source code (along with lots of other little whitespace problems) and lets me clean them up trivially with the touch of a button and without breaking the file. It not only keeps my Python code functioning, but does wonders for keeping junk whitespaces changes out of source control.

Re:first post? (1)

iamgnat (1015755) | more than 2 years ago | (#38946217)

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 IDE of choice", I've just cat'd the file at the command line, or looking at it in vi in a co-worker's shell that uses different tab stops.

And your semi-colon comparison with C doesn't work since the equivalent would be forgetting to hit return in Python code (which I would argue is equally as obvious (if not more so) as the compiler error for a missing semi-colon). A better comparison would be forgetting your closing } against an extra or missing "tab", but again the code fails to compile where Python will go ahead and execute it and the line that is shifted the wrong way gets executed when you don't expect it to.

White space is useful and it is important to help indicate what the writer was thinking, but it shouldn't be integral to the point that if the whitespace gets clobbered functionality changes.

Re:first post? (1)

tuffy (10202) | more than 2 years ago | (#38946797)

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 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 tabs and spaces look the same, it's hard to write Python code and you'd be smart to switch.

It doesn't require a "super-duper IDE". But by sticking to something sub-optimal, you're making it harder than it needs to be.

Re:first post? (3, Insightful)

Dog-Cow (21281) | more than 2 years ago | (#38947131)

Using characters that are, by definition, not supposed to be displayed, is the single most stupid decision ever made in programming languages.

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38953859)

Why can`t you admit that it's a dumb decision? Using characters that are fucking invisible for control logic? Must've been that much whitespace in the author's brain when he thought about that one.

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38944587)

Yes, python works best when pre-processes with a perl script.

Re:first post? (1)

DeathToBill (601486) | more than 2 years ago | (#38950979)

Someone please, PLEASE mod this up. It so deserves better than 0.

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38946239)

eh. find replace "\t" with " " ? just a thought.

what a perfect job for Perl!

Re:first post? (1)

cryptographrix (572005) | more than 2 years ago | (#38946643)

| perl -e 'while () { s/\t/ /; print $_; }'

there. fixed it for ya.

Re:first post? (1)

cryptographrix (572005) | more than 2 years ago | (#38946693)

er, s/()/(<>)/ on that last post

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38944351)

Simply doesn't happen. Its only an issue if you're an idiot or constantly trade with with people who are also idiots.

I've been using Python for over a decade and the number of times its hit me I can count on one hand. And those were situtations whereby code was exchanged via a medium which destroys whitespace and tabs.

Bluntly, the only people who make this an issue are trolls and/or people so ignorant of the subject they shouldn't be talking in the first place.

Re:first post? (1)

Dog-Cow (21281) | more than 2 years ago | (#38947155)

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. (1)

Medievalist (16032) | more than 2 years ago | (#38947745)

Its only an issue if you're an idiot or constantly trade with with people who are also idiots.

So, essentially it's only a problem if you are a human being, or constantly interact with human beings.

Re:first post? (2)

bill_mcgonigle (4333) | more than 2 years ago | (#38943645)

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:first post? (2)

photonic (584757) | more than 2 years ago | (#38944327)

Memory usage is not a problem for python. If you are using big data-structures, you would typically store them in multi-dimensional arrays defined in Numpy/Scipy [scipy.org] . Internally, they use the same type of arrays as in C or Fortran, in all the usual data formats (ints, doubles, ...). There obviously will be a little bit of overhead space needed to store its data-type, array dimensions etc, but this is a fixed amount that is negligible for large arrays. Also the computation speed is for many problems not an issue. If you can formulate your problem as vector-algebra, all the computational intensive algorithms (matrix inversion, FFT, ...) use Fortran or LAPACK under the hood.

Re:first post? (2)

afabbro (33948) | more than 2 years ago | (#38946195)

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:first post? (2)

hondo77 (324058) | more than 2 years ago | (#38944265)

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:first post? (2)

jrifkin (100192) | more than 2 years ago | (#38944385)

A good platform for scientific scripting is Python with PyCUDA [tician.de] . PyCUDA makes it easy to program the NVidia CUDA chips, which can speed up many computations significantly.

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38961685)

Wouldn't you know, Perl can do that too: https://github.com/run4flat/perl-CUDA-Minimal. But I don't really use it much because the vast majority of my calculations can be done on my laptop in a fraction of a second, which is why I use PDL for nearly everything, not CUDA.

Also, just because you have lots of processors on your video card does not mean you can run it on CUDA and get automatic speed improvements. Some problems, like diameter calculations on complex networks, do not parallelize very well. As of 2010, it was still faster to do these calculations on a single CPU compared with the best nVidia GPUs available, and I see that only recently has the problem been adequately addressed: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3115853/

Re:first post? (1)

defcon-11 (2181232) | more than 2 years ago | (#38947183)

I've done a lot of scientific coding in both Perl and Python, and I would pick Python any day of the week. IMO whitespace issues are not a legitimate complaint about Python. I think whitespace delimited blocks are easier to read, and if you have problems with coders not getting it (never ran into this myself), a simple lint script that runs before commit/checkin will solve your tabs vs spaces mismatch. Most Python-based scientific code uses numpy and/or C or Fortan for the computational bottlenecks, so memory and performance are often less of an issue than people assume. Much scientific code is designed to run on cluster/grid/cloud instead of a shared memory system, so the lack of concurrent threads is also often less of a concern.

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38955299)

defcon-11, I'm curious why you would pick Python over Perl. You list lots of important capabilities for scientific programming, but Perl and PDL have those. What makes Python better suited for scientific code? Creating hand-crafted C functions is actually very easy on a perl-script basis using Inline::C and (for PDL) Inline::Pdlpp. The latter, by the way, is well documented in the recently released PDL Book, which you can read more about here: http://pdl.perl.org/content/pdl-book-toc.html

So, what are the cool things that you only get with Python, and which aren't available with Perl?

Re:first post? (1)

X.25 (255792) | more than 2 years ago | (#38948709)

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:first post? (0)

Anonymous Coward | more than 2 years ago | (#38955043)

I've spent years coding the Perl; I'll be glad to bash the language as largely unsuitable for large scientific collaborations.

Obviously, anyone who has tried to work on a large Perl project in the last couple of years would use Perl::Critic to enforce a coding policy. You may have spent years coding it, but you're knowledge of best practices is clearly quite dated.

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.

I hate it when people say Perl wasn't really designed, but grew by accretion. It was designed by a linguist, and it is *very* consistent once you understand the mental model. And like all things, sigils are actually useful once you understand what they mean. Just as with OO programming, if you get the mental model wrong, all code will be confusing and unbearable. Once you get the mental model right, following the code is a non-issue.

Use something clean and designed well like Python.

As a matter of fact, the only large projects I've seen happen to be in Python, because most people where I work happen to code in Python. Python is a fine language that enforces clean lines, but let me tell you, that doesn't make the code any easier to grok. Sure, I can see what each line does, but it had zero documentation, so figuring out how this class over here fits into the larger project took days of studying the code. Good line-by-line programming does not lead to a good large-scale project, and for this reason Python is no better and no worse than Perl in that sense. However, Perl does enable good documentation via pod, has a better object system thanks to Moose, and allows for finely-grained policy enforcement with Perl::Critic. So, actually, I would vote for Perl over Python for a large-scale project.

Re:first post? (2)

mitashki (1116893) | more than 2 years ago | (#38942261)

Obviously the scientists are too busy to code PDL and have no time to comment...

Re:first post? (4, Informative)

xTantrum (919048) | more than 2 years ago | (#38942415)

No Perl is. Real scientist use the Python programming language [python.org] with Numpy [numpy.org] and MatPlotLib [sourceforge.net] :D

Re:first post? (2)

spud603 (832173) | more than 2 years ago | (#38942697)

So true. Also R [r-project.org] is great for vector-based data as well, and does some stuff quite a bit better (and some stuff quite a bit worse) than scipy/matplotlib.

Re:first post? (1)

Anonymous Coward | more than 2 years ago | (#38944479)

Which is also why R for Python (RPy) [sourceforge.net] also exists.

Re:first post? (1)

lucm (889690) | more than 2 years ago | (#38946903)

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:first post? (1)

spike hay (534165) | more than 2 years ago | (#38948071)

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:first post? (0)

Anonymous Coward | more than 2 years ago | (#38957493)

Real scientist use the Python programming language [python.org] with Numpy [numpy.org] and MatPlotLib [sourceforge.net] :D

Ha! Real scientists don't use Perl, Python, or any of those namby-pamby programming languages. Real scientists use slide rules and a No. 2 pencil.

Re:first post? (-1)

Anonymous Coward | more than 2 years ago | (#38942503)

If anyone gave a shit about Perl there might be some comments.

Re:first post? (1)

93 Escort Wagon (326346) | more than 2 years ago | (#38942945)

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.

Re:first post? (0)

Anonymous Coward | more than 2 years ago | (#38954617)

Speaking of well-established, PDL has been in the 2.0 series for around 10 years or so, meaning it's been possible to perform fast, vectorized, backwards-compatible numerics in Perl for over 10 years. Hardly a homebrew project, unless by "homebrew' you mean a non-incorporated and not privately-backed open source project. I'm sure there are some very respectable projects like that.

Seriously, though, why this vitriol? We PDL people are happy because we've made another important release. In addition to that we've finally released a Book. You don't need to tell me that Numpy has had a book for a long time, because I know that. But that's not the point. We're happy, we've made it easier for others out there to learn and use PDL, and we'd like to share our joy. What's wrong with that?

Quiz (5, Funny)

fph il quozientatore (971015) | more than 2 years ago | (#38942235)

Fill in the missing word.
PDL: the computational power of Matlab, octave, IDL and NumPy with the __________ of Perl!

Re:Quiz (3, Funny)

SJHillman (1966756) | more than 2 years ago | (#38942267)

flying purple unicorns

Re:Quiz (1)

Bill, Shooter of Bul (629286) | more than 2 years ago | (#38942281)

Tao?
Awesomeablity?
Parrot-eske?
Tim Toady?

Re:Quiz (3, Insightful)

mitashki (1116893) | more than 2 years ago | (#38942297)

LAZYNESS the missing word

Re:Quiz (1)

somersault (912633) | more than 2 years ago | (#38942369)

Haha :) Work smarter, not harder!

PS.. it's spelled laziness.

Re:Quiz (1)

mitashki (1116893) | more than 2 years ago | (#38942531)

lazYness is a new keyword Perl(tm)

Re:Quiz (1)

somersault (912633) | more than 2 years ago | (#38942837)

Oh, I see. Apparently it's called "Perlude" now.

Re:Quiz (0)

Anonymous Coward | more than 2 years ago | (#38942397)

s/LAZYNESS/Laziness is/

Having said that, I don't quite think thats what GP was after.

Re:Quiz (0)

Anonymous Coward | more than 2 years ago | (#38942831)

I see what you did there.

"__________" is actually a Perl interpreter, written in Perl.

Re:Quiz (3)

jonnat (1168035) | more than 2 years ago | (#38943113)

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:Quiz (1)

NoNonAlphaCharsHere (2201864) | more than 2 years ago | (#38953201)

Damn! Where's my Insightful/Funny mod points when I need them? Well played, sir.

Re:Quiz (1)

mbkennel (97636) | more than 2 years ago | (#38943163)

What do you mean "missing word"? Looks like good ol perl to me.

Oh my's (2)

tonique (1176513) | more than 2 years ago | (#38943277)

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 (5, Informative)

oneiros27 (46144) | more than 2 years ago | (#38943295)

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:Quiz (1)

tonique (1176513) | more than 2 years ago | (#38943539)

That's basically my case. I had picked up a *little* bit of Perl. Then it's been downhill from that!

Re:Quiz (0)

Anonymous Coward | more than 2 years ago | (#38947691)

> a growing number of NumPy users (via SunPuy), 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.

HTH: http://www.korokithakis.net/tutorials/python/ [korokithakis.net]

"Tutorial - Learn Python in 10 minutes" (for programmers of other languages)

Re:Quiz (1)

Spykk (823586) | more than 2 years ago | (#38943495)

s/_*?/regular expressions

Re:Quiz (1)

Tsiangkun (746511) | more than 2 years ago | (#38944809)

genuine cross platform abilities

Re:Quiz (1)

Dr. Zowie (109983) | more than 2 years ago | (#38953563)

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.

brothers in arms (0)

Anonymous Coward | more than 2 years ago | (#38942247)

the python equivalent to PDL is NumPy [scipy.org]

No need for comments (1)

El Royo (907295) | more than 2 years ago | (#38942253)

There's no need for comments as this is a rare article summary that actually tells you what you want to know. Bravo!

Usage information ? (1)

complex_pi (2030154) | more than 2 years ago | (#38942383)

Would someone using PDL in practice give examples of where it is used ? The scientific Python ecosystem has grown so well that I hadn't heard of PDL since a long time.

Re:Usage information ? (2)

stjobe (78285) | more than 2 years ago | (#38942549)

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:Usage information ? (1)

tonique (1176513) | more than 2 years ago | (#38944437)

There's a small PDL user map [perl.org] and use cases are also listed there.

Re:Usage information ? (0)

Anonymous Coward | more than 2 years ago | (#38954817)

I used PDL for all the code for my dissertation, both for data analysis (read data, Fourier transform, slice and dice, plot), and for simulations. In my work, I was simulating the Kuramoto model: http://en.wikipedia.org/wiki/Kuramoto_model. Setting up a time-stepping simulation was extremely simple. I wrote hooks into a GUI toolkit and visualized my simulations in real time. It was incredible to have an interactive simulation running, and I used it to great effect at conference talks and in my defense. I am in the process of turning some of this stuff into Perl modules that I hope to release to CPAN soon, so others can visualize dynamic simulations with PDL.

For some of my work, PDL didn't have code that I needed and expressing it in a vectorized form was awkward or inefficient (from the standpoint of memory, usually), so I wrote my own using PDL::PP. It was amazing, because I wrote a function using PDL::PP, then I assembled my data (which required stitching together chunks by appending to a file) and finally ran the PP code on a dataset that simple mmapped the file. The whole thing just worked, and blazingly fast.

These days I'm using PDL to analyze complex networks. There's a Perl out there for analyzing networks (called simply Graph), but I needed something faster. PDL::PP to the rescue! I had a calculation that had been running for over 48 hours that took only a minute once I had coded up my algorithm. Same thing with a Dynamic Programming project in which we wanted to split the data not only into linear segments, but also exponential segments. It's so fast that it makes it possible to interact with the data (what happens if I change the split-penalty to 0.56 instead of 0.54?).

Perl I love you (1)

hoggoth (414195) | more than 2 years ago | (#38942505)

Oh Perl, what CAN'T you do?!

Re:Perl I love you (1)

mitashki (1116893) | more than 2 years ago | (#38942617)

write a boot loader... Oh wait have you actually tried it???!

Re:Perl I love you (2)

tepples (727027) | more than 2 years ago | (#38942631)

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 (4, Funny)

Waffle Iron (339739) | more than 2 years ago | (#38943261)

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:Perl I love you (1)

SuiteSisterMary (123932) | more than 2 years ago | (#38943565)

Hey, Denise Richards was using an iPaq to disarm nuclear weapons, what, a decade ago?

Re:Perl I love you (1)

rrohbeck (944847) | more than 2 years ago | (#38943599)

Or get a Raspberry Pi. You don't need a radio on your simulator.

Re:Perl I love you (5, Funny)

sg_oneill (159032) | more than 2 years ago | (#38943501)

Oh Perl, what CAN'T you do?!

Stay relevant.

Why PDL? (5, Informative)

tonique (1176513) | more than 2 years ago | (#38943135)

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:Why PDL? (1)

UID30 (176734) | more than 2 years ago | (#38943247)

I think you misspelled "cow-orkers".

Re:Why PDL? (1)

VortexCortex (1117377) | more than 2 years ago | (#38944721)

I think you misspelled "cow-porkers".

new Features (1)

Anonymous Coward | more than 2 years ago | (#38943797)

There's some new language syntax features. Here's what is looks like: %£T$%£$%"^%"

Re:new Features (1)

skids (119237) | more than 2 years ago | (#38944877)

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 (1)

Anonymous Coward | more than 2 years ago | (#38944175)

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 (5, Insightful)

omission9 (178213) | more than 2 years ago | (#38944445)

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:IAMA PDL user (0)

Anonymous Coward | more than 2 years ago | (#38944935)

maybe they have string visceral reactions to regular expressions?

Re:IAMA PDL user (1, Troll)

skids (119237) | more than 2 years ago | (#38944971)

Some people lack the ability to understand Perl code, and fear what they do not understand.

Re:IAMA PDL user (0)

Anonymous Coward | more than 2 years ago | (#38945585)

...so lots of perl devs are like Frankenstein?

Re:IAMA PDL user (0)

Anonymous Coward | more than 2 years ago | (#38946155)

Monster. Frankenstien's Monster for god's sakes! Sheesh.

Re:IAMA PDL user (3, Insightful)

ThePhilips (752041) | more than 2 years ago | (#38946555)

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:IAMA PDL user (1)

DuckDodgers (541817) | more than 2 years ago | (#38953147)

I prefer Perl to Python, but I would not group Python with Visual Basic or Java.

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 written code that would have had all the same problems no matter what language was used. Then as the newbies became more experienced, new developers entered the field, and other veteran developers switched to Perl from other languages, their first encounter with Perl is a nightmare app they have to maintain. That's a condemnation of bad coding practice and assuming you can hire anybody with the slightest interest in software development to build your hot new web company. It's not a condemnation of Perl.

For a new project these days, in many fields Perl is as good a choice as anything. CPAN, the Comprehensive Perl Archive Network, has tons of junk but for almost any conceivable project there's a good chance that out of the one or two dozen CPAN modules written to handle it, at least a few are rock solid and get you more than 80% of the way towards your goal.

If you're a happy Python programmer there really isn't a strong case for you to switch to Perl. But if you're neither a Perl or Python programmer and looking to learn one or the other, don't let the flame wars over Perl syntax and Python whitespace distract you. Perl is an awesome choice.

Re:IAMA PDL user (1)

Dr. Zowie (109983) | more than 2 years ago | (#38953723)

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 but harder to to be expressive in for experts, so grizzled longhairs (like me) tend to scoff at it.

That sort of pattern happened before: there was a time when Pascal attracted a lot of mindshare and people scoffed at the woolier "C". Entire OSes were written in Pascal (gasp). But in the long run people migrated back to C and (when it was invented) C++, because, well, Pascal is easy to learn but it sucks for experts.

There are lots of solutions for getting one's work done. PDL is superior for some tasks, Python/NumPy is arguably superior for others (like learning). I wish people would get over it and code, instead of tribal hating. But that is what people, well, do.

The Internet weeps... (1)

turgid (580780) | more than 2 years ago | (#38946005)

For shortly it will bear the burden of millions upon millions of lines of FORTRAN written in Perl.

most Advanced Quantum Equations written in perl (0)

Anonymous Coward | more than 2 years ago | (#38962361)

OK thats why the the most Advanced Spherical Harmonic Dynamics ever written were were written in perl/PDL
check this out http://www.youtube.com/watch?v=N9RsCQKxom4

Sick of Perl bashing, time to hit back (0)

Anonymous Coward | more than 2 years ago | (#38962411)

I have noticed that in these Python v Perl flamewars the vitriol seems to be only one way.

PythonGuy: Perl sucks and it sucks some more
PerlGuy: They both are good, you should use what you like
PythonGuy: But Perl still sucks

I'm sick of it, I don't want to look at your awful list comprehensions or write lambdas! You call those readable? And good job blowing up all the Python2 code when moving to Python3. Wait the extensions don't move from interpreter to interpreter? Yeah you really have a superior language there.

In truth I don't care which language you use, but this bashing is ridiculous.

  Good Job PDL devs keep it up. You too NumPy devs! All you slashdot f******s go learn a real language, try INTERCAL, leave me alone.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?