Re: reparsing the ambiguous

2001-07-11 Thread Randal L. Schwartz
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

Re: pretty printing sql (fwd)

2001-07-17 Thread Randal L. Schwartz
>>>>> "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

Re: End of block actions WITHOUT magic lexicals?

2001-07-22 Thread Randal L. Schwartz
} ... 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

Re: Sorting in-place? (Whoops!)

2001-07-26 Thread Randal L. Schwartz
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

Re: Sorting in-place

2001-07-25 Thread Randal L. Schwartz
$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

Re: JAPHs with no unsightly letters or numbers

2001-08-18 Thread Randal L. Schwartz
>>>>> "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

Re: JAPHs with no unsightly letters or numbers

2001-08-18 Thread Randal L. Schwartz
>>>>> "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

Re: World's Largest JAPH

2001-08-21 Thread Randal L. Schwartz
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

Re: World's First JAPH

2001-08-21 Thread Randal L. Schwartz
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!

Re: World's First JAPH

2001-08-22 Thread Randal L. Schwartz
'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

Re: World's First JAPH

2001-08-22 Thread Randal L. Schwartz
'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

Re: Photos/Caricatures of Larry Wall and other Perl luminaries

2001-11-05 Thread Randal L. Schwartz
>>>>> "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. - +

Re: Who is this Perl hacker?

2001-11-19 Thread Randal L. Schwartz
>>>>> "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

Re: Who is this Perl hacker?

2001-11-19 Thread Randal L. Schwartz
>>>>> "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

Re: Who is this Perl hacker?

2001-11-19 Thread Randal L. Schwartz
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

Re: Who is this Perl hacker?

2001-11-19 Thread Randal L. Schwartz
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!

Re: Relationship between Perl and various animals and sitcoms

2001-11-26 Thread Randal L. Schwartz
>>>>> "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

Re: Relationship between Perl and various animals and sitcoms

2001-11-27 Thread Randal L. Schwartz
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

Re: substitution question

2002-02-02 Thread Randal L. Schwartz
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!

Re: substitution question

2002-02-02 Thread Randal L. Schwartz
>>>>> "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

Re: Study group for motivated people wanting to learn Perl.

2002-02-05 Thread Randal L. Schwartz
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

Re: rethinking printf

2002-03-06 Thread Randal L. Schwartz
>>>>> "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

Re: regex for html tags

2002-03-17 Thread Randal L. Schwartz
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

Re: regex for html tags

2002-03-17 Thread Randal L. Schwartz
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

Re: regex for html tags

2002-03-19 Thread Randal L. Schwartz
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

Re: AW: regex for html tags

2002-03-20 Thread Randal L. Schwartz
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 &

Re: Metaprogramming

2002-12-12 Thread Randal L. Schwartz
>>>>> "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

Re: Metaprogramming

2002-12-13 Thread Randal L. Schwartz
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

Re: Metaprogramming

2002-12-13 Thread Randal L. Schwartz
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

Re: Metaprogramming

2002-12-14 Thread Randal L. Schwartz
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

Re: Metaprogramming

2002-12-14 Thread Randal L. Schwartz
>>>>> "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

Re: Metaprogramming

2002-12-15 Thread Randal L. Schwartz
>>>>> "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

Re: sort numbers

2003-01-01 Thread Randal L. Schwartz
>>>>> "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

Re: When the Schwartzian Transform gets out of control...

2003-02-11 Thread Randal L. Schwartz
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!

Re: qw(l i s t) vs (l, i, s, t)

2003-07-22 Thread Randal L. Schwartz
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

Re: qw(l i s t) vs (l, i, s, t)

2003-07-22 Thread Randal L. Schwartz
>>>>> "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"

Re: [quickie] Rounding up to next multiple

2003-08-14 Thread Randal L. Schwartz
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

Re: Semcarlbd letrtes sepur! (Scrambled letters super!)

2003-09-19 Thread Randal L. Schwartz
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

Re: s/// w/o intermediate variables?

2004-05-04 Thread Randal L. Schwartz
>>>>> "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

Re: unhead

2004-09-25 Thread Randal L. Schwartz
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

Re: unhead

2004-09-25 Thread Randal L. Schwartz
>>>>> "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/

Re: unhead

2004-09-25 Thread Randal L. Schwartz
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

Re: "Secret" operators

2005-02-03 Thread Randal L. Schwartz
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

Re: code line of the day

2006-09-07 Thread Randal L. Schwartz
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

Re: code line of the day

2006-09-07 Thread Randal L. Schwartz
>>>>> "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

Re: Rate my JAPH

2011-11-24 Thread Randal L. Schwartz
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,

Re: Rate my JAPH

2011-11-25 Thread Randal L. Schwartz
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

Re: Rate my JAPH

2011-12-07 Thread Randal L. Schwartz
>>>>> "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