Slashdot Mirror


Apocalypse 2

Larry Wall has written the second article in his "Apocalypse" series about Perl6. If you missed the first article, you might want to read that one first, or see the previous discussion.

19 of 94 comments (clear)

  1. Re:Programs written in Unicode? by MouseR · · Score: 3

    my $¾ = 0.75;

    Just think of the time and space we'll be saving by using Han characters!

    Karma karma karma karma karmeleon: it comes and goes, it comes and goes.

  2. Killing sh-ness by Luke · · Score: 3

    These first two had some resemblance to sh syntax for dis-ambiguating variable names:

    "${foo[bar]}"
    "${foo}[bar]"

    This is horrid!!!!

    "$foo\Q[bar]"

    So much for Perl being like a bit of sh, awk and C!

  3. Re:Gee... I guess Perl was too Unambigious by Luke · · Score: 3

    I thought the same thing at first, but then realized it's only in " " strings.

  4. Re:reasons to use python instead of perl by elmegil · · Score: 3
    As opposed to all the atheist and other assorted wackos out there? I left the church over significant issues a long time ago, but that doesn't mean that no one from the church can do good. Larry's doing some very good.

    As for reading what you wrote, sorry, but I can still read every perl script I ever wrote. If you can't, you're doing it wrong.

    --
    7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
  5. Re:The problem with open source languages... by frantzdb · · Score: 3
    Yes and no... I think it's being made quite clear that Perl 6 will be different from previous versions. not just another round of improvmens. I don't think it's a moving target but rather Perl 6 will be a new target distinct from classic Perl.

    --Ben

  6. Perl 6 is to Perl as C++ is to C by churchr · · Score: 3

    Perl 6 is to Perl as C++ is to C.

    I bet Perl 6 is going to take a _loong_ time to catch on, if at all. Larry's taking one of the most complicated language syntaxes / semantics ever devised and piling on even _more_.

    my int $pi is constant = 3.14;

    my str $goodness!

  7. Gee... I guess Perl was too Unambigious by powerlord · · Score: 3

    Weird brackets

    Use of brackets to disambiguate

    "${foo[bar]}"

    from

    "${foo}[bar]"

    will no longer be supported. Instead, the expression parser will always grab as much as it can, and you can make it quit at a particular point by interpolating a null string, specified by \Q:

    "$foo\Q[bar]"



    Okay, I'll admit it, I write Perl code.
    I like writing perl code.
    Why are they taking away something that let things be unambiguous and adding this? How can you provide nested unambiguous clues useing a two chatacter, non bracket combination? ::sigh::

    Maybe its time to go learn Python. I can get used to white space indentation. This? I'm not sure.

    --
    This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
  8. Re:*more* contexts? Is Perl's use of context good? by Abigail · · Score: 3
    However, it seems that Perl 6 will extend the concept of "context" still further!

    No, it doesn't. It just makes it easier to query what the context is. But in perl5 you can make objects that behave differently in different context, including numeric context, boolean context, string context, iteration and the five types of dereferencing. Consult the 'overload' manual page.

    -- Abigail

  9. Re:Best thing to ever happen to the Python communi by baxissimo · · Score: 3
    I'll second that. I'd consider myself something of a Perl devotee. Though I'm primarily a C++ coder, there are some times a scripting language is the right way to go. In the past I've always used Perl for those things, but just now reading that Apocalypse2 thing gave me pause. I devoured the camel book. Enjoyed every wacky and twisted page. But there comes a point when you just want to get some programming done without having to consult a reference chart for every other line of code.

    Perl's (and Larry's) "There's more than one way to do it" philosophy is fascinating as programming language theory, but when it comes to really designing something remember this: It's actually easier to write a sonnet than to write free verse. This may seem counterintuitive at first -- there are more rules to constrain you when you write a sonnet. It must be harder to do! But wait, if you're going to design something GOOD it's got to have to have some kind of consistent form and organization in the end anyway. If you write free verse you will have to craft that all yourself, choosing from an infinite possibility of ways to organize words. But if you write a sonnet, that's all taken care of: you just concentrate on the CONTENT, on what you want to say.

    Larry might argue here that that's all well and good, but people still write plenty of free verse -- its probably more common today than ever, in fact. That may be true, but there's also probably more BAD free verse poetry today than ever as well. And brining this back to code, presumably we're actually talking about getting work done here, not expressing one's deepest feelings or inner angst with subtlety and tenderness. A good poem should be read a dozen times at least, and you'll get something more out of it on each read. A good program should only need to be read once. Subtlety that requires a dozen reads to notice is not a virtue! Going into an unfamiliar program knowing the form and syntax ahead of time just makes it that much easier to decipher.

    So good luck to all you Perl poets out there. I wish you luck. But as for me, I think I'm going to check out Python over the summer. It looks like a language that won't force me to keep on thinking about low level design and syntactical form, but instead free me to think about CONTENT.

    I also hear it's a pretty good scripting language for 3D apps (e.g. Alice3D and Disney's recent big switch to it.)

  10. Re:The problem with open source languages... by Alomex · · Score: 3
    The problem with open source languages...is that trying to learn them is a moving target.

    I say that, to the contrary, the biggest problem with almost all languages, open source or not,is that they froze to early. Take any language (Java, C, C++, Perl, Python), and you can quickly name some real flaws that the designers readily admit to, but have left alone for "consistency" purposes.

    I understand your frustration with having to relearn the syntax, but I believe that if the best thing to do is to byte the bullet as early as possible and fix the flaws.

  11. Re:My God... by vsync64 · · Score: 3
    Get an identity pal, you've never written a single line of code in Lisp and you know it.

    No?

    --

    --
    TO BUY A NEW CAR WOULD MAKE YOU SEXUALLY ATTRACTIVE.
  12. Re:Larry Wall ownz j00! by dnh · · Score: 3

    I too am a christian, your comment brought up many things that have been bothering me lately. I suppose the worst side of anything will be the most publicized, but its disturbing that recently the 'bible belt' had gotten so much attention, and is almost synonymous with christianity. As a christian i believe that these people stand against almost everything christianity is about. They spread hatred, fear and force their beliefs upon others, all three of which are said to be wrong in the new testament. Just as bad is that they put more value into the laws which they have imposed than the laws of God. They somehow mistake victorian morallity with christian morality. In doing this they become hypocrites, on the same level as the pharisees, the antagonists of the new testamate.

    All I ask is that people understand that this small group does not represent all christians, most of us are intellegent, open minded people who do not agree with the views of the 'bible belt'.

  13. Re:Not a chance. by Waffle+Iron · · Score: 3
    Ruby lacks some key features. One example is inline data (multiline strings). Ruby's string handling is inferior to Perl's in other ways, too. It's a nice language in many ways, but it's not really a replacement for Perl.

    Try this:

    a = <<EOT
    hello
    there
    EOT

    b = "
    hi
    again"

    c = %q(one (more)
    time)

    puts a, b, c

    Result:

    hello
    there

    hi
    again
    one (more)
    time

    I agree strings need some work - especially polynomial performance with repeat appends. However, there are at least three ways to do multiline strings.

  14. *more* contexts? Is Perl's use of context good? by Paul+Crowley · · Score: 4
    I love Perl in lots of ways, it really is the language that rolls its sleeves up and gets the job done, but the first thing I'd take out if I had a free hand is the entire distinction between scalar and array contexts. As Perl is moving closer to a pure OO way of thinking, it becomes more attractive to make the distinction explicit, by using different names for "foo in scalar context" and "foo in array context".

    However, it seems that Perl 6 will extend the concept of "context" still further!

    Proposal 1 is ``that a hash in scalar context evaluate to the number of keys in the hash.'' (You can find that out now, but only by using the keys() function in scalar context.) Proposal 1 is okay by me if we change ``scalar context'' to ``numeric context'', since in scalar context a hash will produce a reference to the hash, which just happens to numify to the number of entries.

    So now you can get the wrong thing by expecting a number but accidentally creating a scalar rather than numeric context! You've got to have a new operator, presumably numeric(), to sit next to scalar()!

    Will there be a context for every type, built-in and dynmically created, in Perl? Or will the contexts remain a weird wart on the type system?

    I don't know what the right solution is, since Perl 6 would barely be Perl at all without the contexts, but moving away from contexts at least would be good.

    I could be wrong here. I'm writing this mainly because for the most part I love Perl, and I'd be interested in being persuaded that context is a good thing and worht the potential for confusion, that it's better to have a distinction between

    my $line = <FILE>;
    my @wholething = <FILE>;

    than having

    my $line = FILE.line();
    my @wholething = FILE.lines();

    I think I'm intellectually inclined to feel that Python does most things the right way, but somehow I still find myself reaching for Perl when I need to get the job done...
    --
  15. Programs written in Unicode? by Jeffrey+Baker · · Score: 4
    Larry says that the programs can be written in Unicode. Wow. If I am reading that properly, then this would be a valid Perl 6 program:

    my $¾ = 0.75;

  16. better off understanding ancient Mandarin by selectspec · · Score: 4
    Look I love Perl, but everytime I focus on the semmantics of the language, I find myslef utterly confused. Mainly, because I am lazy, but also, because I like an artificial world were there is only one way to do something (like C or Java). With perl, there are an infinite number of ways to do the same thing, and they all look syntacticly different. Understanding perl is like pooring over ancient manuscripts in different languages. My guess in the distant future our descendants will see Perl as this cryptic cult of demon worshipers or something. Some archeologist will spend his whole life trying to unearth the complexities, only to one day to yell out, "My God! Its so simple!"

    Perl. Can't live with it, Can't live without it.

    --

    Someone you trust is one of us.

  17. My request for Perl6 by lupetto · · Score: 5

    Here is my one and only request for perl6:

    When running the 'Configure' script, make the questions a little more difficult. This will effectively weed out serious sysadmins and programmers from the newbies.

    The perl6 configure script should keep track of the answers to their questions, and grade them on how many questions they've got correct.

    Don't know which version of malloc to use??
    Do you want to use vfork()? You sure?
    NO PERL6 FOR YOU!!

    Come on people, if you don't even know the size of the byte boundy on a double, how are you supposed to understand something like:

    if ( /DECLSPEC.*\s\**([^\s\(]+)\(/ ) {

    Post the users name and email address on a public web site and let others view it. Email the results to their family, friends, and employers! Have a special list for those who ctrl-c before it's finished, call it the "chicken" list.

  18. Larry Wall ownz j00! by vsync64 · · Score: 5
    I have to chuckle a little bit at the title of this series, and the fact that Larry Wall actually knows what the word "apocalypse" is. I'm not a big fan of Perl, myself, but I have to say that Larry Wall is one of the most interesting and insightful people to show up in the arena for some time.

    As a Christian, I have to say it's nice that people like Larry are out there to show we're not all stupid bumbling loonies (it's just Sturgeon's Law cropping up again, you know). If you've read any of his writings, especially his "State of the Onion" addresses, you'll see that he manages to present his thoughts and beliefs in a humorous and intelligent way.

    Secondly, I really like the way he manages to make analogies between things. The first year he used sounds, the second year he used pictures, and the third year he used smells. And somehow he ends up with a grand scheme that addresses theology, science, computers, and, of course, Perl.

    I think this is great, not just because the subject matter is interesting, but because to be any good at programming, you have to be able to map between different systems. The good ones don't seem to be as focused on depth (although they certainly can be; no one can argue that Knuth isn't good, and he's way hardcore) but on breadth of experience. The more different systems you experience, the more you can abstract the particular thing you have to be working on and actually transcend the implementation language and platform. (Or at least that's what I tell myself, being permanently scatterbrained and distractable :)

    Anyway, I don't know how to keep this from sounding hopelessly fanboyish, but ummm Larry Wall is cool and learning new stuff is cool, and I recommend that everybody go read his stuff and then go play with something you've never tried before. Exploration is the One True Way to have fun with computers again.

    --

    --
    TO BUY A NEW CAR WOULD MAKE YOU SEXUALLY ATTRACTIVE.
  19. The Perl6 answer could be ... Ruby by Waffle+Iron · · Score: 5
    Perl has been my favorite language for some time now, even with all its warts. I've been keeping tabs on Perl6 stuff and thinking about how Perl could be improved. I finally surfed over to the Ruby site to check it out, since I heard that it was an attempt at a "better" Perl.

    After playing with it for a while, I think it could be my new favorite language. My Ruby programs usually come out even more concise than Perl, but just as clean looking as Python.

    Ruby needs more library support and some optimization work (I usually get about 4X slower than Perl), but I think that is an extremely promising contender in this space.