#perl - Wed 9 May 2007 between 18:19 and 18:29



hobbsintegral: mischan again ;)
LeoNerdI can never spell it
hobbsThe Sieve of erxz_paste!
integralhobbs: No, the conversation had moved on there, and I didn't want to waste my golfing
maukeeratosthenes?
hobbsah
integralLeoNerd: yes, it's a bit like Eratosthenes' Sieve
Ani-_You call that golfing?! Such a long thing? :)
LeoNerdThat's the one
integralTBH I think that's the best pattern for the code. I'd like to see a infinite stream haskell/lisp version though
Ani-_: That's the smallest I can get for that particular algorithm
eval: for(1..32){$..=($_%3?'':F).($_%5?'':b);print$.||$_}
buubotintegral: 1 2 F F Fb FbF FbF FbF FbFF FbFFb FbFFb FbFFbF FbFFbF FbFFbF FbFFbFFb FbFFbFFb FbFFbFFb FbFFbFFbF FbFFbFFbF FbFFbFFbFb FbFFbFFbFbF FbFFbFFbFbF FbFFbFFbFbF FbFFbFFbFbFF FbFFbFFbFbFFb FbFFbFFb
integraldarn. silly me.
maukeintegral: you can save two chars by removing quotes
integralmauke: where?
mauke$_[$_*3]=F etc
integraleval: for(1..32){$.=($_%3?'':F).($_%5?'':b);print$.||$_}
buubotintegral: 1 2 F 4 b F 7 8 F b 11 F 13 14 Fb 16 17 F 19 b F 22 23 F b 26 F 28 29 Fb 31 32
integralmauke: woops, I did that to my other one, but not that.
that's my shortest :-(
alecshi there
does anyone some good perl tutorials?
does anyone knows some good perl tutorials?
hobbsperlbot tutorial
perlbothttp://perlmonks.org/index.pl?node=Tutorials | http://perl.com/cs/user/query/q/6?id_topic=74 | http://learn.perl.org/ | http://books.perl.org/onlinebooks | http://perl-begin.berlios.de/tutorials/ | http://learn.perl.org/library/beginning_perl/
sal|workanyone know a oneliner that only prints the last line of a file?
Ani-_tail -n1
maukeeval: for(1..32){print"F"x!!($_%3).b x!!($_%5)||$_}
buubotmauke: Fb Fb b Fb F b Fb Fb b F Fb b Fb Fb 15 Fb Fb b Fb F b Fb Fb b F Fb b Fb Fb 30 Fb Fb
sal|workwell, I need to s/last line//
mauke:(
hobbsperl -ne 'print if eof'
integraleval: @a=('','',F)x5;@b=(('')x4,'b')x3;print+($a[$_&15].$b[$_&15])||$_ for 1..32
buubotintegral: 1 F 3 b F 6 7 F b 10 F 12 13 Fb 15 16 17 F 19 b F 22 23 F b 26 F 28 29 Fb 31 32
integralempty strings are too long.
maukeeval: for(1..32){print"F"x!($_%3).b x!($_%5)||$_}
buubotmauke: 1 2 F 4 b F 7 8 F b 11 F 13 14 Fb 16 17 F 19 b F 22 23 F b 26 F 28 29 Fb 31 32
maukeeval: print"F"x!($_%3).b x!($_%5)||$_ for 1..32
buubotmauke: 1 2 F 4 b F 7 8 F b 11 F 13 14 Fb 16 17 F 19 b F 22 23 F b 26 F 28 29 Fb 31 32

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 

IrcArchive