Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

The Emperor's New Clothes

by Anonymous Monk
on Jan 15, 2009 at 23:44 UTC ( [id://736706]=obfuscated: print w/replies, xml ) Need Help??

Below is the shortest perl code ever written. If you cannot see it then you are a fool: Can you see it?

Replies are listed 'Best First'.
Re: The Emperor's New Clothes
by TimToady (Parson) on Jan 16, 2009 at 18:27 UTC
    And here's the obligatory Perl 6 version of it. As you can see, it's much clearer and cleaner.

      But aren't you The Emperor?

Re: The Emperor's New Clothes
by runrig (Abbot) on Jan 16, 2009 at 00:02 UTC
    You forgot to enclose it in <code></code> tags.
      Fool. You obviously cannot see the code.
Re: The Emperor's New Clothes
by ikegami (Patriarch) on Jan 16, 2009 at 00:15 UTC
    Who would have thought NUL: and /dev/null were Perl code generators!
Re: The Emperor's New Clothes
by jdporter (Paladin) on Jan 16, 2009 at 00:35 UTC

    You didn't tell the secret: It only works if perl is executed...

    Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.
Re: The Emperor's New Clothes
by Gavin (Archbishop) on Jan 16, 2009 at 12:04 UTC
Re: The Emperor's New Clothes
by JavaFan (Canon) on Jan 16, 2009 at 00:28 UTC
    The emperor has second hand clothes?
Re: The Emperor's New Clothes
by matze77 (Friar) on Jan 16, 2009 at 16:08 UTC

    Would have been interesting: if you posted it with real name to see what xp or xp loss you got from this, nice anyway ;-).

    Thanks MH
Re: The Emperor's New Clothes
by BrowserUk (Patriarch) on Jan 16, 2009 at 12:25 UTC

    Foolish or not. No, I cannot see it! And I challenge you to prove it exists.

      Perhaps, BrowserUK, but I can see nothing there. Unless, of course, I don't exist either.

      ... which reminds me, it's far more interesting to consider the challenge of proving whether or not I exist. Invoking Descartes only works on $self, and I'm not exposing that method, so you can't use it in your proof.

        BrowserUk: Foolish or not. No, I cannot see it! ...

        popidave: Perhaps, BrowserUK, but I can see nothing there. ...

        Doesn't that mean we are in agreement?

        My point FWIW, is that in the original story, the Emperor walked around naked because he was scared to challenge the "new technologist" tailor's claims about his revolutionary new material. And the courtiers were too scared to go against the Emperor's opinion. It's a funny story and kids (of a certain age) love it. The idea of the Emperor walking around naked has them in stitches. But the story has a very relevant serious side.

        The same trick is being performed all around us, all the time. Listen closly to adverts--cosmetic ads are some of the best examples currently. Listen to all the technobable they use--"ceramides"; "aquacurrent science"; "cellular level cleansing"; "biomolecular"; "microtechnology bioactive"; "pro-collagen"; "microsmoothing"; "bio-stimulating"; "microlift".

        And over the last 30 years, I've seen the same thing over and over in our industry. Promise after promise that the latest silver-bullet, techno-speak, "new paradigm" is going to revolutionise our industry and fix all its ills.

        OO has certain obvious and demonstrable benefits--but there are those that would have you not just buy in to OO for those parts of your code that lend themselves to it; but for all your code. So, you can no longer use a global variable for inherently global entities--you have to wrap them over in a "singleton pattern", and complicate your code 10 fold in the process.

        The functional crowd will convince of the benefits of side-effect free functions--of which there are many. But will then go on to try and convince you that all code should be side-effects free--even when the primary, and often only, purpose is to effect a side-effect. Think IO.

        Sometimes the only sensible thing to do, is to call upon the proponents of a counterintuative notion, to prove their position.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re: The Emperor's New Clothes
by Anonymous Monk on Jan 20, 2009 at 19:29 UTC
    For an explanation of the code see John Cage's 4'33".
Re: The Emperor's New Clothes
by rpetre (Sexton) on Feb 26, 2009 at 09:54 UTC
    I believe there is some wisdom in this after all. Sometimes the best code is not writing any code at all.
Re: The Emperor's New Clothes
by setebos (Beadle) on Jan 16, 2009 at 02:27 UTC
    No, this isn't the shortest Perl code, because you didn't follow one main prerequisite:
    `rm`$^X

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://736706]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-12-08 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (50 votes). Check out past polls.