News for hackers. Stuff that matters.
Re:You used Python for what? by rwos on Friday March 23, 2012 @03:30PM (#3746780)
Python lends itself quite nicely to code-golfing, that's true. In fact I am constantly amazed of how terse Python code can be, despite the significant whitespace stuff.

  from os import*
  r='s=[0]*8**5'
  p=0
  for c in read(0,9**9):r+='\n'+' '*p+dict(zip("><+-.,[","p+=1|p-=1|s[p]+=1|s[p]-=1|write(1,chr(s[p]))|s[p]=ord(read(0,1))|while s[p]:".split('|'))).get(c,'');p+=c in'[]'and 92-ord(c)
  exec r
I know, it's a JIT compiler, not an interpreter, but still... :)
Re:You used Python for what? by cadr on Friday March 23, 2012 @04:09PM (#3746989)
Man, that's slick - similar how I did it, but even shorter :)