Fazal Majid's low-intensity blog

Sporadic pontification

Fazal Fazal

Diminishing returns

I have an eight-core Nehalem Mac Pro. Most of these cores sit idle most of the time due to poorly written software that is not optimized for the post-Moore multicore world.

I am beginning to wonder if Intel’s transistor budget wouldn’t be better allocated to more SRAM cache instead of more cores. One SRAM bit uses up 4 transistors, the Xeon 5500 have 751 million transistors, of which 8Mx8x4 or 256 million are for the 8MB L3 cache. If the chip were brought down from quad-core to dual-core, that would allow doubling the cache. Many programs could run entirely from cache, including interpreters.

Amano Ocumare Milk

Amano Ocumare DarkAmano, based in Salt Lake City, makes the best chocolate in the USA, their Ocumare bar, using only Venezuelan criollo cacao (the best in the world).

art_pollardThe founder, Art Pollard (photo taken 2 years ago at Fog City News in San Francisco) claims he gets superior results from roasting at high altitude in Salt Lake City, but I think superior conching technique is primarily to credit.
They recently introduced milk chocolate bars, the Jembrana and Ocumare. Despite its lovely green wrapper, the Jembrana leaves to be desired — it just doesn’t taste chocolatey enough. The Ocumare Milk comes through with wonderful texture, a rich, complex cocoa flavor while avoiding over-sweetness, the downfall of too many milk chocolates, specially in the USA.
It also avoids the harshness of some bars made by chocolatiers new to the world of milk chocolate — the abysmal Scharffen-Berger 68% cocoa “dark milk” bar comes to mind.

Amano Ocumare MilkAmano Jembrana Milk

Mozilla Weave

Mozilla Weave is a project of the Mozilla Labs to build synchronization of bookmarks, tabs, passwords and so on between multiple instances of the Firefox browser. It used to be a private beta, but with the release of version 0.4 recently, it has been opened up to the general public.

Where version 0.2 was pretty rough, 0.4 actually works quite well, even if it is not yet feature complete. Bookmarks and passwords are handled just fine. Furthermore, you can set up your own server, all that is needed is PHP. Previous versions required WebDAV support, and the WebDAV module in nginx is not functional enough for Weave (or anything else, for that matter).

The first synchronization is painfully slow, but once it is done, later synchronizations are essentially instant. When combined with the Awesome bar’s tagging components, it has completely supplanted Del.icio.us for my bookmarking needs (I never liked the rewritten user interface).

Thomas Pink weave cufflinks

Amusingly, I came across these cufflinks at Thomas Pink in San Francisco last Friday — they are the mirror image of the Weave logo.

Thomas Pink weave cufflinks

Below are the relevant sections of my nginx config.

php.ini

magic_quotes_gpc = Off
session.auto_start = 0
file_uploads = On
error_reporting = E_ALL & ~E_NOTICE
allow_url_include = Off
allow_url_fopen = Off
session.use_only_cookies = 1
session.cookie_httponly = 1
expose_php = Off
display_errors = Off
register_globals = Off
disable_functions = phpinfo
error_log = /home/majid/web/logs/php_error_log

nginx.conf

root /home/majid/web/html;
location ~ .php$ {
  auth_basic		"gondwana";
  auth_basic_user_file	/home/majid/web/conf/htpasswd;
  fastcgi_pass		127.0.0.1:8888;
  fastcgi_index		index.php;
  fastcgi_param		SCRIPT_FILENAME  /home/majid/web/html$fastcgi_script_name;
  include		/home/majid/web/conf/fastcgi.conf;
}
# Mozilla Weave
rewrite ^/weave/admin$	/weave/admin.php;
location /0.3/api {
  return		404;
}
location /0.3/user {
  fastcgi_pass		127.0.0.1:8888;
  fastcgi_index		index.php;
  include		/home/majid/web/conf/fastcgi.conf;
  fastcgi_param		SCRIPT_FILENAME	/home/majid/web/html/weave/index.php;
  fastcgi_param		SCRIPT_NAME	/home/majid/web/html/weave/index.php;
  if ( $request_uri ~ "/0.3/user/([^?]*)" ) {
    set $path_info	/$1;
  }
  fastcgi_param		PATH_INFO	$path_info;
}

