Saturday, July 09, 2005

Unfreezing the blog

Hi there. I think I will be slowly unfreezing the blog now.
The pressure of the exams is dying down, I have some interesting project ideas, and basicly the mood is back :)
Due to the last changes in Blogger API, PyQLogger is broken and will not work (authentication problems). One day I will get to it.


Qt 4 is out now, and it's open source even on Windows. Many great, and appealing additions were made to it, so as soon as the nice folks at RiverBank will get to make PyQt4, i'll rewrite PyQLogger for it.
i've stumbled upon this gem today, and just had to share it. Man I love Python!

# Mandelbrot set
print (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,
Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,
Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,
i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y
>=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr(
64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy
))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24)
#    \___ ___  \___ ___  |   |   |__ lines on screen
#        V          V      |   |______ columns on screen
#        |          |      |__________ maximum of "iterations"
#        |          |_________________ range on y axis
#        |____________________________ range on x axis

Don't try this at home, kids!


Well, stay tuned, more posts are coming up!

No comments: