(echo obase=2; tr '\0' '\n' < /dev/zero | head -n 256 | nl -v 0 -b a) | bc
or, if you have seq: (echo obase=2; seq 0 255) | bc
Name:
Anonymous2009-06-18 20:17
[a:b:c:d:e:f:g:[h] | a <- i, b <- i, c <- i, d <- i, e <- i, f <- i, g <- i, h <- i]
where i = "01"
Name:
Anonymous2009-06-18 20:45
You guys are forgetting to make the fon't smaller. That will take up even less space.
Name:
Anonymous2009-06-18 20:56
>>34 echo -e "main = let i = \"01\" in putStrLn $ \"<span style='font-size:0.1px'>\" ++ unlines [a:b:c:d:e:f:g:[h] | a <- i, b <- i, c <- i, d <- i, e <- i, f <- i, g <- i, h <- i] ++ \"</span>\"" | runghc | w3m
>>33
You do know that's exactly what replicateM 8 "01" does?
Name:
Anonymous2009-06-19 19:32
>>39
I thought I understood monads and suddenly you made this post.
And I feel kind of bad about it :(
Name:
Anonymous2009-06-19 19:40
>>40
(ノ`ー´)ノ Here, have a hug
Don't worry, I didn't know that either until >>16-san pointed it out (thank you!!).
You can think of it as: replicate 4 "abc" => [w:x:y:z:[] | w = "abc", x = "abc", y = "abc", z = "abc"] replicateM 4 "abc" => [w:x:y:z:[] | w <- "abc", x <- "abc", y <- "abc", z <- "abc"]
It's obvious this way.
Name:
Anonymous2009-06-19 21:05
Thank you, >>41さん, you have prompted me to explore the mysterious wonders of monads. Through my adventures I have realized that lists are monads and that, for lists, (>>=) = concatMap, which clarifies things a lot.