Perl's State of the Onion 10 126
chromatic writes "Larry Wall's annual State of the Onion addresses cover subjects such chemistry, science, music, lingustics, and screensavers. They occasionally discuss Perl too. This year's, State of the Onion 10 compares raising children into productive adults to guiding the development and design of a programming language. Perl turns 19 soon; Larry says that she'll truly grow up with Perl 6."
Legal, is she? (Score:4, Funny)
Great, so Perl 6 is legal now. Any chance of seeing her while we still have our youth?
Re:Legal, is she? (Score:5, Funny)
Re: (Score:1)
Summary (Score:3, Interesting)
After having read it I get the feeling Perl 6 is having an identity crisis, but that Wall knows what he's doing.
Re:Summary (Score:4, Informative)
To know what Perl 6 will be like, read the Synopses [perl.org].
My own reaction was more like, wow this guy really is nuts, but I really want to see what he'll manage to come up with. :-) (and I say that as a professional Perl programmer...)
Re: (Score:3, Insightful)
It all read to me as if he's disengaging himself from the Perl development process and looking forward to spending more time on Real Life. Good luck to him, if so; he's surely earned some time off to spend with his family.
Pity abou
Re: Summary (Score:2, Insightful)
> just that Perl 6 will be WOP (whatever oriented programming), which is more
> than a little vague.
Ah. What you've missed is that this is Larry's State of the Onion speech. If you want to see details such as how Perl6 will respond to certain challenges, what paradigms the language supports and how it supports them, and so on, you subscribe to the mailing lists or at least read the Synopses. If you just want to be ente
More useful stuff about Perl 6 (Score:5, Informative)
Re: (Score:2)
As a Perl programmer, I have to ask: why? I don't want Pugs, I want Perl 6! The last thing I need is another language to clutter things up. I'm not going to go about converting Perl 5 scripts to Pugs then having to convert them over to Perl 6. Or is LW going to wave a magic wand one day and Pugs will magically transmogrify into Perl 6? I love Perl, I really do -- it's the Swiss Army knife of languages, good for just about anything you can think of. Whether there is a Perl 6 in the future is really irrelevan
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Perl 6 might be great... not. (Score:3, Informative)
For example, here's two choice quotes from the Perl 6 operators [perl.org] page.
Hypocrisy in action, folks.
Re: (Score:2)
I don't get it - the rest of the world doesn't use C or C++ ? Is that what you're saying ?
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re:Perl 6 might be great... not. (Score:5, Interesting)
From what I understand, the Perl6 operators were chosen according to Huffman compression principles. Frequently used operators became shorter, less frequently used operators became longer.
The bare colon operator turned out to be much more useful elsewhere. The dash-arrow operator was initially borrowed from C++, but these days, most dynamic languages all use dot for the same purpose.
This sound more like pragmatism than anything else.
Re: (Score:2)
Hypocrisy? I don't think this word is spelled like you think it's spelled.
Re: (Score:2)
i.e. saying "-> becomes ., like the rest of the world uses." and then changing the ternary operator from something everyone else uses to something completely different.
Changing -> to . has other repercussions, too. In case you'd forgotten, "." was already used for concatenation. So, now concatenation now becomes "~". But wait, ~ was already used to bind scalars to a p
Re: (Score:1)
Good thing it's not arbitrary then.
Re: (Score:2)
Re: (Score:1)
Fine, but by that definition everything in the design a programming language is arbitrary, so that's a fairly useless description. I thought you meant the capricious or random definition, which (while incorrect in this case) actually means something in context.
Re: (Score:2)
> Hypocrisy in action, folks.
I agree. The new ternary syntax is going to be easily confused with the ORLY?? and OMG!! operators.
Re: (Score:2)
To quote Larry in Apocalypse 3 [perl.com]:
If you haven't been keeping up, one of Larry's basic premises in Perl 6 is to improve the "Huffman coding [wikipedia.org]" of the language: things that people use every day shoul
Larry is boring (Score:2, Interesting)
He tries desperately hard to be creative, funny, surprising, to add new perspectives.
Yet, when it comes down to it, he ultimately writes 5 pages of nonsense. He really does say amazingly close to nothing in all those pages. No. A large white square with the literal text "Whatever" in the middle doesn't really tell anyone anything significant.
And no. The skills needed for successfully managing a family and raising children doesn't, infact, have much in common with those skills
Re: (Score:2, Insightful)
The large square panels are presumably slides from his live presentation. They aren't supposed to stand alone, in fact I suspect that the whole presentation would make (as much) sense without any of them.
Personally, I find Wall's prose simply wonderful: I've been known to read entire chapters of the Camel book just for the asides. I think that to judge this presentation you have to imagine the equivalent speech about "the future of typing in C++" or "the evolution of the object model in java" and ask yours
Re: (Score:2)
Re: (Score:1)
Anyways, I'm sure Perl is also quite happy that you left.
Re: (Score:3, Interesting)
We're glad you stopped programming.
I think programmers understood that he wasn't suggesting otherwise.
See, there are a lot of programmers (especially those that learned in the last 5 years, but plenty still that have been working in software development for lo
Debugging (Score:3, Informative)
Perl has a really nice debugger, but you can't use it for debugging scripted web pages. There are solutions, but mostly they're not provided with the standard Linux distributions. I'd like some sort of online solution that doesn't require lots of configuration.
Perl is so damned ugly though (Score:2)
Honestly, if I plugged my mouse into the keyboard port and spat the input into a text editor, it'd look like Perl. I know that's an incredibly immature way of looking at a language but, dammit, even Assembly is prettier! Should that really be the case?
(Disclaimer: this is not a comment on Perl's functionality.)
Podcast (Score:4, Funny)
Operator Error (Score:4, Interesting)
Some Perl 6 additions will prove quite useful, like the zip() function (which Python has had for some time, incidentally). Some changes are moderately useful, but it is difficult to see how they are superior to Perl 5 (like getting rid of the "_" short-cut for stat calls in favor of sequencing calls). But a lot of the stuff just doesn't seem to warrant all the effort to change scripts: programmer time is expensive, and is wasted twiddling ASCII characters just because the language wants to use new characters to express *exactly the same concept*.
In my case, I will probably look at my array of Perl scripts, and I will probably decide it is easier to finally switch them over to Python or another superior language. At least then, I will gain something for my trouble.
Re: (Score:2)
Unfortunately ponie seems to have got stuck or something.
Then if there are some things that perl5 doesn't do well, maybe you switch to perl6.
Or python
Re: (Score:1)
ponie is officially dead [google.com]
Re: (Score:2)
Well, to play devils advocate, how often do you find yourself using the terniary operator or bitshifting in Perl? What if you could, instead, leverage those tokens for other, more commonly used op
Death Valley (Score:3, Insightful)
There's a certain stage, for some projects, at which people realize that the Great Next Version, if it ever comes, will be too little too late, and that the action has moved elsewhere. For Perl that was 3-5 years ago. For Ruby, 2-4 years ago. For countless non-public projects, it happens; gradually, progress meetings become a bit of a joke, the smart staff get moved elsewhere, and Project Star (there's nearly always a project called 'Star') becomes something that still exists on someone's budget, but which nobody really expects to have to pay attention to. Sometimes there's a meeting about it and a status report tha reads like a State of the Onion; a bit of waffle, a few in-jokes, some words of encouragement, and then back to doing something else.
Sometimes, this does _not_ happen. Vista (which by rights should have entered the Death Valley last year) and Java (which should have entered it after 1.2) manage to escape this fate; disappointment after disappointment they somehow stay in the spotlight, stay relevant in hearts and minds.
The question is what to do with a project in Death Valley. In a company, someone usually eventually rolls out _something_ and declares victory so that everyone can forget about it. In open source, though, they _never_ administer the final blow. Look at CVS -- it's been in Death Valley for so long, people are beginning to think that _Subversion_ is old hat! Sure, people _use_ it, if they haven't moved on to something else yet, but the last interesting CVS news item was probably in the late 90s... and yet it jogs along... and now Perl jogs along beside it, in the gated retirement community of Open Source.
I'm not saying it's a bad thing, but it is a definite difference between OS and commercial software; you get far more resources spent on the 'long tail' of a project's life in OS.
Re: (Score:2, Interesting)
What differs with Perl is that Perl5 is such a good language (for those who actually use it) that its use and development will probably continue apace (as they have during this whole Perl6 dev cycle). I really like Perl, but the Perl I like is Perl5. By trying to turn it into an "all things to all people" l
Re:Death Valley (Score:4, Insightful)
You seem to equate a project that is no longer being significantly or quickly developed with a project that is pointless. Some of us would call tools like Perl 5 and CVS "tried and tested", "stable and reliable", or perhaps even "established standards".
Now, me, I've followed Perl 6 development from a safe distance, reading the odd article here and there, but not spending too much time on all the details. I get the feeling that it's going to be too complicated to be worth the effort to switch, but I'll reserve judgement until there's a stable, polished implementation to experiment with.
However, that didn't stop me using Perl 5 to develop a whole load of scripts to drive a new database system I was writing last weekend, or for that matter to write a couple of 50-liners to process some diagnostic output from the app I'm developing at work yesterday. I don't care that I didn't use the latest AJAXified web 2.0 technologies; I had a job to do, and Perl 5 let me do it quickly and correctly, which is all I ask of a programming tool.
Incidentally, if Perl had its day 3-5 years ago, and Ruby 2-4 years ago, what do you think are the cutting edge programming languages of today?
Re: (Score:2)
Incidentally, if Perl had its day 3-5 years ago, and Ruby 2-4 years ago, what do you think are the cutting edge programming languages of today?
Visual Age COBOL [flexus.com] Get with the times man- everything old is new again.
Re: (Score:2)
Hm, well, I don't really like cutting edge things, because I'm very lazy, and because so many things go from 'cutting edge' to 'dead' with no in-between. But in terms of where the interesting effort is going, I personally tend to think:
PHP -- I know, I know. But there's a great deal of interesting webby work happening in it, especially if you like CMSes / knowledge sharing tools.
C# -- Tons of stuff going on, a very powerful platform that is only just beginning to be explored, and then of course the fact t
Re: (Score:2)
I feel like repeating my previous comment. Who says PHP is dead? That same database system I mentioned before has to provide some web access. After looking at the available options, it made far more sense to code that up using PHP than using "pure CGI" with a language like Perl. Again, it may not be the flashiest language on the planet, but it got the job done efficiently and effectively.
Re: (Score:2)
Re: (Score:2)
Your implicit assumption is that I am incompetent. I suggest to you, with no malice intended, that you will gain more from your experiences on boards like this if you seek to find out someone's level of competence before judging them.
In fact, our entire web site is already generated using a customised, home-grown framework based on XML/XSLT and standard scripting tools, which serves our needs far better than any of the cookie-cutter frameworks you mentioned. All we needed was a way to drop a quick databas
Re: (Score:2)
Re: (Score:2)
I'm sorry. When you wrote:
in response to my personal example involving PHP, I assumed that you were in the same conversation as the rest of us. As I have explained, I most c
Re: (Score:2)
PHP is "training wheels without the bike."
Unfortunately, bad programming languages never really die. Even COBOL is still leaving its trail of slime at some mega-corporations.
Re: (Score:2)
COBOL... lessee, you're a bank shuffling billions of dollars around every day, reconciling accounts after business has closed. You've got a pile of 30-year-old continuously maintained COBOL doing the shuffling and adding up those BCD dollar and cents.
And then a whizzkid from down the corridor in the website support office suggests you abandon all that working, time-tested code and rewrite it all in some open-source incredibly cryptic code that looks like line-noise, that doesn't support native BCD, that...
I
Re: (Score:2)
I agree that you need some kind of fixed-point representation for dollars and cents. In any civilized language, you would simply create a class that handles fixed-point math, and use that wherever you need fixed-point math. There isn't really any need for BCD-- it's ju
Re: (Score:3, Informative)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Maybe. But exactly how much time passed between perl4 and perl5? How about if we talk creation (i.e. the ability to create code in the respective languages)?
It's amazing that people think we've been waiting for a while for Perl6. People have been writing in perl6 for a while, it just so happens that more still write in perl5.
Re: (Score:2)
Don't underestimate the inertia of established technologies, though. Some people are still using some variant of FORTRAN, the original compiled language developed in the 50s. Other organizations got stuck at the COBOL stage. There's still a small market for VAX gurus, VMS p
Re: (Score:2)
They did. Mozilla the product is dead.
http://developer.mozilla.org/devnews/index.php/200 6/04/12/sunset-announcement-for-fxtb-10x-and-mozil la-suite-17x/ [mozilla.org]
Firefox replaced it (from part of the same codebase - and note the JWZ doesn't say the code was bad) arguably precisely because they did exactly what JWZ says mozilla should have done and didn't - ie. shipped product early and often.
Perl version should stay below 2 times Pi (Score:2)
O. Wyss
6 - compelling reason? (Score:5, Insightful)
What Perl 6 needs, and I haven't seen yet, is a compelling reason to switch. It may be better under the covers, but Perl 5 works great from a user's perspective. In fact, I've been using 4 and 5 over the past decade and a half, since '91, to craft almost everything. It's part of my nervous system. I've internalized it.
So why would I switch to Perl 6? I'm just not hearing compelling reasons other than they've randomly changed a bunch of stuff so what I know doesn't work anymore or isn't optimal. The installed base of Perl 5 users is Perl 6's biggest enemy.
This would be like changing vi keys to make them conform to the CUA standard or Emacs - it might be progress, but people are used to vi qua vi in its historical form and don't want progress because the standard keys are in their nervous systems now.
Me too! (Score:2)
I **LOVE** Perl 5. It is, without question, the most useful and most powerful programming language I have ever encountered, and that includes C, C++, various assemblers, Pascal, FORTRAN, Java, REXX, Ada, Python... all the languages of the week. I keep coming back to perl because it is so damn useful and because it is so elegant (when used correctly - bad perl is really, really bad).
My productivity would be a tenth what it is today if not for perl. I use it for ever
Re: (Score:2)
Additionally, P6 expands Perl's functional
Re: (Score:1)
That's not really it. Mixins and interfaces are cut-down, minimal, crippled implementations of roles. A role-based system offers both mixins and interfaces trivially, but mixins or interfaces offer poor emulations of roles. Does that make more sense?
Re: (Score:1)
The problem is that people who think that Perl is not good for designing large systems have long since moved on to other languages. People who think that Perl5 is great as is are not going to like the Perl6 features. So Perl6 ends up pleasing nobody.
Perl5 serves a useful niche. I still reach for it when I want to code up something quick and dirty. The Perl development community should have focused
Re: (Score:1)
The Perl development community has welcomed patches for nearly 19 years now. I believe you forgot to preface your humble opinion with "In my humble opinion as a non-contributor and someone who has used the work of hundreds of contributors (who know much better than me and thus may very well be in very good positions to disagree with my humble opinion) for many years for free...."
(Being one of those hundreds of contributors, I laugh when you say "simple" an
Re: (Score:1)
Re: (Score:1)
I'm willing to continueto earn the right to have people care about my opinions by producing code, patches, documentation, bug reports, test cases, articles, presentations, tutorials, and books.
Pick one of those. Show us all how easy it is.
Re: (Score:1)
Re: (Score:1)
Indeed I have, and it was as wrong for me to do so as it is for you. Where's your patch?
Re: (Score:1)
Re: (Score:1)
Re: (Score:1)
How frequent is it? I could come up with a whole article full of criticisms of Perl 5's design and implementation ( What is Perl 6 [perl.com] is a start). I wouldn't have seen everything Larry has seen, for example, but he's a lot better at designing languages than I am.
My experience is that a lot of project have wishlists with big and small items. Granted, the big items tend not to be radical rethinkings (as in the case of Perl 6), but I'm not sure it's as insular as you might think.
Re: (Score:2, Interesting)
P.S.
I love Perl and Lisp, but people tend to get defensive about sore spots. I sometimes think that it would have been easier on everyone to introduce P
Re: (Score:1)
I don't mean to say that the only acceptable form of contribution is a patch. A bug report, a test, a question for the FAQ, a helpful answer on a mailing list or forum, a piece of documentation, an article, a tutorial, a book, or anything else constructive is absolutely fine.
Complaining in a completely unrelated forum without any apparent understanding of the issues or willingness to be a part of the community (by contributing anything) is completely useless. I don't see why the people who do contribute
Re: (Score:2)
I use Perl 5 mainly for quick and dirty scripts. Most of the time I find a good CPAN module to begin with. I won't use it for large scale projects. I find rather difficult for Object oriented programming. I tried it on a middle-size project. the Bless thing is difficult to understand. The syntax is too weird for me. This part of perl5 looks more like hack than an useful and an efficient tool. I find it extremely difficult to track bugs during the development process for example.
I know Larry wall
Re: (Score:1)
There are some [perl.com] good explanations around about why they're rewriting perl.
FWIW, this is set of features that are being implemented in Perl 6 that Perl 5 lacks:
explicit strong typing
proper parameter lists
active metadata on values, variables, subroutines, and types
declarative classes with strong encapsulation
full OO exception handling
support for the concurrent use of multiple versions of a module
extensive introspection facilities (including of POD)
LL and LR grammars (including a built-in grammar for Perl 6 its
Re: (Score:2)
If you try Python again, and try to find ways of using the extra features it has that Perl either doesn't have, or are borderline impossible to effectively use, you'll actually get a better understanding of some of the value of Perl 6. Perl 6, at least on the feature checklist, will blow past Python if it manages to come out reasonably soon. (Whether or not it will be more useful remains to be seen, but I'm comfortably open-mi
Re: (Score:2)
open FILE, ";
When an iterator(filehandle in this case) is evaluated in list context, in this case the context is "print LIST", it will iterate until exhausted and return a list. So this should print out the entire file whose name is passed in as the first argument. So, as you can see, an iterable object can be passed easily as a list. I hope that points you in the right direction
SORRY, FIXED CODE (Score:2)
open FILE, "(LT)$ARGV[0]";
print (LT)FILE(GT);
Re: (Score:2)
That's not passing an iterator, that's passing a list. Perl turns it into a list at the earliest available opportunity because nothing can handle getting an iterator. One of the key characteristics of an iterator is that it doesn't suck the entire file into memory all at once, even if you pass it into something else.
To the best of my knowledge, you just can't quite get to Python cleanl
Re: (Score:1)
Indeed you can. You don't get the iterator as the return value from a read operation on the iterator, but who would expect that you do?
See the book Higher Order Perl for far more examples.
Re: (Score:2)
I've played around a bit more and found that while (my $val = <@something>) mostly does what I'm looking for, but I'm still not seeing an obvious way to take <@something> and get a reference to that iterator that I can pass somewhere else through syntax, rather than wrapping it in my ArrayIterator blessed-scalar class. Which means I still can't see a clean way to write a function to take an array or an iterato
Re: (Score:1)
You're right about that. It's probably too late to fix that in Perl 5, though that does give me an idea.
Re: (Score:2)
I'll freely admit that I haven't thought the whole thing through and I'm not a language designer, but I'd submit having <> working on references to arrays the same way that it does on normal arrays would get me at least most of the way there, allowing me to pass a scalar that provides an overloaded <> or a ref to an array and have the behavior flattened. Currently, that's a "Not a GLOB reference" error.
Enough that I'd wipe off the language support p
Re: (Score:2)
Speed. (Score:2)
Parrot may also become the standard VM for "dynamic" languages, like Python and Ruby, and there are already many implementations of many languages running on Parrot.
This means that you can learn Perl6 slowly, and only use it for new code, and delay rewriting your old code for as long as possible. But there are many other reasons Perl6 will be not just good, but amazing, if I'm to believe what arodla
The book (Score:2)
The _real_ perl news this week... (Score:1)
good summary (Score:3, Insightful)
Hint: pictures of the grandkids is not what people with deliverables and deadlines want to see.
(I probably started using Perl more than 15 years ago. Perl was the best thing since sliced bread then, because it provided a cleaner and easier to use alternative to writing scripts in combinations of shell, awk, sed, tr, and a few other command line tools.)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
No, I wanted to take _your_ pick, smartass. I'm not even aware that there is another language with a find . -name ... -type f -print0 | xargs -0 perl -p -i -e 's/"$//' analog. And a perl -n -e 'BEGIN {srand} rand($.) < 1 && ($line = $_); END { print $line; }'. And let's not forget ... | perl -n -e '$total = $total + $_; END { $total =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d ))/$1,/g; print "$total\
The version after Perl 5 is Python (Score:5, Interesting)
Perl 6 is a step forward from a language design perspective. A big step forward. Such a big step that, if you're going to change, you may as well go to Python and dump the Perl uglyness.
The real problem with Perl is that it's a good language for small programs, but 10,000 lines of Perl is a mess unless you're a very disciplined programmer. The "there's more than one way to do it" is hell on maintenance programmers, because they have to know everything in the language to read code. Nor is reading Perl easy. I used to need three different Perl books when doing maintenance programming, because no one book, including Larry Wall's, covered everything in the language.
Perl made the Web happen in the same way that Basic made the PC happen. We're grateful to Larry for giving us this tool. Now it's time to retire it and look at the pictures of the grandkids. Thanks.
Re: (Score:2, Interesting)
I think you have a typo. Let me fix it for you:
Assuming, as a rule of thumb, that a line of Perl is equivalent to ten lines of C, would you expect an undisciplined programmer to maintain 100,000 lines of C code with ease? Me neither.
No, t
Re: (Score:2)
A natural language idiom is essentially an item of vocabulary. "Flying off the handle" is a natural language idiom idiom; it is complete and includes no new systematic way to vary its meaning. A programming language idiom has any
Re: (Score:2)
Oops. I meant nothing special by "idiom idiom;" it's just a typo that slipped through.
Re: (Score:1)
Perhaps I was a bit unclear. I didn't mean only the idioms of the language, but also the idioms of the problem domain. I'd make a terrible programmer for insurance or payroll software because I've never worked in either industry.
That's something no language can completely solve, and yet another thing that depends on the discipline and standards of the entire team who created and maintains the software.
Re: (Score:2)
I know a lot more about perl and about python, but I've just spent half an hour looking around, and I can't find anything remotely resembling CPAN, which seems like one extremely good reason to stick with Perl. The nearest I can find is a static list of modules on the python.org site that, in total, is about a tenth the length of the CPAN list of XML-related modules alone.
CPAN is another reason why your "10,000 lines of code" thing doesn't work. Larry Wall's "laziness" principle says that you use other peo
Re: (Score:2)
you say that like 10K of undisciplines anything isn't, I know people who can turn 1,000 lines of COBOL into a mess. Programmer discipline isn't a function of the language used.
Re:Huh? (Score:1)
is much more difficult to decipher because there are so many ways of accomplishing the same thing. It truly lends itself to spagghetti code in a way other languages don't.
I wish that weren't the case. It's definitely possible to write good, maintainable perl. But it's the exception, not the rule. 10000 lines of the average perl program are much harder to read than the equivalent in e.g. python.
Just my experience.
Dream on (Score:4, Insightful)
Having worked in a production environment where hundreds of thousands of lines of Perl written by fewer than 50 developers have run with extreme reliability 24x7 for years, supporting a company of tens of thousands of employees worldwide, I feel confident in saying "you have no idea what you're talking about."
Re: (Score:2)
Ruby, for instance, still doesn't have a bytecode engine, much less real compilation. I thought it was beautiful, but the beauty is skin-deep -- it's a bastardization of lisp in perl's clothing. I haven't looked at Python in awhile, but I'm guessing, in terms of power and readability: perl5 < python < ruby < perl6.