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.
| [reply] |
|
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
| [reply] |
|
| [reply] |
|
(?=) 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). | [reply] [d/l] [select] |
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...
| [reply] [d/l] |
Re: What would you put on a Perl mug?
by BrowserUk (Patriarch) on Oct 27, 2005 at 08:19 UTC
|
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.
| [reply] [d/l] |
|
h s o h n a o o t
e r a e y
r e n
e
signify?
I guess I should add a suggestion, too. I'd either use another CPAN-related quote:
CPAN is my programming language of choice.
The rest is just syntax.
or something simple and to-the-point:#! /usr/bin/perl
use coffee;
In a pinch, a blown-down version of something from Obfuscation may be nice, although more illegible, like Camel code.
| [reply] [d/l] [select] |
|
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.
| [reply] |
|
Or even more to-the-point:
#!/usr/bin/perl require Coffee;
BCE --Your punctuation skills are insufficient!
| [reply] |
|
|
I like TMTOWTDI on a mug because the 'D' can stand for 'Drink'!
| [reply] |
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
| [reply] [d/l] |
|
There's always:
$mug =~ s/^$/coffee/;
;-)
Although it would be more like:
$mug =~ s/^$/tea/
for me, personally ;-)
| [reply] |
|
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;
| [reply] [d/l] [select] |
|
|
$mug->consume
while $mug->is_not_empty;
| [reply] [d/l] |
|
$mug->refill( $name_your_poison )
if $mug->is_empty;
| [reply] [d/l] |
|
|
$ 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]
| [reply] [d/l] [select] |
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?
| [reply] |
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. | [reply] |
|
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
| [reply] [d/l] [select] |
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)
| [reply] |
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" | [reply] |
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
| [reply] |
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...
| [reply] |
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.
| [reply] |
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? | [reply] |
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.
| [reply] |
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"?
:-)
| [reply] |
Re: What would you put on a Perl mug?
by cog (Parson) on Oct 27, 2005 at 10:41 UTC
|
| [reply] |
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 | [reply] |
Re: What would you put on a Perl mug?
by Anonymous Monk on Oct 27, 2005 at 14:18 UTC
|
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 | [reply] [d/l] |
|
perldoc perl
perldoc perldoc
To be more consistent, and portable. | [reply] [d/l] |
|
*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
| [reply] |
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". | [reply] |
Re: What would you put on a Perl mug?
by zshzn (Hermit) on Oct 27, 2005 at 22:48 UTC
|
| [reply] |
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 | [reply] |
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; :)
| [reply] [d/l] [select] |
|
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";
}
| [reply] [d/l] |
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. | [reply] [d/l] |
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.
| [reply] |