Here is a very simple python function that requires no libraries, implements some of the deepest python magic and is still remarkably easy to understand:
def memoize_property(f):
"""A lightweight decorator that combines @property and memoization"""
assert f.__name__
class Memoize(object):
# This class implements the non-data descriptor protocol
# The computed value is memoized to the object instance thus
# overriding the __get__ method on subsequent accesses
def __get__(descriptor,instance,owner):
value = f(instance)
setattr(instance,f.__name__,value)
return value
return Memoize()
It was designed to be used a decorator anywhere you might find yourself creating recursive defintiions:
Google hosts all the popular ajax libraries on their servers so you don't have to keep a copy on your own ajax enabled web site.
See http://code.google.com/apis/ajaxlibs/documentation/index.html for the following ajax Libraries:
jQuery
jQuery UI
Prototype
script_aculo_us
MooTools
Dojo
SWFObjectNew!
Yahoo! User Interface Library (YUI)New!
Ext CoreNew!
This is a great service and if widely implemented should significantly speed your end user's experience as well as reducing load on your own servers.
So I've had good luck with the kernel.org kernels. Just compiled and rebooted into 2.6.30 and everything is working well. I am using debian's make-kpkg which will build and package a kernel into a linux-image deb package which is very handy for installing multiple concurrent kernels --- very handy for charging ahead with compiles without fearing that I might render my machine unbootable. As long as my speculative kernel builds don't hose any filesystems I can use bleeding edge kernels without fear. I do a custom build which only support the hardware I actually have so new kernel drivers have no effect on the the actual kernel image I create, and by choosing conservative choices when I make oldconfig I have yet to build an unstable kernel.
I like dell. They seem to have good solid engineering --- I've never had any trouble with their hardware (I am much more impressed by reliability then by by cutting-edge performance). I don't approve of the baroque PC design or the even more baroque Windows OS that they inevitably ship with but, realistically, I can't avoid them (I've never had any hesitation in erasing Windows on my own systems) I've ordered quite a few things though dell over the years but have never needed technical support until I helped a virus take over the Windows XP OS on a nice (until a week ago) 4 year old inspiron 700m. It wouldn't have been so bad if it was my computer but I was wiping the personal data off it for another so it can be used by a humanitarian project in Cambodia (just because I'm nice and my sister asked me to) and replacing XP with debian just wont do.
cross posted this from the wuug mailing list
---
I took off more than I could chew when I offered to clean off the
personal data of a donated dell inspiron 700m (circa 2005). I ended up
destroying the Windows OS. A virus had already removed the Windows
restore points and somehow disabled the factory install restore
partitions, even though there was no current infection of core OS --- a
fact I hadn't fully grokked before I charged on regardless. It appears
the working antivirus software had managed to isolate the offending
virus before it had shut down and on subsequent reboots it was operating
cleanly with the exception of a broken network subsystem and some
weirdness with the battery.
I had managed to restore the network and updated the Anitvirus software
and uploaded overdue security updates --- I thought I was doing OK but
had in fact released more viral code. I just don't get the Windows
mindset. On reboot the machine was lost. A particularly nasty piece of
code. It allowed the machine to run with only a slight delay at boot
time but was in fact spreading itself throughout the filesystem and a
My favourite file manager has been upgraded for gtk2 and I couldn't be happier. The gtk1 version that is installed in Lenny is terminally broken and, as a result, I have been trying to use other file managers without much joy.. The gtk2 version has been out for several months but today's code dump (version 0.15.4) is stable enough to warrant a post to the blog.
The Gentoo file manager [http://www.obsession.se/gentoo/] doesn't do drag-and-drop, it doesn't do tree views, it doesn't do previews, it doesn't do many of things of modern flashy file browsers do --- and is all the better for it (those things are nice but I don't really miss them) The things it does do it does very well. Even better it avoids the worst sins of more "modern" file managers that drive me space --- things such as:
0 1 2 3 4 5 6 7 8 9 A B C D E F --- how ugly mixing letters and digits together like that. In order to remain consistent with the 10 decimal digits that are independent from the alphabet, we really need 6 more digit-like characters for hexdecimal numbers. To this end I have been considering what these digits should look like. Having some resemblence to the letters A-F or their lowercase equivalents is clearly desirable but not essential. Using the forms of existing digits so they look in place seems reasonable, so long as the digits are clearly distinguishable from each other.
Suggestively B (eleven = 8 + 3) looks like its octal representation 13. F (fifteen = 8 + 7 = octal 17) looks like a mirrored 7 crossed in the european style. If we munge 1 and 5 together the result looks kind of like a D or a d with a decoration on top (D = thirteen = 8 + 5 = octal 15). So we have the basis of character representation for hexadecimal digits taking its inspiration from octal --- very nice.
To express A, C and E in terms of octal 12, 14 and 16 requires a greater suspension of disbelief (a facility in which I personally excel).
...

My old 68030 based Macintosh LC III in its bodily form is gathering dust upstairs, but its spirit lives on through an extraordinary emulator called Basilisk II. I just got around to porting the LC III's partition images from my old dell box to the new core 2 box and am pleased at how well it runs. Despite the LC III application software being totally obsolete, it is still quite functional and fast --- very very very fast. When things get to be this fast they seem to magically acquire a whole new level of functionality --- by not getting in your way like most graphically bloated application manage to do. I only wish my native applications ran this well.
Basilisk II hacks directly into the classic Mac OS toolbox which abstracts all the hardware specific details of the machine; the rest of the OS and all the application software thinks it is running on a 68030. The version of Basilisk II that I compiled doesn't use a JIT emulator, just a simple 68k machine code interpreter, and yet it can still cold boot a virtual machine to a fully functional desktop in under a second.
So, it looks like I will be a guinea pig for a new KVM virtual machine to supplant my current LVM one (a pity really as I quite approve of the LVM design); KVM being virtualization at the processor level for the newest generation of AMD and Intel processors. Presumambly this should make better use of the processors virtual addressing hardware and so improve performance. LVM is a clever hack that runs at a much higher level as an ordinary user space programme on a linux kernel with only a smattering of kernel support and no processor support at all. It was hatched at a time when 386 style processors couldn't virtualize themselves (i.e. before a year ago). The 386 processors really are an awful design. All IBM processors have been self virtualizable for 40 years at least. Every other processor contemporary with the 386 that were complex enough to incorporate virtual addressing hardware have been otherwise simple enough to self-virtualize. But the 386 is such a baroque mess that it has stood alone in preserving 1970s microprocessor limitations into the third millenium. This is the only CPU that makes the rest of the PC design look good in comparison. Intel processors, PC computers and Windows operating systems. They are well matched in how awful they are. You have to wonder what computers would be like today if the best designs had flourished instead of the worst.