Saturday, 31 December 2011

The year I was born

  • 0103 Apple incorporated
  • 0104 Pilot of BBC's »The News Quiz« recorded
  • 0525 First Star Wars movie, »A New Hope«, released
  • 0526 »Stop«-Schild introduced in DDR
  • 1005 Inbetriebnahme U8 Osloer Str.
  • 1013 Landshut (Lufthansa flight 181)
  • Lion's commentary on UNIX completed
  • Commodore PET released
  • Planetarium Stuttgart opened
  • Death of Schleyer, Baader, Meinhof and Ensslin
  • Innisfree meteorite recovered in Canada
  • »Der Aufmacher« by Günter Wallraff published

Saturday, 17 December 2011

And now Berlin

Places I've lived, in near-alphabetical order:

  1. Adelaide (10m)
  2. Bristol (10m)
  3. Blaustein (6y)
  4. Stuttgart
  5. Oxford (4y)
  6. Canberra (3m)

If anyone spots a pattern please let me know...

Friday, 9 December 2011

Leaving England

10 things I think I'll miss... in no particular order at all...

  1. Smoke-free pubs serving Real ale and nuts(!)
  2. Supermarkets with online delivery and automatic checkouts to avoid queues, and Post Office queues everywhere else
  3. Great Asian food from take-aways, restaurants and supermarkets
  4. Chocolate Fudge Cakes, Millionaire's Shortbread, Flapjacks, Banoffee Pies
  5. Breakfast rolls!
  6. Frozen croissants for home baking from Redland Village Bakery
  7. Trips to London
  8. Relaxed, casually dressed people
  9. 3's PAYG 3G that doesn't robinson all the time (like Tchibo's) or expire (like O2's)
  10. BBC iPlayer
  11. Scottish call centres (and waiting for things to go wrong just to hear the accent)

Food from Chinese Takeaways in Berlin is appalling, and I can't even find one that serves yellow bean sauce... nor can I find a greasy spoon to satisfy my breakfast cravings. :(

And the English countryside is amazing for cycling! The most beautiful little villages dotted everywhere and rolling hills with hedges and dry stone walls between them.

Wednesday, 7 December 2011

JavaScript debugging

In order to simplify JavaScript debugging, it's useful to have the following code in the [Visualizer] section of Common7\Packages\Debugger\autoexp.dat:

;------------------------------------------------------------------------------
;  JSString
;------------------------------------------------------------------------------
JSString{
 preview ( [$e.mChars,su] )
 stringview ( [$e.mChars,sub] )
 children
 (
  #if(!($e.mLength & JSString::DEPENDENT))
  (
   #(
    [actual members]: [$e,!] ,
    #array
    (
     expr: $e.mChars[$i],
     size: $e.mLength & JSString::LENGTH_MASK
    )
   )
  )
  #else
  (
   ; Dependent strings aren't done yet
   #(
    [actual members]: [$e,!],
    #array
    (
     expr: $e.mChars[$i],
     size: $e.mLength & JSString::LENGTH_MASK
    )
   )
  )
 )
}
;------------------------------------------------------------------------------
;  JSObject
;------------------------------------------------------------------------------
JSObject{
 preview (
  #(
   (void *)&$e,
   " [object ",
   [((JSClass *)($e.classword & ~3))->name,s],
   "]"
  )
 )
 children (
  #(
   #(#(#(
   [actual members]: [$e,!],
   #if ($e.fslots[0])
   (
    #(prototype : (JSObject *)($e.fslots[0] & ~7))
   )),
   #if ($e.fslots[1])
   (
    #(parent : (JSObject *)($e.fslots[1] & ~7))
   )),
   #if (((JSClass *)($e.classword & ~3))->flags & 1)
   (
    #(private : (void *)($e.fslots[2]))
   )),
   #(class : (JSClass *)($e.classword & ~3))
  )
 )
}

Thursday, 13 October 2011

Late influential people

An intentionally incomplete list of influential people who died during my lifetime:

  • 19770816 Elvis Presley
  • 19780319 Gaston Julia
  • 19911124 Freddie Mercury
  • 19951218 Konrad Zuse
  • 19961120 Paul Erdős
  • 20010224 Claude Shannon
  • 20010511 Douglas Adams
  • 20010729 Wau Holland
  • 20031112 Johnny Cash
  • 20060707 Rudi Carrell
  • 20061230 Saddam Hussein
  • 20071029 Itojun
  • 20080305 Joseph Weizenbaum
  • 20080519 Arthur C Clarke
  • 20090625 Michael Jackson
  • 20101014 Benoît Mandelbrot
  • 20110502 Osama bin Laden
  • 20110723 Amy Winehouse
  • 20110822 Vicco von Bülow
  • 20111005 Steve Jobs
  • 20111008 Dennis M Ritchie
  • 20111122 Georg Kreisler
  • 20160421 Prince
  • 20160110 David Bowie
  • 20161107 Leonard Cohen

Monday, 10 October 2011

Saving AllThingsD videos

