Larry Wall Talks Perl, Culture, and Community
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.
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."
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.
who the fuck thought they would be dropping Regex in any way shape or form?
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.
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. Now, that's Perl in Popular Culture!
http://rocknerd.co.uk
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 :-)
More direct regex syntax
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.
Yo dawg, I heard you like the Ackermann function, so OH GOD OH GOD OH GOD
"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?
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.
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!
"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.
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...
A talk on why Perl 5 is Alive 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...
Get your PostgreSQL here: http://www.commandprompt.com/
CPAN. 'nuff said.
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.)
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
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.
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.
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.
The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
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.
All hope abandon ye who enter here.
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.
how to invest, a novice's guide
When they take perl out of slackware ill stop using it. Until then its real handy.
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.
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.
Don't thank God, thank a doctor!
Yes.
512 MB RAM, 20 GB disk, 200 GB transfer, five datacenters. $19.95/month.
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.
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.
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.
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.
Patriotism is a virtue of the vicious
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
$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
'python script' => 13,
'a
'setgid ELF 32-bit LSB executable' => 13,
'setuid ELF 32-bit LSB executable' => 19,
'a
};
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.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
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.
All hope abandon ye who enter here.
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.
I have a theory that the truth is never told during the nine-to-five hours. - Hunter S. Thompson
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.
I have a theory that the truth is never told during the nine-to-five hours. - Hunter S. Thompson
Look at actual available jobs. Not silly popularity contests. Do you honestly believe Delphi is more common than Javascript??
I have a theory that the truth is never told during the nine-to-five hours. - Hunter S. Thompson
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.
How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
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.
Tweet, tweet.
Haiku only has three lines, and 17 syllables. To wit:
Perl does not matter
Pomo Larry became chaos
Academics... Yes!
Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
and that is why I write big programs in Perl... so that they don't have to be bigger.
"Nothing was broken, and it's been fixed." -- Jon Carroll
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.
"Nothing was broken, and it's been fixed." -- Jon Carroll
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.
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).
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.
All hope abandon ye who enter here.
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.
As noted by many Perl fans (like I am) you do not write in Perl - you think in Perl
I usually say something slightly different to people that I'm teaching perl: when writting perl, you think algorythm and data structure more than anything else, and that's what matters. You don't waste much of your time to fight with dumb API, stupid syntaxes or strange behaviors (php anyone). Perl is sometimes intimidating for outsiders, partly due to the way some people overuse its felxibility, but there is an easy way to write clean code without much of the glue you usually need in some alternate languages.
Having arrays, hashes and regexps natively accessible is one of the killing feature. I only miss a better prototyping in method/function calling.
Larry has announced Perl6 will be released on Christmas day on some year in the near future. I obtained insider information that the release date is Christmas Day 2012, probably with a 3-day early release because so much progress has been made on the Parrot interpreter recently -- for a final release date of Dec 21, 2012. Here are the leaked media files and documents: [link 1] [link 2]. It is finally clear why Larry calls his update posts "Apocalypses". For more info see this link.
Burma shave.
Give a chef's knife to a great chef and the chef will produce something amazing. Give it to a young child and the child will get hurt. Don't blame the knife. Children should not play with tools they are not capable enough to handle.
I live ze unknown. I love ze unknown. I am ze unknown.
Is this a joke? Most Lisps have quite an impressive array of standard functions for dealing with Lisps, which are the languages primary data structure, including functions for using lists as associative arrays.
Further, quite a lot of languages have language-level support for lists and mappings (whether the latter is implemented as hash-tables or not), including many that are much earlier than Perl. Whether implementations of those languages optimize those structures is another issue, but optimizers are an implementation feature, not a language feature, in general.
This is nice fluff, but what is it supposed to mean, other than the fact that, as with any language, if you use it enough it shapes your thought process so that its natural to use it more?
Huh? Lisp, qua Lisp, doesn't have standard looping facilities. Most practical Lisps, like Common Lisp and Scheme, tend to have much better standard looping facilities than C (Common Lisp has "loop", Scheme has "do"). Writing procedural code, looping included, in practical Lisps like Scheme or CL is, IME, at worst no worse than doing it in C.
Sounds a lot like Sequel, for Ruby.
Besides CPAN, Perl was one of the first languages to integrate advanced data structures - lists and hashes - directly into language itself.
Wow, the ignorance is remarkable. Learn a bit of history. Lisp had lists at the very beginning, and Smalltalk's collections put most high-level languages to shame, and that includes .NET and Java, which ostensibly have very extensive class libraries.
Of course, I suppose one could argue that, in Smalltalk, collections aren't in the "language itself"... but in Smalltalk, that's also true of, say, all the flow control operations.
I would think that some functional programming would be useful though.
I have a better idea. Learn Smalltalk. That way, you can learn more about both functional programming and proper object-oriented software design. The simple reality is that Ruby, Python, Java, and C# all borrow heavily from Smalltalk (PHP is more of a successor to Perl), so learning Smalltalk will give you a leg up on almost any modern, object-oriented language.
That said, learning a bit about Lisp or Scheme is always a good idea (Lisp's macro system is particularly intriguing)... just don't expect it to be terribly practical in a real-world setting.
Finally, the most important thing to realize is this: languages exist to express ideas. Those ideas may be whole programs, or they may be design patterns or other programming constructs. ie, whether you learn Ruby, Smalltalk, or Perl, all have the concept of an object, all have the concept of a closure, higher-order functions, and so forth. So focus on learning the *concepts*... how they're expressed in a given language is really more of a technicality.
I maybe wrong, but could you do the perl -e one liners in Python? I use them quite often.. Not trying to flame, but curious.
No, not a flame at all. (It's sad that people snark about other people's choice of languages so often that your disclaimer was necessary.) Anyway, python -c is the equivalent to perl -e. The 'c' is a mnemonic for "command."
The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
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.
My biggest gripe with Perl is that after 'knowing' it for years, and using it here and there by picking small scripts off the net and writing my own 1-2 page scripts, I STILL find bits in these scripts that make me go WTF.
I might not understand every single syntactical element of C, C++, or Java, but I can usually figure it out from the context when I come across new ones. That is with very minimal exposure too. I suppose I might be taking for granted how similar the syntax of those three are, and my cumulative experience with all three probably surpasses Perl. Still, with Perl... there are so many implied behaviors, obscure operators, so many different ways of accomplishing the same thing, that I don't think these WTF moments will ever go away :\
I love to write me own Perl, but God damn, reading someone else's is f'ing nuts.
"Perl or Python?" is like "awk or sed?".
No, "Perl or Python?" is more like "C++ or Java?"
No. "Perl or Python?" is exactly like a battle between Smalltalk or MC680x0 machine code.
I think we'll have to conclude that "Perl or Python?" is really just like "Perl or Python?". :-)
You know, Microsoft's street address also says a lot about their mentality.