Am Rande notiert ...

PyPy Status Blog: PyPy wants you! – yay! Fast-forward in PyPy gemerged! Das bedeutet bald ein 2.7 kompatibles PyPy – das Projekt sucht jetzt Contributoren, die 2.7 Features implementieren, die noch fehlen. Die nächste PyPy Version wird sehr interessant!.

InformIT: Art of Computer Programming, Volume 4A, The: Combinatorial Algorithms, Part 1. Part 1 – das sind 2 Überschriften in dem geplanten Buch, sieht fast so aus als würden es eher so 4-5 Bücher werden. Soviel Platz hat doch keiner im Bücherregal! Übrigens ist Volume 5 für 2020 geplant. Sind ja nur noch 9 Jahre.

Genau. Wenn man schon sowas langweiliges wie „warum generic functions und nicht single-object-dispatch“ erklären will, dann mit solchen Beispielen:

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 – jemand hat Python Tailrecursion beigebracht, als Dekorator. Sehr cool. Jemand anderes hat das aufgegriffen und zwei schnellere Versionen gebaut, die allerdings kleine Einschränkungen in der Nutzung haben. Und bei LTU hat auch jemand eine Version gemacht – besonders cool an der ist eigentlich nur, dass er mein lazypy Modul benutzt. Und dann hab ich noch eine super-kurze und schnelle Version gefunden, die dann allerdings falsche Ergebnisse liefert, wenn eine Funktion nicht in tailposition aufgerufen wird. Aber da man Tailcalls eh in der Regel in kompakten rekursiven Funktionen benutzt (oder zwei oder wenigen, die mutual recursion machen), sollte man das im Griff haben können.