I think Walt Mossberg's interviews with Steve Jobs at D1, D2, D3, D5 (with Bill Gates) and D8 are historically tremendously interesting. So I wanted to archive them myself which turned out to be a bit difficult as the Wall Street Journal has gone to quite some effort to make sure the normal video downloading tools don't work.

I ended up getting the RTMP URLs by installing Replay Media Catcher which shows URLs like rtmp://cp49988.edgefcs.net:1935/ondemand/74940/?ovpfv=2.1.4<break>video/20100502/040210atdjobsatd1/040210atdjobsatd1. The free trial version of this software only downloads the first half of any streams, so I wanted to use MPlayer to download the entire streams which I knew supports RTMP.

However, the URL is strange where it contains the odd <break> indicator which I didn't know what to do with. Googling around pointed me at RTMPDump which has separate options for the different components of the RTMP URL. The solution turned out to be the following command:

$ rtmpdump \
 -r 'rtmp://cp49988.edgefcs.net:1935' \
 -a 'ondemand/74940/?ovpfv=2.1.4' \
 -y 'video/20100502/040210atdjobsatd1/040210atdjobsatd1' \
 -o 'steve-jobs-d1-2003.flv'

Just to make sure, I'll also archive versions converted to MP4 using

$ ffmpeg \
 -i steve-jobs-d1-2003.flv \
 -qscale 5 -acodec copy \
 steve-jobs-d1-2003.mp4

Tuesday, 23 August 2011

Blackberry and Elderberry jellies

A year on and it's jelly-making time again!

This time, I used recipies from the book "The right way to make jams" by Cyril Grange Frhs.

On Saturday, I picked 2.5kg of blackberries and 750g of elderberries (with stalks). I also bought 1.6kg of Bramley apples.

The book suggests to add 25% of water to blackberries, and 50%-100% of water to the elderberries and apples (depending how you read the recipe). After boiling for 1h, I ended up with 2.0l of blackberry juice, 820ml of elderberry juice and 1.0l of apple juice.

The recipies I decided to make were:






Source Fruit Apples Sugar (per juice) Juice of lemons (per litre) Bottles of Certo (per litre)
Blackberry Apple TRWTMJ 75% 25% 75% - -
Blackberry Apple Certo 40% 60% 170% 1/3 1/2
Elderberry Apple TRWTMJ 50% 50% 75% - -
Elderberry Certo 100% - 230% 3/4 1.5
To convert weights into volumes, I measured the specific weight of fruit juice at 1.01kg/l.

Strictly, the juice from 833g of apples was for the blackberries and the juice from 750g of apples for the elderberries, equating to 520ml of juice for the blackberries and 480ml for the elderberries, but I ended up adding 655ml to the blackberries and only 345ml to the elderberries. I now had 2.7l of blackberry/apple mixture and 1.2l of elderberry/apple mixture. The pectin tests using methylated spirit for these mixtures were positive as far as I could tell.

The mixtures and respective results I ended up with are:









Batch Juice Sugar (per juice) Juice of lemons (per litre) Bottles of Certo (per litre) Result
Blackberry apple B1 1.3l 75% - 1/5 6 jars, set perfectly
Blackberry apple B2 670ml 150% 3/4 3/4 3 jars, set firmly
Blackberry apple B3 700ml 75% 3/4 3/4 3 jars
Elderberry apple E1 1.2l 75% - 1/5 4 jars, didn't set
Elderberry apple E2 600ml 205% 3/4 - 3 jars, set gooey
Elderberry apple E3 600ml 75% 3/4 3/4 2 jars, didn't set
Elderberry apple E4 600ml 125% 3/4 3/4 3 jars

Batches B1, B3, E1 and E2 were boiled rolling for 12 minutes after adding the sugar as instructed in TRWMTJ. Batches B2 and E3 were brought to boiling after adding lemon and sugar and boiled rolling for 30 seconds to 1 minute after adding the Certo, as stated in the Certo recipes.

Next time, I'd like to use a strategy where I make a small amount first to verify the properties of the fruit and all ingredients.

I'd also like to try extracting the juice from the berries and apples together as described by the blackberry and apple recipes in TRWTMJ and Certo, rather than separately (as prescribed by the elderberry/apple recipe in TRWTMJ). I should also experiment with adding lemon juice, pith or whole lemons at the start of the juice extraction.

Wednesday, 9 February 2011

Profiling SpiderMonkey in gecko-1.9.2

I've had a few problems trying to build a profiling version of SpiderMonkey from gecko-1.9.2 on OS X.

First, in order to build SpiderMonkey at all on OS X 10.6, it's necessary to pick GCC 4.0 because the standard GCC 4.2.1 can't build it.

$ CC=gcc-4.0 CXX=g++-4.0 ../configure --enable-optimize --disable-debug

Then, in order to turn on the profiling support, the -pg flag must be passed to the compiler and linker:

$ CC=gcc-4.0 CXX=g++-4.0 ../configure --enable-optimize="-O3 -fstrict-aliasing -pg" --disable-debug

Finally, to stop the resulting JS shell from instantly crashing, __attribute((fastcall)) needs to be turned off in jstypes.h, jsdhash.h and nanojit/avmplus.h.