Ok, so it's been too long since I updated this. This is the most interresting thing I've read in a while [via lambda]. For any Postgres admin's out there this script that/which I wrote is a better replacement for pg_dumpall (you'll need PyGreSQL).
Incidently, Python disttools bdist_rpm is very useful and cool.
Local record store was holding a closing down sale and the Fellowship of the Rings soundtrack was one of the things I brought. I never realised that the choral work was done by Enya. It's a really good soundtrack.
That's all I can think of for the moment.
I'll get round to describing my current project at some point. It's neat, but nothing very exciting. (it will have some useful Twisted Python snippets thou).
In perhaps the most impressive display of War Against Drugs cluefulness so far the UK govt's latest drugs site is actually half correct. See their page on LSD - I wouldn't really disagree with any of that.
Of course, it's not Erowid, but it's a big step in the right direction.
Yesterday, O'Reilly sent me a note about their OpenBook project. More or less, they are reverting to "Founder's Copyright" where copyright only lasts 14 years (with an optional extention of another 14). After this time, O'Reilly release the book (on that website) under a Creative Commons license.
The options to O'Reilly author's (i.e. myself) are 1) To agree 2) To decline 3) To take a 3 month option to find another publisher after 14 years, otherwise it goes free. (Guess which I chose).
I'm really impressed that O'Reilly are doing this. Sure, computer books aren't going to be making much money after 14 years but even so, it's a damm good point of principle.
How the heck, 3 weeks into term, have I ended up with 2 odd socks? I always put a matching pair on in the morning and I'm pretty sure it stays that way during the day. It would be pretty tough to change one of my socks without me noticing. Perhaps if aliens were performing snap abductions just in order to do this (I can't think of any other way) but that would be frankly mind boggling.
And it's not like there's a lot of places to hide a sock in my room. Sure, there's a fair amount of junk on the floor at any one time, but it gets turned over pretty often and if they were hiding in it I would be covered in random socks all the time; and I'm not. There's also always a fair amount of lint in the tumble dryer after a wash, I suppose. But I don't think that my socks (which survive so much during an average day) are getting atomised by a mere dryer.
There's just no way that amotile inanimate objects could do this - which leads me to conclude that socks aren't in fact inanimate. Given the state of some people's shoes at the end of a day it wouldn't take too much for intelligent life to develop, I'm guessing. And, by definition, life tends to replicate so perhaps a number of everyone's socks are normal and the rest are living socks - able to run away at will (sorry about the pun) and so everyone is left with the odd, non-living socks.
Just a couple of interresting snippets from New Scientist that I picked up this morning:
Firstly, there is a really terrible soap called Eastenders in the UK, possibly we export it too - I'm not sure. Anyway - like any soap it's completely over the top; at least it seems that way. New Scientist has figures averaged over the 18 year run time of Eastenders:
| Behaviour | Real Life (% of pop) | Eastenders (% of pop) |
| Homicide | 0.0016 %/year | 0.22 %/year |
| Rape | 0.3 %/year | 0.35 %/year |
| Infidelity | women: 9 %/year, men: 14.6 %/year | women: 2 %/year, men: 1.7 %/year |
| Men paying for sex | 4.3 %/year | 0.18 %/year |
| Deceived fathers | 10 %/year | 5.8 %/year |
So, except for homocides, Eastenders is actually tamer than real life (consider that rape is vastly under reported in offical statistics). That is a deeply depressing thought.
On another topic, a couple of pages later
The vassopressin receptor gene (...) is controlled by a promoter whose length varies between species. The expression of this gene in certain parts of the brain in rodents seems to be necessary for them to form monogamous pair bonds - to fall in love, as it were.
(...) the prairie vole has a 460-base-pair insert in the gene's promoter which is lacking in its close relation, the montane vole. This has the effect of causing the gene to be expressed in a part of the paririe vole's brain where it is absent in the montane vole. It makes that part of the brain sensitive to vasopressin, a molecule released into the brain by the act of sex. (...) the male prairie vole becomes "socially addicted" to females it has had sex with, whereas the montane vole is socially indifferenet to its mates. (... the first species is monogamous, the second polygamous ...) The human vasopressin receptor gene looks not unlike the parires vole gene in both its promoter length and its expression pattern. But it varies in length between individuals. (...) the probability of divorce is highly heritable, and adopted people are more like their biological parents than their adoptive parents in this respect.
Well, all my exams are finally over (most of them went ok) so it's back to play time and today's plaything is a TINI
It's a small (SIMM sized) Java processor that can drive a couple of serial ports, a 1-Wire net and Ethernet (10BaseT). Although the TINI itself is only SIMM sized, the connection board is a fair bit bigger; though still pretty tiny.
The SDK contains a Java app that is supposed to load the firmware via the serial port and could I get it going? Could I bugger. I spent about 4-5 hours swapping serial cables/making serial cables/swapping computers. At one point I even had it plugged directly into the back of a computer just to eliminate cabling from the equation. After a while I decided that I couldn't possibly make it any worse and decided to play with the last option left - supply voltage. Now, the manual says it takes 5V +/- 5%, but (despite the LED being on at 5V) it only came to life at 7.5V. Aggh! Anyway - it's working now.
It starts up a telnet and ftp server and you can upload preprocessed Java class files to it for execution. On the 1-Wire port I currently have a DS1820 temperature sensor (which says that it's 21C in Systems at the moment). Hopefully in future there will be a number of TINIs around the department with a number of DS1820s monitoring comms and machine rooms.
If you like, you can reach it (for a while at least) at tincan.doc.ic.ac.uk.
Nothing to see here for a while - I have maths exams all this week
Due to a couple of oversights (nothing to do with me, honest!) the whole Freenet website was lost today and SF can't/wont restore it from backup.
So this evening has been a process of setting up CVS to sync to the live website on the fly and digging around in Google cache for all the snippets I can find of the website in order to patch it together again. Phew.
Structure and Interpretation of Computer Programs: Update: I'm stuck on exercise 1.13.
Done:

(or as a PDF)
Deep as a puddle, but great fun. Go see.
Jeff is also thinking about writing style recognition like I was a few days ago.
It's nice to know that even wizards can have total brainfarts at times (from BUGTRAQ):
The default behavior of the runtime linker on AIX is to search the current directory for dynamic libraries before searching system paths. This is done regardless of the executable's set[ug]id status.
This story recounts one author's experiment with a Tip Jar system for funding a book. Now, this is good reading because there haven't been enough tests despite all the advocation that these business models gets from people like me. But the book itself is fantastic.
Erowid (the usual reference for all your interresting drugs) was giving a couple of different values for the LD50 of caffine and I couldn't find a definative value for it. Here's the reply from Erowid that I got:
Thanks for your note. I went back to check where the 75mg/kg number came from and, unfortunately, the website reference I had for it no longer exists. Calculating estimated LD50s for humans is a tricky business I'd rather not get into, so I decided to simply change the number to the known LD50 in rats, which is 192 mg/kg oral. I was able to find some numbers for lethal doses in humans (not LD50, but doses that actually killed the individual). A couple of those were IV rather than oral and were significantly lower than 75 mg/kg (57 mg/kg in one case and 7 mg/kg in another). The estimate of 150 mg/kg in the caffeine faq is in the right ballpark for an oral human LD50.
As the kernel staggers towards 2.6 pre series I thought it might be worth trying it out.
Short version: it doesn't boot yet
Longer version: Booting gets as far as the AIC7xxx driver - which hangs. Removing that drivers lets it get as far as the megaraid driver which complains all about all the error handling code that it's missing and then takes a 3-4 minutes to scan all the LUNs. Then ALSA hangs. Removing ALSA reveals that the megaraid driver didn't manage to find my RAID array and so has nothing to mount as root.
So it will be a little longer yet I'm guessing
This makes me happy. Come visit me!
This advice not santioned by the WHO 
From this:
Sam had to agree to handle the hardware abstraction layer (HAL) and not release the code he wrote for that component because Atheros uses a software defined radio (SDR). The company (and any individuals involved) could face huge headaches if they released code that allowed direct and simple manipulation of the SDR to work outside of a, b, or g ranges. He'll have precompiled binaries for many processors.
So the company would be in trouble for selling a software defined radio? Is this another DMCA style peice of legal stupidiy? I'm generally pretty hopeless with hardware (I leave it to the EE dept) but even I think I could build a radio! How does banning the sale of SDRs help anyone?
Personally, I could have great fun with a good SDR. Roll on GNU Radio! (did I read somewhere that they announced a cheaper USB device at O'Reilly ETCon2?)
Imperial shifted fileservers yesterday, which is why IV was giving access denied errors. In fact, due to the wonders of NFS, it may be down for a while longer as stale filehandles are removed.
Invisiblog is a mixmaster based blogging system designed for totally anonymous blogging. This kind of stuff really appeals to me in a "yay freedom!" kind of way. If I had the hosting that could take the traffic and legal problems I would have done this sort of thing a while back - it's good that someone else has.
But I would wonder exactly how anonymous they are. I have all the usual faith in Mixmaster and they seem like sensible people so I'm assuming no stupid screwups. But it's really hard to avoid slow intersection attacks.
(Aside for people who don't know about intersection attacks: Assume I said "I was on the I10, going to work when the sun got in my eyes and I hit the central barrier, leaving a bright red mark on the barrier and a big dent in my door". From that we can say that the writer a is a member of the intersection of a) the set of people who live in LA (high chance) b) the set of people who are driving east in the morning (the sun got in their eyes) c) the set of people who have a dent in their left door / paid a garage for repairs sometime soon after d) the set of people with red cars)
Even your style of writing can give a fair amount away. As a quick test I wrote a short python script to find the mean and std dev of the numbers of 4 charactors (';', ',', '-', '?') in each sentence and the length of each sentence.
Given some sample data. (Where would you go to find long, rambling prose? The Freenet mailing list archives of course!
) Here are the results for 3 people:
Ian: [(0.0, 0.0), (1.173, 1.028), (0.464, 0.677), (0.042, 0.204), (110.536, 52.722)] Oskar: [(0.0, 0.0), (0.675, 0.812), (0.253, 0.464), (0.12, 0.328), (97.409, 60.337)] Matt: [(0.024, 0.153), (0.689, 0.905), (0.262, 0.642), (0.19, 0.395), (77.963, 59.192)]
(I would have included Scott, but he doesn't say enough!)
There are a fair number of differences even in this trivial test. If they use semi-colons - it's Matt. Lots of commas? Ian.
So, given someone who seems to know a lot about Freenet I think I could narrow it down a fair amount using this very simple test by analysing the list archives. (assuming that they post to the list)
The lesson is: be very careful
Scapy[via LtU] is a domain specific language for manipulating network packets. Actually, it's a thin wrapper around a Python read-eval loop and all the better for it.
Also, it makes for a very neat Python packet manipulation library. Have a look at the homepage (linked to above) for a transcript demonstrating some of its neat little features.
% python scapy.py
Welcome to Scapy (0.9.11.1beta)
>>> net = Net ("127.0.0.0"/24)
>>> list = IP (src = Net)
>>> for x in list:
... print repr (x)
...
<snip>
<IP src=127.0.0.246 |>
<IP src=127.0.0.247 |>
<IP src=127.0.0.248 |>
<IP src=127.0.0.249 |>
<snip>
>>> Ether()/IP()/TCP()/"123"
New signing only key
Since I handle nearly all my email on DoC servers now I need a signing only key because I don't trust them with my main key. Outgoing mail from me should be signed by this key. This key is not secure, however. Anything for which you would generally require a signed message should still require a message signed with my main key. Although you can encrypt to this key, doing so would be stupid.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.1 (GNU/Linux)
mQGiBD6lQFIRBACpwWqCQF26SdILeV2TwrCygvkIxPKlp+qqZTMymyewEKVZ9+2L
utXBHJxhSfJnQA12Oijmu6vx+7uCYdnR+yx/oW5Q1jhDymz+ASfsXJtAUFOERCQN
n/JjeVJCM3EMLVnlMo1oDTioxfFClHDz0lRAZS5pAPZWpVJbrs24jgzeIwCgxJx8
Tk7yPcI4bc0cIEvEbypi+wcD/12zXIFYir2eofG+4vxz+lMyHo5LXz8E4jSRWJTZ
a7OOzz3PyT96mShPJ34pZLZuwbE4fK7Kvzr0rAo95E2pVXoe0r7croCOs51JXc/p
LFiSexJvF8IN4bhehOy41SAM+86TNjQFZ9KISnWWBzpMXdQki8QpfhDP7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K-----
Persistence
Over the past few weeks I've been knocking about with ideas (which generally go under the name of Landscape) for holding data between code. Generally a byte stream (be it a pipe or a file) is the highest we get when sharing data. Too much data is far too difficult to get to and too little data is well linked.
One key part of fixing this could be a persistent object store and I've been messing with Python versions of this. Firstly, ZODB is far too slow and Prevayler keeps everything in memory.
Prototype 1
This kept data in XFS extended file attributes and each object was a file.
Pros:
- Nice kernel interface for non-Python code to use
Cons:
- Requires XFS
- Inflexible
Prototype 2/3
This used SQL to store the objects.
Pros:
- Again, a nice interface for non-Python code
- SQL has transaction ability
- Backlinks are handled just by a different SQL query
Cons:
- SQL is pretty slow - would have to read and write cache
Prototype 4
This uses proxy object that act as far pointers and pickle/unpickle objects on demand
Pros:
- Deals with any pickleable Python object (e.g. most of them) well
Cons:
- Pain for anything non-Python to use
- At the moment the code is a bit flaky. Playing with the garbage collector is a dangerous (and non-deterministic) game.
Ramblings
These are, of course, only prototypes to play about with these ideas. The true way to do it would be to use EROS. But EROS isn't seeing much take-up (I've not even got it to boot) and it might be better to put the neat bits of EROS into Linux, even if they don't all fit.
Prototypes 1 and 2 only support dictionary type data and Prototype 3 has slightly bodged support for other objects (they can have a .type link, pointing to the python code to be imported). Supporting other types of objects is very important for objects like (for example) the mixer which has to get and get its values from/to somewhere else.
The interface is also very important. Finding the right set of ideas to simply abstract data is a very hard problem. The interface to the same is possibly just as hard.
At the moment the interface is shell like but different types of objects will need more than that. It remains to be seen if some objects will need to handle the interface themselves to the level that they do today (e.g. GTK/QT level APIs) or if a system akin to XHTML/CSS will do.
Site Map/ Root Alternate The Weird and Wonderful Backlinks What are backlinks John Gilmore What's Wrong with Copy Protection Archives Blog Archives One Archive 1 Two Archive 2 Three Archive 3 Four Archive 4 Five Archive 5 Six Archive 6 Seven Archive 7 Eight Archive 8 Nine Archive 9 Ten Archive 10 Eleven Archive 11 Twelve Archive 12 Thirteen Archive 13 Fourteen Archive 14 Fifteen Archive 15 Sixteen Archive 16 Seventeen Archive 17 Eighteen Archive 18 Nineteen Archive 19 Twenty Archive 20 Twenty One Archive 21 Twenty Two Archive 22 Twenty Three Archive 23 Twenty Four Archive 24 Twenty Five Archive 25 Twenty Six Archive 26 Twenty Seven Archive 27 Twenty Eight Archive 28 Twenty Nine Archive 29 Photos Poor People Caught on Film Jack and the Beanstalk Jack and the Beanstalk RIP Scan Results of a Stage Scan Fire Yosemite Yosemite National Park Projects Incomplete things from the lab Seagull's Bane Linux Automounter bttrackd BitTorrent Tracker CAPTCHA CAPTCHA CGI script Conserv Console Serving Deerpark Using Tor with Firefox/1.1 (Deerpark) DNSFix Fixing DNS Xovers XTA Crossover Control IAFS Archive Org Storage JBIG2 JBIG2 Encoder Verify PGP Key Verifier MaxFlow Maximal Flow in Python PyBloom Bloom Filters in Python pyGnuTLS Python wrapping of GnuTLS Sxmap Apache SuEXEC Map Hellard Union Server Notes Recordings Free recordings ICSM Choir St Paul's Church School Ancient School Stuff Writings Who knows Cap Systems Capability Systems Intro Introduction to me Suprema JMC2 Group Project MP Letters Letters I've written to my MP Sound Sound With Dramsoc SyncThreading The wonders of user-land threads