Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

What would you put on a Perl mug?

by jarich (Curate)
on Oct 27, 2005 at 06:52 UTC ( [id://503250]=perlmeditation: print w/replies, xml ) Need Help??

I've long been a fan of the vi mug although I've never had one of my own. Who wouldn't want such a cool mug, even after you've already learned everything it covers?

As such I've been very excited about the opportunity I currently have, which allows me to create my very own mug design for Perl Training Australia. I've decided that I want the mug to be valuable to the conference attendees who get one. I want it to be almost as cool as the vi mug and yet still show off our logo.

I've had a good look at Juerd's Perl cheat sheet, erudil's regex quick reference and a few other similar documents. There's no way I can put all of any of those onto a itty bitty "can" mug. So what should I include?

I must say I've been leaning towards a regular expression mug in the hopes that it has some use to the non-Perl programmers at the conference. If the mug is cool enough then people might take it into work with them and thus increase the chance of their managers hearing about us.

My current design can be found here. What would you add or replace? What would you consider cool on a mug?

Many thanks,

jarich

UPDATE (24 Nov)

The artwork has gone to the printers and with luck the mugs will arrive in the next day or so. The final version should look something like it does in the below picture.

http://perltraining.com.au/~jarich/mug.jpg

If you want one of your own, please contact me and I'll see what we can do for you.

Replies are listed 'Best First'.
Re: What would you put on a Perl mug?
by Perl Mouse (Chaplain) on Oct 27, 2005 at 08:16 UTC
    Your mug design doesn't include the only regex thing I always need to look up: the difference between \Z and \z.

    Anyway, if I were to put manual page snippets on a Perl mug, my vote would go for another mini-language: the pack/unpack templates.

    But if I was asked to design a Perl mug, I'd include an onion and a white circle with a red edge, the word "Java" in the circle, and a red line through the circle. (aka "No Java"). (Not that I want to pick on Java, but that's the most well known language with a coffee theme).

    I must admit that at work I use Java mug (happy 5th birthday), but strictly for tea. Coffee goes into my Sybase mug.

    Perl --((8:>*

      Regarding \Z and \z. Now added. Thankyou for your suggestion.

      I didn't think about pack/unpack but that's because it's something I so rarely use. It's also less likely to have appeal to the Java, Python and PHP members of the conference audience, whereas (so far as I know) Perl's regular expression syntax ought to be useful to all of those members.

      A "No Java" message might get me into trouble, all things considered. ;)

      Thanks again for your suggestion.

      jarich

        I didn't think about pack/unpack but that's because it's something I so rarely use.
        That's exactly why I'd put it on a mug. Regular expressions is what people use all the time, and so they'll know most, if not all, of the syntax already. And since Perl regular expressions are firmly based on Henry Spencer's library, a lot of non-Perl users will not have problems with Perl regular expressions.

        OTOH, I don't use pack and unpack that often. That's why I need to look up its syntax when I do use it.

        Perl --((8:>*
        In that same vein (or in the vein where I have my coffee injected)...

        The things for which I'm always going back to "perldoc perlre" are:

        (?=) positive look-ahead (?!) negative look-ahead (?<=) positive look-behind (?<!) negative look-behind
        In fact, I had to look them up again just now, to make sure I posted them right. (Having done this, maybe I'll be able to use them from memory next time.) These really are tremendously useful, and it would be swell to have them visible on my desk at all times (except when I'm drinking my coffee, of course).

        I'm reluctant to suggest removing anything you have already, and I suppose you'd need to shrink the font if possible (and abbreviate "positive" and "negative") to make more stuff fit. If that were doable, and you ended up with enough room for just a couple more things besides "[pn].* look-.*d", you could add:

        \p{...} unicode class ... [:...:] posix class ...
        (not much detail there, admittedly, but just getting the terms "unicode" and "posix" onto the mug seems worthwhile).
Re: What would you put on a Perl mug?
by Ctrl-z (Friar) on Oct 27, 2005 at 16:17 UTC
    do{ local $/ = undef; <> }
    slurp, slurp



    time was, I could move my arms like a bird and...
Re: What would you put on a Perl mug?
by BrowserUk (Patriarch) on Oct 27, 2005 at 08:19 UTC

    T.I.M.T.O.W.T.D.I

    h s o h n a o o t e r a e y r e n e

    The art is chosing the right one for your application.

    The science is knowing which and why.


    or one of dragonchild's old sigs


    Perl + CPAN: 90% of every application is already written.

    Let us show you how.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

        The 'second' one is just a continuation of the first. Everything above the first horizontal rule is one suggestion.

        The small letters are the vertical expansion of TIMTOWTDI. T(here) I(s) M(ore) ...etc. The two 'taglines' are also a part of that suggestion.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        Or even more to-the-point:

        #!/usr/bin/perl
        require Coffee;

        BCE
        --Your punctuation skills are insufficient!

      I like TMTOWTDI on a mug because the 'D' can stand for 'Drink'!

      Chris
      M-x auto-bs-mode

Re: What would you put on a Perl mug?
by leriksen (Curate) on Oct 27, 2005 at 07:45 UTC
    If only

    s/empty/coffee/mug;

    was valid syntax.

    That said, something that disproves perls reputation for being write-only is a good start.

    ...reality must take precedence over public relations, for nature cannot be fooled. - R P Feynmann

      There's always: $mug =~ s/^$/coffee/; ;-) Although it would be more like: $mug =~ s/^$/tea/ for me, personally ;-)
        Hmmm, that would mean if there's a bit of cold coffee from yesterday, you're stuck - you aren't getting fresh coffee.
        $mug =~ s/.*/coffee/s, sleep(1500 + rand 600) while 1;
        Or maybe:
        $mug =~ s/.*/beer/s, sleep(1500 + rand 600) while 1;
        Perl --((8:>*
        And more importantly:
        $mug->refill( $name_your_poison ) if $mug->is_empty;

      If only

      s/empty/coffee/mug;

      was valid syntax.

      I just stumbled upon this, 8 years after it was written. Now the syntax is valid:

      $ perl -Mstrict -Mwarnings -E '$_ = "empty"; s/empty/coffee/mug; say' coffee

      [In fact, as far as I can tell, it has been valid since 5.14]

      -- Ken

Re: What would you put on a Perl mug?
by ciderpunx (Vicar) on Oct 27, 2005 at 09:39 UTC
    I've had a good look at Juerd's Perl cheat sheet, erudil's regex quick reference and a few other similar documents. There's no way I can put all of any of those onto a itty bitty "can" mug. So what should I include?
    Surely you just need a bigger mug? Maybe something like this?
Re: What would you put on a Perl mug?
by chester (Hermit) on Oct 27, 2005 at 14:54 UTC
    Quick, someone write a mug-shaped obfu that prints an ASCII picture of a mug.
      With a lack coffee (ironically enough), this is the best coffee mug graphic I can muster at the moment. So I figured the least I could do was refill it. Unfortunantly the '~' only gets me half-full. And yes, dependent upon my mood, my coffee mug and beer mug look the same :)

      I like the aesthetic zenness of this:
      s/c[_]/c[~]/;
      But this one actually works:
      $_='c[_]'; s/\Qc[_]\E/c[~]/; print $_,$/;
      -jbWare
Re: What would you put on a Perl mug?
by swampyankee (Parson) on Oct 27, 2005 at 16:56 UTC

    If it's a large enough mug (or my eyes were younger), Mark Lentczner's Periodic Table of the Operators might be amusing..

    (Note that I am not Mark Lentczner, and I have neither met him nor correspondended with him)

    emc

Re: What would you put on a Perl mug?
by DrHyde (Prior) on Oct 27, 2005 at 09:41 UTC
    "Daddy, why are we hiding from the police?" "Because we use perl, son. They're Pythonistas"
Re: What would you put on a Perl mug?
by zentara (Archbishop) on Oct 27, 2005 at 12:25 UTC
    I always like John Krahn's( a well respected Perl writer on the newsgroups) tagline.

    use Perl;

    It is Perlish, simple and elegant.


    I'm not really a human, but I play one on earth. flash japh
Re: What would you put on a Perl mug?
by wolv (Pilgrim) on Oct 28, 2005 at 05:48 UTC

    The three chief virtues of a programmer are: Laziness, Impatience and Hubris. — Larry Wall (Programming Perl)

    Although perhaps that should be shortened to just laziness, impatience and hubris.

Re: What would you put on a Perl mug?
by pboin (Deacon) on Oct 28, 2005 at 02:49 UTC

    I'm shocked no one has suggested the canonical perl hack: Erudil's Camel Code. It's what came to mind instantly. Which may or may not be what you're looking for...

Re: What would you put on a Perl mug?
by salva (Canon) on Oct 27, 2005 at 09:04 UTC
    There’s Only One Obvious Way To Do It: use Perl!
    
    or something scary:
    I [red heart] P.E.R.L.
    
Re: What would you put on a Perl mug?
by derby (Abbot) on Oct 27, 2005 at 12:45 UTC

    I think the most useful thing you could place on a mug would be

    Have you tried "use warnings" or used "-w"?
    Have you tried "use strict"?

    :-)

    -derby
Re: What would you put on a Perl mug?
by McDarren (Abbot) on Oct 27, 2005 at 08:23 UTC
    Surely it has to feature a Camel somewhere?
Re: What would you put on a Perl mug?
by cog (Parson) on Oct 27, 2005 at 10:41 UTC
    What would you consider cool on a mug?

    A list of useful modules.

Re: What would you put on a Perl mug?
by samizdat (Vicar) on Oct 27, 2005 at 12:23 UTC
    JMNSHO...

    If you give them the book, they won't want the training. :)

    I'd concentrate more on a catchy pull-line. What you have now is not a hooker in any sense.

    I'd put 'Perl Training * Australia' on one line along the bottom with the fine print below it, and concentrate on doing something very funny with the main mug space. Maybe a 'roo with a camel's head popping out of the pouch?

    Useful (OTT holding hot liquids) is not what mugs are for. They're cultural statements. :D
Re: What would you put on a Perl mug?
by Anonymous Monk on Oct 27, 2005 at 14:18 UTC
    I'd write:
    man perl man perldoc perldoc -f <functioname> http://www.perlmonks.com http://www.perl.org http://www.cpan.org "Be consistant. Be nice." -- Larry Wall "Write for clarity first; let correctness follow naturally from clear +design and good testing. Make it right; then make it fast, if necessa +ry." -- Me
    That's what I'd put on a Perl mug: some of the important things (IMHO) to know as a perl programmer. I'd spiral the text around the surface of the mug, in nice pretty fonts and colours. That's just what I'd do, though. I don't really like regexp syntax, or coffee for that matter, so maybe I'm the wrong one to ask.
    --
    Ytrew Q. Uiop

      Make that:

      perldoc perl perldoc perldoc

      To be more consistent, and portable.

        *shrug*

        When I learned perl, perldoc didn't work on about half the systems I used it with. ( I don't remember why; lazy sysadmins, perhaps). The man pages always worked.

        Hence, the suggestions, by force of habbit.
        --
        Ytrew

Re: What would you put on a Perl mug?
by Dr. Mu (Hermit) on Oct 27, 2005 at 18:39 UTC
    A picture of Arnold Schwarzenegger as the Terminator (maybe wearing a camel button on his bandolier), with the admonition, "use strict or die".
Re: What would you put on a Perl mug?
by zshzn (Hermit) on Oct 27, 2005 at 22:48 UTC
    Since Juerd's Perl cheat sheet has been mentioned, I think his Perl advice page has a nice list of points that could be of good use on a coffee cup (along with strict and warnings, at least)

    http://juerd.nl/site.plp/perladvice

Re: What would you put on a Perl mug?
by rir (Vicar) on Oct 28, 2005 at 02:45 UTC
    I would ask people for demonstrations of Perl's great utility, complete programs and perhaps a brief explanation of them. My brain is numb so I won't give any code but things like:
    • a command line program that would change "black" to "regular" if followed or preceded by "coffee"
    • a program to check the state of the S&P500 and DJI
    I would ask people what brought them to Perl. And of those there will some who say "It was just so handy to do XXX." I would look for the common XXX and proselytize by using them. It could be neat to have the code outside and the explanation viewable on the far inside.

    I am not suggesting any obfu, I think a few or more complete and reasonably clear programs could fit on a 12 ounce mug.

    I also like some of the insider Perlism's proposed but I don't know what suits your audience.

    Be well,
    rir

Re: What would you put on a Perl mug?
by Juerd (Abbot) on Oct 27, 2005 at 19:00 UTC

    What would you consider cool on a mug?

    s:g/5/6/;

    Update: For the Perl 6 newbies out there, that's the Perl 6 way of writing s/5/6/g; :)

      Okay... this is offically my first feable attempt at obfu... I sure someone can make a far better obfu then this...
      $a = ".";for ($i=0; $i<20;$i++){print "$a"; }print"\n|\t\t |\n|use strict;\t ......\n|\t\t |\t |\n|\t\t +|\t |\n|\t\t |\t |\n"; print "|\t\t |......\n|\t\t |\t\n|\t\t |\t\n|\t\t |\t\n";for ( +$i=0; $i<20;$i++) { print "$a"; }
Re: What would you put on a Perl mug?
by fauria (Deacon) on Oct 28, 2005 at 22:32 UTC
    Yes, it sounds very classic, but a simple
    #!/usr/bin/perl -w use strict;

    will do for me. This is what i engraved on my ipod, since i bought it whith the money earned programming with Perl.
Re: What would you put on a Perl mug?
by atcroft (Abbot) on Oct 28, 2005 at 22:54 UTC

    Sounds like a great idea-and look forward to hearing what you decide upon.

    Have you considered maybe a listing of (some, if not all of) the perl* docs that come in a standard distro (possibly with a brief description), so someone wondering where to look for something might be reminded which perldoc to look at? Just a thought.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://503250]
Approved by pjf
Front-paged by hsmyers
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-16 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found