The story behind Acme::Bleach and its many cousins:
http://www.perlmonks.org/?node_id=967004
Feedback and anecdotes welcome.
Thanks,
/-\
I wonder if --$| and $|--, very popular in golf, and described
by japhy as "the magical flip flop variable" at:
http://www.nntp.perl.org/group/perl.fwp/2002/01/msg1367.html
qualifies as a secret operator?
/-\
> [ ~~ vs. scalar ]
The ~~ secret operator is old hat, good ol' inchworm:
http://www.catonmat.net/blog/secret-perl-operators/#inchworm
BooK's innovation is to add <> and <>+0 to the end of it.
BTW, in addition to inchworm-on-a-stick ~- to subtract one,
I often use the converse -~ to add one (t
This node:
http://perlmonks.org/?node_id=412464
claims that the first JAPH was simply (note the punctuation):
print "Just another Perl hacker,"
This ancient JAPH was penned in 1988 by a Portland Oregon hacker,
currently sobering up after his wild 50th birthday party.
/-\
- Original M
--- Alan Young wrote:
> I missed any discussion on this, and searching for this series of
> characters is fruitless.
Here's an attempt at a definitive reference list for Perl's
secret operators. I blame cog and BooK.
Original fwp thread on secret operators:
http://www.mail-archive.com/fwp@perl.
--- Andy_Bach wrote:
> Question came up elsewhere and via:
> http://www.creativyst.com/Doc/Articles/HT/Dell/DellNumb.htm
>
> we found Dell uses base 36 for its Service tags. You need the decimal for
> the automated phone access so somebody came up w/:
> map {$s+=(/\d/?$_:(ord()-55))*(36**$i++)}
Philippe 'BooK' Bruhat wrote:
> So we have :
>
> symbolnicknameRole
> --
> <=> spaceship documented operator
>
> 0+venus numification
> }{eskimo greeting END{
Not that it is seen very often, but you might try dreaming up a
name for:
]->[
I first saw this operator employed in a graceful way to return the
lesser of $x and $y:
[ $x => $y ]->[ $y <= $x ]
/-\
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
José Castro wrote:
> Apart from the "secret eskimo greeting" and the "goatse operator",
> can anyone tell me about other "secret" operators?
Let's not forget the Ton Hospel "high-precedence decrement"
operator ~- invented during a golf tournament (anyone remember
which one?).
IIRC, Ton's ~- inven
Rick Klement wrote:
> And replacing one map with a sort, taking advantage of the fact that
> in 5.8, sort is stable, saves 10 strokes:
#!perl -lp
/ /;$a{pack A10,$'}.=" $`"}for(sort{$b-$a}map$a{$_}=~y/ //.
" $_:$a{$_}",sort keys a){
Very nice. Hmm, if:
"map sort [SORT BLOCK]map" is the Sch
> #!perl -lp
> / /;$A{$'}.=$".$`}for(map{s}.}9-$&}e;$_}sort
> map{9-$A{$_}=~y. ...sprintf" %-10s:$A{$_}",$_}keys%A){
Interesting sub-problem is shortest way to space-fill the CPAN ID:
sprintf"%-10s",$_
pack A10,$_
uc($_^$"x10)
The last works because CPAN IDs match /^[A-Z]{4,9}$/.
Replacing
The Phalanx project top 100 CPAN modules has just been published:
http://qa.perl.org/phalanx/distros.html
To get a report sorted by most prolific author, I wrote this
little program (using a good ol' GR-Transform):
#!perl -lp
/ /;$A{$'}.=$".$`}for(map{s}.}9-$&}e;$_}sort
map{9-$A{$_}=~y. ...sprin
Perhaps I am posting this to wrong list, but that has become the norm
lately. :-)
I noticed on this page:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52234
titled "a guaranteed-stable sort with the decorate-sort-undecorate
idiom (aka Schwartzian transform)"
---
Ton Hospel wrote:
> With a little more effort by mtve and me this becomes:
>
> sub
> [EMAIL PROTECTED](abs||n.o,bottle."s"x!!++$_,of,beer),on,the,wall]}print
> "@{+b},[EMAIL PROTECTED],\nTake one down, pass it around,[EMAIL PROTECTED]"
> for-pop||-99..-1
Of the 515 languages represented at
http://
Ton Hospel wrote:
> With a little more effort by mtve and me this becomes:
>
> sub
> [EMAIL PROTECTED](abs||n.o,bottle."s"x!!++$_,of,beer),on,the,wall]}print
> "@{+b},[EMAIL PROTECTED],\nTake one down, pass it around,[EMAIL PROTECTED]"
> for-pop||-99..-1
>
> (which also has the "no" for 0 bottles.
In case anyone is interested, I timed four of the solutions with
one sample of valid test data, as shown below.
use strict;
use Benchmark;
my $x = 'aBc123xyz';
sub make {
local $_=$x; return
/^[-\w]{6,14}$/ && /[0-9]/ && /[a-z]/ && /[A-Z]/;
}
sub sec {
local $_=$x; return
/^(?=.*[a-z])(?=.*[A-Z])(
Abigail sprak:
> I'm not going to claim this is the shortest solution, but this
> is very straightforward (and untested):
>
> /^(?=.{6})# At least 6 characters long.
> (?=.*[a-z]) # Contains a lowercase letter.
> (?=.*[A-Z]) # Contains an uppercase letter.
> (
Stefan `Sec` Zehl sprak:
> If you insist on it beeing a single regexp, I would do it with
> several lookahead assertions ;-)
>
> print "ok" if /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[\w-]{6,14}$/
After eating sushi with chopsticks, then cleaning my teeth with
toothpicks, I thought of this for some reaso
Ian Phillipps sprak:
> I just typed in 'Eugene' to check.
>
> eugene is the fastest and most pleasant
> eugene is about the size of a dog
> eugene is devastated
>
> But, most relevantly,
>
> eugene is right
In my experience, Eugene (and Ton) are always right.
I just noticed that Yitzchak's emai
(-ugene sprak:
> Andrew Savige schreef:
> > Aristotle golfed:
> > > $_=$x;@lines=(/^.*/mg)x+length;
> >
> > Against my better judgment, I will have a go at golfing this:
> >
> > $_=$x;@l=(/^.*/mg)x/./s
>
> This clobbers $_. Not nice for th
Aristotle golfed:
> $_=$x;@lines=(/^.*/mg)x+length;
Against my better judgment, I will have a go at golfing this:
$_=$x;@l=(/^.*/mg)x/./s
/-\
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send some online love this Valentine's Day.
Aristotle:
> > @lines = ($x=~/^.*/mg) x !!length($x);
>
> $_=$x;@lines=(/^.*/mg)x+length;
*whistle* *whistle* *red card* *disqualified*
multiplying by length (x+length) will not give the desired result here;
it must be boolean (0 or 1 only).
/-\
http://greetings.yahoo.com.au - Yahoo! Gre
John Douglas Porter:
> @lines = length($x) ? $x=~/^(.*)$/mg : ();
@lines = ($x=~/^.*/mg) x !!length($x);
@lines = ($x=~/^.*/mg) x ($x ne "");
This line of play looks promising for golf.
/-\
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send some online love this Valentine's Day.
John Douglas Porter wrote:
> @lines = length($x) ? $x=~/^(.*)$/mg : ();
^ ^^
unnecessary
This is a little faster:
@lines = length($x) ? $x=~/^.*/mg : ();
/-\
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send some online love th
Yitzchak Scott-Thoennes wrote:
> Sigh. I'd call that a bug if someone hadn't gone to the trouble to
> test for it and document it. (Indeed, I see a bug report out there:
> #6653, was 20010327.008.) So do something like:
>
> my @lines;
> chomp(my $tmp=$x);
> @lines = split /\n/,$tmp,-1 or @lines=
To convert the other way is simpler and I'm struggling to find
alternatives to my original join solution. The only edge case I
can think of is empty array @lines. You may assume that no item
of @lines contains "\n". Benchmark program follows.
use strict;
use Benchmark;
my @lines = (
"",
"This
To clarify, you may assume that lines in string are separated by
"\n" but any solution must pass the following edge cases:
1) empty string: @lines should contain zero elements
2) string of "\n" : @lines should contain one empty element
3) trailing empty lines should be retained
4) you may not a
Yitzchak Scott-Thoennes wrote:
> chomp(my $tmp=$x); my @lines=split /\n/,$tmp,-1
This one fails for the case $x = "\n"; @lines should contain one
empty element, but the code above contains none.
/-\
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send some online love this Valentine's D
Winter Christian wrote:
> # String to array:
> @lines=$x=~/[^\n]/g;
This one splits into array of chars not array of lines.
/-\
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send some online love this Valentine's Day.
`/anick wrote:
> I'll prolly say something stupid here, but:
>
> my @lines = split "\n", $x;
This one prolly erroneously removes empty trailing lines.
/-\
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send some online love this Valentine's Day.
Aristotle wrote:
> my @lines = split m[\Q$/], $x, -1;
This one produces one too many elements in the array.
/-\
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send some online love this Valentine's Day.
I am interested to learn the fastest and shortest way to convert a
textfile-like string to an array and back again (chopping newlines).
Test program follows. Improvements (golf or speed) welcome.
/-\
use strict;
my $x = <<'FLAMING_OSTRICHES';
This is first test line
This is 2nd
And 3rd
FLAMING
Text::Balanced is now a standard Perl 5.8.0 module, which seems
a good thing to me (though I have not used it before). Anyway, it
seems a handy tool for a chore I have parsing a configuration file.
I suppose I might use a bigger Parse::RecDescent hammer for this job,
or do it in some other way. Wh
En op 31 oktober 2002 sprak vakeel ahmad:
> I would like to hide my perl scripts at client server,
> is there any way to hide perl scripts.
I don't think [EMAIL PROTECTED] or [EMAIL PROTECTED]
are the right places to ask this question.
/-\
http://careers.yahoo.com.au - Yahoo! Careers
- 1,000's
Just a bit more hero-worshippin' in the form of a revitalized T-shirt
design produced by a specialized wrestler noggin enlarger algorithm.
Freude,
/-\
--
#!/usr/bin/perl
('')=~(
'('.'?'.'{'.
('['^'+').('['^
En op 27 oktober 2002 sprak David H Adler:
> I think I've got better still photos of it, if you want them. :-)
Oh, that would be great. Please let me know the URL or send
them to me personally, whichever is easier for you. I will have
to first go out and buy a pair of ultra-strong sun-glasses
I was so impressed by the YAPC::Europe naked arm wrestling:
http://astray.com/tmp/yapcbits3.mov
I decided to EyeDrops it.
Save all text between below as naked.pl (say), then run with:
perl naked.pl
Enjoy,
/-\
--
En op 15 oktober 2002 sprak sthoenna:
>On Tue, 15 Oct 2002 13:17:09 +1000, [EMAIL PROTECTED] wrote:
>>my ($want,@bollocks) = /(.*?)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/g;
> g?
Oops, I'm Mr Magoo. Again.
(For those interested in golf history, google for "mrmagoo.pl golf").
/-\
En op 15 oktober 2002 sprak the alien:
> /\S+/g;//;//;//;// # $` now contains required string
No. $` contains a gratuitous trailing space.
/-\
En op 15 oktober 2002 sprak sthoenna:
> (@bollocks[3,2,1,0], $want) = map scalar reverse, split ' ', reverse($in),
5
my ($want,@bollocks) = /(.*?)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/g;
/-\
En op 15 oktober 2002 sprak Aaron Mackey:
> @d = splice(split, -4); # I always know that the last 4 fields
This won't compile (first argument to splice must be an array).
> # this next line is the one to focus on:
> $str = join("", (split(/(\s+)/, $_, scalar(@d) + 1))[0..2*$#d]);
> method 2:
> (
En op 19 juli 2002 sprak Mtv (hot favourite for next TPR golf tournament):
> it would be very useful in golf to force array context with sort:
> $i_need_add_something_to_number_of_letters+sort/\w/g
>
> but unfortunately you need to write one stroke longer:
> $i_need_add_something_to_number
En op 12 juli 2002 sprak Csaba Ráduly:
> $_=reverse qw"' r e k c a h x l r e P x r e h t o n a x t s u J ' t n i r
> p";y y xyzz y;eval;
>
> Suggestions for stylistic improvements ?
s;;reverse qw s' r e k c a h x l r e P x r e h t o n a x t g u J ' t n i r
p s;ex;y y gxyzs y;eval;
/-\ndrew
You didn't think I would stop at 128 did you?
To the seven main options:
perl camel.pl ""normal camel
perl camel.pl q quine (program prints itself)
perl camel.pl m mirror (camel looking in the mirror)
perl camel.pl i inverted camel
perl camel.pl u upside-d
Some brilliant golfing from Mtv Europe and Ronald J Kimball has
allowed me to increase the number of camels from 32 to 128.
There are now seven options:
perl camel.pl normal camel
perl camel.pl q quine (program prints itself)
perl camel.pl m mirror (camel looking in the mirro
A friend of mine showed me:
http://www.thinkgeek.com/stuff/docs/perl-camel-source.shtml
a camel-shaped program that prints four camels when run, and
asked could I do better using CPAN Acme::EyeDrops module.
Well, I don't know about better, but I could not restrain
myself from trying something si
En op 20 maart 2002 sprak Csaba Ráduly:
> If the outputs of the above are identical, does this count
> as a quine ?
Let's call it an 'accidental' quine. My main purpose was simply
to display Buffy's face. :)
I am not a quine expert, but I suspect most people would view reading
your own source as
En op 25 maart 2002 sprak Mark 'Doc' Rogaski:
> The archives won't start until someone actually posts something.
Yep, the archives are up now.
En op 25 maart 2002 sprak Stephen Turner:
:
: I agree that there should be a separate golf list. But I also agree that
: (although it was kind of Mark t
En op 20 maart 2002 sprak Ronald J Kimball:
> I say create a new Perl Golf list, especially for the involved
> discussion of golf tournaments.
Erm, excuse my ignorance, by I have no idea how all these Perl
mailing lists work. I know Mark 'Doc' Rogaski has kindly
set up [EMAIL PROTECTED]:
http://
Searching amazon on "Perl Golf" reveals that Eugene has already
written a book on Perl Golf under the pseudonym of "Eugenia Perl":
"Understanding Golf Games, a guide for all skill levels"
by Eugenia Perl
http://www.golfersinternational.com/bookstore/096672450XAMUS148102.shtml
--
/-\ndrew
Look f
En op 28 februari 2002 sprak /-\ndrew:
> k.pl (82 characters):
> open 0;chop,$==length,$=<$-or$-=$=for@a=<0>;
> print map{$"x($--length).reverse.$/}@a
I just whittled k.pl to 79:
open$[;chop,($==y===c)>$-&&($-=$=)for@:=<0>;
print$"x-(y---c-$-).reverse.$/for@:
Apart from reducing the stroke count
En op 20 maart 2002 sprak Abigail:
> The majority of the people programming Perl don't even know
> anything about Japhs, golf or obfuscated Perl. Don't consider
> the inbred circle of people on the various mailinglist, clpm,
> #perl, and perlmonks as the average Perl programmer. They aren't,
> the
En op 20 maart 2002 sprak Ronald J Kimball:
> No other topic swamps all other traffic on this mailing list.
> It is quite reasonable that if a specific sub-topic appeals
> to only some of the subscribers but accounts for most of the
> traffic on a list, that sub-topic should be spun off into
> its
In message <[EMAIL PROTECTED]>,
Randal L. Schwartz writes:
: [...] Obfuscated Perl and Golf are both uninteresting to me.
And JAPHs. ;-)
Randal, I am curious, after all these years, are you still
interested in JAPHs?
/-\ndrew
En op 19 maart 2002 sprak Greg Bacon:
> I coined the phrase "Perl golf" ...
I am curious as to how you came to think of it.
Were you playing a lot of real golf at the time?
En op 19 maart 2002 sprak Greg Bacon:
> IMHO, the volume of golf traffic on fwp warrants the
> creation of [EMAIL PROTECTED
$ 704,000.00
7. Piers Cawley$ 622,720.00
8. Andrew Savige $ 448,000.00
9. Mtv Europe $ 441,040.00
10. Marcus Holland-Moritz $ 432,000.00
11. Keith Calvert Ivey
En op 14 maart 2002 sprak Bart Lateur:
> Don't say you've never heard of "cookies".
cookie. US, a small sweet biscuit.
biscuit. Brit, a small unleavened cake.
I apologize for my ignorance, but when I installed Windows,
I asked for "English (Oxford)" and not "English (US)",
and so Internet Explo
En op 14 maart 2002 sprak Stephen Turner:
> Oooh, what fun. We can see all of Andrew's... eccentricities as once.
>
> chop eggs, eat lollipop, (?{'.('`'|'%').('['^'-').('`'|'!')&mredo
I missed an obvious improvement of preceding 'chop' with 'karate':
#!/usr/bin/perl -l
sub lolli{$_=pop;/
En op 14 maart 2002 sprak `/anick:
> A first tentative to see what kind of stuff can be done
> with that can be found at
> http://babyl.dyndns.org/golf/golfers.epl
Cool.
En op 14 maart 2002 sprak `/anick:
> My next step is to try to create mock-baseball cards
> with scores and
En op 13 maart 2002 sprak Dave Hoover:
> This discussion definitely has started me to thinking about
> passwords in PGAS. They will probably be implemented
> at some point in the not-too-distant future.
I think a similar scheme to that used for journal authors
at use.perl.org is appropriate.
I
En op 13 maart 2002 sprak `/anick:
> And on a semi-related topic, so far the web interface uses
> a golfer's email addie as way to confirm his/her identity. But
> since a lot of us are on fwp and see each other addie, isn't
> that a risk? I mean, if Andrew hadn't been dozens of strokes
> ahe
En op 10 maart 2002 sprak Dave Hoover:
> Reminiscent of my football days, I often find myself jumping
> around like a buffoon after discovering a better algorithm.
Already, Perl golf is showing potential as a TV spectator sport.
Imitating the all-conquering Aussie cricket team, I myself indulge
En op 10 maart 2002 sprak Eugene van der Pijll:
> Actually, I did look for other solutions; I just could not find them.
> I did not try the s///eg within s///eg way, as I was sure that
> couldn't work. Earlier, I had tried things like m#___(?{___/./___})___#,
> which produced an error message abou
It is clear from recent games that Perl Golf is a sport,
not so different from chess, or real golf for that matter.
There is strategy there, and tactics too -- with tactics
predominant, in my opinion.
I would like to illustrate this sporting aspect of the game
with some examples from recent play,
En op 08 maart 2002 sprak Eugene van der Pijll:
> Of course, some people can do a golf thread all by themselves
> in one post:
http://groups.google.com/groups?selm=1991Apr29.072206.5621%40jpl-devvax.jpl.
nasa.gov
En op 04 maart 2002 sprak /-\ndrew:
> Oh, the shock and terror of seeing Eugene and
Stephen Turner schreef op 09 maart 2002:
> Thanks for all the replies about the history of Perl golf.
> One more question: when is the earliest example of a proper
> organised competition, rather than just a challenge on a mailing
> list or whatever? Are there any before the recent five?
The ill-
Dave Hoover schreef op 08 maart 2002:
> But the honor must go to Ton for his herculean 47.53, beating
> BoB and 132 other golfers. Congrats Ton! Honorable mention also
> goes to Lars Mathiesen for winning the Beginner's category.
I would also like to congratulate Ton and Lars, and pay tribute
to
Ton schreef op 06 maart 2002:
> The current use of fractionals is just fine: the bigger
> the number, the worse your score.
54.25 Stephen Turner
Is this a misprint? Are you really saying that Stephen solved
this problem with only 25% of his characters being \w\s ??
That is genius!
That is the
Stephen Turner schreef op 06 maart 2002:
> Well, I see BoB's leapt ahead to 51 now.
And Stephen Turner to 54, I see! When I saw you one ahead of
Eugene I thought it must be a misprint. Actually, Stephen is
my dark horse tip to win the tournament. Why?
"This is Turner's 3rd Golf Tournament, and h
Rick Klement schreef op 05 maart 2002:
> I hate to break it to you, Andrew, but others consider *you*
> to be one of the sharks...
/-\ndrew schreef op 05 maart 2002:
> When I went to submit it, I noticed Ton Hospel is on 52.
> Well done, Ton!
Well done, shark Rick too! I see you got to 52.
Since
/-\ndrew schreef op 04 maart 2002:
> After seeing the leaderboard this morning, I started hearing
> the Jaws theme playing in my head. It won't go away, has been
> playing all morning. Oh, the shock and terror of seeing Eugene
> and Karsten swimming in the water right behind me!
>
> /-\ndrew
Ric
Stephen Turner schreef op 04 maart 2002:
> Well, I see BoB's got 52. I'm still stuck on 60. Still, even if
> I am 8 behind BoB, at least I'm only 4 behind Eugene. :-)
Eugene van der Pijll schreef op 04 maart 2002:
> 5, unless you have taken one off as well. But I do not see how
> it can be any sh
[EMAIL PROTECTED] wrote:
> Unfortunately, I have been reduced to hanging on to Keith and
> Stephen like a leech. :-(
Keith C. Ivey schreef op 4 Marchi 2002:
> Looks like the leech has detached itself. You've shot up to
> second place, 5 strokes ahead of me. I don't seem to be
> getting the ep
On Sat, 2 Mar 2002, Yanick wrote:
>
> Ah, the things one is ready to do to keep his mind away from
> a big fat score of 65 that doesn't seem to want to shrink of a
> single stroke...
>
Stephen Turner schreef op 3 marchi 2002:
> If only there were a POSIX::secretnumber().
I checked tha
The latest version of Acme::EyeDrops:
http://search.cpan.org/search?dist=Acme-EyeDrops
contains five face shapes, namely:
larry, damian, merlyn, eugene, buffy2.
A friend of mine asked: Is it possible to produce a 'pure'
(i.e. no leading eval) EyeDrop'ed program that displays
one of these faces
Andrew Savige schreef op 22 februari 2002:
> #!/usr/bin/perl -l
> [pop=~/.(?{$a=$a*36+(ord(lc$&)-9)%39})/g];print$a
>
> why do you need the [] ?
OK, I understand it now. The [] provides the list context
to force iteration of the whole string. For example:
$x = 'abc';
Eugene van der Pijll schreef op 22 februari 2002:
> #!/usr/bin/perl -l
> [pop=~/.(?{$a=$a*36-55+$&=~y#0-9##*7+ord$&})/g];print$a
> (58)
I don't recall seeing a single entry in any of the 4 golf
games that successfully used this technique. In the Get Even
post mortem, Ton suggested to try to find
Ton Hospel schreef op 21 februari 2002:
>> $\=(30+ord lc)%39+36*$\.$/for pop=~/./g;print
>>
>> Hey, that's 45! Stephen, are you happy now?
>> Ton, you are the best golf post-mortem analyst in the world. :)
>>
> You did all the hard work, I just moved some chars around.
Eugene van der Pijll schr
Ton Hospel schreef op 20 februari 2002:
> $\=(30+ord lc)%39+36*$\.$/for pop=~/./g;print
Andrew Savige schreef op 20 februari 2002:
> Hey, that's 45! Stephen, are you happy now?
> Ton, you are the best golf post-mortem analyst in the world. :)
This one is longer, but for some re
Ton Hospel schreef op 20 februari 2002:
> $\=(30+ord lc)%39+36*$\.$/for pop=~/./g;print
Hey, that's 45! Stephen, are you happy now?
Ton, you are the best golf post-mortem analyst in the world. :)
/-\ndrew
Two more:
$a=$a*36+(30+ord lc)%39for pop=~/./g;print$a,$/ ton:47
$\=$\*36+(30+ord lc)%39 .$/for pop=~/./g;print ton's ghost:46
$x=$x*36+(-9+ord)%39for split//,lc pop;print$x.$/ albert:49
$\=$\*36+(-9+ord lc)%39 .$/for pop=~/./g;print albert's ghost:46
Now the space after the 39
Three more 46-ers:
map$.=36*$.-55+/\d/*7+ord,pop=~/./g;print$..$/spiff:46
map$\=(36*$\-55+/\d/*7+ord).$/,pop=~/./g;printGhost of
Eugene's reverse
map$\=36*$\-55+/\d/*7+ord().$/,pop=~/./g;printGhost of
Stephen Turner schreef op 20 februari 2002:
> I'm still interested in seeing a real solution less than 46.
> But maybe there isn't one.
Since we have had a positive sighting of Eugene whittling at the
RC4 solution, I doubt that it is possible. ;-)
I had visions of reliving Eugene's celebrated re
Eugene van der Pijll schreef op 17 februari 2002:
> 151:
>
> sub f{@s[$x,$y]=@s[($y+=$s[$x])%=@s,$x];
> $s[$x++]+$s[$y]}@k=pop=~/../g;$y+=hex$k[
> $x%@k],f for@s=0..255;$x=1;$y=0;$x%=@s,p
> rint$_^chr$s[f()%@s]for<>=~/./g
I haven't got a clue about RC4, but inspecting Eugene's
masterpiece, can yo
Philip Newton wrote:
> Well, existing compilers tend to be slow to implement new
> standards such as C99
>
> So for my purposes, "standard C" is "ANSI C" i.e. "K&R 2nd ed.". YMMV.
Interestingly, in this particular case, many vendors are very
*quick* to implement, often implementing before it
Though singled out for submitting a whopping 9 entries, I could
not help but notice that specialist obfuscator BooK submitted more.
Luckily for me, however, he did not find the strtol hack, for he
would surely have tried for a T-shirt by producing a "C is Perl"
entry, just as he did in the 4th Ob
Stephen Turner wrote:
> In that case, I think there should be a separate leaderboard for
> people who didn't use strtol. Just so that I could be only one
> stroke off the lead, you understand. :-)
2002/02/11 19:52:29 - 46 - Karsten aka Spifff
map$.=36*$.-55+/\d/*7+ord,pop=~/./g;print$..$/
2002/0
Stephen Turner wrote:
> Thanks for the explanation, Andrew. I'm interested to know how
> you made the picture of Eugene during your golf competition.
> I found the original photo, but how do you turn that into a line
> drawing to work your magic on? Do you have to do it by hand?
For that photo, I
Thankyou to Dave and Jerome for running the game and for
their invitation to explain some of my weird entries.
The fwp old-hands may have yawned at my 7918-stroke entry,
but I hope it caused at least a few fwp newbies to remark
"What the hell is that?" or "How the hell does that work?".
Let me s
On Sat, 16 Feb 2002 11:10:17 +0100, F. Xavier Noria wrote:
>: What an anti-climax. Utterly boring.
>
>Maybe being a mathematician I am a bit formalist, but the challenge was
>to use as few strokes as possible, if you didn't use strtol you lost. If
>you didn't want to use strtol as an option you a
Andrew Savige wrote:
> #!/usr/bin/perl -l
> use POSIX;print strtol pop,36
>
> I think this should work, but it prints a spurious trailing zero.
Ronald J Kimball wrote:
> RTFM.
>
>strtol String to (long) integer translation. Returns the
>parsed
Rick Klement wrote:
> A modest suggestion for perl golf: no modules allowed.
If it's any consolation, Rick, I think most serious golfers
(well, me, at least;-) recognize those golfers who shot 46
and 47 without using any modules or external commands.
I tried hard, but could not break 50. :-( I wo
Stephen Turner wrote:
> Can someone explain to me why
>
> -l use POSIX;print strtol pop,36
>
> doesn't work? Where does the extra 0 come from?
To quote myself to Dave and Jerome:
BTW, because I felt you were already inundated with queries about
it, I did not bother you with what seems to be a Pe
John W. Krahn wrote:
> They won't accept it. :-(
> Want me to post it here?
I think they should accept it, not as an official entry,
but to make `/anick and /-\ndrew go oooh and aaah
in the post mortem. You may have noticed I was very late into
this game because I was playing the last ga
John W. Krahn wrote:
> Well, in _this_ case, the one-liner version is 33 characters and the
> file version is 34 charcters.
`/anick wrote:
> Oh... Really? I'm looking forward tomorrow and discovering
> that thing, then. :)
If that 33 count includes the leading "perl -e'", I'll go
Ooooh
Jonathan E Paton wrote:
> Does your solution pass all the tests though Andrew? and
> do we have to wait to the finish to see how you streched
> the problem into all characters?
Dave Hoover wrote:
> Yes and Yes.
> It's worth the wait.
The Perl Review Golf column exhorted you to "use Perl in some
Ala Qumsieh wrote:
> 7918 Andrew Savige
> I see that Andrew has perfected Perl Bowling :-)
At least I forced them to move all the names over by one space. :)
(You might need to put some eye drops in your eyes to see
it clearly).
/-\ndrew
-n s/[aeiouy]?/"1&~$.&y!$&!!c?\$&:next"/gee;print 49 honza(w)
The one below is 2 strokes worse, but I found it interesting
to solve the problem with two substitutions. I wonder if
there is a way to do it with just one.
-p s/[aeiouy]?/"1&~$.&y!$&!!c?\$&:S"/gee;s/.*S.*//s 51 bob
This on
Jean-Pierre Vidal wrote:
> The "Beginners'Leaderboard" helped me to go on stage unashamed,
> and this is its part (do you think so, Andrew ?).
Andrew Savige wrote:
> It worked wonderfully in this game because Peter Makholm,
> Jason Parker and Stephen Turner staged an
Honza was the only golfer to find the clever trick of avoiding
eval by using the s///ee construct.
-nl s/|[aeiouy]/"y!$&!!c%2|$.%2&&next;'$&'"/gee;print 53 honza
I could not restrain myself from whittling this to 49 (see below).
We now have 5 quite different ways to break the 50 barrier!
-p $
1 - 100 of 249 matches
Mail list logo