joeyh

joeyh at

 -- | Optimized to use less space.
 helloworld' :: String
 helloworld' = brainfuck $ go 0 $ map Char.ord "hello, world!"
   where
         go n [] = return ()
         go n (c:cs) = do
                 let delta = c - n
                 multi (if delta > 0 then incr else decr) (abs delta)
                 output
                 go c cs

I think this generates the shortest possible brainfuck hello world program. And I wrote it in ... 15 minutes?