marnanel: (Default)
Today I decoded the secret competition questions from a 1984 Thames Television computer show. I still don't know the answers, but I'm probably a bit late to send in a postcard!

A friend pointed out this copy of Thames Television's 1984 Database programme, and wondered what the files transmitted over the closing credits are.



I took a look at the audio. All the signal is on the right channel, so I threw away the left. This is what the remaining channel looks like:
http://www.chiark.greenend.org.uk/~tthurman/thames/waveform.png

You can see that most of the signal is a lead tone, and there are two files each of four blocks. In fact the files have the same content, and they're both called THAMES.

Before I did any analysis on the waveform, though, I amplified it so that all peaks were at the same volume, on the grounds that the volume isn't significant. At first I tried to load these files into BeebEm. The trouble is that BeebEm doesn't take .wav files directly-- you have to convert them to a format called .uef-- and the conversion programs were reallyt finicky with noisy signals. And this signla is very noisy, having been transmitted over UHF, recorded on home video, and then digitised. In the end, I ended up writing my own demodulator based on the specs given here. Then I ran the file from the tape through Matt Godbolt's BBCBasicToText script, ,slightly modified not to give up around the occasional bit of noise.

Fortunately, the resulting file did not say "be sure to drink your Ovaltine".. BBCBasicToText doesn't implement target line number conversion, so those are missing, and as you see some noise remains. This has been an interesting diversion-- sort of like a cryptic crossword puzzle.

