Saturday October 23, 2010

07:57 PM: Metroid: Other M - The Elephant in the Room

August 31st marked the release of Metroid: Other M, the latest installment of Nintendo’s Metroid franchise, and the most aggressively marketed game in the series. Produced, directed, and written by franchise patriarch Yoshio Sakamoto, with game design by Team Ninja, it represents a significant change of direction for the series. Plenty of reviewers have already dissected its gameplay, with mixed but mostly favorable impressions.

But this is not a gameplay review.

I’m here to address the game’s writing — not so much where it failed artistically (though there are some legitimate complaints to be made on that front), but unfortunately where it succeeds. When it comes to the game’s story, there is an elephant in the room which very few reviewers have addressed head-on.

Read more...

Thursday October 21, 2010

12:30 PM: Beethoven's Fifth Salsa

The Hovedøen Social Club & Kringkastingsorkesteret presents a Salsa rendition of Beethoven’s Fifth Symphony:

The treatment of the famous opening chords doesn’t quite work for me, but the rest — wow.

Thursday August 26, 2010

11:40 PM: Maru Plays Star Wars

“Maru” is a popular pseudonymous Japanese musician on the video sharing site Nico Nico Douga. While Nico Nico requires registration to view videos (and is generally difficult for non-Japanese-speakers to navigate), some of her videos have been mirrored on YouTube.

Watching via YouTube, you’ll miss out on the clouds of user comments floating by (one of the Japanese site’s unique features is the way user comments scroll over the video in realtime), but her performances speak for themselves. This lady rocks the Electone (an advanced console synthesizer).

This morning, I’d like to share with you her performance of selected themes from Star Wars:

(Star Wars(Electone)スターウォーズ(ファンファーレ付き)エレクトーン,maru氏sm1895469)

Also, just because she could, she did another version where she swapped major and minor keys. It’s not as epic, but it’s worth it to hear what the Imperial March sounds like in a major key:

(StarWars.Electone(MajorKey⇔MinorKey)スターウォーズエレクトーンsm2037274)

Update: Here’s another video of Maru playing music from Pirates of the Carribean, this time wearing her iconic dinosaur suit. It isn’t as technically impressive as her Star Wars videos (she’s playing from sheet music, a prepared arrangement), but it’s still neat:

(Pirates of the Caribbean(Electone)パイレーツ・オブ・カリビアン エレクトーン演奏sm3341314)

Saturday July 24, 2010

04:28 PM: Proper Oposum (Opossum) Pedicure

This has to be one of the more bizzare things I’ve run across in a while.

(Proper Oposum Pedicure)

The video series is the creation of actress Anna Dresdon, who plays Georgette Spelvin in the video. Anna is licensed by the California Council for Wildlife Rehabilitators, the non-standard spelling (“oposum”) is intentional, and the opossum in the video is elderly, not sedated.

(Don’t try this at home.)

Friday July 16, 2010

11:22 PM: The Sound of Sorting

Ever wonder what insertion sort, bubble sort, selection sort, merge sort, gnome sort, or heapsort sound like? Check out these neat (audio)visualizations by university student Andrzej Rutkowski:

(What different sorting algorithms sound like)

(Heapsort audibilization)

The soundtracks for these videos were produced by generating a pair of tones for each pair of values under comparison (simultaneously visualized in red) during the course of each algorithm.

The nice thing about watching these is that you can start to get a good intuitive feeling for where these algorithms spend their time and what makes them behave the way they do, beyond what you could get from a pure visualization.

Thursday July 08, 2010

09:57 AM: The Biggest Mistake Everyone Makes With Closures

Whether they’re called “closures” or “lambdas” or “Procs” or “anonymous functions”, many popular programming languages have a hidden gotcha when it comes to combining them with loops, and nearly everyone will fall victim to it at one time or another.

Read more...

Sunday July 04, 2010

04:57 AM: Ni no Kuni (formerly "The Another World"): Studio Ghibli Gets Into Games

Apparently Studio Ghibli is collaborating with game studio Level-5 (who US audiences may know from the Professor Layton games) on a video game!

In fact, two games! There will be one version of the game for the Nintendo DS (“Ni no Kuni: The Jet-Black Mage”, due for release late this year) and one for the PlayStation 3 (“Ni no Kuni: The Queen of the Sacred White Ash”, due to be released in 2011).

The two games will share a basic premise and protagonist (Oliver), but will differ in terms of plot, controls, appearance, and gameplay.

Here’s a taster of the DS version:

(Ninokuni: The Another World)

And the version on the PS3:

(PS3 二ノ国 白き聖灰の女王 PV)

The official website for the games is also worth a look, though it’s in Japanese. There’s no word on a US or European release for the games yet, but we can only hope…

Edit: Also, here’s the Japanese trailer for the DS game, which reveals a little more about the premise:

