Archive for the 'apple' Category

First production <video> tag support lands… without Ogg support

Tuesday, March 18th, 2008

So, Apple pushed out Safari 3.1 for Mac and Windows today, which adds support for the HTML 5 <video> tag… unfortunately, without native Ogg support. :(

Fortunately, it uses QuickTime as the backend, so if you have the XiphQT plugins installed, it will play Ogg Vorbis and Theora files. Yay!

Filed two three bugs for our video plugin detection on Safari…

Wikipedia local search?

Saturday, March 8th, 2008

iphone-search.png

So, the other day Apple finally got round to releasing the iPhone SDK… While there may still be issues with the licensing and distribution, I’m at least intrigued about the possibilities of location-based searches — using the device’s knowledge of its physical location to search for articles about nearby places.

For kicks, I spent a few hours of my spare time prototyping a location-based Wikipedia search, with the interface optimized for a device like the iPhone.

I’m using a copy of the Wikipedia-World database, which has pulled coordinate data out of articles and linked them up via interwiki links. Results within an approximately ~20-30km range are sorted by distance and optionally filtered by text, then spit out in a list with little thumbnails.

Links are currently to the experimental WAP gateway, which tends to load rather faster over a slow connection and has nice big text. ;)

A small iPhone native app could pull up the device’s location, then pass it off to a web application like this (or present a similar list in native UI).

This does raise some questions to consider…

  • What are the privacy implications of getting people’s physical locations in addition to just their IP addresses? Would we have to update our privacy policy? How should we log or aggregate data for debugging and statistics purposes?
  • Do Wikimedia’s open-source software policies conflict with the various restrictions on software distribution for locked-down devices like the iPhone?

Update 2008-03-21: While we’re still waiting for Apple to let us into the beta program for official development, some enterprising individual has made an unofficial app for this which should install on jailbroken phones.

Case-insensitive OpenSearch

Wednesday, January 30th, 2008

I did some refactoring yesterday on the title prefix search suggestion backend, and added case-insensitive support as an extension.

The prefix search suggestions are currently used in a couple of less-visible places: the OpenSearch API interface, and the (disabled) AJAX search option.

The OpenSearch API can be used by various third-party tools, including the search bar in Firefox — in fact Wikipedia will be included by default as a search engine option in Firefox 3.0.

I’m also now using it to power the Wikipedia search backend for Apple’s Dictionary application in Mac OS X 10.5.

We currently have the built-in AJAX search disabled on Wikimedia sites in part because the UI is a bit unusual, but it’d be great to have more nicely integrated as a drop-down into various places where you might be inputting page titles.

The new default backend code is in the PrefixIndex class, which is now shared between the OpenSearch and AJAX search front-ends. This, like the previous code, is case-sensitive, using the existing title indexes. I’ve also got them now both handling the Special: namespace (which only AJAX search did previously) and returning results from the start of a namespace once you’ve typed as far as “User:” or “Image:” etc.

More excitingly, it’s now easy to swap out this backend with an extension by handling the PrefixSearchBackend hook.

I’ve made an implementation of this in the TitleKey extension, which maintains a table with a case-folded index to allow case-insensitive lookups. This lets you type in for instance “mother ther” and get results for “Mother Theresa”.

In the future we’ll probably want to power this backend at Wikimedia sites from the Lucene search server, which I believe is getting prefix support re-added in enhanced form.

We might also consider merging the case-insensitive key field directly into the page table, but the separate table was quicker to deploy, and will be easier to scrap if/when we change it. :)

Mandatory Apple reactions

Tuesday, January 15th, 2008

Like every other Apple fanboy, of *course* I have to post my reactions to the MacWorld announcements…

iPhone updates: Firmware updates are welcome, but nothing earth-shattering.

AppleTV movie rentals: Potentially very cool… The price point is about even with going to a BlockBuster store without having to get off your ass. I will say though I’ve gotten pretty comfortable with Netflix’s flat monthly fee and huge selection.

Limited selection for TV is the reason I haven’t used my AppleTV much in months except for playing music in the living room… My shows are available on iTunes, but half of my lady’s aren’t, so we ended up getting cable.

If the selection’s decent and downloads actually *do* start “in seconds”, the new AppleTV software should be perfect for spur of the moment rentals, but if we’re already paying a flat fee for Netflix I don’t have much incentive to use it frequently… unless I have to see something *now* I can put it on my queue and wait.

I’m assuming of course that the software update will come for older AppleTV units…

