see whatever…

jump to menu

September 27, 2007

this server is lame

Filed under: Uncategorized — see @ 10:00 pm

oh my, this server is really slow

I installed wp-cache yesterday so reading should actually be better (not many visitors come around so probably overkill) but writing is really a pain…

closures in Python

Filed under: Javascript,Python — see @ 9:58 pm

Written quite a while ago but but still a very good post about how closures in Python work. Basically they are read-only so if you need to mutate a value you need to use a mutable variable like a list or object.

Closures in e.g. Javascript are easier – ah wait, actually I am not quite sure if I actually did change a value the last time I just a closure…

- just checked, it does work as expected (thanks to Firebug, I guess that’s why I like both Javascript and Python, both with a great console ;) ):

>>> a = 1
>>> function b() { alert(a); a = 2}
>>> b() // alerts 1
>>> b() // alerts 2
>>> a
>>> 2

I do quite like to work with closures, working with Ajax callbacks is almost only possible by using them. I did try to use the same technique in cssutils and of course failed miserably until I found the above post and workaround. So all in all better than nothing. I wonder though if it would be very difficult to add “proper” closure support to Python, guess a simple syntax is the most difficult…

September 23, 2007


Filed under: Uncategorized — see @ 12:00 pm

Just added recaptcha which is simply available as a WordPress plugin. Guess I should add it to my normal site’s comment form as well (from which I normally spam only though).

September 13, 2007

not again a survey…

Filed under: Uncategorized — see @ 10:03 pm

I guess I should not even post my score but on the other hand why not? says I'm an Uber-Dorky Light-Weight Nerd.  What are you?  Click here!

(via Grig Gheorghiu, and I guess I do about any survey that is available…)

Powered by WordPress