Re: Error puzzler

2006-09-24 Thread Ilmari Karonen
Michael G Schwern wrote: I have a solution! DON'T USE $_ [1] [1] Except in map and grep and the magic while() where its localized. Didn't this thread start from the fact that $_ is _not_ localized in the magic while() loop? -- Ilmari Karonen

/$sudoku/

2006-04-20 Thread Ilmari Karonen
for the corresponding cell) and outputs the solution in the same format as the input. -- Ilmari Karonen

Re: /$sudoku/

2006-04-20 Thread Ilmari Karonen
Robert C. Helling wrote: On Thu, 20 Apr 2006, Ilmari Karonen wrote: Ilmari Karonen wrote: Incidentally, here's the hardcoded-givens version. It's indeed quite a lot faster the generic version -- I've yet to find a puzzle that would take more than 0.1 seconds to solve on my workstation. Try

Re: Perl Challenges, Anywhere?

2002-08-31 Thread Ilmari Karonen
worried about the 64MB limit... -- Ilmari Karonen - http://www.sci.fi/~iltzu/ We have argued that unskilled individuals suffer a dual burden: Not only do they perform poorly, but they fail to realize it. It ... appears that extremely competent individuals suffer a burden as well. Although

Re: shortest test for truth false assignment

2002-05-28 Thread Ilmari Karonen
(); } Just make sure you don't select a different filehandle somewhere... -- Ilmari Karonen - http://www.sci.fi/~iltzu/ I admit, the original poster didn't say they wanted a solution that was good. They just said they wanted it to be multi-threaded. -- Logan Shaw

Re: Fisher-Yates shuffle

2002-04-15 Thread Ilmari Karonen
with the inevitable backwards compatibility issues... Want to submit a patch? -- Ilmari Karonen - http://www.sci.fi/~iltzu/ I once bought a 'wand of long blue line creation'. That's what it said on the side and it worked, too. -- Jonathan L Cunningham in rasfc

Re: Fisher-Yates shuffle

2002-04-12 Thread Ilmari Karonen
On Tue, 9 Apr 2002 [EMAIL PROTECTED] wrote: On Tue, Apr 09, 2002 at 01:49:01PM +0300, Ilmari Karonen wrote: On Fri, 5 Apr 2002 [EMAIL PROTECTED] wrote: sub shuffle { for (my $i = @_; $i;) { my $j = rand $i --; @_ [$i = $j] = @_ [$j = $i

Re: Fisher-Yates shuffle

2002-04-05 Thread Ilmari Karonen
On Fri, 5 Apr 2002 [EMAIL PROTECTED] wrote: On Fri, Apr 05, 2002 at 12:17:27AM +0300, Ilmari Karonen wrote: The point of taking a reference is that the Fisher-Yates algorithm is an in-place shuffle. If your array happens to be a couple of megabytes in size, you start to appreciate

Re: Fwd: Re: interesting typo I couldn't see

2002-02-23 Thread Ilmari Karonen
.) -- Ilmari Karonen, virtuaalisihteeri, Luonto-Liitto

Re: Golf challenge: decode CETI message

2002-01-12 Thread Ilmari Karonen
single quotes special for s/// and y/// anyway? I think what Keith _really_ meant was tr[\0\xff][ @] or equivalent. BTW, I'd like to congratulate you for producing worst-case backtracking behavior in my mental parser with your, um, creative use of parentheses. -- Ilmari Karonen - http://www.sci.fi

Re: Sorted Code

2001-12-15 Thread Ilmari Karonen
On Fri, 14 Dec 2001, Jeff 'japhy' Pinyan wrote: On Dec 14, Ilmari Karonen said: On Thu, 13 Dec 2001, Jeff 'japhy' Pinyan wrote: On Dec 14, [EMAIL PROTECTED] said: what is the longest piece of perl code $c which is perl -c correct with the requirement that each character in $c is ord

Re: Sorted Code

2001-12-14 Thread Ilmari Karonen
, which seems unbeatable. No, I've no idea why that works. Explanations gladly accepted. -- Ilmari Karonen - http://www.sci.fi/~iltzu/ I'd say the number of people in the world who really understand Perl's regex code is about three, plus or minus four. -- Larry Wall

Re: [Not Fun] (Perl) WWW-Authenticate: NTLM using LWP::* or Net::* ????

2001-10-20 Thread Ilmari Karonen
On Sat, 20 Oct 2001, Bill Jones wrote: WWW-Authenticate: Negotiate WWW-Authenticate: NTLM [snip] Client-Warning: Unsupported authentication scheme 'ntlm' Okay, obvious question: Are authentication scheme names case-sensitive? -- Ilmari Karonen - http://www.sci.fi/~iltzu/ Signal handlers

Just-another-Perl-hacker

2001-09-23 Thread Ilmari Karonen
package UNIVERSAL;sub print {map{s;::; ;g;print}@_=@_}AUTOLOAD{${(caller 0)[3]}} Just-another-Perl-hacker-print(,\n); -- Ilmari Karonen - http://www.sci.fi/~iltzu/ TIMTOWTDI, but did you have to pick the ugliest way you could find? -- after Michael Carman

Re: Fun with Regexes

2001-08-13 Thread Ilmari Karonen
message specifies. (And yes, I did test it for shorter inputs than the ones listed above.) -- Ilmari Karonen - http://www.sci.fi/~iltzu/ It's possible to write a Perl program that simulates a universal Turing machine, so, yes, your point is both valid and correct