satine.org

by Charles Ying

Archive for the ‘Life’ Category

Google Chrome OS and V8 ARMs

Tuesday, July 7th, 2009

Google Chrome OS is real and now we know that V8 has a ARM JIT compiler coming soon. Nicely done, team Google. Next up, ARM Cortex A9 based Apple and Google tablets… er, netbooks…

Safari 4 CSS Video Effects

Thursday, June 4th, 2009

Safari 4 Video

If you have a recent browser build of WebKit nightly, you’re going to love this movie trailers demo I’ve been hacking on. Click on the image above, select a movie trailer, and check out Safari 4’s video reflections using CSS Effects. Recent WebKit nightlies with the latest QuickTime installed give the best experience, with flawless transitioned video reflections. Safari 4 Beta also provides a decent experience, but doesn’t transition reflections.

What you are seeing is:

  • A WebKit reflection applied to a HTML5 video tag. It’s also just 1 line of CSS, and the same reflection is applied to the movie poster thumbnails as well:

-webkit-box-reflect: below 1 -webkit-gradient(linear, left top, left bottom, color-stop(0.5, transparent), color-stop(1.0, rgba(255, 255, 255, 0.5)));

  • HTML5 video events, “loadstart” and “finished” which then change the page state.

  • CSS Transitions handle all of the animation, so my code simply adds and removes the “darker” class to make the text and the movie thumbnails fade out while the video is playing. Things like stopping the video before it fully fades in just works.

Up until Safari 4, video reflections had not been working very smoothly. But times sure have changed.

I should note that video reflections are really tough to do, especially in a web browser. Flash makes it somewhat possible, but not easy, and certainly not as fast as what you see here. And I hope this example gives you a taste of what a cinematic user experience might look like in a web browser.

You may also be interested in my post on CSS CoverFlow, complete with snapping, physics, and perspective correct 3D.

Technorati Tags: , , , , ,

iRhyme – A NLP Rhyming Dictionary for iPhone

Monday, March 30th, 2009

I have always been frustrated with writing song lyrics. Almost all my songs have been instrumental, except for one, which had terrible lyrics and took forever to write.

Before starting PixVerse, I prototyped a NLP lyric writing helper with a markov-chain language model. Sadly, it didn’t seem to offer much practical help when I actually tried to write some lyrics with it. Back on the shelf it went, until recently.

I came back to song writing, but this time on iPhone. I changed the goal to be: “A rhyming dictionary that works really well for songwriters.”

I looked at the existing rhyming dictionaries on the web and iPhone. A lot of them really don’t work well – you get all these words that don’t really fit thematically with what you’re trying to write. No soul, just obscure terms that happen to rhyme.

So it was time for a new approach: Use a lot of interesting data and simple algorithms.

iRhyme constructs its rhymes database from a simple natural language analysis of a very large song archive (corpus). Think of iRhyme as the collective knowledge of songs and songwriters condensed into a 16 MB iPhone app. Most of the effort went into packing all those rhymes in a easily retrievable format.

It was very cool to see the results of the analysis. With some tweaks, iRhyme had linked over 1.5 million relevant words and rhymes together, with some pretty canny free-associative rhymes emerging from the data. iRhyme has over 50,000 unique words, all used in real songs.

For now, you can buy iRhyme for $0.99 on iPhone. It’s a pretty good value compared to the cost of an “old world” printed 100,000 entry rhyming dictionary. iRhyme also fits better in your pocket (the entire database is stored locally).

I am also currently working on upgrading iRhyme’s database, increasing iRhyme’s depth even further, which will part of an upgrade once I can figure out how to pack all the new data into the 10MB over-the-air App Store limit.

iRhyme is available from getirhyme.com or directly from the App Store.

Technorati Tags: , , , ,