Tag Archives: Larry Wall

OSCON 2010: State of the Onion

The Thursday sessions are over, but before I head out to the parties, I’m attending the 14th State of the Onion address. This is the always well-attended update on the universe of Perl. I immediately noticed that Larry is surrounded by his wife and his son, the former dressed as an angel, the latter as a devil.

Larry claims that so rarely does he talk about Perl in the States of the Onion addresses that he has brought his conscience with him today to prod him in the right direction (the aforementioned angel and devil).

The current state of the onion is segmented into left, central, and right sections. It can be labeled, say, 5 and 6. They can also be labeled 0 and 1, for false and true. Larry then asked a series of boolean questions, asking the audience to weigh in on the veracity.

Do you think Perl 5 and Perl 6 are really the same language?

Do you think Perl 5 and Perl 6 are really different languages?

As the angel and the devil argued, Larry pointed out that an important skill for a language designer is to be able to stay on the fence long enough until he can determine which side the grass is greener on. Sometimes you discover that you’re sitting on the wrong fence and the voices in your head start to argue about which side has the greener grass.

When the voices in your head start arguing if the purple cow eats greener grass than the brown fence, it’s time to see a doctor. Or find a better drug dealer.

— Larry Wall

This is, of course, a metaphor for being a language designer. Sometimes you sit on the fence for language features, without ever knowing which direction is the better one.

Next up is a live demo of Perl 6; or, more specifically, of Rakudo Star, which is scheduled to be released next week. Some of the demos, without comment:

.say if 6 %% $_ for 1..^6
[+] gather { take $_ if 6 %% $_ for 1..^6 }
[+] grep { 6 %% $_ }, 1..^6
~[+] grep 6 %% *, 1..^6
-> $n { $n == [+] grep $n %% *,  ..^ $n }
-> $n { $n == [+] grep $n %% *,  ..^ $n }(6)

At this point, the examples scrolled off the screen due to a “whatever” example being run. That’s good news, though. It means Rakudo Star supports lazy lists and, as such, we finally have those infinite lists we’ve been promised:

0, 1, ... *

The whatever star can, in addition to being used as in an infinite series, can be used to curry a function:

(1, 1, *+* ... *)[^20]    # Fibbonacci
(0, !* ... *)[^20]        # 0 1 0 1 0 1 ...

In a recent video interview, Larry was asked, if he were hit by a bus, has he designated anyone to be his successor as the leader of the Perl 6 project? His response was that he trusts the Perl community to choose the right person.

Onions can make you cry, so can disruptive technologies or innovations. Almost everyone has labeled their technology as disruptive. As such, the phrase has lost most of its meaning.

A disruptive technology simultaneously does something worse and does something better than its competitors. In a time of the Unix philosophy of “do one thing and do it well,” Perl came along and attempted to do everything, but didn’t necessarily do any of it well. The Unix philosophy was broken by its own utilities. No one knew what a “thing” was, and no utility of the time did it well. By the time Perl 4 turned into Perl 5, it demonstrated that a tool that was itself an entire tool shed could run circles around shell scripts.

In California, we once had many, many colonies of ants. Now, most of California is populated by a single colony of Argentine ants. This is because the colonies have forgotten how to fight with each other. Perl 6 has benefited from multiple teams creating multiple implementations, in the end working together to create a better product, even if that product takes longer to complete.

If you don’t like Camelia, you can just fork off.

— Larry Wall

The takeaway, I think: It is up to all of us to determine what Perl 6 will be. What kind of disruptive technology will it be?

OSCON 2008: State of the Onion

It’s finally time for the State of the Onion. Larry Wall introduced this year’s theme, Rules That Are Meant to be Broken.

If he had Perl to do all over again, what would he do different? Only two things, nothing, and everything. Perl 6 is the everything part of the answer.

In Perl 5, one of the problems that creeps up is that regular expressions (regexes) are strings. The best example of this is variable interpolation in regexes. In Perl 6, this has been fixed. They are now their own language.

Like cargo-cult programming, parsing has turned into its own cargo-cult. Perl 6 breaks the mold when it comes to copying languages (the old lex/yacc loop), and instead uses polymorphism in its sub-language design.

Both regexes, double quoted strings, and single quoted strings are examples of sub-languages in Perl 6. Each of these sub-languages has its own parsing rules and therefore parsing implementations. This allows is code reuse. Parsers can derive behavior from other parsers, but treat the tokens differently as necessary.

Fundamentally, Perl 6 is very simple. It has no CORE. It has no built-ins and no operators. What Perl 6 has given us (will give us?), in effect, is a just in time lexer. Tokens and their behavior can be defined on the fly, on a per-sub-language basis.

There are quite a few changes to the regularity of regular expressions. Mostly what this means is that Perl 6 regexes are incompatible with those used in Perl 5, and that Perl-compatible regular expressions (PCRE) aren’t (or won’t be).

All languages tend to fall into the One True Syntax trap. Perl 6 has aimed to break out of that trap. By giving the user enough power over the syntax (rope) to design the language that suits them (hang themselves).

I didn’t enjoy the State of the Onion as much as I have in the past. I suppose that’s to be expected. Larry did warn us at the top of the talk that it would be serious and contain only a single joke. For as great a writer as Larry is, his ability as a public speaker is lacking. That’s okay, though. I’d rather he not shift focus away from the design and development of Perl.

[tags]oscon, oscon08, oscon2008, Perl, State of the Onion, Larry Wall[/tags]