April 2012
1 post
March 2012
6 posts
Uploading and deleting from flickr
I’ve now implemented uploading and deletion of pics. It’s now pretty
complete:
horizon% cp /tmp/glenda.jpg /n/flickr
horizon% page /n/flickr/glenda.jpg
reading through graphics...
horizon% rm /n/flickr/glenda.jpg
horizon% ls /n/flickr/glenda.jpg
ls: /n/flickr/glenda.jpg: '/n/flickr/glenda.jpg' file not found
Current limitations:
Upload expects jpg
Does not detect presence of...
Read and rename implemented for flickrfs
I have implemented reading and renaming in my flickrfs server.
Example session:
horizon% 8.flickrfs
horizon% cd /n/flickr
horizon% page scan0001.jpg
reading through graphics...
horizon% mv scan0001.jpg 2cv.jpg
horizon% ls 2*
2cv.jpg
horizon%
This sets the title of the image (previously scan0001) to 2cv. This
is verifiable via the web interface. UTF-8 works fine:
horizon% mv scan0006.jpg...
Towards a 9p flickr server
One of the web services I use reasonably frequently is
flickr where I like to show my amature photos. Up until now
I’ve just been using the web interface to upload my images. It is
however really slow and I hate all the clicking, so I thought a 9p
fileserver for flickr would be useful for me. Also, I’d like to be
able to sync my playbook with flickr and having both mounted...
When's my next train?
After living on local solar time for a couple of days I can say that
it’s much better than the ridiculous daylight saving time. As the sun
rises at the proper time (around 6am) it is much easier to wake up and
get going. Another (side) benefit is that public transport is less
crowded as peak hour is naturally avoided.
However, catching trains is more difficult as it requires much...
What time is it?
Today we shifted to daylight saving time and I lost 1 hour of sleep.
I didn’t notice for a while as most of my clocks correct
automatically, and when I finally noticed I was disappointed. I don’t
like daylight saving time as I feel it’s disruptive and does not lead
to the purported energy saving benefit. Furthermore, I already think
Paris is offset too far from local mean time,...
Postscript quines
I’ve just learnt postscript and thought I’d amuse mysef by trying to write some quines. Here’s one console quine:
{(pstack exec) =}
pstack exec
and one using the graphical device:
<< /PageSize [5000 20] /Orientation 0 >> setpagedevice /Courier
findfont 18 scalefont setfont 0 4 moveto /l {( ) dup 0 40 put
show} def /r {( ) dup 0 41 put show} def /quine {dup show...
November 2011
1 post
Cache oblivious matrix multiplication with Hilbert...
A well known problem in computer science is how to do matrix multiplication. Usually, matrices are stored in memory in either row-major or column-major format, i.e., matrices are stored sequentially in either row order or column order. The conventions vary a little, for example Fortran uses column-major and C uses row-major, but the differences between the two are mostly notational and they both...
September 2011
2 posts
Installing cyanogenmod on HTC Desire
To install inferno on android you need a rooted phone. Since the inferno guys use cyanogenmod I thought I’d load that up and go from there. In any case, I was running Frozen Yoghurt and not Ginger Bread so my phone was out on date anyway.
I found some overly complicated instructions on the cyanogenmod wiki that provided a starting point. The process is much simpler if you load up the...
Inferno for android
It’s been a while since my last blog post, time to get back into it with something small. Over the weekend there was a lot of traffic on the 9fans mailing list about a port of Inferno to android. The port replaces the whole Java machinery instead of running on top of it. The video demonstration looks quite snappy, I’m tempted to install it on my HTC desire and have a play.
July 2011
1 post
4 tags
Controlling GPU temperatures
I’ve recently taken possession of two ATI 6990 graphics cards for the purposes of GPU computation. A few days ago, Paris had a “heat wave” where the temperature reached around 37°. As my apartment does not have any airconditioning, I was worried for the life of my GPUs, especially as they’re overclocked.
My solution was to run the fans at 100% and to hack up a quick...
March 2011
4 posts
3 tags
S3Venti port
In an earlier post I discussed using Amazon S3 as a venti block server for backup using the s3venti code of Richard Bilson. This code was written for plan 9 port and not for a native plan 9 installation. Now that I use plan 9 almost exclusively, I wanted to run the s3venti server from plan 9. Thus I ported it:
The patch is for Richard’s code found on sources in contrib/rcbilson/s3venti....
Adjusting image contrast
I wanted to do some simple image manipulations under Plan 9 for my photographs. I don’t like to edit my images much and prefer to keep them close to what the camera produces. Thus, I don’t really need many operations, only resizing and image contrast enhancement. The former is already available in Plan 9 with the resample program, but I couldn’t find anything to do the...
5 tags
Plan 9 CPU server on a floppy
One of the nice things about Plan 9 is that it has separate cpu, auth, and file servers. This means it’s possible to have a diskless CPU server for running numerical stuff that connects to a remote auth and file server. This quite a useful case for me, as I can for example quickly setup any machine as a CPU server and use it to run my numerical code off my file server. I’m going to...
4 tags
Dealing bridge hands
Last night I wrote a little program to deal random bridge hands. It does a Knuth shuffle using /dev/random as the RNG, sorts each player’s hand, and then prints them out. It can either pretty print the hands or output in PBN. It’s not terribly fast due to /dev/random, which is limited to a few hundred bits a second, but consequently it should generate pretty good deals.
It’s...
February 2011
4 posts
4 tags
Café à l'eau froide
Je viens d’écrire un article sur le café à l’eau froide, une nouvelle technique pour préparer le café qui a des caractéristiques intéressantes. L’article explique ce que j’ai fait pour faire le café en utilisant l’aeropress et présente d’ailleurs mes réfections sur la méthode en général.
4 tags
Hosting venti arenas on Amazon S3
I’ve been using Amazon’s S3 storage service for some critical backups. Namely these are things I think are worth having an off-site backup for in case of fire/theft/stupidity, such as my collection of photos (I don’t backup scans as they are too big, and I can scan them again probably). I started off using s3fuse for accessing s3 buckets, and this worked ok. Sadly, it does...
4 tags
Aligning time-series
Recently I wanted to align some time-series data recently for plotting. I couldn’t find some library function in R to do it for me (actually I did, but they involved stuffing around with special time series objects instead of vectors), and the problem was interesting anyway so I wrote something myself. The idea is to find the offset using cross-correlation and then do a phase shift to...
2 tags
Script for creating p9p venti stores
Recently I wanted to setup a venti server backed by a USB disk drive. The drive already has a filesystem so I didn’t want to repartition it (resizing XFS is a pita), and in any case running venti from files has some advantages. It isn’t completely trivial as the arenas, log, and bloom filter spaces have to all be created manually. I found a script on the internet, but it...