fastcgi.conf

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx;

fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

Olympus E-P1 hands-on impressions

I had the opportunity to handle an Olympus E-P1 camera at Keeble & Shuchat in Palo Alto. There has been quite a bit of excitement on sites like Rangefinder Forum and many were expecting this to be the first pocketable camera that could compete with SLRs in image quality.

The Sigma DP1 and DP2 were actually the first cameras with large sensors and reasonable pixel counts, bucking the marketing-driven trend towards too many pixels squeezed onto too small a sensor chip, with horrible noise as the result. I own both, and their image quality is indeed stunning, but they have one Achilles’ heel — speed, or the lack thereof.

The E-P1 is very compact, almost the same size with the 17mm as the Sigma DP2 (some photos released suggested it was closer to the Leica M8). The build quality is fine, and it is nowhere near as heavy as some early users suggested it was. They probably compared it to a plastic fantastic compact rather than a more substantial camera like a Leica or a DSLR.

I was surprised to find the 17mm AF hunted quite a bit, overshooting and then backtracking. Oddly, it did this even on the next shot when the lens was already in focus. I don’t know if this is specific to the 17mm lens, but it is certainly not encouraging.

From my test shots, I was also distinctly unimpressed by the optical quality of the lens, or the noise performance at ISO 1600. The Four-Thirds and Micro Four Thirds formats are hobbled by sensors one half the size of the APS-C used in most entry-level DSLRs, with predictably higher levels of noise and limited dynamic range. I had to go back to 2003 and my then Canon EOS 10D to find similar levels of noise. The Canon Rebel XT was definitely superior in high-ISO performance, let alone current SLRs. Olympus fanboys seem to be in denial about the limitations of Four-Thirds sensors, but you cannot fight against physics and expect to win.

The other disappointing thing about the 17mm lens is that it is not particularly sharp, specially for a prime lens of relatively modest maximum aperture. The pictures were nowhere near as crisp as the lovely Sigma lenses on the DP1 and DP2. This is all the more a let-down as Olympus was renowned for the quality of its miniaturized prime lenses in the days of the ground-breaking OM system. I wasn’t expecting Pentax SMC Limited pancake lens levels of performance (we are talking of a lens one third the price, after all), but there is no point in having 12 megapixels (at least 6 too far in my book) if the lens can’t actually exploit them.

I had preordered an E-P1 with the 17mm kit lens and viewfinder from Amazon. After handling the E-P1 and taking a few test shots, I canceled my order.

@font-face embedding

I updated my wife’s home page to use embedded fonts (in this case the Fonthead GoodDog typeface for headings) with the @font-face CSS primitive. With the introduction of Firefox 3.5, all the major browsers now support embedded typography.

As usual, Microsoft had to do its proprietary thing in Internet Exploder and devised a crackpot font format called EOT (Embedded OpenType), ostensibly at font foundries’ request, with weak DRM-like metadata that allows the font supplier to restrict which sites the font can be used on. Microsoft has an incredibly convoluted tool called WEFT (Web Embedded Font Tool) to do this, but I used the open-source and incredibly easy to use ttf2eot tool instead. The only hitch in this case was that this tool takes a TrueType TTF font as input, and GoodDog is a (PostScript-ish) OpenType OTF instead. Fortunately, TypeTool can do the conversion.

We finally have semi-decent typography on the web without having to embed images (bad for page load times or accessibility) or the even worse sIFR hacks using the noxious Adobe Flash. The only question remains whether type foundries will follow. Fonthead has enlightened licensing policies for GoodDog (free for up to 5 sites, no insistence on DRM). Typeface design is a painstaking craft and designers certainly deserve what they charge for their fonts, but I hope the typographic industry does not follow the RIAA in its self-destructive crusade against its own customers.

Update (2011-03-03):

One option for hassle-free embedded font licensing is TypeKit. It does require JavaScript in the browser to work, unlike a pure CSS solution like the one I used, but the convenience can’t be beat. We use it on Apsalar’s public website.