Archive for the ‘computer’ Category

Scripted merge

Saturday, May 24th, 2008

I've been thinking a bit about version control systems. It occurs to me that almost every element of a version control system is actually fairly easy technically except for two - diff and merge.

Diff is the process of finding the difference between two files - I've written about some ways to deal with this in the past.

Merge is process of taking two changes X and Y and finding the change Z consisting of both X and Y. This sounds easy but it's really solving the "A is to B as C is to what" problem (the original being A, X being B, Y being C and Z being the answer). Suppose X is adding a method to a class and Y is renaming the same class. Most merge systems would add the new method with the original name (since Y didn't include renaming of the new method).

I think the answer is to treat every change as a little program in its own right. X isn't just "inserting the lines corresponding to the new method", it's "insert the lines corresponding to the new method, substituting the current name of the class where appropriate" and Y isn't just "change this list of instances of Foo to Bar" it's "change Foo to Bar everywhere it appears in the context of a class name in namespace Baz". In other words, have the changes themselves actually have some intelligence about what they are supposed to be doing. Then these programs could just be "run" (in any other) and produce the correct result.

Such changes would be more than just lists of "insert this text in this position in this file" and "delete this text from this position in file", and could therefore not easily be generated from diffing two files.

However, such changes could be generated by a text editor which has some understanding of the format of the files it is used to edit. For example, if such an editor had a "rename class" command, it could generate a change saying exactly that.

Diff algorithm

Wednesday, May 21st, 2008

Determining where the differences are between two files is a very important application in many areas of computing. I use it all the time when programming (to get an overview of my most recent changes). It's also used in file compression (so that only changed parts of big files need to be stored/transmitted) and in genetics.

The usual algorithm for diff is to find the longest common subsequence (LCS) between the two files, or equivalently, the edit script (the set of insertions and deletions you need to transform one file into the other).

However, this may not be the best algorithm for looking at differences between pieces of source code. People who edit source code don't just insert and remove text, they also move things around. This isn't handled so well by the LCS algorithm. Refinements are possible (like trying to match up adds with corresponding deletes to turn them into moves) but I think better results might be obtained by using an algorithm designed from scratch to handle moves.

I have an idea for such an algorithm. First, find the longest common substring (LCSS) between the two files (unlike a subsequence, the characters in a substring must be consecutive in the original string). Then, remove this string from both of the files, and repeat until either no characters are left or the substring is sufficiently short that it might just as well be an add and a remove rather than a move.

This can be done fairly efficiently (the LCSS can be found in O(N) time with a sufficiently sophisticated algorithm) and has a number of advantages over the standard method:

  • The algorithm can be "tuned" for the particular type of files it's working on. For example, you might tell it to prefer edits which affect fewer syntactical units in the language you're working in.
  • If your edit script is too noisy, you can increase the minimum length of found substring.

The day after I originally wrote this, Bram Cohen (of BitTorrent fame) wrote this. I haven't had a chance to play with his algorithm yet (or indeed mine), but I'd be interested to see how they compare (pun intended).

2D game

Tuesday, May 20th, 2008

I don't tend to have time to play many computer games these days (though I made exceptions for Portal and Lost:Via Domus), but I still like to keep abreast of how technology trends change in games.

A concept that I think is interesting in games is to "raise the stakes" as the game progresses, so that later levels seem to be more important than earlier ones. A couple of contemporary games (neither of which I have played) that embody this principle are Katamari Damacy and Spore. As the game progresses, the very scale of the action increases, causing the early parts of the game to pale in comparison.

