ance.
Or even keeps us from parsing superbowl as superb-owl instead of
super-bowl.
"It's time for that wonderful bird again... the Superb Owl 24!!"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com
>>>>> "Andy" == Andy Bach <[EMAIL PROTECTED]> writes:
Andy> and I thought; perl, BN, Parse:RecDescent ... FWP!!
SQL::Statement contains a YAPP parser for SQL, if I recall.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
}
...
ok( 2 + 2 == 5);
TODO {
todo("some stuff");
last TODO if $condition;
ok( some_unfinished_func(42 == 23);
};
ok("foo" eq "bar");
It's close enough to a named b
u did the equivalent of
\$a > \$b ? 1 : -1
inside the sort function... a value we already had. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical wri
$a <=> $b;
} 1..9;
4 5
5 6
3 5
2 5
1 5
5 7
5 8
5 9
7 6
8 7
9 8
2 1
3 2
4 3
See the last few? If you were to swap the 4/3 pair to put them
in order, you're actually taking them *out* of order.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROT
>>>>> "Andrew" == Andrew Savige <[EMAIL PROTECTED]> writes:
Andrew> Maybe there should be an ANSI JAPH standard.
Gawd. What have I started?
:-)
Next, O'Reilly will be soliciting for "JAPHs in a Nutshell"!
--
Randal L. Schwartz - Stone
>>>>> "John" == John W Krahn <[EMAIL PROTECTED]> writes:
>> Next, O'Reilly will be soliciting for "JAPHs in a Nutshell"!
John> What animal do you want on the cover? :-)
A Party Animal, of course. :)
--
Randal L. Schwartz - Stonehe
encoding properly, so somewhere
the NNTP POST feed is not set properly to allow a double dot to remain
sane. I've cc'ed Ask here to have him take a look.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> ht
st archives for
all time, and the early CLP archives, since those got bit when the
disk pack was either erased or crashed at convex where Tom C had been
keeping them.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
's also 25 characters long, and some of my
early JAPHs did nice 5x5 rotations and transformations based on that.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/secur
't print anything else.
Abigail>- The program uses at most 4 lines, each line at most 80 characters.
Abigail>- It uses obscure or surprising syntax.
Fine rules for JAPH version 1.0. I lay claim to JAPH version 0.0, though. :)
--
Randal L. Schwartz - Stonehenge Consulting Serv
>>>>> "Simon" == Simon Cozens <[EMAIL PROTECTED]> writes:
Simon> aalib is pretty good. Stand well back. :)
I tried going into the other room. That wasn't far enough. :-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +
>>>>> "Brett" == Brett W McCoy <[EMAIL PROTECTED]> writes:
Brett> On Sun, 18 Nov 2001 [EMAIL PROTECTED] wrote:
>> Does anyone recognize this Perl hacker?
Brett> Looks like Randal Schwarz!
Which wouldn't be me. :)
--
Randal L. Schwartz - Stoneh
>>>>> "Michael" == Michael G Schwern <[EMAIL PROTECTED]> writes:
Michael> Here's a better picture. Randal is the one on the right.
Michael> http://www.stonehenge.com/merlyn/potatoe-out.gif
I made sure they added that annotation, lest anyone be confuse
Hacker" part of the query,
or is there some actual feature of my face that is easily charicatured
into low-rez graphics, that I've been prior unaware, and is thus
present in that rather generic-looking picture?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 009
s the
original inquisitor already declared this a victory?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
>>>>> "Andrew" == Andrew Savige <[EMAIL PROTECTED]> writes:
Andrew> Why Buffy? (as opposed to some other TV sitcom)
Buffy? *sitcom*? Did I miss the laugh track, or do they have a special
version in your area?
--
Randal L. Schwartz - Stonehenge Consultin
7;ve ever seen Buffy lumped in with
Craig> the likes of Three's Company
Ah yes, the "sitcom" of Three's Company. Big Sit, little Com.
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.sto
ralize this, I'm allowed
to be specific.
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
>>>>> "Anthony" == Anthony J Breeds-Taurima <[EMAIL PROTECTED]> writes:
Anthony> On Thu, 31 Jan 2002, Michael G Schwern wrote:
>> Folks, I'm clawing my eyes out here. Stop hitting the regex crack pipe!
Anthony> the poster asked for a regex soluti
o, that's if $var is a scalar. If you have %var, you want $var{$1}.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTr
>>>>> "Rich" == Rich Morin <[EMAIL PROTECTED]> writes:
Rich> This seems pretty ugly to me (Randal didn't like it much either :-)
Yup.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://w
hose on the client machine. Can anyone help me?? thanx
This doesn't exactly qualify as on-charter for "Fun With Perl".
You might try asking on the beginner's mailing list, or on the
Perl newsgroups.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
ng...
I've actually been pondering the same thing. FWP was originally far
more than Golf. I've seen only Golf recently. For that, I may pay
less attention. Obfuscated Perl and Golf are both uninteresting to
me.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 7
t may have backfired. Maybe
Obfuperl would have been come about some other way, but I'm sure my
JAPHs were a contributing factor.
Having said that, I really enjoyed Abigail's presentation a few years
back at YAPC.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
s a hash
Bernard> element you'd use $hash{key} instead of %hash{key}.
And how angry will *we* be, when we've got to relearn that the way
they wanted it to work is the way it *does* work in Perl6!
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
&
>>>>> "Michael" == Michael G Schwern <[EMAIL PROTECTED]> writes:
Michael> Using B::Deparse you can get the source of any running subroutine.
Nope, I've given examples of subroutines that cannot currently be
accurately deparsed.
--
Randal L. Schwartz - St
pletely sure. The problem is closures, because you end up
having to figure out how to construct the right sharing of lexicals
amongst the various coderefs you've discovered.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.st
irst odd one I tried. I could probably construct weirder ones
once that one is fixed.
So, coderefs that have been closed, break.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security c
for closures, it must dump the state of the closure
variables. It has to do that, so that I can restore the subroutine to
its current state, just like when I dump a variable to be able to
restore the variable to its current state. That's what marshalling
means.
--
Randal L. Schwartz - Stone
>>>>> "Bernie" == Bernie Cosell <[EMAIL PROTECTED]> writes:
Bernie> In fact, unless I'm misunderstanding how the closure works, "$constant"
Bernie> is exactly correct and '42' would be incorrect...
No, that's wrong. Read my o
>>>>> "Simon" == Simon Cozens <[EMAIL PROTECTED]> writes:
Simon> Randal L. Schwartz:
>> That's what I expect code2text to do. Dump the coderef so that I can
>> restore it. And for closures, it must dump the state of the closure
>> variab
>>>>> "Philip" == Philip Newton <[EMAIL PROTECTED]> writes:
Philip> You're not allowed to compare numbers? That will make it difficult to
Philip> find out when the list is sorted.
use ESP::Psychic qw(infer_sortedness);
--
Randal L. Schwartz - Stonehe
ark" scan, keeping the best
candidate as you compare it with each other candidate.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
ding the annoying warning under -w about the deprecated split
into @_.
In modern versions of Perl, the splitting happens at compile time, and
now acts like a comma-list, returning either a list in a list context,
or the last element of a list in a scalar context.
I think the break was Per
>>>>> "John" == John Douglas Porter <[EMAIL PROTECTED]> writes:
John> "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote:
>> ... the last element of a list in a scalar context.
John> Randal said "...a list in a scalar context"
tic expression, without the if?
$len = ($len + ($page_size - 1)) % $page_size + 1;
I first learned this trick to convert 0..23 into bands of 1..12:
$hour12 = ($hour24 + 11) % 12 + 1;
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> ht
rick has been rejected in golfs before.
I don't know about current perl versions, but in older perl versions,
that'd lose elements, double up on elements, or even coredump.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.st
>>>>> "Greg" == Greg Allen <[EMAIL PROTECTED]> writes:
Greg> $tranformed = map {local $_=$_; s,::,/,g; $_} $package
Ugh. I'd strangle someone who did that.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PR
you want to print a file, but without the first N lines...
Jose> For N=1, one possibility would be:
Jose> print if $. - 1;
Jose> For any N, maybe this:
Jose> print if ($N+1)..0;
Jose> Any thoughts? Any other ideas? What would be the best way to do this?
perl -ne 'print unl
>>>>> "Keith" == Keith C Ivey <[EMAIL PROTECTED]> writes:
Keith> perl -pe '$_ x=!(1..5)'
FWP. Not Golf. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/
7;s even handy for one-liners
Keith> occasionally once you've gotten used to it.
Well, it also presumes that "!" returns literally 0 and 1. I've
never seen a promise of that in any docs.
I think Perl6 should return "42" for true, just to keep people
from making that
The array version was actually discussed in private email between me
and Larry, if I recall correctly, shortly before that public post,
because I had come up with it for some courseware of mine.
But, this *is* 10 years ago, and I could be mismembering.
--
Randal L. Schwartz - Stonehenge Consul
cs include: what does it do?
Uh, it throws a lot of warnings when values(%$tmpls) has non-references?
What do I win?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, e
>>>>> "Ronald" == Ronald J Kimball <[EMAIL PROTECTED]> writes:
Ronald> Why would it throw warnings? ref() returns empty string if the argument
Ronald> isn't a reference.
At one point, I'm sure it returned undef on a non-reference.
Maybe I'm g
If there were points for "earliest JAPH", I'd get an unfair advantage. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy,
ecognize it... it split a string into a hash, then printed
the hash elements by order. I think that's also the one that fails
later, thanks to the randomization applied to hash key seeds now for
security purposes.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 50
>>>>> "Andrew" == Andrew Savige writes:
Andrew> print "Just another Perl hacker,"
That's missing the trailing semicolon. I was pretty consistent on
putting that there.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
48 matches
Mail list logo