Well, there aren't really any yet, but you can help with that. Tell us what would amuse you to see in Perl6. Funny error messages in the compiler? Guest appearances by Nodereaper? Undocumented* functions that do funny things?

*Secret features would be described in full detail in the standard Perl documentation, thus preventing anyone from knowing about them.

To kick it off, I was thinking of functions to print ASCII camels, or maybe code to detect hand-rolled CGI parsers, that prints one of merlyns funnier posts on D-I-Y CGI. Or error messages like "Your comment to code ratio is too low".

___________________
Jeremy
I didn't believe in evil until I dated it.

Replies are listed 'Best First'.
Re: The Secret Features of Perl6
by Arguile (Hermit) on Jun 15, 2003 at 16:06 UTC

    I want to see Carp::Jewish::Mother.

    Oy vay! You just come in here and use $foo unannounced! You trying to give your father a heart attack?

    Isn’t that better than Global symbol "$foo" requires explicit package name? I mean, everybody listens to their mothers.

    Posted against my better judgement, with jepri egging me on. ;)

(jeffa) Re: The Secret Features of Perl6
by jeffa (Bishop) on Jun 15, 2003 at 15:54 UTC
    The Monastery (and mailing lists) might not have as many "use strict!!" answers if Ovid's Acme::Code::Police was adopted into the core ... then again, there would be a ton of questions along the lines of "Why does my script keep deleting itself?"

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      Well if we're talking modules, Schwern's Bone::Easy should be a core module as well. Or maybe not.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

Re: The Secret Features of Perl6
by meredith (Friar) on Jun 15, 2003 at 16:02 UTC
    Great idea! In the proud tradition of great eggs like make love! Another one to detect is when someone uses a simple C-style for iterator loop, and say something about it along the lines of, "What an insult! This is perl, not C! on Line \d+". I'm sure some other good fodder for newbie error messages will be easily found by browsing SoPW. Or what about, when under warnings, if the programmer misspells a variable (the awful used only once error) send a message like "NodeReaper swallows $foobor, it was tasty. $foobor used only once at line \d+".

    Of course you'd still have to describe the actual error, lest we scare off new monks :) Anyway, from your list, my vote goes for the CGI warning. ++

    mhoward - at - hattmoward.org

      Detecting for(;;) constructs is doable in perl5. Its a good project for a budding perlguts hacker to try.

      Added: If you want to do this its solution likely involves looking at the optree structure created by saying for(;;) and then using B::Util/B to detect those structures. You should also look at perly.y to see the initialize, while( condition ) { ...; increment } structure.

Re: The Secret Features of Perl6
by theorbtwo (Prior) on Jun 15, 2003 at 20:20 UTC

    I think the documented and partaly spec'd functionaly is already crazy enough, myself: hyperoperated hypothetical conjuncted coroutines!

    Update: Fixed stupid doubletype.


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Re: The Secret Features of Perl6
by PodMaster (Abbot) on Jun 16, 2003 at 06:33 UTC
    I don't think that would amuse me at all. In fact, I think i'd be rather disgusted to find crap permeating Perl6. Sure, easter eggs are fun until they lead to easter back doors (inadvertently or intentionally).

    Hmmm, I think i'm gonna run profanity here? on parrot.

    BTW - I don't consider the "panic: %s" messages funny.

    update: I did run profanity here? and I'm glad to have only found 3

    ./languages/BASIC/compiler/COMP_parser.pm : 367 : crap
    ./languages/BASIC/compiler/RT_variables.pasm : 158 : shit
    ./icu/source/i18n/nfrule.cpp : 1252 : crap
    
    but sadly the one in COMP_parser.pm is not a comment (it gets printed out someplace).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      I find it those results extremely dissapointing. Why? Because it would seem to indicate that nowhere in the implementation of brainfuck does it give the proper name of the language, which is decidedly not BF or brainf**k.

      And I find panic a perfectly good name for a class of error, though I find it interesting that in the linux kernel, Oopses are a subclass of panics (or is that the other way around... in any case, they are very close levels).

      Shrug, different strokes for different folks.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

        I find it those results extremely dissapointing. Why? Because it would seem to indicate that nowhere in the implementation of brainfuck does it give the proper name of the language, which is decidedly not BF or brainf**k.
        Did you bother to look at the README? BF is indentified by it's proper name. Regexp::Common's $RE{profanity} simply doesn't match it.

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

      Perhaps Alan Perlis said it best:

      I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customers got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don't think we are. I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun. Above all, I hope we don't become missionaries. Don't feel as if you're Bible salesmen. The world has too many of those already. What you know about computing other people will learn. Don't feel as if the key to successful computing is only in your hands. What's in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.

      Don't take everything so seriously, have a little fun every now and then :)

      Oh come on. If you told me the topic was childish, that would be reasonable. Why the sudden appeal to security? It's not like running the Swedish Chef filter over the compiler error messages is going to hurt anyone.

      The tradition of messing with the text of error messages has a long history and hasn't hurt anyone. Now if I was suggesting putting a flight simulator into the VM, that would be stupid.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

        I don't consider it childish. I consider it crap.
        Why the sudden appeal to security?
        I'd consider adding non-features a security risk, especially Undocumented* functions that do funny things.
        The tradition of messing with the text of error messages has a long history and hasn't hurt anyone.
        So? Then it's long been a crap tradition. As for hurting somebody, how do you know? I can't cite specific examples, but I guarantee that it probably has.
        Now if I was suggesting putting a flight simulator into the VM, that would be stupid.
        Correction, that would be more stupid. Are you going to maintain the VM? Do you think the perl6 developers like this idea? (btw did you ask)

        Can you name a single good reason this should happen (other than making perl6 a joke)?

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