3D graphics have become much more impressive in the past few years but the trouble with 3D is that the extra degrees of freedom make the controls more complicated and difficult to learn (especially for people who don't play many 3D games).

I think it would be interesting to apply the "increasing scale" concept to a 2D game using modern graphical techniques. My idea is a 2D-scrolling shoot-em-up. You start off with a very small, simple "asteroids" spaceship with a very simple weapon. As you blow things up, you can collect more weapons which make your spaceship bigger. Using these bigger weapons, you can attack bigger and bigger targets. The view gradually "zooms out" as the size of the ship, weapons and targets increases.

This idea also reminds me of the Seven Force in Gunstar Heroes on the Megadrive. Easy parts of this boss appeared in an early level and then in a later level there was a "scaled out" version which was much harder and with smaller sprites.

And with modern technology, 2D games can be seriously beautiful. Aquaria does actually zoom in and out a bit, but not by orders of magnitude as I'm imagining.

Devolving the CPU

Monday, May 19th, 2008

Until fairly recently, most computers could only do one thing at a time. To put it in technical terms, they had only one "execution unit" to take instructions from memory and actually act upon them. Computers have been able to apparently run many programs at once for much longer than that, through sleight of hand (switching the execution unit between different programs many times per second - so fast that you can't tell they're not executing simultaneously).

But in recent years, CPU manufacturers have been finding it more and more difficult to make execution units faster. CPU speeds increased exponentially until a few years ago, but the fastest CPUs you can buy have been about 3.6GHz for several years now.

But Moore's law (which says that the number of transistors you can put in a single chip doubles every 18 months) has continued to hold. So what do we do with these extra transistors, if we're not using them to make the execution unit faster?

Well, they're instead being used to put multiple execution units on a single CPU, so that computers really can execute multiple programs at the same time, without switching between them. This has the effect of making computers faster (since these days they're rarely doing only one thing at a time anyway, or if they are the work can often be divided amongst execution units to effectively increase the speed).

This means that programmers need to change the way they write programs, to obtain maximum speed from the latest machines. They can no longer write a program as a single list of instructions (or a single "thread of execution" to use the technical term) and expect it to run 1000 times as fast in 15 years time. Instead, programmers must write programs that use multiple threads and divide the work between them. This "multi-threaded" style of programming is more difficult and (if you don't know what you're doing) tricky errors can occur (for example, some errors only happen if two particular parts of the program happen to be executed at the same time, so can be very difficult to reproduce).

Once we've got the hang of doing multi-threaded programming properly, having any one execution unit go really fast won't be so important, because programs will be able to go just as fast by dividing up their work between execution units. This means that we will see a redistribution of transistors on future CPUs - we will go from a few very fast but complex execution units to many slower but simpler execution units, because we can make CPUs with better overall throughput that way.

There are several ways to simplify an execution unit. You can get rid of speed features like pipelining, branch prediction, out-of-order execution and speculation. Removing these gives you another advantage - it becomes much easier to determine how fast a thread will execute, which means less optimization and tuning is needed.

Another way is to simplify the instruction set (the operation codes that the execution unit actually interprets). Most currently used instruction sets are very complicated (in order to squeeze as much power as possible from a single execution unit) so there is great scope for simplification there. All the single instruction, multiple data instructions can be removed (the parallelism they enable can be more easily realized with multiple execution units).

Another simplification would be to remove all the registers and use a pure stack machine architecture. A few processors that use this technique have been developed in the past, but they never took off as they were too slow. This may cease to be a consideration in highly parallel architectures.

Stack machines have a number of advantages besides simplicity. Compilers can also be made much simpler (the parse tree can be translated into code almost directly, with no register allocation or complicated instruction selection algorithms needed). The CPU stores less non-memory state, making the operation to switch an execution unit from one thread to another much quicker. This state could be as simple as an instruction pointer, a stack pointer and some context to identify the thread.

Stack machines can also have much higher code densities than register machines, because you don't need to use any bits to specify which registers to work on - all instructions work implicitly on the top of the stack. Code density will continue to be important as the bus between CPU and RAM is a bottleneck that will only get worse as the number of execution units increase.

