Slashdot Mirror


Apocalypse 5 Released

Simon Cozens writes "The Apocalypses are Larry Wall's explanation of the design of Perl 6. In Apocalypse 5, Larry turns to redesigning regular expressions. He set out to intentionally 'break' a lot of the regular expression culture we're all used to, and these are the results - and they're mindblowing."

12 of 234 comments (clear)

  1. Regex by inflex · · Score: 4, Insightful

    Why do we always have to keep changing regex [and many othe things]. Isn't enough that we have to learn one format for almost every language. Sure, there are perhaps easier ways to express certain logic situations, but over all, do we /need/ another regex format?

    1. Re:Regex by joeykiller · · Score: 3, Insightful

      Perhaps we need to change regex and a lot of other things because the way they work today is not too optimal, or even logical (not that Perl itself is) or intuitive.

  2. New regexes by Dacmot · · Score: 5, Insightful

    The new perl 6 regexes are crazy. They seem "weird" and awkward compared to the perl 5 ones... but then again I thought the same when I started learning perl (at version 5.6).

    A lot of this makes a lot of sense however, especially the default /x to allow for easier reading of code and allow for comments inside the regexes. Some of the new features make the regexes a bit longer to type, but in general they are significantly smaller. There's also a much better and more consistent use of different types of brackets. Not having to look at the end of the regex to understand the whole thing is going to be great. I hate having to skip the regex to look a the flags first.

    Brilliant I think. I can't wait for it to come out. I hope they make a perl5->6 translator though :o) I also wonder what the speed of the interpreter is going to be like compared to perl5. Hopefully faster :o)

    Good job Larry, Damian et al.

    1. Re:New regexes by JimPooley · · Score: 2, Insightful

      Amen to that. Perl just has to be the most annoying 'language' (if gibberish can be held to be a language) I've ever had to use, it's like it was cobbled together out of scraps of this and bits of that in a completely haphazard and random fashion. Eugh!
      Hate Perl. Hate it!

      --

      "Information wants to be paid"
  3. Re:People use COBOL by ajm · · Score: 3, Insightful

    I agree, I've used COBOL myself. For what we were doing with it when we were doing it it was the best choice, in fact probably the only choice. That's not the case anymore, just like it isn't with perl. I can see why you're sticking with COBOL, though I'd look at Java as it's probably now the data processing language of choice. I wouldn't rate perl as highly as COBOL wrt its fit in its space anymore. As to Java's maturity, I think you're under rating it pretty heavily. It's mature enough now. btw I imagine you're shop will never use .NET if maturity is a criterion, and rightly so.

  4. Great by duffbeer703 · · Score: 5, Insightful

    So now Perl regexs are going to be completely different from every other language and more complex than ever... wonderful.

    I certainly hope that someone is going to be maintaining Perl 5. I certainly cannot see the Perl community moveing en masse to Perl 6, or whatever they decide to call it.

    --
    Conformity is the jailer of freedom and enemy of growth. -JFK
    1. Re:Great by jabberw0k · · Score: 2, Insightful

      In the same way you still have to write in ancient versions of JavaScript and HTML because some non-zero percentage of your readership still uses Netscape 4.x, most of us will have to code in Perl5 for a long time to come.

      Why should Perl have forced upgrade incompatibilites like Microsoft Word? Arrgh.

    2. Re:Great by Koschei · · Score: 2, Insightful

      Actually, if you read the Apocalypse, you will see that Perl5 regexen are quite complex and can be quite hard to properly grok. As Larry says: look at the (?...) extensions.

      The Perl 6 design is far simpler. It's simpler and more powerful. It's just going to be different from every other regex implementation around. I can, however, safely assume that packages such as PCRE will be updated. Someone will amend vim's and emacs's implementations to allow for Perl 6 style regexen.

      The world will continue rotating and people will realise that things have improved.

      And, yes, Perl5 will be maintained for a while yet. Although I'm willing to bet that most people who actively use the Perl (the community, rather than those who have had their Perl 5 non-nms scripts running for five years and never learnt Perl to begin with) will shunt to 6. I'm sure people said the same thing about Apache 1.3 and 2. Or Windows 3 and 95. Or C and C++ (perhaps a bad example there).

      Anyway - in the case of people and their old web scripts. They'll probably keep them that way. Someone will write Perl 6 versions and new users will use them. It's called migration. Heck - who knows - maybe some web hosters will remove the Perl 5 versions and installed Perl 6 versions. Maybe even just remove Perl 5. =)

      All fun.

      --
      -- koschei
  5. Will perl6 = ruby? by Jeppe+Salvesen · · Score: 3, Insightful

    I've asked this elsewhere. Ruby was designed with respect to perl, but all the same keeping to the principle of least surprise (which perl does not adhere to). Now, with Perl starting to look like a grown-up, mature language, what will the major differences between Ruby and Perl be?

    --

    Stop the brainwash

  6. Re:Perl's had it's day - It's become like COBOL by Saint+Nobody · · Score: 3, Insightful
    For instance, Python already has changed regexes; but because they don't come built in to the main language syntax (as they shouldn't; not everything is about text), it was a painless transition for everybody involved.

    perl is the practical extraction and reporting language. that's what it was originally designed for, and it's still extremely useful for that. just the other day i had to rip some statistics out of the debug output of a program, and average it together over multiple tests, outputting it into comma separated values. perl was incredibly useful for that. not everything is about text, but perl is designed for the cases where it IS about text.

    perl only really starts to fail when you consider it a panacea. it will not do everything for you, and there's some things that it just plain sucks at. all languages are the same way -- they have strengths and weakness. perl will extract your data, and it will act as a quick scriupting engine, for when shell scripting just isn't powerful enough. just don't try to write an officew suite or anything in it.

    --
    #define F(x) int main(){printf(#x,10,#x);}
    F(#define F(x) int main(){printf(#x,10,#x);}%cF(%s))
  7. Dammit Larry ... by scrytch · · Score: 3, Insightful

    Just get the damn thing written, make it flexible enough for us to rewrite perl in perl, and kick this lazy-ass camel out the door before my grandchildren ask me when perl6 is coming out!

    I don't want more powerful regular expressions. I want a more powerful pattern-matching syntax, one I can compile down to an opaque object with a bit of syntactic sugar, then use in place of a regex. I want a parser sub-language like SML or parsing primitives like haskell. Regular expressions are now turing complete thanks to perl ... great, so move on already, regexes are not the final word in pattern matching.

    And what's more -- all this you're doing Larry, it's anti-hacker. It's top-down, it's engineered, it's ivory-tower theory that might sound neat and no matter how zany your presentation is, you are living in the rareified atmosphere of a language designer, and now you are starting to think that way, dispensing wisdom on The Right Way To Do Things from on high. Yes, inventing Just The Right Way to give people 1E+255 ways to do things is still looking for the perfect that's the enemy of the good, because once we have the foundations to improve on perl6, we will do it, but only if we have something to work with. It doesn't all need to be done up front.

    Your extended regexes can be done as a library solution. Stop ending the world and start living in it.

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  8. This will kill Perl by dybdahl · · Score: 2, Insightful

    If Perl 6 isn't backwards compatible, they do the same Microsoft does with Visual Basic .net: make programmers switch to other tools.

    A good language can introduce new features without changing the basics. This is why PHP got so popular so fast.