10MODE7:COLOUR129:CLS
20PRINT"Thames  Television"
30 PRINT"-------------------"
40PRINT:PRINT:PRINT"DATABASE COMPETITION"
50 PRINT:PRINT:PRINT:PRINT"Send solutions on a postcard only to:"
60PRINT:PRINT"    Database"
70PRINT"     THAMES TV"
80PRINT"      149 TOTTENHAM COURT ROAD"
90PRINT"       LONDON"
100PRINT"        W1P 9LL"
109 PRINT:PRINT:FOR"PRNOTLN SPACE BAR TO CONTINUE"
110 A$=GET$:IFA$="" THEN 110
111 IFA$<>" "THEN 110
120 MODE5
130COLOUR129:CLS
140PRINT:PRINT;
150FORI=1TO8:READA$:IFI=1 THENGOTO [...line...] ELSE [...line...]
160 COLOUR4:GOTO180
170 IFI=5THENCOLOUR3ELSE COLOURI
180PRINTA$;:NEXT
190COLOUR3=PRINT" COMPETITION"
195PRINT"--------------------"
200 PRINT:PRINT:PRINT:PRINT:PRINT
210COLOUR2:PRINTSPC( [... corrupt ...]
220COLOUR2:PRINTSPC(8);"4";
230COLOUR3:PRINT" *"
240COLOUR3:PRINTSPC(8);"* *"
250COLOUR2::PRINTSPC(6);"1";:COLOUR3:PRINT"******" 
260PRINTSPC(8);"* *"
270COLOUR2::PRINTSPC(6);"3";:COLOUR3:PRINT"******"
280PRINTSPC(8);"*"
290PRINT:PRINT:PRINT:COLOUR2:PRINT"1.";:COLOUR6:PRINT" Arresting pop       group1
300 PRINT:COLOUR2:PRINT"2.";:COLOUR4:PRINT"_ to me only" 
310PRINT:COLOUR2:PRINT"3.";:COLOUR4:PRINT" Four star           transport"
320PRINT:COLOUR2:PRINT"4.";:COLOUR4:PRINT" Underwater         computer language?"
325 GOTO [...line...]
330"DATA "D","A","T","A","B","A","S","E"

One last mystery remains: what are the answers to the competition questions? (Edit: we have answers!)
marnanel: (Default)
People often post images of text on Twitter, either to get around the 140-character limit or because they're posting a screenshot from another site. This is a problem for people who use screen readers and people who have images turned off.

I propose to create a web service which will allow people to associate images with URLs of pic.twitter.com/XYZ with transcriptions. For example, you could associate http://pic.twitter.com/2EaLCXaszP with the text "The Bishop of Dibley".

This would then be available on the Twitter site via a Javascript snippet in the browser.

Byte-for-byte identical images would automatically share a transcription, detected by digest. There could be a tineye-style similarity test, but that would make a simple idea much more complicated.

Users would log in with their Twitter account details, via OAuth. All their transcriptions would have their account name attached.

The biggest problem is of people maliciously adding incorrect transcriptions. I invite suggestions.

What do you think?

2010-02-20

Feb. 20th, 2011 04:41 pm
marnanel: (Default)
A cat on a bed


Rio has been learning poems by Eleanor Farjeon and A. A. Milne, and reciting them to me. Impressively, when she makes mistakes they are starting not to affect meaning or metre. I am very proud of her.

The spring is beginning to arrive, and I'm feeling quite a lot better than I was. I'm reminded of the stories about how a hundred years ago kids would be sewn into their winter underwear in the autumn and cut out again in spring; leaving the winter behind feels like finally getting free of your winter underclothes must have felt. I was talking to Sumana earlier about my poem May and how I think of it this time of year, and how people seem to like its description of seasonal change, even though they perhaps often miss the extra meanings about Revelation 22.

My grandfather was buried on Friday. They put my sonnet into the order of service.

We found his medal collection: I thought you might like to see it.

I spent far too long yesterday hacking: something I love to do, and in a way it defines me, but if left to my own devices I would spend the whole day doing nothing else. That would be bad. Yesterday I started adapting the imgur integration to use the new API, and built part of a test harness I had been daydreaming about, and made a start on debianising some fonts I need, and played around with an idea I had for a LiveJournal/Dreamwidth to Atom adaptor which allows you to read friends-only posts in a desktop feed reader. (I call it ljferea. I may be the only person amused by this.) I also tried to explain things to someone who was creating a new programming language, and told the story of where Firinel's name comes from.

There's much more I'd like to write, but little time, and it's only a half-formed wish anyway.
marnanel: (Default)
In case it's useful to anyone else, here is a script to list translators of a program since the most recent release (defined as the most recent time you made a commit to NEWS). It goes in /usr/local/bin/git-translators, so that you can invoke it as git translators:

[marnanel@tinidril metacity]$ git translators
Khaled Hosny (ar); Jordi Mas, David Planella (ca); Carles Ferrando
(ca@valencia); Petr Kovar (cs); Christian Kirbach (de); Daniel Mustieles, Jorge
González (es); Ivar Smolin, Mattias Põldaru (et); Mahyar Moghimi (fa); Fran
Diéguez (gl); Yaron Shahrabani (he); Gabor Kelemen (hu); Kjartan Maraas (nb);
Og B. Maciel (pt_BR); Matej Urbančič (sl); Daniel Nylander (sv); Gheyret
T.Kenji (ug); Maxim V. Dziumanenko (uk); Nguyễn Thái Ngọc Duy (vi); Wei-Lun
Chao (zh_HK); Wei-Lun Chao (zh_TW).
[marnanel@tinidril metacity]$


I know there are other similar scripts out there; I wrote this a while ago when I couldn't find any of them quickly that still worked after we changed from using svn.
marnanel: (Default)
If you're not interested in coding nargery, you can skip this post.

Two things you need to know to read it:
  1. It's a lot simpler to pass lists of strings over DBus than it is to pass lists of pairs of strings.
  2. Images on imgur.com are identified by a five-character code, such as c7bC9. This gives us a URL of http://i.imgur.com/c7bC9.jpg , but you can also find a thumbnail by appending an "s" to the basename: http://i.imgur.com/c7bC9s.jpg .
I have a call in the DBus service that forms the back end of the imgur integration: it lists all the images you have uploaded. Now, a thumbnail of each such image is held on disk with the same basename as the image's ID. So here, "/home/marnanel/.local/share/imgur/c7bC9.jpg" (note: not c7bC9s.jpg, even though it's the same file as the URL which ends that way).

Clients might want to know two things about each image: its ID, and where to find a thumbnail. We could just list IDs, but then the client would have to make a call for every ID, asking where the thumbnail was, and that would be wasteful. I could have passed pairs of strings, but that's a bit clunky. What I did instead was to say that a filename was considered a non-canonical form of ID. When you pass in a filename, it takes the basename and uses that as an ID instead. So we can just supply a list of filenames of thumbnails, and the client can use those filenames as IDs, and we still know what they mean. It works rather well.