Another technique that can improve code density is bit-aligned instructions. By making assigning short opcodes to the most commonly used instructions and longer opcodes to the rarer instructions, you effectively apply Huffman compression to the instruction stream. The Intel 432 used this technique (and was very slow, but as the shifting that is required to decode such an instruction stream is pretty easy to implement in hardware I think this wouldn't be a big issue for a massively parallel CPU).

With a stack machine, certain patterns of instructions tend to occur over and over again. These can be assigned shorter codes (as is done in many popular lossless compression techniques like ZIP files).

Working out the optimal coding for this instruction set would be fairly simple in principle. First design a minimal instruction set for a stack based language without regard to code density (maybe just use one byte per opcode). Compile a large quanity of software to this architecture (spanning the range of possible uses - an operating system, application suite, development tools, games, emulators, number crunching, scientific visualization etc.). Next, determine the instruction frequencies across all these codebases and apply Huffman coding to figure out the optimal opcodes. With some fine-tuning, I think this could give significantly higher code densities than any of the architectures currently in use.

Another advantage of having many execution units is that transistors can be assigned to different tasks in the most efficient possible way. For example, if you have one ALU per execution unit and it is only in use 70% of the time, you could instead have 7 ALUs per 10 execution units - the ultimate in superscalar design.

Copyrighting public domain information

Friday, May 16th, 2008

Some people seem be confused about copyright and public domain, thinking things like:

  1. I used some public domain code in my program, so I have to release it as public domain as well
  2. I should be able to take some public domain code, add my own copyright to it and then prevent anyone else from using the public domain version
  3. I need a new law passed so that I can copyright this list of facts I compiled.

These are all wrong. Public domain isn't a copyright license like the GPL - it's just the absence of copyright, meaning that you can do what you like with it.

There's nothing stopping anyone from taking copyright-expired works of arts or lists of facts and copyrighting them, but such a copyright would be completely useless because it couldn't be enforced - if you sue someone for violating your copyright on that work they have an iron-clad defence - they can just say "my work is based on the public domain version, not your version" (in the case of copyright-expired works) or "I compiled my own list of facts which happens to be the same as yours because both are based on the same reality" (in the case of the phone book example) and you would not be able to prove that they had referred to your copyrighted work.

No new law is necessary because there's an easy workaround - just change something slightly to make it a new creative work - add a fake name to your phone book or change a few words in that old story. Then not only do you have a perfectly good legal case against anyone who copies your work, you also have a way to prove it (their copy will also have your changes). And you won't be "removing" anything from the public domain to boot. Sure you probably can't make much money by taking public domain works, changing something and then releasing a copyrighted version, but that's seems quite reasonable to me because you haven't actually contributed much (if anything).

I understand that map makers have used this technique in the past - changing the position of roads slightly or adding features to the map that don't exist in reality in order to make their maps copyrightable "creative works" and to enable them to track down counterfeiters.

Stack measuring

Wednesday, May 14th, 2008

We generally do what we can to make programs reliable, but there is one particular cause of software failure which seems to have been surprisingly under-attacked. Probably because it is fairly rare in real-world situations. That failure is stack overflow.

Many real-world programs have recursive algorithms where the recursion depth depends on user input and is unchecked, and where the activation records are allocated on the stack. Current computer systems do not recover well from stack overflow (you generally get an access violation which the program cannot recover from because it is in an unknown state). This means that it is possible to supply input which crashes the program.

The compiler for my ideal language will detect when a program uses a potentially unbound recursion and allocate the activation records for such functions on the heap instead of the stack. This means that calling such a function can potentially throw an out of memory exception, which is much easier to recover from than a stack overflow (since we still have a stack to work with, and because the state of the program is well-defined - as far as the calling function is concerned the called function threw an exception and as far as the called function is concerned it never got called.)

A nice side effect of this is that now every function with an empty set exception specification has a well defined maximum stack size, which means that when you create a thread you know exactly how much stack it needs. This means stack guard pages are no longer necessary (stack can be treated just like any other area of memory) and potentially means that threads that perform small tasks can be created with very little overhead, possibly making thread pools unnecessary.

A programmer can track the maximum stack size of every thread in their application. If a change causes the stack size to increase dramatically this may be due to calling a very high-level function from a very low-level function, which may indicate a bug. Similarly, adding recursion without realizing it also indicates a possible bug, so it would be nice if the compiler could also alert the programmer to that.

ALFE build system

Tuesday, May 13th, 2008

When I finally get around to building my ideal language, it will have a linker and build system built in. It seems very silly to write your code in one language, your makefile in another, your configure script in a third etc.

The compiler will be invoked with the name of one source file on the command line, and that source file includes all the other required source files by means of an "include" statement which works similarly to the "#include" of C and C++, but never includes any given actual file more than once.

The program can also specify the name of the output file to generate, which can be a binary (.exe or .dll for Windows, or equivalent on other platforms) or intermediate file to be used with a C or C++ linker (.obj or .lib, or equivalent). Similarly, object and library files can be included just as source files can.

On a first pass through the program, the compiler will enumerate the complete set of input files and check their timestamps. If no input files are more recent than the output file, compilation will stop early.

Cool stuff you can't find on the web

Saturday, November 3rd, 2007

Every so often, I think of something - perhaps a book, television programme or computer game - that I remember but that I have lost or have no record of. Usually when that happens, I turn to the web - a simple search and I have a massive amount of information on whatever it is in no time.

However, sometimes it doesn't work. For whatever reason, the collective consciousness has failed to remember some things. A few of these are recorded here, but since I'm relying on my memory, some facts may be inaccurate.


Fire was a computer game I used to have a copy of, but it was destroyed by the Dir II virus. You had to fly a helicopter through 8 levels, blowing up various things including hot air balloons, planes and a train (which constituted level 2). Then there were some levels over water, where you had to destroy boats, and some over desert, where you had destroy tanks and ground-to-air missile launchers. The really amazing thing about this game was the parallax scrolling - I'd never seen anything like it on the 8MHz 8086 I played it on. It had CGA and EGA graphics modes. The title screen (which took up most of the first of the two 360K floppy disks the game came on) was beautifully atmospheric, with the helicopter flying in front of the sun and stopping in the middle. Then there was this brilliant (and long) bit of sampled soundtrack. There was some documentation, but it was in French. When I asked Jim Leonard of Mobygames, he hadn't heard of it but said it sounded like a game by Loriciels. I found some screenshots for another Loriciels game on the web and the graphics did have a similar sort of style. I'd really like to play this again, but searching for "Fire" in the context of computer games is a somewhat futile exercise.

[Update!] - Fire wasn't by Loriciels at all but by New Deal Productions. I have found information about versions for the Amstrad CPC, Amiga and Atari ST, but still haven't found the PC version.

[Update!] - Found it! (at ibm5150.net). It can run from a hard drive in theory but the contents of the zip file need to be in the root directory for it to work. I seem to recall that to run it from 2 360Kb disks, the CGA and EGA directories need to be on disk 2 and everything else on disk 1. Start with "fire c" for CGA graphics, "fire e" for EGA graphics or "fire h" for Hercules graphics. The documentation also mentions "fire v" but that doesn't seem to work. This is probably because there's no vga graphics directory (it was also missing on the copy I had on floppies). The sampled soundtrack 52.7 seconds of 4-bit samples at 9.322KHz (1/384 of the NTSC colour burst frequency). DOSBox plays it fine in all 3 graphics modes, though needs to be slowed down a bit from the default - the game is CPU-speed dependent (unusually for a game made as recently as 1989).

For the most part the game is of very high quality but there are a few rough edges - apart from the VGA graphics problem already mentioned, the game seems too difficult to start with and then very easy once you get the knack of it. This, combined with its rarity, makes me wonder if the PC conversion was unfinished or unreleased.


I used to have a book which (like the "choose your own adventure" series) was divided up into sections, between about 1 and 5 per page. At the end of most of the sections there was a decision to make, with a section number for each choice. There were about 200 sections altogether, and many possible paths through the book. Every time I read it I came across sections I hadn't seen before. The book was also a competition - if you figured out it's secret you had a chance of winning a trip to Disneyland. The plot was that the land was dying, and you had to find a magic word to tell Steeleye the Raven so he could break the spell and restore the land. At one point in the book, you were falling and had to shout "Save me, Steeleye!", holding the feather he gave you at the beginning of the book, in order to get rescued. There were puzzles such as roman numeral codes and liar/truth-teller type things. There was a unicorn near the beginning who gave you a tear which emitted light. There was a talking tree near the end, and there might have been a swarm of bees somewhere. One character says "Deeds, not words" and tries to kill you. The book was published by Ladybird (it was that shape) but I don't remember what it was called or who wrote it.

[Update!] - I now know that the book is called "Steeleye and the lost magic" by Jason Kingsley, illustrated by Jon Davis and pubished in 1987. If anyone can help me find a copy I'd be very grateful to them!

[Update 2!] - I now have a copy of the book! It's a bit shorter than I remembered (only 117 sections) and a bit easier (I've solved it, I think, apart from one cryptic clue) but otherwise very much as I remember. I've scanned it so hopefully soon I'll find time to put it on the web (okay, it would be a copyright infringment, but since the book is out of print I'm sure there would be no harm in it.)

Links which helped me in my quest to find this book:
Demian Katz's Gamebook site - http://www.netaxs.com/~katz/game/book.htm
The Cheesypeas Ladybird book site - http://www.cheesypeas.demon.co.uk/ladybird
Sadly, both of these websites have since gone missing. Please let me know if you find them.


Comedy wordsmith and Splicer's disease sufferer Creighton Wheeler, who used to appear regularly on
Kevin Greening's weekend morning shows on BBC Radio 1, and now appears somewhat less regularly on Steve Wright's afternoon show on Radio 2.

[Update!] - The part of Creighton Wheeler is performed by Andrew McGibbon. Testbed made two shows about Creighton Wheeler in 2003 for Radio 4, called "Wheeler's Wonder" and "Wheeler's Fortune". Anybody know where I can get a hold of these? Apparently Creighton Wheeler has also appeared on Loose Ends.


Pickwick tell-a-tale tapes (in association with Ladybird books, Pickwick international and Moss Music) - brilliant audio books for children. I have "Treasure Island", "Swiss Family Robinson" and "Gulliver's Travels" but I'm sure there were many more. The voice acting and classical music were great.

[Update!] - Reader James pointed me to this website which is selling these tapes.

Along a similar vein, there used to be a magazine (I think) which came with a tape which had various childrens stories on it. The one I remember was "The thin king and the fat cook" but there were a few on each tape. I had a couple of tapes, but I've lost them now. Maybe they are still at my parents' house somewhere.

[Update!] - This is what I was talking about. Apparently I had "Story Teller 2" parts 5 and 16 and possibly also "Christmas Story Teller" part 2, because the titles Bored Brenda, Noggin And the Birds, The Snow Bear, The Inn Of Donkeys, Shorty The Satellite And The Brigadier, The Nightingale, Hugo And the Man Who Stole Colours, Mole's Winter Welcome, The Tale of the Little Pine Tree and Grogre and the Giant Nasher seem familiar. I remember very little about any of these except that (as I recall) some of them made me feel quite sad. And there was something about a picnic of bread, cheese and apples in one of them. And people getting swallowed up by a bog. Derek Jacobi's voice still makes me think of these stories to this day. It's quite possible that at least some of these tapes were chewed up by my tape player - it used to do that every once in a while (particularly when I stuck things into it - I was a little scientist).

[Update!] - I got a hold of a digital copy of all of the tapes and magazines, and they are just as good as I remember - extremely well done. I have been playing them for Alexander but he's a bit young for them at the moment. I look forward to the day when he is old enough to enjoy them. The one with the picnic was "The Snow Bear", and the sad one was "The Nightingale" (all these stories have happy endings, though). "Mole's Winter Welcome" still brings a tear to my eye.


The A Word A Day entry for 18th December 1998 reads:

Date: Fri Dec 18 00:04:27 EST 1998
Subject: A.Word.A.Day--straight-from-the-shoulder
X-Bonus: We see but dimly through the mists and vapors; \
 Amid these earthly damps \ What seem to us but sad, funeral tapers \
 May be heaven's distant lamps. -Longfellow (1819-1892)

straight-from-the-shoulder (strayt-fruhm-thuh-SHOAL-duhr) adjective

   Frank and forthright: straight-from-the-shoulder reporting.

   "A striking poem called Sequinned ends this way:
        Girl, don't you let that city get away.
        Lift it up, raise it up, slip your arms through
        and take it back to dance.
   This is poetry that speaks to us boldly, straight from the shoulder."
   Natalie Soto, et al., On the Shelf, Rocky Mountain News, 21 Dec 1997.

This week's theme: idioms.

Anyone know who this poem is by and where I can get a copy?

[Update!] My friend Claudine Burgos found the poem. Not on the web, though - by the old-fashioned technique of looking up the archives of the Rocky Mountain News and calling the library to find a copy. The poem is by Allison Adele Hedge Coke and goes:

    Don't tell me you couldn't reach down pick up
    the whole gleaming garment and wear it
    to fancy shawl dance back home. Dancing proud
    in a twenty -four- dollar trinket city.

    All laid out
    shimmering and shining on jet black world
    traffic lights, stret lamps, hot neons, cool fluorescents.

    Headlights
      	swim freeways electric

      	minnows, glittering eyelets on bridges
    bridges lacing up New York and Newark, separate
    sides of a sequined vest.  Borough lights trace out
    webbed wing

    butterfly design, no wasps- mosquitoes even.
    Something ready to fly off the whole metro stretch.
    Some cousin calling:

    Girl, leave your French braids right `cause
      	Cut Nose is goin' ta have it out with you
    Over snagging her sometimes half-side last night.
        She wants to take yoru prize and crown
  	from Red Nations Pow Wow-

    Her eyes painted sharp red at the corners,
    red as the landing light
      	on this plane's wing tip.
    Her plume high and straight, the Empire State,
    while yours falls
      	gently over your part.  But that vest-
    red, green, gold, silver sparkles,
    no one's got more brilliance.
    More elegant that bugle beads and embroidery,
    More stunning than satin and silk.

    Girl, don't you let that city get away,
    Lift it up, raise it, slip your arms through
    And take it back to dance.

The game Willy the Worm was written by a guy called Alan Farmer. Anyone know anything about this game other than what's in the documentation, such as where to obtain the editor, and what the author is doing these days? I'd be particularly interested to know if there was ever a "Willy the Worm II" or a "Pete the Pigeon" game.

[Update!] - A school friend of Alan's sent me some of his software:


I used to have a book called something like "20 Games for the BBC Micro". They were written in BBC BASIC mostly (although there was one - a board game - which was written partly in assembler). You had to type them in. The games included Hunchback, Monty Mole, a Star Wars game and some others I don't remember. How come you can't find downloadable copies of these games to run on an emulator?

[Update!] I since found out what happened to the book - I lent it to a friend of mine and forgot about it. I'll have to try to remember to get it from him next time I see him, and possibly reproduce some of the programs here.


Chris Evans used to do the breakfast show on BBC Radio 1, and every Friday he and his cohorts would sing "The Weekend Song" (or, possibly, "The Friday Song".) Some of the lyrics were "I want Spielberg to focus my camera / I want Versace to dress my dog...".

[Update!] - Someone sent me some more lyrics:

I want to live in a castle,
I want an ocean for a pond,
I want a jumbo jet just to get to work,
Because it always takes me far too long.

I want to skip in the sunshine,
I want to dive into the deep blue sea,
I want to buy an ice cream for the man in the moon,
Because he always shines his light on me.

I want Spielberg to focus my camera,
I want Versace to dress my dog,
I want a current account at the Jodrell Bank,
I want Niagara falls to flush out my bog.

We're all just a drop in the ocean,
And the world's just the size of a pea,
And like a meal for one, it'll soon be gone,
And it's all just a cliché for me.

Anyone got a recording?


"Das Verflixte Hundespiel" by Artus Puzzle. You had nine cardboard squares, and on the side of each square was half a dog (either a head or a tail). There were four different types of dog. You had to arrange the squares into a 3x3 matrix in such a way that the heads and tails matched up. It was very difficult! There are 9! x 48 = 23,781,703,680 different ways of arranging the squares but only 2 solutions. I eventually gave up and wrote a computer program to solve it.

[Update!] - Das Verflixte Hundespiel is still being sold here. Apparently it is Swiss. This isn't exactly the same version I had - the dog illustations on the version I had were different.

A friend of mine remembers having a British version - anyone know anything about it?

My then girlfriend (now wife)'s family bought me a similar puzzle which is even more difficult as it only has one solution. The box and website claim that there are "over 300,000" wrong ways to assemble the pieces but this is a gross underestimate (probably based on 9! = 362,880 permutations, which doesn't include orientations).

[Update!] - Commenter John requested the solver program and solutions. Here they are. It is currently set up to solve the card suits jigsaw version (I don't have the "Das Verflixte Hundespiel" puzzle to hand). It's not a particularly elegant way of coding it (18 nested loops for the tile choices and orientations) but it should be easy to adapt for similar puzzles. There is a project file for Microsoft Visual Studio .NET 2003 but the code is portable.


This one isn't for me, but for a friend of mine. Dave writes:

Several years ago, a band called Blind Melon did an acoustic set on a late-night ITV rock/metal show called "Noisy Mothers". Around a month later, the lead singer died of a cocaine overdose, after they'd only released two albums [they released a third posthumously]. I've been trying to track down a recording of that ever since I accidentally taped over it a couple of years ago, before I could transfer the VHS to digital... I'll be impressed if anyone in the world can track a copy down...

Can you help?

[Update!] here is one of the songs from the set.


Some years ago, I remember seeing several episodes of a TV show called "They Who Dare" on BBC2. Each episode was only 10 or 15 minutes long (might have been longer or shorter, I don't remember, but I'm sure it wasn't a full half-hour).

Each episode documented some dare-devil sport such as parachuting, hang-gliding or BASE jumping. One particularly memorable episode featured people jumping out an aeroplane and then parachuting down large holes in the ground. The holes themselves were formed by some unusual natural phenomenon, and were quite spectacular even without people parachuting down them.

Each episode was a real work of art - fusing music and beautiful landscape cinematography with the human drama of people who get their kicks from flying through these scenes in some dangerous fashion. It was so enthralling that I remember regularly finding myself realizing at the end of an episode suddenly realizing that I had actually been watching TV for the past 15 minutes and not actually performing these incredible stunts.

I'd love to get a hold of copies of all the episodes of this show, but have only found single, in-passing mention of it using Google.


Along similar lines, I remember hearing about a 5-minute BBC promotional film short featuring a Helicopter tour around the coast of Britain. I never saw it (except for highlights on Points of View but I remember people saying it was really amazing to watch. I have ever since been kicking myself for missing it.


What is this piece of music? I found it on an episode of This American Life but this piece isn't listed. It isn't on TAL's scoring tracks page either (I think - I listened to them all and didn't hear anything that sounded like it). The world needs a search engine where you can upload a piece of music and find out what it is.

[Update!] - Somebody pointed out that such services already exist - Shazam is one and I think there are several others. Unfortunately they all seem to need an SMS-capable mobile phone which doesn't really help me because I don't have one.

[Update 2!] - John Philips from Bath emailed me with the answer - the song is "At The River" by Groove Armada.


This one is a real long-shot, since there is almost nothing to go on.

There is a childrens book I remember reading as a child, but I remember almost nothing about it. I remember that I read it in the childrens' section of Goring library, and it may have been about some children going into space. I think it was (at least mostly) a picture book. I have a vague recollection of one of the illustrations being of something like this (possibly in the middle of a large room, possibly aboard an alien spaceship - though that could just be a mental picture I formed at the time). I don't know that I would even recognize it if I saw it. I do remember that I felt amazingly inspired by it at the time and I have a feeling it may have influenced my life greatly.

I recently visited Goring Library again for the first time in more than 19 years. It was very much like I remembered (though as one would expect it seemed smaller than I had remembered). Unfortunately (with the exception of some Meg, Mog and Owl books I had completely forgotten the existence of) all the books I that were around when I was a child seemed to have been replaced.

So to sum up, this book:

  • Was written for children
  • Has colour illustrations
  • Was published in the UK in 1988 or before
  • Has a science-fictiony sort of story, possibly involving aliens

Any suggestions about books that might fit these criteria?


From Ben Davis, via Dave:

Just wondering if anyone remember a game called 'Prunes' for the BBC computer?

I tried searching the Internet the other day, but amazingly the Internet seems to contain absolutely no knowledge of the game's existence. :/

I remember it well enough to remake it last night :) I'm just still getting to grips with the fact that it seems to be completely unknown to the world.

Screenshot: http://bdavis.strangesoft.net/prunes.png

You are "the last of the Giant Prunes", aka the white pixel leaving a cyan trail. You have to surround the "Giant Figs" (red pixels moving randomly and leaving a magenta trail), and then touch a blue-yellow flashing pixel, at which point any fully surrounded magenta regions turn green. Unfortunately there's no win condition (in mine or in the original), so you eventually end up with what resembles a cyan and green world map and nothing to do.

It's a pretty faithful remake. Apart from exact dimensions and timings and stuff like that, the only bits I couldn't remember were the scoring mechanism and the behaviour when a blue helper prune (which eats through fig trails for you) touches a flashing pixel. The sound effects are missing from my version, which is a shame since they had bags of character.

Executables (insert standard disclaimer here yada yada): http://bdavis.strangesoft.net/prunes.exe (DOS) http://bdavis.strangesoft.net/prunes-win.exe (Windows)

Source - compiles with Allegro on some other platforms like Linux and Mac: http://bdavis.strangesoft.net/prunes.cpp

Maybe I'll launch a full-scale investigation to find out who made the original game and make sure they know that they are awesome.

My suspicion is that this was never actually published anywhere - that it was just something coded by a secondary school student over a few lunchtimes (probably starting with the random walk used by the figs and blue things - I coded that up algorithm myself shortly after learning C), evolved into a game and possibly got passed around on disk. It has a Qix-like feel to it so may have been inspired by that. The simple graphics, the fact that it's not winnable and the fact that it's relatively easy to get to a stalemate situation all point to an unpublished, one person job. However, it would be interesting to track down the original version and/or it's author.

Portal

Monday, October 29th, 2007

I played through Portal over the weekend. I don't play many computer games any more but I'm glad I made time for this one - very impressive storytelling, and hilarious dialogue (monologue?).

Software downloads

Thursday, September 6th, 2007
  • These are all for IBM compatible PCs running DOS and/or Windows. They will not run on any computer named after a piece of fruit or any operating system which has the letter 'X' in the name (probably). Some of the DOS programs will have problems running under Windows.
  • They are all compressed with PKZIP. You need PKUNZIP or another program that can decompress .ZIP files to be able to use them.
  • The Windows programs may require a DLL (Dynamic Link Library) that you don't have. If this is the case, try here.
  • Please don't write and tell me that the documentation for some of these programs is very bad - I know. Some of them don't have documentation at all. I wish you fun trying to figure out what they do.
  • Download sizes are given in brackets. To calculate approximate times in seconds, divide the size (in Kb) by your connection speed (in Kbps) and multiply by 10. That's the approximately the theoretical maximum speed.
  • Warning: Never run software you have downloaded from a site you do not trust! Whilst every precaution has been taken to ensure that these files do not contain viruses, I recommend running a virus checker that you trust on the files once they have been unzipped (.ZIP files cannot carry viruses, only their contents can). However, even a virus checker will not tell you if the files they are checking have been specifically created to cause havoc (trojans) I promise that none of the programs I've uploaded here are trojans. If you don't trust me, get the source, understand it and compile it yourself with a compiler you trust.
  • Full source code for all these is available on the free software principle:
    • Use it
    • Change it, just don't hoard it.
    • Sell it if you like, although I'd appreciate a cut of the profits.
    • Please don't remove my name from it.
    • Whatever else you do, just don't hoard it.

    At the moment you'll have to email me for the source because it's too messy to upload. Hopefully I will get around to fixing that soon.

[New Sep 2007!] Mandelbrot zoom (160K) - a fractal program for Windows featuring a logarithmic palette, progressive resolution and dwell limit, anti-aliasing and real-time zooming. For best results ensure your colour depth is set to 32-bit. Source code (30K).

Digger - Classic arcade action game - Click here for more info
Cool Dude I (190K) - Massive action/adventure game
Screen Designer (36K) - For CD1, batch files and DOS programs
Character Designer (68K) - ideal for Windows icons, games design, etc. Very powerful.
Binary File Editor (22K) - Change individual bytes in files
Fractal trees/clock and 3D salt model (52K) - Demos: require VGA
Address book (15K) (Windows)
Interest calculator (3K) (Windows)
Oscilloscope for Soundblaster (21K) - see your voice in real time!
MAZE-O-TOUR (23K) - beautiful smooth scrolling VGA game
Freecell for DOS (38K) - 16 bit DOS version of the addictive Microsoft Win32 game.
DSPACE (13K) - useful program which shows you which directories/extensions are taking up all your hard disk space
LIFE (19K) - Obligatory cellular automata program. One of my earliest programs.
Tetris (39K) - Fast action game.
Miscellaneous DOS utilities and screen programs (68K)
VGA Demos (169K) - pretty animations
Date calculator (10K) - Want to know when your next 1000-day birthday is, or when you will have known someone half your life? This will help.
Date calculator for Windows (4K)
Text utilities (25K) including ROT13, WORDWRAP and a utility for fixing files saved on Apple Macs.
Disk utilities (11K) SERIAL, ABSDISK, QFORM and ROOTSORT. Be sure to read README.TXT before using these.
Q7 (7K) A puzzle.
SETKIPS (6K) Program to slow down new computers for running old games. Better than Mo'Slo with some programs, and free!
KEYB (5K) Tiny program to turn your computer keyboard into a musical keyboard: with true polyphony and multiple instruments. Doesn't even need a sound card.
Words (20K) Flashes (in big, pretty letters) random inspirational words until you press ESC. A result of my playing with the FreeType library.
Runsaver (3K) (Windows) use any program (DOS or Windows) as your screensaver.
Rockfall (12K) - Clone of "Drop Zone".
Mr X (19K) - Clone of "Orby" and precursor to Cool Dude. You'll probably want to change the speed - 500 is the default and higher numbers are slower.
Watermargin (10K) - Two player board game.
Sliders (7K) - Someone challenged me to write this game using as little code as possible.
Disasm (41K) - Intelligent disassembler for all 80x86 compatible processors up to and including the Pentium III. Not quite finished yet (it's going to be interactive) but still more useful than DEBUG (even more useful than Sourcer in my opinion).
GRABBMP/REPLCBMP (19K) - A suite of programs to extract windows bitmaps (BMP, ICO and CUR) from files in which they are embedded (usually EXE and DLL) and replace them once you've edited them.
DbxTool (84K) - A program to extract messages from "dbx" files (Outlook Express message folders). If you came here looking for "Defunge", download this instead - it's better.
run_random (99K) - A program to run a random file from a directory.
crc32 (112K) - A program to enumerate files in a directory and find their CRC32 checksums.
Bifurcation fractal (117K) - A program to render the Bifurcation fractal.

The Sopwith source code, which used to be here, has moved to sopwith.org.