17 August 2008, 10:11 UTCFurther violence done to time
Not content with slicing time into weird little pieces, I have begun bending and stretching those pieces:
Inspired by Howard Goodall's "How Music Works" series. Goodall says bending the beat began as a jazz thing, at least as far as recognized techniques go. Cannonball Adderley, my favourite jazz musician, certainly gets up to this kind of mischief.
9 August 2008, 8:20 UTCMythical
In the 9th century AD, roughly 3x10^14 man hours occurred. In the 90s roughly 5x10^14 man hours occurred. A century during the middle ages contained roughly the same amount of human experience as a modern decade.
While there are all sorts of reasons to doubt this as a benchmark of the rate of human progress, it does not seem too far wrong.
24 June 2008, 21:43 UTCMore drum beats
See earlier post. Multiple instruments and various tweaks.
Update: And here's my first attempt at melody by division:
2, 3, and 5 are like the opponent-process dimensions in color. The aesthetic rule may be similar, requiring some but not too much variation in each dimension. More on this to come.
Oh yes indeed.
By changing the amount of variation desired, different effects can be achieved.
This last one composed by my computer while I read Stross's latest Laundy story.
Further tweaking:
The main thing currently lacking is a feeling of progression.
18 May 2008, 9:24 UTCDividing a beat, a la Arbeau
Thoinot Arbeau, in his 16th century dance manual, first introduces rhythm as it relates to military marching.
That is to say, the beat corresponds to the footfalls of the soldiers.
To spice things up a bit, the period before each bit may be divided into
lesser periods, each ending with lesser drum beats. Similarly, dance steps may be elaborated by introducing extra footfalls before the main footfall.
So rhythm, from the standpoint of dancing, has as its fundamental unit a delay followed by a beat. During the delay we step, hop, leap, or somesuch, and on the beat one or other foot hits the floor.
Note that this is opposite to how we notate music, in which the fundamental unit is an attack followed by a period of sustain.
Take a single unit:
|
|
------
We may divide it into two:
|
| |
------
or three:
|
| | |
------
The resulting units may then be further subdivided to produce complex rhythms. Dividing a unit by larger numbers doesn't produce as pleasing results as dividing by two or three.
Here is an example demonstrating progressively deeper divisions:
Here is the code I used to generate it:
You will need python, abc2midi and timidity (or whichever MIDI player you prefer). (Yes this is an ungainly way to generate MIDI, I'd love to find a less painful way.)
Update: One still needs to think about what comes after a beat, lest the beat interfere with following beats. Here's an example that does this (and with some further refinements):
4 May 2008, 0:17 UTCInsane prisoner's dilemma
Two perfectly rational human prisoners, let us call them Alice and Bob, have been caught and are about to be interrogated. In the meantime they are both being kept in the one cell.
The outcome will be as per normal prisoner's dilemma. If neither confesses, they both win. If one confesses and the other does not, the first one wins a lot and the second loses. If they both confess, they both lose. They will never meet again.
If this were normal prisoner's dilemma, the outcome game theory predicts is that they both confess. It doesn't matter how much they confer before hand, the game is set up so that this is the rational thing to do.
However, being human, we shall suppose they have a novel ability and a novel option while they are in the cell:
- They can tell what motivates the other player, which will be some linear combination of both of the players outcomes. Of course initially both prisoners only care about their own outcome.
- They can choose to go insane, modifying their own motivation to be a new linear combination of their own outcome and the other player's. From then on their actions will be guided by that new motivation (possibly to their detriment!). Note that their actions will only be irrational from the perspective of their initial motivation. From the perspective of their new motivation, their actions from then on will be perfectly rational.
If we only allow a limited set of linear combinations, working out the player's actions becomes fairly easy to solve.
What will happen is this: One of the players, say Alice, goes insane to the extent that, to her, the game becomes a coordination game. She will then not confess if she knows that Bob will not confess. Bob, seeing this, will also go insane to the same extent. The problem is now a coordination problem, and they have common knowledge that they both do not want to confess. So they don't confess, and both win.
25 April 2008, 13:53 UTCIntelligent design for the evangelical atheist
Continuing on from "Why go insane?".
Jared Diamond has written up a fascinating set of stories about revenge. What I hope is striking is that people can hold completely alien moral codes, and that in primitive societies these are actually pretty dysfunctional.
A couple more examples of alien moral codes. The Chinese attitude to pets is somewhat different. Disgusted? Good. Now think about how a vegan views you. And of course our own culture is not free from change.
So perhaps your own moral code, despite being obviously correct, is actually a result of taking the conclusion your culture requires and backfilling an argument. Sure, it seems to hang together, but at some point there's a little note that definitely does not say "then a miracle occurs". Maybe it's that people can somehow transcend their evolved natures now they have brains. Maybe it's that there's been some kind of weird evolutionary accident that left us all jolly nice people. Maybe there's some kind of moral zeitgeist, whatever that means. Maybe it is that contrary to all reason group selection is actually a strong effect. Maybe being able to understand the motivations of other creatures will make us love them, rather than just letting us exploit them more efficiently. Maybe it's super-rationality a la Hofstadter.
People are nice, therefore <my pet theory> is true. This is progess over "people are nice because God"? Please stop, it's embarassing.
Your moral code has no more foundation than any other, but that is fine, flying is actually pretty straightforward. The proper test of a moral code is whether it results in a society that is to the benefit of its members. It is perfectly valid to pull a whole belief system from your posterior, if it passes this test.
In fact this is business as usual. The 10 commandments are awfully useful. They were probably designed by committee. Same goes for most religious constructs. People choose to believe in them because they work.
You're not going to arrive at the one true moral code by pure reason. You're not going to find it by introspection. Science is silent on the subject. It's not going to be handed to you on a silver platter. You're going to have to damn well design it yourself.
Or wait for some more practical brand of insanity to wipe you from the face of the Earth.
So, um, that's the general outline of the whole "insanity" thing. Obviously it needs a bit more fleshing out. I'm confident that all the various forms of "then a miracle occurs" are indefensible, but each of them is topic unto itself. The idea that other people can have radically different moral codes, and consider them just as natural as one's own, seems to be a common blindspot [1]. I need more examples of these, and more depth to the examples -- how they differ at a fundamental level, and why they still work.
[1] Two defenses employed here: 1. Labeling beliefs "memes" allow different beliefs to be dismissed as hostile infections. 2. Conspiracy theories allow people's actions to be blamed on coercion and disinformation.
13 April 2008, 10:39 UTCRobust topological sorting and Tarjan's algorithm in Python
The Strongly Connected Components of a directed graph are subsets of nodes such that each node within a subset can be reached from each other node. Tarjan's algorithm can identify these components efficiently (thanks njh for finding this algorithm).
By identifying strongly connected components ahead of time we can create a topological sorting algorithm that does the best it can in the presence of cycles.
Here is an implementation in Python:
Here are some things you might use this for:
- Install packages with circular dependencies in the best order you can.
- Work out in which order a set of equations must be solved, and which must be solved simultaneously.
- In a revision control system align as well as possible many versions of a file. (This is basically what I am using this for, but with DNA.)
12 April 2008, 0:28 UTCA Nokia phone has crashed
I recently bought a mobile phone from a company called Nokia. This company has a good reputation for making mobile phones, and has been doing some great work getting Linux onto some of their phones as well. So it is with some small sadness, but also with firmness of resolve in doing what is right, that I must now report the following:
That the phone that I purchased crashed.
The crash was apparently due to a software fault, and occurred while receiving an SMS.
What must happen now is by the laws of natural justice inevitable. In their hubris they allowed their standards to slip so far as to ship a product with a software defect, and now they must pay the price. It is time for Nokia to get out of the mobile phone business.
7 April 2008, 6:27 UTCAMOS message reader/writer module for Python
(of interest to bioinformaticians, and few others)
AMOS (A Modular Open-Source Assembler) defines a standard message format for describing DNA sequence assemblies. It has a Perl module for reading these assemblies, but no Python module.
Shock! This must be rectified, forthwith!
I am currently using this module to import Newbler assemblies of 454 data into AMOS. The quality data is thoroughly b0rked. If anyone has any experience with this, please contact me.
26 February 2008, 22:30 UTCModern anti-depressants such as Prozac are ineffective
Initial Severity and Antidepressant Benefits: A Meta-Analysis of Data Submitted to the Food and Drug Administration Kirsch I, Deacon BJ, Huedo-Medina TB, Scoboria A, Moore TJ, et al. PLoS Medicine Vol. 5, No. 2, e45 doi:10.1371/journal.pmed.0050045
Drug-placebo differences in antidepressant efficacy increase as a function of baseline severity, but are relatively small even for severely depressed patients. The relationship between initial severity and antidepressant efficacy is attributable to decreased responsiveness to placebo among very severely depressed patients, rather than to increased responsiveness to medication.
Now who thinks this will actually stop doctors from fucking over many of my friends and colleagues?
Give your doctor a notepad to write on. Give them a pen. Given them a fluffy toy and a mousepad. Give them some patient data tracking software that doesn't display ads [1]. Doctors are so poor, they have to sell their patients to drug companies just to have these necessary things.
And give them a copy of this paper.
[1] Not joking. At least at Monash University, the GPs use patient data tracking software that displays drug ads.
23 February 2008, 10:51 UTCIntroducing Myrialign - align short reads to a reference genome
27 January 2008, 21:34 UTCWhy go insane? Some preliminary notes
15 January 2008, 7:39 UTCRandom color scheme generator
11 December 2007, 8:31 UTCA rest from opponent process
4 December 2007, 9:51 UTClol.py
12 November 2007, 11:47 UTCMedium sized publication graph
11 November 2007, 11:17 UTCSCA: 13th C French scholar's cap
24 October 2007, 23:32 UTCLazy lists in Python
9 October 2007, 5:17 UTCApproximate string matching with regular expressions
7 September 2007, 23:56 UTCYaedit 0.4 - keyboard shortcuts
27 August 2007, 5:56 UTCIntroducing yaedit
21 August 2007, 0:04 UTCWanted: Rope file system
9 August 2007, 0:46 UTCSearch a large sorted text file in Python
31 July 2007, 11:19 UTCEuclidean Distance Transform in Python
24 July 2007, 4:29 UTCDepartment of Microbiology at Monash
10 July 2007, 10:03 UTCReally simple memory management: Fat Pointers
23 June 2007, 3:24 UTCA practical application of the Elevator Function
26 May 2007, 15:05 UTCSome Hidden Markov Model generated surnames
16 May 2007, 14:06 UTCIn bacteria, genes have sex
26 April 2007, 11:28 UTCVertigo
