2007-06-03

Rosemary's, Mac King, and Spamalot

We just returned from a short jaunt to that great blinding spot in the desert, Los Vegas. The trip was designed to let us stuff ourselves silly, and see some silly shows. It was a complete success.

We had a phenomenal dinner at a small restaurant well off the strip called Rosemary's. The whole experience was wonderful, with just the right combination of good service, great food, and good beer. We both had the night's five-course tasting menu, including matching beers in my case. Every detail of the service, presentation, plating, food, (and matching beer selection) was perfectly executed. My only note for a return visit would be to go easier on the early beers... four 150ml servings and a smaller dessert beer do add up, especially when cleverly served in half-full 300ml mugs. The dessert course for two was a sampler of half-servings of pretty much the entire dessert menu which itself is a menu item they call their Dessert Storm. It is highly recommended if you manage to have room for dessert and can't make up your minds.

We had a very fine lunch at a hard to locate Thai restaurant called Lotus of Siam (known to foodies as LOS). It too is well off the strip, although in this case you could easily drive right past it due to the mini-mall it sits in having its face turned away from the street. Those in the know order lunch off the menu, although their buffet certainly looked and smelled good.

For entertainment in between sessions of overindulgence in food, we managed to see the classic cars at the Imperial Palace, Shrek 3, Mac King's afternoon show at Harrah's, and Spamalot at the Wynn. 

Each of those probably deserve separate reviews, but...

Mac King is a friendly down-to-earth guy who's performs as a bit of a hick in an ill-fitting plaid suit. The show is fun, and in between bouts of silliness he does some seriously good magic and gets really strong reactions even from the relatively jaded (and quite often slightly tipsy) Vegas audience. Be warned, however, that his style is not the classic gentleman magician...

Spamalot is the Vegas version of the Broadway Musical (somewhat loosely) derived from the classic Python film Monty Python and the Holy Grail. For Vegas it seems to get an extra dose of showgirls, is cut a little shorter, and runs without intermission. Fans of the film are pretty certain to find most of their favorite bits and lines preserved, although some of the longer sequences from the film have been simplified. The result was a very effective translation of the experience of the film into the completely different medium of live theatre.

Back at home, we find ourselves in need of a vacation from our vacation...

2007-05-07

New look for my ranting

To confirm the obvious, Ross Randomly Rants has a new look. Blogger revised its systems a while back, and recently pushed all of us into their new format. Since they allowed us to preserve our existing templates and page designs, this change probably had little or no visible effect aside from requiring some people to have Google accounts.

Here at ranting central, I finally got around to finding out what new features were available if I flipped my blogs to the new layout system from the old template system. The key feature that pushed me over the edge is that new Blogger has post labels. Labels are a lot like what we call tags over at Flickr: an ad hoc mechanism for categorizing blog posts.

Once I went back and re-read all the old posts and dropped a few labels on them, I realized that the blog itself needed a way to tell visitors what labels I had used and as a result a way to find posts with particular labels attached. Although there might be tricks available to show the labels in an old Blogger template, it was much easier to bite the bullet and flip to the new layout system where a list of the labels in use in my blog is a stock widget.

Then I got greedy. At Flickr, we are used to tag clouds as the best way to display a collection of tags. A cloud lists all the tags, but uses font size and color variation to signal which are used more than others. This produces a more interesting display than a flat list with counts of posts. A little searching around produced a page at phydeaux3 that did exactly what I wanted. I don't know who phydeaux3 is, but their fine script deserves credit.

I hope the change to a cleaner overall look is for the better, and now all that remains is to remember to actually label my posts in the future.

2007-05-06

MOOve over business cards

Long-time users of Flickr have probably already heard of MOO, but since the short-lived free promotion has long since expired I thought I would share my experience with them and one of their products. The executive summary is that I am very happy with their product and service.

Moo is a printing company in England that is providing a novel service. They make custom printed social cards and invitations using photography and text of your choice. But, that doesn't really sound all that novel, does it?

The difference is that they have optimized their print workflow to permit many different photographs to be used in a single print job, with printing on the reverse side that relates to both the user and the photograph itself.

They have also chosen two unusual formats for their products. Their oldest product is a kind of social card with a photo on the face and writing (up to six lines of text) and logos on the back. The text can be fixed (name, URL, phone number, email, address, or whatever else seems appropriate) or derived from the photo itself (title, date, and similar). The card is nominally 1:2.5 in aspect ratio, and my box measures 2.8cm by 6.9cm (which works out to 1:2.47). If you are keeping score, this is somewhat less than half the size of a standard US business card (5.1cm by 8.9cm, 2" by 3.5" or 1:1.75 aspect ratio). The paper used is a heavy matte-finish coated stock so the cards don't feel flimsy at all. Boxes of 100 run about US$25.

Their new product is larger, at 10cm square. It seems to be aimed at invitations and announcements, and is significantly more expensive than the classic MOO card.

They are particularly well integrated with Flickr. It was extremely easy to create a MOO account, connect it to my Flickr identity, and select an entire set of photos as the starting point for my order. Since I selected about 25 photos, the minimum order of 100 cards got 4 copies of each photo.

Their automated workflow emailed me to confirm the order within minutes, and again to confirm that it was in the hands of the Royal Mail about one week later. It arrived in my mailbox in California only five days after the email. For my US$25, I received a very nicely printed stack of cards. Since I didn't happen to include any text that was derived from the photo itself, I didn't test its ability to make the fronts match the backs but all the cards do have my info and none have anyone else's info on the back. They even included my Flickr avatar on the back!

I've given away a handful already, and expect to hand out more in the days to come.

2007-04-18

Raving about a moon

Lua logo

