I went to the British Museum yesterday to see Hadrian: Empire and Conflict, which was pretty good. I booked online, and received the confirmation email below. I turned up at the museum, went to a self-checkin kiosk and it asked me for my order confirmation code. So what did I type in?
I was going to write about how I have come to love Moose, but I can't really beat how John Napiorkowski explained it on the perl-appengine list: "Without Moose, I'd probably have lost the faith and left Perl for another language..."
I was microoptimising. I admit it. I was trying to get a little bit of code which read a part of a file going quickly, and I got slightly sidetracked. I noticed that PerlIO had layers, so I played around with the layers and benchmarked things. I noticed that :stdio was quite fast for my one test case, so I compiled a new Perl with ./Configure -des -Uuseperlio -Dprefix=/home/acme/perl-5.10.0-stdio/ to ignore PerlIO and use stdio instead, then benchmarked things (didn't really help). I eventually thought about using unbuffered IO, and noticed that it was much faster than all the others. Aha! I suddenly remember about buffered and unbuffered IO. Buffered IO using seek, read, and write is very handy when reading or writing the whole file. If you are actually doing random access in files then you should use sysseek, sysread and syswrite, doh!
search.cpan.org is a pretty useful website for searching CPAN. Unfortunately sometimes I am not online. Sometimes I am online but have very spotty access. You can't run search.cpan.org locally as it is closed-source. I've been annoyed about this in the past, errr, seven years now, but haven't quite figured out the proper solution. Now I have: let me announce to the world CPAN::Mini::Webserver.
You must create a minicpan with CPAN::Mini. Then install the module and simply run minicpan_webserver. This finds out where your minicpan lies, reads some indexes from it, and starts a web server. Through the web interface you can search for authors, distributions and packages, browse distributions by author, browse files in a distribution, see the documentation of any file and see syntax-highlighted Perl code. All while offline. Try it out now!
It works well enough, but I have some more plans. Let's have a BoF about it at YAPC::Europe in Copenhagen. Tell me what you think, Léon.
SIGGRAPH 2008 happened last week and here are some of the papers that I particularly like:
- Programmable Aperture Photography: Multiplexed Light Field Acquisition - all about capturing light fields on a standard camera
- Motion-Invariant Photography - deblurring photographs by intentionally blurring them
- Face Swapping: Automatically Replacing Faces in Photographs - also useful for group photos
- Simulating Knitted Cloth at the Yarn Level - knitting
- Finding Paths through the World's Photos - user-generated flyarounds?
- Improved Seam Carving for Video Retargeting - more on Seam Carving for Content-Aware Image Resizing
- Structure-Aware Halftoning - sketching
- Surface Depth Hallucination - getting a textured high field from the same shot with and without flash
- Self-Animating Images: Illusory Motion Using Repeated Asymmetric Patterns - by far my favourite
This quarter's Perl Foundation Grant Proposals have been announced. Some of them are quite interesting, but we need to know which ones you like so we know which to approve - please have a read and leave questions and comments.
It used to be that you had to dig around in forums to check if Amazon S3 or EC2 had problems. How things have changed: Amazon Simple Storage Service (US) Event: July 20, 2008. Mental note, once I have thousands of servers I should check out gossip protocols.
My, weddings and honeymoons are fun. Anyway, previously I've mentioned "Protocol Buffers" in the context of Facebook's Thrift, which is a reimplementation. "Protocol buffers are now Google's lingua franca for data". Well, Google finally went ahead and open sourced their Protocol Buffers implementation. It's a neat little way of encoding structured data (think XML or ASN.1) in C++, Java and Python and there is work on implentations for other languages (including Perl). Good writeup. Keep on eye on them.