Archive 21. January 2011

PyPy Status Blog: PyPy wants you! - yay! Fast-forward in PyPy gemerged! This means soon a 2.7 compatible PyPy - the project is now looking for contributors to implement the missing 2.7 features. The next PyPy version will be very interesting!.

InformIT: Art of Computer Programming, Volume 4A, The: Combinatorial Algorithms, Part 1. Part 1 - these are 2 headings in the planned book, it almost looks like it will be more like 4-5 books. Nobody has that much space in their bookshelf! By the way, Volume 5 is planned for 2020. Only 9 years left.

Exactly. If you want to explain something boring like "why generic functions and not single-object-dispatch," then use examples like these:

A short example: Imagine you have a class human which is inherited by a class male and female. Now as we all have an urge to reproduce where to put a method for having sex? Create a method haveSex in the human class, duplicate it in male or female? What would the argument to such a class be? What about having sex with people of the same sex, toys, animals, buildings...

via /dev/random - Random Thoughts On Programming In Parentheses - Coops - An introduction to chicken scheme's object system.

Tail Call Optimization Decorator - someone taught Python tail recursion as a decorator. Very cool. Someone else picked that up and built two faster versions, which, however, have minor restrictions in use. And at LTU someone also made a version - what's particularly cool about it is that it uses my lazypy module. And then I also found a super-short and fast version that, however, delivers incorrect results if a function is not called in tail position. But since you usually use tail calls in compact recursive functions (or two or a few that do mutual recursion), you should be able to handle that.