(Ni no Kuni TGS 09: Japanese Trailer)

Monday June 21, 2010

08:44 AM: WE ARE NOT TIME TRAVELERS: Alt/1977

Designer Alex Varanese recently posted a really awesome series of retro-interpretations of modern devices. His premise?

What would you do if you could travel back in time? Assassinate Marilyn Monroe? Go on a date with Hitler? Obviously. But here’s what I’d do after that: grab all the modern technology I could find, take it to the late 70’s, superficially redesign it all to blend in, start a consumer electronics company to unleash it upon the world, then sit back as I rake in billions, trillions, or even millions of dollars.

To me, an especially interesting aspect of this is that the goal is not to represent what one might actually build with 1977-era technology, but rather to explore how someone might go about redesigning 21st-century technology to blend in with 1977-era design.

I’ve learned that there is no greater design element than the anachronism. I’ve learned that the strongest contrast isn’t spatial or tonal but historical. I’ve learned that there’s retro, and then there’s time travel.

The irony is that all post-modern, smugly self-referential retro porn aside, I’d gladly trade in my immaculately designed 21st century gadgets for these hideously clunky, faux-wood-paneled pieces of über-kitsch. Sorry, Apple.

Have a look at the whole gallery, which features anachronistic interpretations of cellphones, portable music players (above), laptops, and portable gaming systems.

Thursday June 10, 2010

10:34 PM: Hayaku: A Time Lapse Journey Through Japan

I think this set of time-lapse videos filmed in Japan by Brad Kremer are really beautiful. (The music gets better towards the end, but the imagery is exceptionally beautiful throughout.)

Hayaku: A Time Lapse Journey Through Japan from Brad Kremer on Vimeo.

(This is actually the first in a planned series; he’s looking for funding to make the rest.)

Wednesday June 09, 2010

01:24 AM: Atomic Operations in Ruby

Often, when it comes to parallel programming in Ruby, people make the mistake of assuming that compound assignment operators like += are atomic — that is, that the value will be read, modified, and written again without interference by other activity.

This is never guaranteed in JRuby, and it isn’t even normally guaranteed by other Ruby implementations: modulo some small details, in Ruby @foo += 1 is not fundamentally different from @foo = @foo + 1 — a lot can happen while dispatching that :+ method.

The only safe/portable way to do an atomic update in any Ruby up until this point has been to use a Mutex:

@mutex.synchronize { @foo += 1 }

This avoids the “lost update” problem, among others.

In a Ruby implementation with a weaker memory model (JRuby and IronRuby, currently), when multiple threads are accessing a variable, this is also important to do in order to have a memory barrier that prevents CPU instruction reordering or cache issues. Indeed, if you have multiple threads using @foo, then you would need to use the mutex even for simple accesses (since Ruby has no language provision for Java-style volatile fields):

return @mutex.synchronize { @foo }
@mutex.synchronize { @foo = 3 }

This works (and performs better than you might expect), but for very simple things it invites needless problems with lock contention. It’d be nice to have portable volatile variables with support for lockfree atomic update operations, wouldn’t it?

In response to this need, Charles Nutter (headius) and I came up with the atomic gem, which provides a simple class, Atomic, which embodies a volatile reference and supports atomic updates to it.

It’s pretty primitive so far (and the fallback portable/generic implementation still uses locks), but it provides the essentials in a lockfree fashion under JRuby:

  • Atomic.new(initial_value=nil) – creates a new atomic reference
  • Atomic#value – returns the value
  • Atomic#value=(new_value) – sets the value
  • Atomic#swap(new_value) – sets the value and returns the old one
  • Atomic#update { |old_value| ... } – atomically sets the value to the result of the block
  • Atomic#try_update { |old_value| ... } – same thing, but fails rather than retrying on conflict

So, rather than this (which won’t actually work reliably in multiple threads under load):

@foo = 0
# ...
@foo += 1

You can do this:

@foo = Atomic.new(0)
# ...
@foo.update { |v| v + 1 }

The block passed to update doesn’t run exclusively; instead, the reference’s value at the beginning and end of the block are compared to determine whether it is safe to update (under JRuby, this uses a hardware test-and-set instruction when available). If there was a change, then Atomic#update tries the block again with the externally-changed value.

In other words, Atomic#update proceeds optimistically and retries the block if there is a conflict. Because long-running expressions increase the likelihood of conflict, the expression in the block should be simple, and because it can sometimes be retried multiple times, it should ideally have no side-effects.

Atomic#update is lockfree, but some specific use cases would benefit strongly from actual hardware-level atomic operations, particularly atomic increment and decrement. Since they cannot be performed on general Ruby types, support for these operations will require a separate API (perhaps a special subclass which holds only Fixnum values), but we’re certainly interested in supporting such things in the long run.

Check out the atomic gem on github.