Re: The Secret Features of Perl6
by Elian (Parson) on Jun 16, 2003 at 17:48 UTC
    Not to rain on anyone's parade, but there won't be any secret features of perl 6. Sorry. (There may be some odd features of perl 6, or unusual things packaged with parrot, but no secrets)

      Not even disabled warnings on nroff useless constants? (merlyn did a trivia quiz yesterday on why perl -weq/ig/ doesn't produce a warning but perl -weq/ih/ does)

        Nope, not even those. If we do skip nroff constants it'll be clearly documented. I wouldn't count on it for perl 6 code, though. (Maybe perl 5 code, depends on where it stands in the Great Deprecation Cycle. If we do support them, they'll be documented)
      It's OK, I was just asking for amusement value. I wasn't planning on hanging around the dev lists, telling anyone who'll listen that perl should have funny features.

      Instead, I plan to hang around the dev lists telling anyone who'll listen that Perl6 (or for preference, Parrot), needs a tightly integrated graphics system. Kind of like Swing for Java, but without the slow and ugly bit.

      OpenGL or Enlightenment17 both would work. I just live in dread of people going "Perl doesn't need graphics, we haven't missed it so far"

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

        I'll save you the trouble, then. Not gonna happen, sorry. Far, far too many cross-platform issues.

        If you really want it, find something that works on OS X, Linux, Microsoft Windows, VMS, and at least one Cray. (PalmOS would be a bonus) Once you've found one, then we'll talk.

        I, for one, completely endorse your idea for a tightly integrated, cross-platform graphics system using Parrot. I even ++'d the node for the suggestion. It's that cool.

        So ... when are you gonna write it? ;-)

        I kid (a little). It is a cool idea, but beyond merely difficult to implement. A fair chunk of Swing's reputation for cross-platform effectiveness is based on nothing more than marketing. Some OS's go out of their way to be functionally different from others. It may or may not be a bad thing, but it does mean you can usually tell when you are running a Java application under OS X. This is despite the fact that some tremendous efforts have been made by Apple and Sun to make Java seem native under OS X.

        If you really want to see something like this happen, you should either start a project or find a similar project. Seriously, go for it. Could be fun!

        Kind of like Swing for Java, but without the slow and ugly bit.

        Hmmm... okay, give me a little bit of time, I'll get back to you :).

Re: The Secret Features of Perl6
by Anonymous Monk on Jun 16, 2003 at 02:03 UTC
    Tell us what would amuse you to see in Perl6. Funny error messages in the compiler? Guest appearances by Nodereaper? Undocumented* functions that do funny things?

    I'm sure many of you have already noticed how hard it is to get some managers to let you use Perl. We really don't need any "amusing" features that will be no doubt brought up thousands of times as arguments against Perl. Thanks.

      That's our secret selection program to breed better PHB's^W^W^W^W^W^W^W^W^W... uhhh.. forget I said anything, ok?.

      After Compline,
      Zaxo

      But that's why we would make them secret undocumented features.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

        Why do we need any more? Nobody has even published The Nine yet.