The Lumber Room

"Consign them to dust and damp by way of preserving them"

Here.

```~\$ cat q.hs
q a b c=putStrLn \$ b ++ [toEnum 10,'q','('] ++ show b ++ [','] ++ show c ++ [','] ++ show a ++ [')']
main=q "q a b c=putStrLn \$ b ++ [toEnum 10,'q','('] ++ show b ++ [','] ++ show c ++ [','] ++ show a ++ [')']" "def q(a,b,c):print b+chr(10)+'q('+repr(b)+','+repr(c)+','+repr(a)+')'" " def e(x) return 34.chr+x+34.chr end;def q(a,b,c) print b+10.chr+ 'main=q '+e(b)+' '+ e(c)+' '+e(a)+' '+ 10.chr end"
~\$
~\$ runhaskell q.hs | tee q.py
def q(a,b,c):print b+chr(10)+'q('+repr(b)+','+repr(c)+','+repr(a)+')'
q("def q(a,b,c):print b+chr(10)+'q('+repr(b)+','+repr(c)+','+repr(a)+')'"," def e(x) return 34.chr+x+34.chr end;def q(a,b,c) print b+10.chr+ 'main=q '+e(b)+' '+ e(c)+' '+e(a)+' '+ 10.chr end","q a b c=putStrLn \$ b ++ [toEnum 10,'q','('] ++ show b ++ [','] ++ show c ++ [','] ++ show a ++ [')']")
~\$
~\$ python q.py | tee q.rb
def e(x) return 34.chr+x+34.chr end;def q(a,b,c) print b+10.chr+ 'main=q '+e(b)+' '+ e(c)+' '+e(a)+' '+ 10.chr end
q(" def e(x) return 34.chr+x+34.chr end;def q(a,b,c) print b+10.chr+ 'main=q '+e(b)+' '+ e(c)+' '+e(a)+' '+ 10.chr end","q a b c=putStrLn \$ b ++ [toEnum 10,'q','('] ++ show b ++ [','] ++ show c ++ [','] ++ show a ++ [')']","def q(a,b,c):print b+chr(10)+'q('+repr(b)+','+repr(c)+','+repr(a)+')'")
~\$
~\$ ruby q.rb | tee qq.hs
q a b c=putStrLn \$ b ++ [toEnum 10,'q','('] ++ show b ++ [','] ++ show c ++ [','] ++ show a ++ [')']
main=q "q a b c=putStrLn \$ b ++ [toEnum 10,'q','('] ++ show b ++ [','] ++ show c ++ [','] ++ show a ++ [')']" "def q(a,b,c):print b+chr(10)+'q('+repr(b)+','+repr(c)+','+repr(a)+')'" " def e(x) return 34.chr+x+34.chr end;def q(a,b,c) print b+10.chr+ 'main=q '+e(b)+' '+ e(c)+' '+e(a)+' '+ 10.chr end"
~\$
~\$ diff q.hs qq.hs
~\$```

Written by S

Thu, 2008-02-07 at 03:27:35

Posted in Uncategorized

Tagged with

This site uses Akismet to reduce spam. Learn how your comment data is processed.