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
for the corresponding cell) and
outputs the solution in the same format as the input.
--
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
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
();
}
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
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
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
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
.)
--
Ilmari Karonen, virtuaalisihteeri, Luonto-Liitto
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
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
, 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
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
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
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
15 matches
Mail list logo