satine.org

by Charles Ying

Archive for the ‘Life’ Category

Leaked iPhone architecture document

Sunday, April 1st, 2007

iPhone Aloha Module Overview

Wow. I was surfing Scribd this morning for some code snippets and I happened upon this thing. It looks like a high level block diagram of the OS X that’s running in the iPhone. I’m not sure how much you can tell from this picture about what’s going on, though.

Technorati Tags: , , ,

The Skia Source Code Dilemma

Monday, March 5th, 2007

I have good friends who work on “secret” projects at Google (among other companies). Recently, news about Google’s acquisition of Mike Reed’s company, Skia, was leaked. Thus, I believe I can talk more freely about it now.

So here’s the thing. Last year, Google open sourced the Skia vector graphics engine and placed the code up on Google Code under an Apache license. I heard about it through the grapevine (not from Mike) and downloaded a copy to take a peek. Shortly thereafter, the code disappeared.

So here’s the general dilemma I pose to our virtual community:

  • What is the legal standing of the Skia source code at this point? It was made available briefly under an Apache license, possibly for several weeks. Is it still Apache licensed code, even though the code has been removed?
  • What do you think would happen if I were to post it again for posterity? What do you think Google would do?
  • What are the implications of this to open source in general?
And remember, don’t be evil! :-)

[Update #1] It seems that not many people know what the Skia engine is capable of. Skia built a vector graphics renderer core very similar to the one that Openwave Mobile Phone Suite V7 uses. (Mike built both, and I worked for him at Openwave) Skia is capable of full Java2D or PostScript (group opacity, bezier curve paths and clipping, kickass type rendering, gradients, filters) on typical “feature phone” hardware (average clocked ARM9ish processor, decent memory bandwidth) with a ~300K footprint. It’s like OS X’s Core Graphics, without the GPU rendering.

[Update #2] Simeon Simeonov, Engadget and CrunchGear all have follow on stories.

[Update #3] An interesting twist / pickle emerges: When I looked through the source archive this morning, I found that the actual Apache license is not included with the source code. It was only published on the Google Code web site! Not only that, but no copyright information exists or even authorship is in the codebase. So what now? I definitely need to speak to a IP lawyer.

[Update #4] According to a few authoritative sources, source code with an Apache license cannot be revoked once published. Source code without an accompanying license isn’t as clear cut a case and is still being examined.

[Update #5] I’ve decided not to release the source code at present, not for legal issues, but as a favor. I’m confident that this source code situation will, however, be resolved at some point by Google. :-)

Technorati Tags: , , , , ,

Connect The Dots: iPhone Graphics, OS X, LLVM, ARM, and Ruby?

Thursday, February 1st, 2007

I’d like to connect the dots between Apple’s iPhone Graphics, OS X, LLVM and the ARM architecture, and what it means for compilers, interpreters, high-performance embedded software systems, specifically in graphics and bytecode engines.

We’ll start with what the heck LLVM does, and go from there.

  • LLVM is a fascinating compiler system that optimizes code at many stages, from compile-time to run-time optimizations; e.g., your code is optimized while it’s still running!
  • Apple uses LLVM to optimize OS X’s OpenGL pipeline to emulate older video hardware features and accelerate modern hardware.
  • Apple is integrating LLVM with GCC and supporting OS X’s executable file format. Chris Lattner posted about it here.
  • Apple has also contributed ARM backend enhancements to LLVM that would allow a ARM version for portions of a OpenGL graphics pipeline, and subsequently, Core Animation.
It means that any type of performance critical code that’s “interpreted” or “pipelined”, like OpenGL pipelines and JavaScript engines, can be effectively JITed automatically through run-time optimizations via LLVM.

Let’s see: Simple JavaScript engine, with automatic JIT compiler vs. manually coded JIT VM and compiler… hmmm….

This also has interesting implications for high-level languages like Ruby. Could a LLVM-Ruby provide the performance of YARV without the complexity of a manual JIT compiler and VM? I know that Python’s looking at it

Plus you’d get a JIT embedded ARM mobile processor port of Ruby for nearly free. And if that’s true for Ruby… why not for all the important bits of OS X?

Ahh, so that’s how iPhone runs Mac OS X

Technorati Tags: , , , , , ,