[Haskell] Re: ANNOUNCE: The Succ Zero International Obfuscated
Haskell Code Contest!
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Wed Aug 4 07:04:30 EDT 2004
Shae Matijs Erisson <shae at ScannedInAvian.com> writes:
> Come to the Succ Zeroth INTERNATIONAL OBFUSCATED HASKELL CODE CONTEST!
Two things.
First, it is a shame that the webpage for the zeroth contest has disappeared.
(Especially since I won :-)
Second, did you know that there was an international obfuscated
Haskell code contest *before* the zero'th? It was held in 1993.
The results, posted to comp.lang.functional, are attached below.
Regards,
Malcolm
-------------- next part --------------
Newsgroups: comp.lang.functional
From: augustss at cs.chalmers.se (Lennart Augustsson)
Subject: Results of the 1993 Obfuscated Haskell Code Contest
Nntp-Posting-Host: statler.cs.chalmers.se
Organization: Dept. of CS, Chalmers, Sweden
Date: Mon, 21 Feb 1994 16:42:07 GMT
Here are (finally) the results of 1993 Obfuscated Haskell Code Contest.
I only received three (3) entries. You are welcome to speculate
about the reason for this low number. It is obviously not because
obfuscated programs cannot be written, so it must be something else.
(Could it be that Haskell users lack the ability to make
fun of themselves? No, that cannot be.)
All entries get prices!
Grand Price: John Launchbury
Most symmetric: Kevin Hammond
Most useful: Mikael Rittri
And here are the programs. You'll have to figure them out
yourself for the moment.
JL:
-------------------------------------------------------------------
e=181021504832735228091659724090293195791121747536890433
u(f,m)x=i(m(x), [],let(a,b)=f(x) in(a:u(f,m)b))
(v,h)=(foldr(\x(y )->00+128*y+x)0,u( sp(25),((==)"")))
p::(Integer,Integer )->Integer -> Integer --NotInt
p(n,m)x =i(n==0 ,1,i(z n ,q(n,m)x, r(n,m)x))
i(n,e,d )=if(n) then(e) else (d) --23+3d4f
(g,main ,s,un)= (\x->x, y(j),\x->x*x,unlines)--)
j(o)=i(take(2)o== "e=","e="++t (drop(4-2)o),i(d>e,k,l)o)
l=un.map (show.p (e,n).v.map( fromIntegral{-g-}.ord)).h
k=co.map(map(chr .fromIntegral ).w.p(d,n). read).lines
(t,y)=(\ (o:q)-> i(o=='-' ,'1','-' ): q,interact)
q(n,m)x= mod(s( p( div(n)2, m{-jl-})x) )m--hd&&gdb
(r,z,co) =(\(n, m)x->mod(x*p(n-1, m)x)m,even ,concat)--6
(w,sp)=( u(\x->( mod(x)128,div(x )128),(==0 )),splitAt)
d=563347325936+1197371806136556985877790097-563347325936
n=351189532146914946493104395525009571831256157560461451
-------------------------------------------------------------------
KH:
-------------------------------------------------------------------
--}--
import --K-- tropmi
Prelude renaming --|-- gnimaner edulerP
(reverse to(#), --|-- ,)#(ot esrever(
interact to(=*), --|-- ,)*=(ot tcaretni
map to(.),(.)to($), --|-- ,)$(ot).(,).(ot di
($)to(#!),lines to(^), --|-- ,)^(ot senil,)!#(ot)$(
(^)to(!#),unlines to(&)) --|-- ))&(ot senilnu,)#!(ot)^(
{-{
--}--
main=(=*)(($)(($)(&)((.)(#)))(^))--|--))^()))#().(()&()$(()$(()*=(=niam
--}--
{-{
(^)to(!#),unlines to(&)) --|-- ))&(ot senilnu,)#!(ot)^(
($)to(#!),lines to(^), --|-- ,)^(ot senil,)!#(ot)$(
id to(.),(.)to($), --|-- ,)$(ot).(,).(ot pam
interact to(=*), --|-- ,)*=(ot tcaretni
(reverse to(#), --|-- ,)#(ot esrever(
Prelude renaming --|-- gnimaner edulerP
import --H-- tropmi
--}--
-------------------------------------------------------------------
MR:
-------------------------------------------------------------------
infixr ->!,=\
-- auxiliary functions -----------------------------------------------------
g u v w (x:y:z) = i(v x y)(u x y (w z) z)(x:w(y:z))
g u v w [x] = [x,512]
q u v w nil = u : 95 : z v : w
long = several.length
((->!),(=\))=(map,($))
a = g q f
y = (-)32
z = (+)32
several = (>)2
fairlySmall = (<)64
notTooSmall = (>)91
justRight = (==)95
notTooBig = (<)96
veryBig = (>)123
goodSize x =foldr(&&)
otherwise =\($x)->![notTooBig,veryBig]
f y z =fairlySmall(z)&&goodSize(y)&¬TooSmall(z)
i cond th el=if(cond)then(th)else(el)
toBeIsToDoAndToDoIsToBeSaidConFuTse
-- main functions ----------------------------------------------------------
g = interact$map
chr.g.map
ord
main =
toBeIsToDoAndToDoIsToBeSaidConFuTse(let h=a;t=x where x x=i(long x)x(h t x)
q v w x z =- y w:x
a = g q f
f x y = justRight x
&& goodSize y
in t)
-- rittri at cs.chalmers.se ---------------------------------------------------
--
-- Lennart Augustsson
[This signature is intentionally left blank.]
More information about the Haskell
mailing list