Beta

Slashdot: News for Nerds

×

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!

Larry Wall Talks Perl, Culture, and Community

Soulskill posted more than 5 years ago | from the wall-to-wall-coverage dept.

Perl 123

LostDiver writes "Computerworld Australia caught up recently with Larry Wall of Patch and Perl fame. He talks about the development of Perl as 'scratching an itch,' a release date for Perl 6 (Christmas day, year unknown) and beauty versus practicality. Computerworld also has some more information on the upcoming Perl 6. A while back they interviewed Bjarne Stroustrup of C++ fame as well." jamie pointed out a interesting, related video of a presentation by Clay Shirky from last year's Supernova conference in which he discusses why the Perl community (or any web community) drives progress and innovation.

cancel ×

123 comments

bill (-1, Offtopic)

Anonymous Coward | more than 5 years ago | (#26110983)

frist

Dropping regex as a core lang feature (-1, Redundant)

BadAnalogyGuy (945258) | more than 5 years ago | (#26110993)

That's like removing LINQ from C#. Maybe it removes unorthonality, but at the expense of programmer power.

Re:Dropping regex as a core lang feature (5, Informative)

psy0rz (666238) | more than 5 years ago | (#26111029)

they wont be dropping regex completely. from tfa:

Perl 6 promises to put the "regular" back into regular expression. "We have more powerful primitives in Perl 6," Wall said. "There's no more /x switch to enable extended syntax. No more mode switches like /s and "dot" (.) now means match any character. There's no /m modifier and we've regularised the brackets so {} always mean embedded code."

Re:Dropping regex as a core lang feature (2, Insightful)

modmans2ndcoming (929661) | more than 5 years ago | (#26111151)

who the fuck thought they would be dropping Regex in any way shape or form?

Re:Dropping regex as a core lang feature (-1, Flamebait)

modmans2ndcoming (929661) | more than 5 years ago | (#26112479)

how is that flamebait? because I swore?

Re:Dropping regex as a core lang feature (4, Informative)

Anonymous Coward | more than 5 years ago | (#26111157)

They didn't drop regexes at all. They've actually generalized them into context-free grammars, and these CFGs are a core part of the language.

If anything, the problem with perl6 is they added way too much.

Re:Dropping regex as a core lang feature (4, Interesting)

mrvan (973822) | more than 5 years ago | (#26111191)

Hmm that's interesting.

I know quite a lot of scientists who use Finite State Automata for tasks and use custom libraries for that. If Perl 6 can provide an easier and efficient way of doing that it might even have a future :-)

Re:Dropping regex as a core lang feature (0, Offtopic)

will_die (586523) | more than 5 years ago | (#26111193)

Isn't Microsoft dropping parts of LINQ from .net 4.0?
I'm sure I glanced over something that said they were deprecating it and that while they would provide support they would have no future development and they were going to something else.

Re:Dropping regex as a core lang feature (1)

FishWithAHammer (957772) | more than 5 years ago | (#26111469)

I believe they're dropping one of their database connectors because another one's better. I'm still stuck in .NET 2.0 land where I am, so I'm not sure. (Not that I like LINQ to begin with. The one .NET feature I really dislike.)

Re:Dropping regex as a core lang feature (0)

Anonymous Coward | more than 5 years ago | (#26111483)

Why would they do that? they only added it in the last version of .NET (3.0)

Re:Dropping regex as a core lang feature (2, Informative)

wootest (694923) | more than 5 years ago | (#26111619)

The version that brought LINQ was .NET 3.5, with C# 3.0. .NET 3.0 was just the Vista technologies ("WinFX": WF, CardSpace, WCF, WPF and arguably also WTF) and didn't affect any of the languages in any way - just a bunch of new namespaces. .NET 4.0 will deemphasize LINQ to SQL in favor of LINQ to Entities, which hooks LINQ up to Entity Framework, a more solid (but as of yet woefully "1.0") mapping framework on its own. As with everything Microsoft, it'll probably live on for ages.

LINQ to SQL is more of a joy to use, but it's a joy to use because it has less syntax, and it has less syntax because it tries to abstract less. Entity Framework tries to abstract more (like abstract away most many-to-many junction tables where the connection itself doesn't have properties) to the point where it is intelligent enough to handle joins for you, and it demands you to be far more explicit about lazy-loading data across relationships (which is a good thing). But it's not entirely there yet unless every query *always* produces an instance of a known type from the database.

First Ninnle Post! (-1)

Anonymous Coward | more than 5 years ago | (#26111027)

Ninnle NOW!

handy printable link (-1)

Anonymous Coward | more than 5 years ago | (#26111055)

here [computerworld.com.au]

Christmas? (2, Interesting)

MikeRT (947531) | more than 5 years ago | (#26111065)

It sounds almost like they're hoping that Santa will drop it down the chimney on a flash drive for them. In the time it has taken Perl 6 to get where it is now--fairly close to release--Mono has gone from being scraps of C and C# code, to being a fairly complete and compatible .NET development environment that has a fairly active developer base on Linux. I'm not going to say that Perl 6 is irrelevant, but if it is not out, in a final release within 6 months to a year, it probably will be since even PHP will be grown up with 5.3 and 6.0 by then.

Re:Christmas? (-1, Troll)

Anonymous Coward | more than 5 years ago | (#26111111)

I think the Christmas day thing is more likely related to the fact that Larry Wall's god's birthday is celebrated on that day. His god sent an invisible spirit to implant sperm in the egg of a poor woman. The idea was that after the woman gave birth to this thing, humans could use his blood to cleanse them of their own wrongdoings.

You can start to understand how Perl is so logical, when it comes from guys who think like this. ;)

Re:Christmas? (2, Funny)

mewshi_nya (1394329) | more than 5 years ago | (#26116611)

"I was either onto something, or on something."
                    -Larry Wall

Re:Christmas? (2, Insightful)

maxume (22995) | more than 5 years ago | (#26111219)

Actually, it doesn't matter. In a world where millions of people are providing software for hundreds of millions of other people, being a niche player is perfectly viable.

Such low expectations... (1)

MikeRT (947531) | more than 5 years ago | (#26111341)

Actually, it doesn't matter. In a world where millions of people are providing software for hundreds of millions of other people, being a niche player is perfectly viable.

If that's your goal, then fine. However, nothing I have ever heard from the Perl developers has suggested that they are trying to target just a niche.

As someone who works on Movable Type, a perfect example of what Perl can do, I want to see Perl 6 succeed and eventually have Perl 5 modules and apps ported to it. I would love to be able to switch to using Python 3k for writing objects, and use Perl 6 to access them in scripts on the same VM, but these guys aren't working on the same timeframe that the rest of us are...

Re:Such low expectations... (2, Insightful)

maxume (22995) | more than 5 years ago | (#26111591)

It depends on what you call a niche. "People looking for an improved Perl" is arguably a niche. I'm not trying to quibble, I see what you are saying, that the current Perl community is looking elsewhere (or entrenching on 5).

I guess I was trying to point out that the base community will probably be big enough to sustain Perl 6, so the size relative to other communities isn't something to be concerned about (which is somewhat different than being concerned that the community won't be big enough to provide X).

Re:Christmas? (1, Insightful)

Anonymous Coward | more than 5 years ago | (#26111287)

we are comparing programming languages by how fast their version numbers increase?

that is even worse than video game fanboys comparing stock quotes of Nintendo and Sony...

i remember when i would visit slashdot in 2001 (before the attacks and the new politics section which was an invitation to filth no nerd cared about) without being insulted by such retarded BS..

Re:Christmas? (4, Interesting)

jheiss (10829) | more than 5 years ago | (#26111305)

It appears within the system administration community that Ruby is well on its way to replacing Perl as the de facto language for major tools. Well over half of the new tools introduced at the LISA (Large Installation System Administration) conference this year were written in Ruby. I've been developing in Perl for about 15 years, but have recently switched nearly all of my development to Ruby. I know I'm tired of hearing about how great Perl 6 will be. I've been hearing that promise for half a decade now. The biggest drawback to Ruby right now is that the availability of 3rd party libraries is nowhere near the level of what's in CPAN.

Apple is also putting a significant amount of effort into improving and integrating Ruby with Mac OS X. MacRuby and HotCocoa both look really interesting, particularly if you want to develop GUI apps.

Re:Christmas? (0)

_xeno_ (155264) | more than 5 years ago | (#26111351)

The biggest drawback to Ruby right now is that the availability of 3rd party libraries is nowhere near the level of what's in CPAN.

Unless I'm hugely mistaken, from the sound of it, Perl 6 will have that same flaw - it isn't backwards compatible with Perl 5 and so every Perl module will need to be rewritten.

Re:Christmas? (5, Informative)

BenLeeImp (1347831) | more than 5 years ago | (#26112289)

You are hugely mistaken. http://dev.perl.org/perl6/faq.html [perl.org]

Re:Christmas? (1)

Smallpond (221300) | more than 5 years ago | (#26112617)

I don't see anything in the faq that says that modules will run untranslated in a perl6 program unless it is in perl5 compatibility mode, which would kind of make it pointless. Of course, you can translate the modules to perl6, but you can also port modules to python or ruby.

Re:Christmas? (1)

_xeno_ (155264) | more than 5 years ago | (#26112663)

I'm not sure how much of that applies to modules, though. Especially modules that rely on a native component. That FAQ leaves several questions unanswered:

  1. Can Perl 6 code use a Perl 5 module?
  2. Does the Perl 6 converter work on modules?
  3. Given that the object system is getting an overhaul in Perl 6, does that break OO-based modules? (I would assume no, but they should be rewritten to use the new system.)
  4. Is Perl 6 source-code compatible with the native code stubs that many modules, for example database drivers and GUI libraries, require?

That last question is the biggest question. Losing modules that require native code stubs would be a huge loss. Hopefully it's just a simple recompile, since I'm certain that Perl 6 isn't going to be binary compatible.

Being able to move my code to Perl 6 with a simple converter is great, but it's still unclear just how much of CPAN will still be usable in Perl 6. That FAQ doesn't really answer anything related to modules.

Re:Christmas? (1, Informative)

Anonymous Coward | more than 5 years ago | (#26112703)

That would be because you're a fucking idiot and they answered that question so fucking long ago that no one with half a brain doesn't know the answer already.

Perl 6 Myths [openfoundry.org]

From that page in HUGE LETTERS:

Perl 6 can use CPAN modules.

There you go. Question answered. TWO FUCKING YEARS AGO.

Why your post got modded up I'll never know.

Re:Christmas? (-1, Offtopic)

Anonymous Coward | more than 5 years ago | (#26115089)

Calm down. Fucker.

Re:Christmas? (5, Informative)

chromatic (9471) | more than 5 years ago | (#26112837)

I'm not sure how much of that applies to modules, though.

All of it.

Can Perl 6 code use a Perl 5 module?

If you use a Perl 6 implementation which supports Perl 5, yes.

Does the Perl 6 converter work on modules?

Yes, if they're pure-Perl.

Given that the object system is getting an overhaul in Perl 6, does that break OO-based modules?

No.

Is Perl 6 source-code compatible with the native code stubs that many modules, for example database drivers and GUI libraries, require?

That depends on the Perl 6 implementation. The answer is probably no, but there's no reason someone couldn't write a converter for the basic XS uses.

Re:Christmas? (2, Insightful)

bzipitidoo (647217) | more than 5 years ago | (#26113551)

Modules have to be rewritten? No they won't. More like, abandoned as unnecessary. But still usable as is if you want. Many so-called modules are just wrappers for C libraries, where someone else has gone to all the pain of figuring out the XS. If I've understood it correctly, Perl 6 will be able to call library functions directly, without a lot of fuss. No more messing around with XS, or SWIG and the 100K extra verbose code it is wont to generate per function, or whatever, wondering if it's failing because you screwed up the stack or misunderstood a parameter, or the system's linker does something oddball with the parameter order. Or even, the coder used that long forgotten C keyword, "pascal". The Camel book itself said of this problem "here be dragons".

For me, that's huge. I've been waiting for Perl 6 for this feature alone. Call any library function I want! Just call it, no more digging around CPAN to find that wrapper module that's half finished. No more dragons!

Re:Christmas? (3, Informative)

chromatic (9471) | more than 5 years ago | (#26113685)

If I've understood it correctly, Perl 6 will be able to call library functions directly, without a lot of fuss.

Rakudo [rakudo.org] (Perl 6 on Parrot) can do this now.

Parrot (2, Informative)

DrYak (748999) | more than 5 years ago | (#26114833)

In addition to what the other /.ers have said, bear in mind that one of the main targets for Perl 6 to run on is Parrot a "one-VM to rule them all" multi language VM.

Thus, not only will the binding be accessible to Perl, they would be accessible to any other language targeting Parrot VM.

(Think of something remotely like JVM or Mono/.NET's CLR except that, unlike microsoft's CLR, Parrot is designed from the ground up with all the complexities of modern latest-gen dynamic languages in mind)

Where the things get even more interesting is that the Ruby community is interested in using Parrot as their main VM.
So Parrot would also cure Ruby's problem at the same time.

Also, some of the python users are interested in creating yet another python implementation targeting parrot. And some fans are trying to create a PHP compiler for Parrot. Haskell coders are also involved a lot in the development of both Perl6 and Parrot. Thus Parrot has indeed serious chances of becoming the central interconnection point for lots of modern dynamic languages.

Re:Christmas? (1)

Opyros (1153335) | more than 5 years ago | (#26111529)

Haven't quite a few Ruby versions been released around Christmas? Maybe Larry is imitating Matz!

Re:Christmas? (3, Interesting)

r7 (409657) | more than 5 years ago | (#26111825)

It appears within the system administration community that Ruby is well on its way to replacing Perl

Interesting observation but not what I'm seeing here in Silicon Valley. Perl is far less popular than in years past, but Ruby is not that popular among systems admins either. Instead Python is all the rage. I believe this is because Ruby is better suited to those who spend a majority of their time writing code whereas Python can be learned and used more easily without such frequent use. So sysadmins here, who don't spend the majority of their time writing code, are using mainly Python (and shell).

Not a statistic, just an observation across a dozen or so large and small Linux and Unix using organizations.

Re:Christmas? (1)

VGPowerlord (621254) | more than 5 years ago | (#26111933)

I don't do much on the sysadmin side, but I too was under the impression that Python was the most popular language for writing tools with.

Re:Christmas? (2, Insightful)

Kent Recal (714863) | more than 5 years ago | (#26112041)

Yup, python is more popular than ruby in the sysadmin arena in my area, too. I guess for the reasons that GP mentioned - it's easier to learn the basics and the syntax generally makes it harder to write stuff that you don't want to maintain later than that of Perl or Ruby.

Unscientific sample from my box here:

$ grep "/python" /usr/bin/* | wc -l
114

$ grep "/ruby" /usr/bin/* | wc -l
28

And from a fairly vanilla debian box:

$ grep "/python" /usr/bin/* | wc -l
34

$ grep "/ruby" /usr/bin/* | wc -l
17

Re:Christmas? (4, Informative)

cxreg (44671) | more than 5 years ago | (#26113805)

Interesting omission:

$ grep "/python" /usr/bin/* | wc -l
168

$ grep "/ruby" /usr/bin/* | wc -l
23

$ grep "/perl" /usr/bin/* | wc -l
570

Re:Christmas? (2, Funny)

Kent Recal (714863) | more than 5 years ago | (#26114253)

Well, I didn't bother to include Perl because everybody knows it's the 800 pound gorilla. 20 years of script hacking don't just go away, whereas python and ruby only started gaining traction in the last 5ish years.

Re:Christmas? (2, Insightful)

PiSkyHi (1049584) | more than 5 years ago | (#26117605)

Ahh, the things I've hacked together with good old Perl - hacking Perl maybe unfashionable and considered unmaintainable by other - maybe even other Perl programmers.

But to a hacker who believes most generic code has been written, that only tailored code remains to be written, Perl will remain to glue and re-use other code with ease.

Replacing it is a fantasy by people who would like to re-invent the wheel with a different color-scheme annually.

Re-usable code ? modules are easy to write, easy to understand and object oriented is only more practical when writing GUI apps.

Grow your code, use other's code, write it in way to be re-usable, don't rely on someone elses syntax issues to take of it for you.

I just don't care if Perl is fashionable or not, I like it, it works for me and as a hacker not a programmer, I just don't care if its not documented, when I read Perl, I think in Perl.

The only reason I learned Python is to use others code who felt the need to switch.

Re:Christmas? (1)

Ant P. (974313) | more than 5 years ago | (#26114799)

Just for completeness...

$ grep "/ruby" {/usr,}/sbin/* 2> /dev/null | wc -l
0
$ grep "/python" {/usr,}/sbin/* 2> /dev/null | wc -l
18
$ grep "/perl" {/usr,}/sbin/* 2> /dev/null | wc -l
2

(although I blame Gentoo for there being so many python scripts there)

Language popularity in my Debian server (1)

rduke15 (721841) | more than 5 years ago | (#26114597)

Here are the results for my small Debian web/mail/dns/databse/etc server.

Not very readable :-), but Perl helped to show that it's quite popular indeed, ranking third after ELF executables and shell scripts.


$ find /usr/bin /usr/sbin -type f | xargs file | perl -MData::Dumper -ne '($l)=/:\s+(.*?(script|executable))/; $h{$l}++; END {print Dumper(\%h)}'
$VAR1 = {
                    'setuid perl script' => 1,
                    '' => 8,
                    'ELF 32-bit LSB executable' => 1154,
                    'Bourne shell script' => 144,
                    'perl script' => 197,
                    'Bourne-Again shell script' => 14,
                    'Korn shell script' => 1,
                    'a python script' => 1,
                    'setuid setgid ELF 32-bit LSB executable' => 6,
                    'a /usr/bin/wish script' => 1,
                    'python script' => 13,
                    'a /usr/bin/ruby1.8 script' => 2,
                    'setgid ELF 32-bit LSB executable' => 13,
                    'setuid ELF 32-bit LSB executable' => 19,
                    'a /bin/loadkeys script' => 1
                };

Re:Christmas? (1)

tobiasly (524456) | more than 5 years ago | (#26111499)

OK, but does Mono or C# have its very own Slashdot icon? No?

Re:Christmas? (1)

sasdrtx (914842) | more than 5 years ago | (#26114241)

Perl6 has been the absolute worst thing that ever happened to Perl. All the drawbacks of vaporware, and none of the benefits. Everyone thinks Perl 5 is obsolescent because Perl 6 is supposedly coming out ...someday. Frankly, Larry and them should have announced they were developing a new language (say "Emerald"), and not trashed the Perl brand for so far, nothing.

Seems like I've said this a million times, but it seems like this has been going on for a thousand years.

Re:Christmas? (2, Informative)

chromatic (9471) | more than 5 years ago | (#26114507)

Perl 6 is supposedly coming out ...someday.

The next stable release of Rakudo [rakudo.org] (Perl 6 in Parrot) comes out next Tuesday. This will be the 24th stable monthly release of Perl 6 on Parrot in a row. You can also see daily Rakudo spectest progress [rakudo.de] , if you like.

Grown up into what? (1)

weston (16146) | more than 5 years ago | (#26115383)

even PHP will be grown up with 5.3 and 6.0

But grown up into what? :)

5.3 is an interesting release. IMHO they've saved it from being yet another mundane bridge release that's a small step down the path to Java by paying attention to a lot of the excitement surrounding the other dynamic languages. But it's been clear for a while that Java was originally what they planned to grow up into with 6, and 5 being the bridge between it and 4, and the PHP community has always been by and large a bit... pedestrian... in their vision.

I don't think PHP is where people fleeing Perl at this point might go. Python and Ruby and even Javascript have better communities and much more thoughtful design behind them. The biggest thing PHP has had going for it is that it's been on most web servers, and that'll pull the market that just wants to use whatever's available on their web host, but I think overlap between that and Perl users probably split years ago.

Re:Christmas? (0)

Anonymous Coward | more than 5 years ago | (#26119997)

Well, just remember that not everyone working in Perl is developing Perl6. Most Perl programmers are working on here and now projects, so they develop in Perl5. Over the past few years the semantic gap between Perl5 and the vision of Perl6 has closed. This has been due to the thousands of new libraries and the ideas they express uploaded to CPAN.

I think the issue for Perl6 has been 1) it wasn't always straightforward how to jump in and contribute. Virtual Machine and Interpreter design is a pretty specialized activity, not many people know a lot about it, and not many companies need to hire someone to do that kind of work. 2) Nearly all Perl5 programmers need to write code for projects due in days or months, so contributing to Perl6 before it's 100% complete is not possible.

So Perl6 ended up with a Chicken and egg problem. Comparing it to Mono isn't fair, since the Mono project got a ton of funding while nearly all Perl6 development has been on donated time. But the good news is that Perl5 is a great language, with tons of libraries, an active community and easy ways to contribute. At some point we'll see a type of convergence between the projects.

Full text of the interview (-1)

Anonymous Coward | more than 5 years ago | (#26111089)

What prompted the development of Perl?

I was scratching an itch, which is the usual story. I was trying to write reports based on text files and found the Unix tools were not quite up to it, so I decided I could do better. There was something missing in Unix culture â" it was either C or a shell script, and people see them as opposites in one continuum. They were sort of orthogonal to each other and that is the niche Perl launched itself into â" as a glue language. Unlike academic languages, which tend to be insular, I determined from the outset I was going to write Perl with interfaces.

Only later did it turn into a tool for something that was not anticipated. When the Web was invented they needed to generate text and use a glue language to talk to databases.

Was there a particular problem you were trying to solve?

You can tell the other problem by the reaction Perl got from the die hards in the Unix community. They said tools should do one thing and do them well. But they didn't understand Perl was not envisioned as a tool so much as a machine shop for writing tools.

How did the name Perl come about?

I came up with the name as I wanted something with positive connotations. The name originally had an "a" in it. There was another lab stats language called Pearl, so I added another backronym. The second one is Pathologically Eclectic Rubbish Lister.

Do you ever find yourself using the âoebackronymâ Practical Extraction and Report Language at all?

It is meant to indicate that there is more than way to do it, so we have multiple backronyms intentionally.

Were there any particularly hard/annoying problems you had to overcome in the development of the language?

Now, this is a story all about how
My life got flipped-turned upside down
And I liked to take a minute
Just sit right there
I'll tell you how I became the prince of a town called Bel Air

In west Philadelphia born and raised
On the playground was where I spent most of my days
Chillin' out maxin' relaxin' all cool
And all shootin some b-ball outside of the school
When a couple of guys
Who were up to no good
Startin making trouble in my neighborhood
I got in one little fight and my mom got scared
She said 'You're movin' with your auntie and uncle in Bel Air'

I begged and pleaded with her day after day
But she packed my suite case and send me on my way
She gave me a kiss and then she gave me my ticket.
I put my walkman on and said, 'I might as well kick it'.

First class, yo this is bad
Drinking orange juice out of a champagne glass.
Is this what the people of Bel-Air Living like?
Hmmmmm this might be alright.

But wait I hear there're prissy, wine all that
Is Bel-Air the type of place they send this cool cat?
I don't think sow
I'll see when I get there
I hope they're prepared for the prince of Bel-Air

Well, the plane landed and when I came out
There was a dude who looked like a cop standing there with my name out
I ain't trying to get arrested
I just got here
I sprang with the quickness like lightening, disappeared

I whistled for a cab and when it came near
The license plate said fresh and it had dice in the mirror
If anything I can say this cab is rare
But I thought 'Now forget it' - 'Yo homes to Bel Air'

I pulled up to the house about 7 or 8
And I yelled to the cabbie 'Yo homes smell ya later'
I looked at my kingdom
I was finally there
To sit on my throne as the Prince of Bel Air

Re:Full text of the interview (-1, Offtopic)

Anonymous Coward | more than 5 years ago | (#26111161)

If you were trying to Bel-air us, you failed. Your text is way too fucking long already for anyone to bother reading it, and in addition you didn't make any attempt to conceal the bel-air within it.

Why should I use Perl instead of Python? (0)

Anonymous Coward | more than 5 years ago | (#26111143)

What is it Perl does better?

Re:Why should I use Perl instead of Python? (1)

heffrey (229704) | more than 5 years ago | (#26111195)

More direct regex syntax

Re:Why should I use Perl instead of Python? (2, Interesting)

exploder (196936) | more than 5 years ago | (#26111215)

Things you plan to write in under fifteen minutes are generally better done in Perl. Beyond that point, the verbosity and consistency of Python becomes a distinct advantage.

Re:Why should I use Perl instead of Python? (0)

Anonymous Coward | more than 5 years ago | (#26119891)

I doubt you've ever worked on a large scale, modern and well designed project in Perl.

Tools like DBIx::Class is unparalleled in any language, and combining with Moose gives nice syntax and extreme robustness and reliability in code.

To give an idea of what I'm talking about, DBIx::Class has a great idea of being able to "chain" result sets from the database. So, if you have a query, you can (on the fly) modify that query by adding additional filtering or even joining and prefetching.

I've yet to see anything come close in any of the other languages that have the same flexibility (even if they support chained result sets).

Re:Why should I use Perl instead of Python? (1)

burris (122191) | more than 5 years ago | (#26111277)

Use perl instead of python when you have a lot of necessary code/modules already written in perl instead of python. Unless you like spending time writing code when you don't have to.

Re:Why should I use Perl instead of Python? (1)

Stinking Pig (45860) | more than 5 years ago | (#26116693)

and that is why I write big programs in Perl... so that they don't have to be bigger.

Re:Why should I use Perl instead of Python? (4, Insightful)

Haeleth (414428) | more than 5 years ago | (#26111335)

"Perl or Python?" is like "awk or sed?". They solve different problems. They're suited to different tasks. For the parts where they overlap, though, there are various arguments either way. There's a reason why there are flamewars about this stuff. You get flamewars when the arguments on both sides are evenly matched, and the choice therefore becomes a religious issue.

Perl has some advantages. It has anonymous functions that aren't crippled. It has predictable lexical scoping. It has (optional) variable declarations. It has more libraries, and a very convenient standard way of installing them. It's available on any Unix system, whereas Python programmers are frequently reduced to begging sysadmins to install their favourite language. (And sysadmins frequently prefer Perl...)

Perl also has disadvantages: cryptic syntax, too much magic DWIM stuff, no standard way of doing OOP, etc. Note that these are all areas where Python is strong; if you care about consistency, Python is going to be a better choice for you personally.

Neither is a clear winner on performance; Perl is faster for some things, Python for others.

Re:Why should I use Perl instead of Python? (3, Insightful)

Daniel Dvorkin (106857) | more than 5 years ago | (#26111665)

No, "Perl or Python?" is more like "C++ or Java?" In other words, they are indeed different languages with different strengths, but the area of overlap is pretty damned large -- you can write programs that do the exact same thing in either language and it really won't make any difference to the end result. Since I switched over from Perl to Python ~6 years ago, I've never found a task for which I would have used Perl that I couldn't do in Python. I'm not saying that there aren't any such tasks, you understand, but I honestly don't think there are many of them.

Re:Why should I use Perl instead of Python? (1)

rubypossum (693765) | more than 5 years ago | (#26115061)

No. "Perl or Python?" is exactly like a battle between Smalltalk or MC680x0 machine code. You can do many things in assembler, but it's technically impossible for anything to be written in machine code, it's just to much like line noise. And as we all know, machine code is often written in assembler. Which is indented using tabs, which leaves python out as well. It's just so unsolvable.

Re:Why should I use Perl instead of Python? (0)

Anonymous Coward | more than 5 years ago | (#26117077)

> you can write programs that do the exact same thing in either language and it really won't make any difference to the end result

You can say that about any two Turing-complete languages, can't you?

Re:Why should I use Perl instead of Python? (1)

xouumalperxe (815707) | more than 5 years ago | (#26118265)

yes, of course. But, to give an easy and stereotypical example, writing lisp-style functional/recursive code in C is a royal pain in the arse (function pointers are not friendly things to work with), while writing procedural code in lisp sucks to no end as well (its standard looping facilities being several kinds of bad all at once). "the language is technically capable of" is different from "the language makes it feasible". That feasibility is more often than not measurable in the end result (bugs, time to implement, etc etc).

Re:Why should I use Perl instead of Python? (1)

SanityInAnarchy (655584) | more than 5 years ago | (#26112599)

no standard way of doing OOP

Really? I was under the impression that not only was there a standard way, but it was lifted from Python.

Re:Why should I use Perl instead of Python? (4, Insightful)

berend botje (1401731) | more than 5 years ago | (#26111457)

CPAN. 'nuff said.

Re:Why should I use Perl instead of Python? (1, Insightful)

wilder_card (774631) | more than 5 years ago | (#26111643)

<bias>If you want to make sure no one else can read and/or understand your code, by all means use Perl. Use as many expert "tricks" as you can to make it indecipherable. On the other hand, if you want to produce reliable, working code, and still understand it years later, go with Python.</bias>

Re:Why should I use Perl instead of Python? (0)

Anonymous Coward | more than 5 years ago | (#26114067)

I feel the same way about Ruby and Python, because I don't know them. Learn Perl to read it, dipshit.

Re:Why should I use Perl instead of Python? (0)

Anonymous Coward | more than 5 years ago | (#26111701)

Not sucking.

Re:Why should I use Perl instead of Python? (5, Insightful)

ThePhilips (752041) | more than 5 years ago | (#26111779)

Besides CPAN, Perl was one of the first languages to integrate advanced data structures - lists and hashes - directly into language itself. And not some half-assed implementation - e.g. C++'s STL or Lisp' lists - but really really good implementation, supported by many standard functions and (most importantly) internal optimizer.

Last, but not least, Perl is quite well performing. Compromise fitting most tasks: scripts are loaded relatively fast (e.g. compared to Python), yet if you use structures intelligently, it will run very fast.

All that together, with Perl's pragmatical approach, you have a tool which easily scales from irreplaceable "perl -pe" one-liners to relatively huge projects. And in many cases, huge projects start as one liner scripts. That's where I'm addicted to Perl: if you know what you do, you can write short but powerful scripts in few seconds. And if you need, you can easily improve the one liner into some good tool, usable by other too.

As noted by many Perl fans (like I am) you do not write in Perl - you think in Perl. It is language without any artificial barriers between you and resources you need to accomplish your task. That's why it is so hard to get off the Perl.

P.S. Can't compare to Ruby, since I haven't used it. Few examples I have seen before hadn't stroke me as anything radically new or more useful/practical than Perl.

Re:Why should I use Perl instead of Python? (1)

cheebie (459397) | more than 5 years ago | (#26112745)

My take on Ruby (admittedly limited), is that it's Perl written in Reverse
Polish Notation. Instead of 'sort list', you do 'list.sort'.

If you'rea big fan of OO, Ruby is the tool for you. If you're dashing off
a quick hack to rearrange that text file, Perl is gonna be your tool of choice.

Re:Why should I use Perl instead of Python? (0)

Anonymous Coward | more than 5 years ago | (#26113005)

Woah, and to think Perl is older than LISP, so that's where LISP got the idea of lists from!
Idiot.

Re:Why should I use Perl instead of Python? (1)

ThePhilips (752041) | more than 5 years ago | (#26115039)

Hehe...

And to think it would be 15+ years to the next language which would integrate standard data structures right into language is really a shame.

Most languages try to create "the language." Perl always wins by simple fact of being first and foremost "the tool," and only then "a language."

If with normal language, you spend some time learning syntax, with Perl you first learn to do some work by picking scripts on the Net. Then you try to combine the scripts - and find that it is possible indeed and the abracadabra beneath is a neat programming language.

Re:Why should I use Perl instead of Python? (1)

rubypossum (693765) | more than 5 years ago | (#26115151)

I'm a long-time perl fan and I recently began learning Ruby since it seems to have more jobs available (for RoR websites.) It's not terribly impressive, although I think code can be written more compactly than even Perl. It is many times slower than Perl for almost anything.

The real language that has stolen my keyboard is PHP5. Even though it seems to unite all the negative features of Perl, embperl, Python, Java and C++, I'm still intrigued. It seems to be a language which cannot be written cleanly. It can never look beautiful to any eye but that of a PHP programmer. And yet, I love you PHP5, you dirty dirty girl.

Anyway, it seems like web people are moving from Perl5 to PHP and sysadmins are moving to Python or Ruby. Although most are remaining versed in Perl, a language which has had more lines written in it than Python, Smalltalk, Eiffel and Ruby combined.

Re:Why should I use Perl instead of Python? (1)

bnenning (58349) | more than 5 years ago | (#26115381)

Besides CPAN, Perl was one of the first languages to integrate advanced data structures - lists and hashes - directly into language itself. And not some half-assed implementation - e.g. C++'s STL or Lisp' lists - but really really good implementation

Ugh. Perl deserves credit for recognizing the importance of built-in data structures, but auto-flattening lists and requiring explicit references to do nesting is insane.

Re:Why should I use Perl instead of Python? (1)

ThePhilips (752041) | more than 5 years ago | (#26118383)

auto-flattening lists and requiring explicit references to do nesting is insane.

Care to elaborate where your problem is?

I in fact the auto-flattening a nice feature which allows for many silly and useful tricks (e.g. prepare list(s) with arguments to function, dynamically lookup function reference, call by references supplying the list)

Explicit references are pretty handy too. After all, normally you do not use references at all. For most of the things plain data structures (without nesting) are sufficient. And even then, if you have deep nested structure, by adding extra functions to work on primitive types (hashes, lists), you can keep referencing madness localized to small part of a program. But I find it all not much more complicated than working with pointers in C. Perl run-time checks (use strict) help here too.

Re:Why should I use Perl instead of Python? (1)

walterbyrd (182728) | more than 5 years ago | (#26113845)

If you are a UNIX/Linux sysadmin, you may find that perl code looks more unix-like. Also, as a practical matter, perl is far more popular for unix sysadmin than python, so you are more likely to have to work with perl scripts.

These days, perl is essentially a requirement for unix sysadmin jobs - that is not true of python.

Re:Why should I use Perl instead of Python? (1)

oliderid (710055) | more than 5 years ago | (#26120201)

Depends of the job...See CPAN for example and all modules available. If you need OOP, don't use Perl, if you need to glue quickly few modules, Perl is still my favorite.

Design is not irrelevant (-1, Flamebait)

Anonymous Coward | more than 5 years ago | (#26111147)

Perl does not matter anymore.
Larry's postmodernism turned into chaos.
Academics does matter,
especially with scaling issues.

Re:Design is not irrelevant (1)

jjohnson (62583) | more than 5 years ago | (#26116263)

Haiku only has three lines, and 17 syllables. To wit:

Perl does not matter
Pomo Larry became chaos
Academics... Yes!

Perl culture on public display (2, Funny)

David Gerard (12369) | more than 5 years ago | (#26111185)

The quality and intelligence of graffiti is inversely proportional to the difficulty in putting it wherever it is. Dangerous spots on train lines? Misspelt tags. Quiet abandoned swimming pools? Computer scientists with spray cans. [today.com] Now, that's Perl in Popular Culture!

Holy typos, Batman! (3, Insightful)

Haeleth (414428) | more than 5 years ago | (#26111243)

"Signals" for "sigils", describing ClearCase as a "rear-vision control system"... was this article dictated over a noisy phone line to someone who knows nothing about computers?

Re:Holy typos, Batman! (1)

MoeDrippins (769977) | more than 5 years ago | (#26111373)

Having used ClearCase*, I'm not sure that one's a typo.

* Mind you, it was a badly architected usage of ClearCase, and even the ClearCase folks told us at the time, "you're doing it wrong". Our company knew better of course, resulting in a lot of suck.

Good reasons for the delay (4, Funny)

burris (122191) | more than 5 years ago | (#26111299)

Some important changes had to be made to support the developers of Duke Nukem Forever, who are rewriting the project from scratch in Perl 6. The good news is that means Perl 6 is right around the corner!

What is the reason for slanding perl ? (-1, Troll)

Anonymous Coward | more than 5 years ago | (#26111345)

Python advocates often trying to slender and cut down Perl.

Why? Driven by jealousy?

Python is the language for idiots who do not understand Perl. :b

Who needs Perl 6 when we have Perl 5? (3, Insightful)

poet (8021) | more than 5 years ago | (#26111419)

A talk on why Perl 5 is Alive [postgresqlconference.org] was given at PostgreSQL Conference West 08. What I found most interesting is how vibrant the current perl 5 community is. There are even non profits popping up to support it and forgo worrying about 6...

Re:Who needs Perl 6 when we have Perl 5? (3, Informative)

diegocgteleline.es (653730) | more than 5 years ago | (#26111549)

Take a look at the November 2008 TIOBE index top ten:

            Position Position Programming Ratings Delta Nov
            Nov 2008 Nov 2007 Language Nov 2008 2007
            1 1 Java 20.299% -0.24%
            2 2 C 15.276% +1.31%
            3 4 C++ 10.357% +1.61%
            4 3 (Visual) Basic 9.270% -0.96%
            5 5 PHP 8.940% +0.25%
            6 7 Python 5.140% +0.91%
            7 8 C# 4.026% +0.11%
            8 11 Delphi 4.006% +1.55%
            9 6 Perl 3.876% -0.86%
            10 10 JavaScript 2.925% 0.00%

You can read the rest of the article [perl.org] here...

Re:Who needs Perl 6 when we have Perl 5? (1)

chromatic (9471) | more than 5 years ago | (#26112009)

TIOBE isn't serious research. Counting "Chrome" for Delphi may skew the numbers, given that Google's browser is not written in Delphi.

Re:Who needs Perl 6 when we have Perl 5? (0)

Anonymous Coward | more than 5 years ago | (#26112451)

Based on research like that I am the number one Perl programmer (and number 2):
http://www.google.com/search?q=Perl%20programmer

Look at actual available jobs! (2, Informative)

rubypossum (693765) | more than 5 years ago | (#26115253)

Look at actual available jobs [indeed.com] . Not silly popularity contests. Do you honestly believe Delphi is more common than Javascript??

perl is irrelevant (0, Flamebait)

larry bagina (561269) | more than 5 years ago | (#26111635)

not irrelevant in the sense that it's dead, but irrelevant in the sense that it's a has-been. Ruby, Python, and PHP have overtaken it. Consider:

In Perl 6, ``->'' is being replaced by ``.''. And ``.'' is being replaced by ``_''. Why? Because everybody else (Python, Java, C#, etc) uses ``.'' to dereference.

Perl is no longer a leader, it's a follower. Monkey See, Monkey. That's the sort of cargo cult programming you'd expect from PHP.

Vista was version 6, too. Maybe Perl 7 will be better.

Re:perl is irrelevant (0)

Anonymous Coward | more than 5 years ago | (#26111751)

Perl has always "stolen" features from other languages, replacing -> by . is just pragmatism. It's widespread and shorter to type, that's all.

Re:perl is irrelevant (5, Informative)

chromatic (9471) | more than 5 years ago | (#26111951)

Why?

It's also two keystrokes shorter. What's wrong about borrowing good ideas from other languages? (I'd tell you what's wrong about borrowing bad ideas from other languages, but you didn't ask.)

You're also years out of date on the string concatenation operator. I leave it as an exercise for readers to form their own conclusions about the accuracy of the rest of your post.

Re:perl is irrelevant (1)

hachete (473378) | more than 5 years ago | (#26114105)

I agree with you about the gp; but a while ago I noticed a lot of comments in the CPAN modules which started talking about the perl "way of doing things" rather than just nicking things wholesale from other languages. If they have started the latter again, then Perl 6 will be the better for it.

Re:perl is irrelevant (0)

Anonymous Coward | more than 5 years ago | (#26112195)

very insightful!

Re:perl is irrelevant (1)

thetoadwarrior (1268702) | more than 5 years ago | (#26112333)

It's a shame PHP doesn't ditch -> and replace it with .

Most languages do borrow from other languages. There is nothing wrong with seeing something good and implementing it. Keeping something bad just to be original is silly.

Re:perl is irrelevant (2, Interesting)

theredshoes (1308621) | more than 5 years ago | (#26113255)

After reading over the comments on this article and figuring out what I should spend my time on studying is not going to be exactly easy.

Maybe I should just continue on with OO programming and pick up where I left off and stick with interpreted languages and then onto OOP, instead of functional programming.

I would think that some functional programming would be useful though. I am guessing if you are familiar with OO and functional it would make you a bit more marketable. Just a hunch.

If Ruby, Python and PHP have overtaken Perl, it might be better to learn PHP. I will probably end up looking over both though as I go along.

Re:perl is irrelevant (1)

Stinking Pig (45860) | more than 5 years ago | (#26116727)

Making career decisions based on Slashdot discussions is insane. You might as well go ask the guys huffing glue in back of the gas station. Fewer people around here actually have paying jobs in the field than would like to present themselves as having such.

Re:perl is irrelevant (0)

Anonymous Coward | more than 5 years ago | (#26119509)

PHP has overtaken perl?? Gimme some of what you are smoking!

Perl (3, Insightful)

scsizor (1380671) | more than 5 years ago | (#26112021)

When they take perl out of slackware ill stop using it. Until then its real handy.

Christian? (-1, Offtopic)

Anonymous Coward | more than 5 years ago | (#26112109)

He still Christian?

Re:Christian? (1)

palegray.net (1195047) | more than 5 years ago | (#26112707)

Yes.

It's rather like nuclear fusion power (-1, Flamebait)

Anonymous Coward | more than 5 years ago | (#26113031)

We're 40 years away from having viable nuclear fusion plants. And we've been 40 years away from it for all of the 50 years I've been on the planet.

I think Perl 6 is rather like that. It's been "just round the corner" for almost as long as I've been coding in Perl 5.

Perls sense of Community vs C++'s anti-community (2, Insightful)

CuteSteveJobs (1343851) | more than 5 years ago | (#26118215)

I'm a C++head and I've a friend who is a Perlhead. One thing I really envy about Perl is the sense of community; you get the feeling they're all in it together, and CSPAN gives them a massive library of contributor functions. Stuff I have to write in C+++, he can just reach into CSPAN and find a module, well documented, all ready to go.

Now compare that with C++. We've finally got BOOST.ORG which is supposed to be C++'s answer to CSPAN, but its too little too late. Well, maybe not too little, but it's tiny. There's just too much function it doesn't have. So what can you do? If you need some function you can google around to find a library someone else has done, but since C++ never dictated things like geometry or template libraries (STL was an unpopular pig at first, so many codeshops rolled their own instead). Everything is different. The standard of documentation for open libraries isn't great; you're lucky if you get any doc at all, and usually you'll have a few poorly strung together test programs you need to reverse engineer. Despite POSIX, portability is still a problem. Microsoft C++ doesn't like GNU C++, and this affects packages which you wouldn't think would have any OS dependent code at all (e.g. NOVA).

But worst of all, what C/C++ code there is out there was smithed in the days of "I will get rich off this hundred line program ha ha royalty holidays forever". Nearly everything has a non-commercial clause. Even the most piddling things or everyday stuff like triangulation. Where does that leave you? Well you can get a payware library like Alan Murthra's Polygon Clipper library for which he charges a whopping $2K a license. Prices most of us out of the market (an educational, no-profit exemption is useless). ie. GTFO. So in C++, almost always, you'll find yourself rolling your own code. And when people roll libraries, they're seldom open-sourced. There are a few honourable exceptions; LIBPNG, LIBJPEG, LIBZIP, FFTW. But these are few and far between.

I truly envy Perl. I'd like to blame the C++ Community for not doing an equivalent of CSPAN sooner, but there is no community to blame. I welcome Boost, but it has such a long way to go. Really what C++ misses is community.

Latest Developments in Perl5 (0)

Anonymous Coward | more than 5 years ago | (#26119821)

Larry Wall is understandably focused on Perl6, but I wouldn't want people to think Perl5 has been standing still. Over the past few years a lot of the great ideas from the Perl6 development process has informed new Perl5 development. For example, Perl5 has a fantastic Object Oriented framework called Moose (http://moose.perl.org) which is not only one of the most rapid development OO frameworks I've ever used, but has very active community. No surprise Google Apps Perl port will use it (see http://groups.google.com/group/perl-appengine/browse_thread/thread/26ddf4c0cf76b2ac for more about this).

I have nothing against other languages, but if you haven't see any modern Perl recently it's time to take another look.

perl for sysadmin (0)

Anonymous Coward | more than 5 years ago | (#26120355)

I have had this debate may times at my current IT house. I personally use perl and others use python and php. From what I can see, I can cleanly implement the same takes in perl as the other 2 languages in far less code (based on modules) at the same performance or better and I am far from an expert programmer.

When I look at the same functions that other programs use to perform the same tasks (wrote by far more experienced programmers to say the least), I am astonished on how complex they are in comparison.

The only problem I see with perl (and for that matter per the main subject perl6) is that there seems to be no standard code style between each perl programmer because of the nature of how "free" or "easy" it is to implement different things, move around things, inputs, outputs, etc. Some may say this is a good thing, but I can easily read the other 2 mentioned languages and know what/how that work, but in perl its not really that straight forward. If Perl6 adds more to this (via the sudo OOP approach) then I will probably move to another language.

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...