Now I would like to extend this by allowing people to look up not only images they have stored locally, but also the popular images of the day. Clearly the filename trick could be extended to URLs. But as mentioned earlier, http://i.imgur.com/c7bC9.jpg is the address of the original image, not the thumbnail. So we have a choice between sending them a list of full-size images, and sending them thumbnails and having to rewrite the canonicalisation rules.

I could
  • say that six-character IDs ending in "s" are a non-canonical form of five-character IDs with the "s" removed. I am leaning towards this option. It keeps everything in line, but it's a bit of a hack, and after all we're receiving the actual thumbnail URL. On the other hand, we could always check that the actual thumbnail URL is what we expect, and discard the entry if it isn't.
  • supply five-character IDs, but expect the client to know how to turn the URL of an image into the URL of a thumbnail. This is also a bit of a hack, because it's specific to imgur.com and I expect it might be useful to run this program against other servers.
  • just give up on this thing and supply pairs of strings instead.
Your thoughts, gentle reader, are as welcome as ever they were.
marnanel: (Default)
Anyone fancy beta-testing imgur upload for Maemo? Let me know how you get on.

Deb: http://www.chiark.greenend.org.uk/~tthurman/imgur/tmp/imgur_0.50-1_armel.deb

Source: https://github.com/tthurman/imgur-integration

screenshot



screenshot



screenshot


Instructions are included.

Update: Now in extras-testing.
marnanel: (Default)
When people IM me out of the blue, so that I'm working in another program and a notification pops up, very often what they're sending me is a URL they want me to look at.

I would rather like it if notifications which contained only a URL had a "Follow" button, like this:



Then I could either dismiss the message, or go and see what they were talking about, without having to switch back to Empathy on the way.

I raised bug 640917 about this today, in case anyone else happens to agree with me that this would be nifty.
marnanel: (Default)
It would be rather useful if there was a PermittedHours field in the .desktop file spec. It would list the hours during which the program could be run. That's not just for kids, it's also for me, in the manner of LeechBlock:

[Desktop Entry]
Version=1.0
Type=Application
Name=Some Program I Use For Work
Comment=But let's say I don't want to be tempted to spend all evening working on it
Exec=foo
PermittedHours=9-17

[Desktop Entry]
Version=1.0
Type=Application
Name=Aisleriot
Comment=And I definitely shouldn't be playing this during work hours
Exec=aisleriot
PermittedHours=0-9,17-23


I wonder how best we could do per-user settings, though.

My idea is to prevent launching the program during those hours. What would happen if the system saw the program was still running when the time had expired, I'm not sure. Maybe nothing, or maybe it would put up a notification telling me I have five minutes to quit or the process gets it.

I know nanny does some of this, but I wonder whether it's generally something that should exist in application launchers.

What do you think? Worth suggesting to them?
marnanel: (Default)
A spot of lunchtime hackery brings you imgur integration v0.4.0, "Stieglitz". Here's the original announcement, in case you'd like the background.

New in this version:
  • Configuration files.
  • A man page.
  • Recording of details of previous uploads, API to check them, and commandline switches to access this API.
  • Details are always printed to stdout, even if the browser is launched.
  • Extra column in stdout details, giving the ID of the whole record.
  • More tests.
  • Bugfixes.
Next version will concentrate on getting Maemo libsharing working, which will be of great interest to some of you and none at all to the rest.

Download the tarball of 0.4.0, or look at the source control.

There is no packaging yet except for Gentoo; thanks to Dean Matzkov for doing the Gentoo packaging. Deb and RPM will follow soon.

Unrelatedly, the planets may like to hear about an awesome review of my storybook.
marnanel: (Default)
Every contact database program I know has a "nickname" field. Today I was thinking that I use the same values in that field for EXIF tags, and what I'd like to see is a plugin (or better, to see it coming out of the box) with a button on each person's contact record. The button would query Tracker, and then launch gthumb or the local equivalent to show images of that person. The button would not display if there were no such images.

Something like this (on Maemo, though the principle is the same for GNOME):

Mockup