MacBook AIR: A year or two ago this would have been the answer to my prayers — the fairly compact form factor of the MacBook, while thinner and lighter than my first love, the PowerBook G4 12″. I’m a bit leery of the lack of an optical drive and losing some of the wired ports, but it’d make a great travel / conference / meeting machine and everything but the FireWire can be replaced with USB extras for “what do you mean, there’s no WiFi?” emergencies.

I have the suspicion though that the iPhone’s going to eat up a lot of my computer-on-the-go requirements; it’s already got mail and web, and an official SDK should let us see extra apps come in (chat, organizers, games ;) that lessen the need to lug a laptop around town.

Seeing Apple lurch towards solid-state drives is verrrrrrrrry exciting, but the cost is still high and the capacities too small for a primary-use computer (my iPhoto or iTunes libraries *each* would fill the optional 64GB SSD, and they’re only going to get bigger).

Now if we can just get the pervasive connectivity that the iPhone delivers built in to the laptops…

Sweeeet

Tuesday, January 15th, 2008

Hadn’t noticed this before… on Leopard, when you do a window screenshot (command-shift-4, space) it now captures the window’s drop shadow over a transparent background.

Shadow! Shit yeah

That’s pretty cool for demo screenshots; I used to use temporary white backgrounds and capture an area around the window manually, but this is way prettier. :D

Leopard Spotlight

Saturday, January 5th, 2008

Spotlight keeps deciding it has to index my external hard drive all over again. Is this going to happen every time I reboot? Or is it just because I almost never have to boot unless I’m recovering from a crash or power outage?

Sigh. At least it lets me search the internal drive while it’s doing it.

Leopard thoughts

Monday, December 31st, 2007

So since I’ve got an iMac with Leopard sitting around in my home office, I figured I’d try actually using it for a while. My impressions so far:

Spotlight: YES! Searching actually seems to work at a reasonable pace so far. Seems to be nicely replacing Quicksilver as an app launcher.

Terminal: YES! Tabs and an integrated SSH agent? I’m sold! Won’t need SSHKeychain anymore.

Spaces: meh Turned it on, haven’t really used it yet.

Finder: meh The new icons are uglier. “Cover flow” for documents seems pretty useless, though vaguely amusing for the ol’ porn folder. ;)

The Dock: meh Its uglier, but who cares? I only see it when I’m actively clicking something on it.

iCal: meh The detail drawer is gone, replaced with annoying popup thingies. Suckage. Update: The new iCal is a fricking disaster. Trying to see or edit details of events is basically impossible. Extra clicks, popups obscuring your view, lack of feedback while changing dates. Someone needs to be shot.

Boot Camp: meh I gave up on dual-booting years ago in my Linux days. Virtualization for the win!

Mail, iChat, Safari: No terribly interesting changes.

Time Machine: haven’t touched it yet.

Wikipedia on Leopard

Friday, December 28th, 2007


The Dictionary.app included in Mac OS X 10.5 has support for making lookups to Wikipedia, optionally in various languages.

The actual display of articles seems to be done by loading the page out of the live Wikipedia and doing some custom filtering of it. This isn’t documented to us, so I hope we don’t break it by mistake!

The searching is done via a relatively simple REST protocol to do title-prefix searches as type-ahead suggestions.

Some Apple engineers whipped up a little index search using the DARTS C++ library, with a PHP wrapper extension around it for web output. The results are wrapped in some simple HTML, pretty straightforward to handle.

Once production finally rolled out, though, we encountered some problems:

  1. The number of page titles in the system has increased to the point where a complete index for all languages barely fits in memory on a 32-bit box. I had to break the index in two (English and non-English) just to get it to generate.
  2. Performance was spotty, sometimes mysteriously hanging up for several long seconds. I suspect this is due to the huge indexes loaded in memory; every once in a while something decides to swap.

I finally got my hands on a copy of Leopard to confirm I wasn’t breaking the client, so it’s time to see what I can do…

Rather than investing more resources into the DARTS indexer, I figured I’d see if we can roll this back in with our existing tools to make it easier to maintain.

We already have a type-ahead suggestion backend, which is used for our OpenSearch interface. If you’re running Firefox 2.0 or later you can pull up the ‘Wikipedia’ search and try it out.

I did some quick testing and confirmed that it was pretty easy to make a translator that would query the OpenSearch suggestion API and format results for the Apple widget; I just had to add a limit option, then a simple re-query and wrap the results.

On my quick benchmarking, performance at least isn’t any worse, and seems to be more consistent so far and gives up to date results — no waiting for the next index generation.

