Python. It's programmers sometimes like to think that they are different from Perl Programmers because "we don't make big messy shitheaps that other people can't read" and of course, whitespace is suppose to be important.
o rly?
http://infomesh.net/2003/wypy/wy.py.txt
Anyone else have any recent finds of obfuscated Python they would like to share with us?
There's a difference between an intentional shitheap and a shitheap that develops that way...
I will say that if that's the worst Python can do, I'm not overly impressed. I don't even know Python yet still have a general understanding of what that snippet does.
Agreed. Obviously, Python doesn't have to look that messy to do the same thing; someone just went out of their way to make it so.
I'm interested in the lack of whitespace though. I keep hearing that whitespace is enforced. Does that program run without warnings, and if so, what's the real deal with whitespace and Python?
Python uses whitespace to indicate the block structure. If you can find a way to avoid using blocks entirely, I assume you can just format your code however you want. I know avoiding blocks is fairly easy in Perl, and I'm sure Python has a lot of the same constructs available. I see map
being used in there, for instance.
tee hee. jcalderone, aka Exarkun once wrote a chat server in one line.
You can run this code, telnet to hostname:6665 and chat with people. Relies on twisted.
(lambda r,p,b: (r.listenTCP(6665,(type('F',(p.Factory,object),{'protocol':(type('P',(b.LineReceiver,object),{'connectionMade':lambda s:s.factory.c.append(s),'lineReceived':lambda s,m:(s.factory.m(m),None)[1]})),'c':[],'m':lambda s,m:[c.sendLine(m)for c in s.c]}))()),r.run()))(*(lambda p,i:(i(p,'reactor'),i(p,'protocol'),i('twisted.protocols.','basic')))('twisted.internet.',lambda a,b:import(a+b,None,None,b)))
http://www.livejournal.com/users/jcalderone/2660.html
If you've ever heard of 'perl golf', where people compete to write the shortest perl code that completes a task, often producing hideous and hard to understand programs. Over on irc.freenode.net #python, we play a game similar to perl golf.
When people write shitty little obsuficated programs while trying to be clever, everyone tackles them. We call it 'python rugby'.
Yeah, that'll teach those people not to try and have fun while programming!
Programming is serious business!
>>7 WINS!