FS

Blog Archive

Tuesday, July 03, 2007

Another quine, this time using the printf trick

I'm not sure how to make blogger give me a scrollbar to put code in.
You'll just have to remove linebreaks where needed.


import System.IO
import Text.Printf
main = let s = "import System.IO%cimport Text.Printf%cmain = let s = %c%s%c
in printf s (10 :: Int) (10 :: Int) (34 :: Int) s (34 :: Int) (10 :: Int)%c"
in printf s (10 :: Int) (10 :: Int) (34 :: Int) s (34 :: Int) (10 :: Int)

No comments:

Listening:

Watching:

  • House
  • Ride Back