The one big problem right now is that our suggestion search is case-sensitive, since it pulls directly from the binary-collated page title columns in our core database. That’s a minor annoyance except that the Dictionary app sends us queries which have been forced to lowercase — so you can’t easily reach titles with caps past the first letter.

Guess it’s time to bring back the title key field and get that working properly so I can switch in the new version…

Mac v Linux

Monday, October 1st, 2007

I first switched to the Mac in ‘03 after a few years of being a mostly Linux/BSD guy. Aside from the ability to test Wikipedia in Mac browsers, I was drawn by the oh-so-cute factor of the 12″ aluminum PowerBook and more importantly the way it actually was able to detect its included hardware and attached monitors. ;)

Four years later, desktop Linux is better than ever but still tends to fall down and wet itself when doing things like configuring a multimonitor configuration or installing Flash and Java plugins in 64-bit mode. I’d be afraid to even try it on a laptop without knowing that sleep/wake and external monitor hookup work properly on that exact model.

But when I switched I promised myself I would retain my freedom to switch back. Today I’m using a Mac laptop and a Linux desktop together in the office; if I wanted to switch 100% to Linux, what would I need to change?…

Mac app Linux app
Firefox Ahh, open source. :)
Thunderbird
Gimp
NeoOffice OpenOffice
TextMate / BBEdit gedit? jEdit? Eclipse? I haven’t really been happy with *nix GUI editors. Emacs is not an acceptable option. ;)

I need a good project-wide regex search/replace, good charset support, ability to open & save files over SFTP, and syntax highlighting/sensitivity that doesn’t interfere with my indenting.

Being easy to load files from a terminal and not sucking are pluses.

Yojimbo Tomboy? I use Yojimbo constantly for notes, scratch space, web receipts, chat snippets, todo lists, reference cheat sheets, anything and everything.

Simple as it is, I love this app! The closest thing I’ve used on *nix is Tomboy, but it doesn’t feel as smooth to me. I’ll just have to fiddle with it more… figuring out how to import all my existing data would be another issue.

QuickSilver Gnome desktop launcher? I’ve found QuickSilver invaluable for launching various apps… I used to switch to Terminal and run ‘open -a Firefox’ and such. ;) I think the new launcher which will be included with Ubuntu Gutsy will serve okay on this, though I haven’t tried it.
Keynote OpenOffice Impress Wonder if it’s got the nice preview-on-second-screen that Keynote does.
Parallels VMWare Workstation Already use this on my office Linux box.
iChat Pidgin Been using Pidgin a bit on my Linux box in the office; it’s pretty decent these days.
Colloquy XChat-GNOME Kind of awkward, but I haven’t found an IRC client I’m happier with on *nix.
Google Earth Google Maps I haven’t had any luck getting the Linux version of Google Earth to run on my office box, but the web version is usually fine.
iTunes RhythmBox I’d have to strip DRM from my iTMS tracks, but that’s certainly doable. Don’t know whether it’ll be able to sync with an iPhone, though. ;)
iPhoto F-Spot I took a quick peek on the F-Spot web site and was surprised to find nothing about importing from iPhoto. Should be doable; the photos are all just JPEGs and the metadata’s in some kind of XML last I looked.
NetNewsWire ? I haven’t found a good RSS reader on *nix yet.
iCal Evolution calender? Sunbird? I guess I could use Google Calender, but it’s kind of nice to have something that works locally.

The biggest lapse if I switch at home would be in the video editing / multimedia end of things, which I dabble in sometimes and keep meaning to get back into more. I’m pretty happy with the Apple pro apps (Final Cut, Motion, etc), and there’s not really much touching that in Linux-land.

iProduct vs Veronica Mars

Saturday, April 7th, 2007

So I finally gave in and picked up an Apple TV unit; that frees up my Mac Mini from TV duty to be my main home computer, while letting the Apple TV concentrate on being a media player.

The good: unit is very compact, setup is pretty straightforward, and picture looks good once I adjust the ungodly color saturation my TV defaults to on the component input.

The bad: at least for the shows I tested (Veronica Mars season 3), video playback is totally broken at HD resolutions!

At 720p playback stutters very badly, with very jerky motion and sound out of sync from picture by about a second.

At 1080i I don’t even *get* picture during playback, just sound. (Menus display fine.)

At 480p everything looks great, though, and the currently available content doesn’t need more than that, so I’m leaving it there for now.

A quick Google scan doesn’t show any other obvious complaints of this problem, so I’m not sure if I’ve got a bogus unit or if it’s something funky with the Veronica Mars encoding that might not be a problem with other shows…

Update: At some point it started working fine. *shrug*


I love Wikipedia!