in reply to One line Fibonacci generator

The world needs more one-line Fibonacci sequence generators, especially obfuscated ones!

++Very nice!


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: One line Fibonacci generator
by Anonymous Monk on Aug 14, 2006 at 23:27 UTC
    Not sure if this is obfuscated (actually I'm pretty sure it isn't) but here's one:
    ++$*;while(1){($_,$*)=($_+$*,$_);print;} #By fatalserpent; code in Public Domain
    I'm also a bit worried that it goes dry in less than a second... number generation justs stops..., it says it's reached infinity. Is this a problem with the code, or is my CPU just too fast?