Re: Hamming minigolf post mortem

[email protected] (Daniel Tuijnman)
Newsgroups perl.golf
Message-ID <[email protected]>
Hello mtve,

Quite impressive algorithm!

> Fifth, i didn't need zero, because logarithm of zero is an exception,
> so i needed ($multiplicator * $number or 1) where 'or' is '||' operator.
> But at that moment perl decided to crash my solution, and to recover
> situation i've applied my own rule about necessity of regexes -
> i've replaced 1 with // and, duh, it helps.

Replacing the for loop with a map helps too.
What is your rule about necessity of regexes?

> P.S. After this lecture you should be able to describe why there are
> floating numbers in the output of following code:
> 
> map{$_<1|$_>10 or $a[800*log]=$_.$/ for $_*$' } @a,//for 1..5;print@a

I don't quite see them. Maybe you made a typo?

-- 
Daniël Tuijnman
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.