(It's interesting to consider whether the plugin should assemble the list and then pass it to gthumb, or whether gthumb should be extended so that it can be passed a switch to display all pictures known to Tracker with a given tag.)

Of course, Tracker also tracks things other than images, so you could also have buttons for wordprocessor documents, emails, and so on. I could do this (in a while, when I have some time); would any of you want it?
marnanel: (Default)
Those of you who pray the Daily Office, and make use of missionstclare.com to do so, and run a free desktop, may be interested in a little script I threw together which downloads the PDFs month by month when required, and displays the correct one for the time and date.
marnanel: (Default)
I have had this sitting half-written in my projects directory for far too long, so I present: Imgur Integration version 0.20. imgur.com is a website which allows you to host arbitrary images without creating an account. This program includes a DBus service which allows posting of images to imgur.com, a command-line interface to the DBus service, and an Eye of Gnome plugin to do the same. It is not an official client, but I have talked to the imgur admins and they are happy about its existence.

So when you open a picture, you have a menu option that uploads it and opens a browser at the right page, with no configuration, thus:

screenshot


You have to turn on the plugin in eog after installation (Edit > Preferences > Plugins > Post to imgur.com). If I package this, I may make it turn on automatically, since it's a little hard to find this.

As originally conceived, it would have also allowed you to use libsocialweb to tweet/dent the resulting URL. I took this out for now because libsocialweb also has API to post pictures, and I wasn't sure how best to do it. There is still a rather useless dependency on libsocialweb. Sorry about that.

eog seems not to look in /usr/local/share/eog/plugins, only /usr/share/eog/plugins. You may therefore have to set --prefix appropriately, or simply copy the files from /usr/local to /usr by hand after installation. Sorry about that, too.

There was a partially-written libsharing plugin for Maemo which used the imgur DBus service, but it's not finished. It could be finished, if people would like it.

Other thoughts on how the program could develop are in the README. You can download the program or look at the source control. This is quite a rough draft. Patches and suggestions are, as always, welcome.

Delicious

Dec. 17th, 2010 01:35 pm
marnanel: (Default)
There has been a lot of fuss about del.icio.us shutting down (along with AltaVista— my goodness, I used that when I was an undergrad. How weird to see it go).

I am worried that someone out there is going to go to all the effort of writing a new del.ici.ous. Or more likely several someones, and all the results will be incompatible. As Mark Pilgrim points out, this is a bad idea. Don't do it.

I'd like to offer a better suggestion. Write something that takes the not-really-XML of the del.icio.us backup format and uploads it line by line to a given identi.ca account. So, for example,

<DT><A HREF="http://www.paulmeier.com/ipa/charts.html" ADD_DATE="1104124425" PRIVATE="0" TAGS="flash,linguistics,phonetics">Flash-based IPA charts</A>

becomes

http://www.paulmeier.com/ipa/charts.html Flash-based IPA charts #flash #linguistics #phonetics

That way
  • you keep your bookmarks somewhere
  • that somewhere runs on free software
  • tags still work
  • you can make feeds
  • you can get daily dumps added to your blog
and so on.  If there's something it can't do, it's far better to do it in identi.ca and then extend identi.ca than to write a whole new site.

The main issue is that the string becomes longer than 140 characters, but there are ways around that.

If anyone writes such a script, let me know and I'll link it here.
marnanel: (Default)
I'm hereby releasing a public beta of robotfindskitten version 2.0 for MeeGo. I've been sitting on it for far too long. This is a complete rewrite in Qt. It's only designed for the netbook; I haven't tested on the handset. It should work fine on the Lenovo machines distributed at the MeeGo conference.

Links:If you lot like this, it will go into the Garage.  There are some issues I still need to consider; let me know what you think:
  • Is it a good reimplementation of Maemo rfk?  Is it a good implementation of rfk in its own right?
  • Is it playable?
  • Are dialogue boxes a reasonable implementation of the popup messages?  On Maemo I used banners (thus), which were perhaps less intrusive.
  • For those of you who know Qt and C++, I would appreciate some code review.
  • On the handset it's still going to vibrate when robotfindskitten.  Do you think it should bleep or something (or miaow) on the netbook?
I think Planet GNOME will be getting this as well because my feed setup doesn't have tags specific enough; I apologise in advance.

Profile

marnanel: (Default)
Monument

January 2022

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 9th, 2025 01:07 am
Powered by Dreamwidth Studios