Several months ago I tripped over a little language called Lua. It seemed like a novel idea, but its absence of curly braces and lack of ++, += and similar operators felt uncomfortable after years of C, and I didn't look very close. Then I started to notice it hiding in the most unlikely places, culminating in Adobe Photoshop Lightroom where the development team claims that over 40% of LR is implemented in the Lua programming language. It seemed like it was worth a second look (along with SQLite, the database engine behind LR, but that is another subject altogether) so I started to play with it.

In a word, "wow".

Lua is a scripting and extension language designed to be easily embedded in a host application. It has a simple C language API that permits the application to easily call functions and manipulate lua values. It also makes it easy to call C functions from lua code, and to add those functions by dynamic linkage to a running program from shared libraries (DLLs on Windows).

Lua was invented by a resourceful group at a Brazilian college to serve needs they saw for configuring and extending applications. Since it was a successor to an earlier language called Sol (Portuguese for Sun), it got named Lua (Portuguese for Moon).

As I see it, several properties of the language have contributed to its success. First, the Lua team has chosen to use the MIT license which is an open source license that also permits effectively unrestricted use in commercial products. This has made it legally possible for commercial developers to consider using the language in their products; and probably as a result of this leniency a significant number of commercial product teams are regular contributors to the lua programming community.

Second, Lua is implemented in standard C, sticking to the subset of the C language that has identical semantics if compiled as C++. The Lua language itself is compiled for a virtual machine and can be saved as (non-portable) bytecode before execution in the VM. Since it is possible (and encouraged) to write lua programs that don't need to compile new code at runtime, it is easy to separate the compiler from the interpreter and distribute only pre-compiled byte code files. Because of this, it is amazingly portable. It is found inside a shocking number of game consoles, PC games, more general products like LR, and even a wide array of embedded systems. In an embedded system, it is most likely to have the compiler stripped off to reduce the amount of code and data space required in a limited environment.

Third, and certainly not last, lua is a very expressive language. The designers have emphasized mechanisms over policies, and as a result although lua is not an object oriented language, you can use its core metatable features to implement object oriented features such as single and multiple inheritance, private data, and object and class methods. Functions are a first-class value, and hence can be stored in variables, passed as arguments to functions, and even be generated (as closures) as the return values from functions.

The core language provides numeric and string data types, along with nil, tables, functions and threads, and two kinds of data wrappers for opaque data belonging to the C side of the fence. The language provides an incremental garbage collector that can be tuned to avoid long stalls for collection.

The C API makes it easy to provide wrappers for third party libraries and system calls that can be loaded on demand. By putting the most demanding inner loops and algorithms into C libraries and leaving the overall program structure to lua, powerful utilities can be built quickly.

My first project in Lua was a serial protocol debugger for a new feature for one of Cheshire's projects. In about 1500 lines of lua and another 1500 lines of C (and only a couple of days work) I was able to build an interactive serial port debugging tool that could log traffic, load and save the logs, send arbitrary data to the device, send random data to the device, and play saved files at the device at an adjustable rate. Building something like that from scratch with C++ and MFC would have taken a lot longer and may never have been as feature rich.

Since then I have built a protocol analyzer for an unrelated Cheshire project with a much more complex packet based protocol, and even built a live status monitor with meters and displays. I have created my own generalized C language host application so that I can deliver an installable windows application as an executable, a few DLLs, and a nest of lua scripts. When my host engine is ready for public view, I will be releasing a version of it back to the Lua programming community as my thanks.

Learn more about Lua at www.lua.org where you will find links to the language itself, its reference manual, books published by its authors, and of course links to the most prominent bits of the lua community: the lua wiki and luaforge.

The tools I've built for Windows would not have been possible without some of the other work contributed by people associated with Lua's creation: IUP for portable user interface design, CD for 2-D graphics, and IM for image processing.

2007-03-24

A Box of (slightly) Puzzling Mystery

So I get home from work the other day, and a small, white, cubical mailing carton is waiting on the doorstep. Since that isn't all that unusual, it got nudged inside without much thought. A little later, Michelle noticed it and wondered what I had ordered since it wasn't hers after all.

Looking at the label didn't answer any questions. It was, indeed, addressed to me. My name was spelled right. The return address was a complete unknown and I am pretty sure I haven't been shopping on eBay (actually I know I haven't since I don't have an account there at all... that's Michelle's bailiwick).

A Puzzle Box

So we open the carton, and this is what we found inside neatly wrapped in plastic, bubble wrap, and air bladders. It is a very nicely made puzzle box, about 11.8 cm by 8.2 cm by 5.3 cm, covered with intricate inlay patterns.

There was no packing slip, so the plot thickens.

Proof that it can be opened.

I've seen this sort of thing before, so I know that opening it is just a matter of patiently searching out which bits of which panel will slide, and then solving the maze to get the box all the way open. An inscription found inside. It is possible its not right side up in this photo, however.This turns out to be a well made a fourteen step box, counting the final removal of the cover. Aha! There's a rolled up sheet of note paper inside. Perhaps that will answer the obvious question... but alas, it only answers questions for those who can read Japanese, and I cannot.

The one remaining clue is the return address: someone at U of Waterloo, in Canada. Perhaps Google will shed some light. Expecting to find someone known to the puzzle community, perhaps an importer of well crafted puzzle boxes, I give that a try. My unknown benefactor is clearly the first search result... but he has no obvious connection to puzzles, woodwork, Japan, or me.

 Except for one minor thing. He's one of a very small community of people who deeply understand quantum computers, another of whom almost certainly knows both of us, lives in Japan, and furthermore knows I collect things like this box and would be amused by a good puzzle.

Thanks, Rod, for the mysterious box...