“Through this be madness...”
JibberJabber
Big Behind-the-Scenes changes for SDL 1.2.14 on Mac OS X (Snow Leopard)

At least from my perspective, there has been a surprising amount of work and effort put into the (upcoming) maintenance release of SDL 1.2.14 for the Mac. Many of the changes have been focused on modifying the Mac code base to support Snow Leopard, particularly 64-bit. As I understand it, Ryan Gordon has spent the time cleaning up the codebase with help from user patch submissions in the SDL Bugzilla to modernize the codebase. (Thank you to all of you that have submitted patches.)
Meanwhile, I have been focusing on modernizing the Xcode projects, Xcode application templates, doing testing, updating documentation, and working on the official binary distribution.
So there are some fairly substantial behind the scenes changes Mac…
Norman Borlaug: The Man Who Saved More People Than Anyone Else in History, Has Died
I don't plan to talk much about current events on this blog, but Norman Borlaug more than anybody deserves an exception. No person in history has done more good for the world than Dr. Borlaug.
Dr. Norman Borlaug was an agricultural scientist who developed high-yield crop techniques and other agricultural innovations, credited with averting global famine in the latter half of the 20th century. He is "The Man Who Fed the World".
By some estimates, he saved over a billion people (that's with a 'B') from starvation.
"He has probably done more and is known by fewer people than anybody that has done that much."
Dr. Borlaug died last night from complications from cancer. He was 95.
Links:
Another C vs. C++ incompatibility rant:
Void parameter lists
Ugh. C++ always finds another way to irk me.
I finally upgraded one of my systems to Snow Leopard and am trying out all the new compilers (gcc 4.2, llvm/gcc, clang). In addition, Apple sent me back a bug report telling me they fixed a problem with OpenAL buffer unqueuing returning the wrong buffer id, and wanted me to test it in Snow Leopard.
Being OpenAL, I could have submitted a plain C example, but I wanted to use some standard data structures so Apple couldn't accuse my code of being buggy. I wanted a GUI too to help trigger the problem, so I obviously used Cocoa/Obj-C to build the UI. But from past experience, I knew the Core Audio team likes C++ and I really wanted them to fix my bug, so I decided to use STL data structures instead…
Found the Braid Stars

*************************************************************
SPOILER ALERT! (WARNING!)
*************************************************************
I'm going to talk about some hidden things in the video game Braid.
Stop reading if you don't want to spoil the secrets.
See further down below to continue.
*************************************************************
*************************************************************
*************************************************************
*************************************************************
*************************************************************
*************************************************************
*************************************************************
…
Murky: A Cocoa GUI front-end for Mercurial

One of the things I miss from the days just before the great Linux/Bitkeeper schizm is the Bitkeeper GUI front-end tools. Obviously, since the great fallout, I have moved away from Bitkeeper and have been alternating between Git and Mercurial as I get the chance. But to this day, I still miss the GUI tools Bitkeeper provided. They were written in Tk and damn ugly, but the overall design was pretty good and integrated well with my workflows at the time.
I remember struggling to get better Mac support for the Bitkeeper tools way back then as they required X11. Once upon a time, there was a way you could redirect Bitkeeper to use an Aqua/Tk so you at least didn't have to go through X11 (which had even less integration on those older Mac OS X…
Sandvox updates comment support;
Picking a new comment system

A long time ago, I posted about trying to pick a comment system. At the time, Haloscan was the built-in option for Sandvox, and JS-Kit was the only other alternative I could find.
I was worried about Haloscan because there were complaints that comments were deleted after one year. But I couldn't get JS-Kit to work nicely with Sandvox. (The comment boxes would collide into other parts of the webpage.)
I tried contacting Haloscan about their policy but never heard a word from them.
Well, since then, Haloscan was bought by JS-Kit. Comments have not been removed so far after 1 year as far as I can tell. But interestingly, JS-Kit no longer allows new registrations for Haloscan. I am apparently grandfathered in. But I wonder how long JS-Kit is…
Mercurial Subrepos: A past example revisited with a new technique

A while ago, I did a back-to-back comparison of Git and Mercurial on how to create aggregate projects containing unrelated repositories. For Git, I used the submodule option. For Mercurial, I used the Forest Extension. Since then, Mercurial (1.3) has rolled out a new experimental feature called subrepositories (subrepos). This new experimental feature seems slated to replace the Forest extension as an official core feature.
I was curious how the procedure for the new subrepos differed from forests, so I have revisited the earlier example I did using LuaDoc, and repeated it using subrepos.
The original Mercurial repositories for the underlying subrepos are in the same place from the Forest example, so all that is unchanged. So we just need…
New Screencasts Uploaded on Getting Started With CMake (An End-User's Perspective)

I just uploaded a set of new screencasts. I've been sitting on this since for 5 months now, just to show you how far behind I am in things. But I worked really hard to improve the production and post-production quality over my last set of videos.
Now that YouTube has an HD option, using them as the primary server is no longer a problem for me.
Head over to my Screencasts section for more details.
Direct link to my entry here.
Create a Triple-boot Mac/Windows/Linux system and share/reuse with VMWare...
In just 19 easy steps! (In the basement of your home, to amuse yourself and your friends)
In just 19 easy steps! (In the basement of your home, to amuse yourself and your friends)

I setup a triple-boot Mac/Windows/Linux system about 6 months ago with which partitions I shared with virtualization. Unfortunately, I sat on this document too long without finishing it and have forgotten what I did to make it work. At this point, I'm just going to push out my notes as I have them now and hope it still may be helpful to somebody out there. My particular setup is a bit more uncommon which is why I feel I should push this document out there.
Unlike a traditional triple-boot system, I pushed the envelope a bit further. In addition to having native bootable partitions for each OS, I also made each runnable through virtualization. In my case, I used VMWare Fusion. I also tried Parallels Desktop, but didn't have any success.
…
Book Review: Core Animation for Mac OS X and the iPhone by Bill Dudney
What is Core Animation?
Core Animation is a powerful new Apple technology that debuted with Mac OS X Leopard. As it was later revealed, it was a technology that originated for the iPhone.
Core Animation is actually comprised of two different technologies:
1) An animation technology
2) A layering (compositing) technology
Core Animation makes it easy to animate a "view" object from point A to point B without having to write your own animation loop or timer callbacks. It can be as simple as just saying "move there" and Core Animation takes care of the rest.
The layering aspect is the part that caught my attention as an OpenGL developer. Basically, you can think of Core Animation as a textured rectangle engine, i.e. apply a 2D image on a…
SDL_Clipboard API Prototype/Proposal

Cross-platform copy & paste support comes up once in a blue moon on the SDL mailing list.
Sam Lantinga (the main author of SDL) implemented a demo piece called SDL_scrap some years ago. Several years ago, I tried the code and decided to modify it because it didn't meet my needs.
First, it completely lacked a native Mac OS X implementation, so I implemented that.
Second, Sam's demo relied on inventing custom types for clipboards so it was useless for sharing data between other applications that didn't use SDL_scrap. For example, if I wanted to copy/paste text with Notepad.exe or an image with MS Paint , this was impossible because SDL_Scrap didn't leverage native known types in the underlying clipboard implementations.
So I implemented…
Mixing audio sources for multiple computers

With all my recent talk of triple-booting, I might be giving the wrong impression. Generally speaking, I am not a fan of multi-booting, and without hardware accelerated OpenGL, virtualization is of limited use to me.
So my solution has been to run multiple computers. This has many well-known downsides. I'm not really going to defend my solution, but merely state it as fact that this is what I tend to do.
One aspect of dealing with multiple computers that is often ignored is audio. For other things, there are gadgets like KVMs, and so forth, but there is very little discussion and even fewer gadgets for audio.
I dislike using a set of speakers per computer because the wiring and power brick situation gets messy. I also have (only) one…
Initial Impressions (and Criticisms)
of Debian Lenny
of Debian Lenny

To my shock, the next iteration of Debian was released and it hasn't been an eternity. For those who don't use Debian, releases in the past have taken very long amounts of time. It is usually the butt of jokes along with Windows (Vista) release cycle times.
I actually put off upgrading to Etch until only a little over a year ago expecting I would still have at least several more years before Lenny.
My experience I am about to convey is actually two separate experiences, a brand new computer and fresh install, and an upgrade on an old computer.
The Story of the New Computer (New install on Mac Pro)
I was entrusted with a new Mac Pro to do some development work on. The work was for a cross-platform project, so I needed Mac OS X, Windows,…
Native Mac OS X and iPhone back-ends for SDL_image
This holiday break was much like revisiting my roots. I did OpenGL, OpenAL, and now SDL.
I finally got around to finishing one of the zillion things in my queue. With SDL getting closer to its 1.3 release, I felt compelled to get this one done. I have implemented and submitted a new native Mac OS X and also iPhone backend for SDL_image.
SDL_image currently depends on libgif, libjpeg, libpng, and libtiff to load these formats. For the official Mac OS X framework distribution, we have been statically linking these libraries into the framework. This has been a pain to build and maintain, particularly since none of these libraries have Universal Binary friendly build systems.
This submission utilizes native OS X frameworks to load the images…
Defective Core Audio (Mac OS X) ALC_ENUMERATION_EXT implementation / My fixed implementation and letter to the community

(The following is an open letter I posted to the OpenAL community asking for support to convince Apple this problem is indeed a bug in their implementation and to accept my patch.)
The Bug:
There is a bug in the current Mac OS X implementation concerning the ALC_ENUMERATION_EXT.
The current implementation fails to do two things:
1) It fails to return a list of devices as intended by the ALC_ENUMERATION_EXT, even though the implementation claims to support the extension.
2) It fails to support opening of specific devices that would be named in this list.
As my Xmas gift to the community, I have implemented these deficiencies and made my changes publicly available. My wish is that these will be included into the main Mac OS X distribution as I…
OpenGL Vertex Buffer Objects (VBOs): A Simple Tutorial
Recently, I have been getting a lot of similar questions about how to draw geometry in OpenGL without the use of glBegin()/glEnd(). This is mostly due to the interest in iPhone development which uses OpenGL ES 1.1, though I have received a few desktop performance questions as well. Since I've gotten multiple questions, I thought I would post a very simple tutorial for VBOs.
When most people first learn OpenGL, they are taught using glBegin() and glEnd(). But to shock of many people, these functions have been excluded from OpenGL ES, and there is pressure to remove these functions from future versions of OpenGL proper. The two main reasons for removing these functions are performance and simplicity.
In performance, the glBegin()/glEnd()…
Balanced Fund Update & Market Thoughts
This is a follow up to the article I wrote on Aggressive Savings Techniques using Balanced Funds (for intermediate term). I am not going to do a quantitative analysis right now. I want to wait for the year to end to see where things end up.
But yikes! When I wrote the article, I didn't believe we would enter into the worst economic crisis since the Great Depression. (Don't interpret that line as this crisis is just as bad as the Great Depression. Some people I've talked to make that allusion when they hear this and that is plain wrong. While the current crisis is very bad, it is nowhere as bad as the Great Depression. Perhaps the phrase, 'Only the Great Depression has been worse in the past 80 years' would be more clear.)
So here are…
QuickTime 7.5 Core Animation Improvements
Every time a new Apple software update comes out, people always wonder what's really changed. Apple's release notes are usually not very detailed. QuickTime 7.5 which was released the week of WWDC 2008 happened to be a fairly significant update in terms of bug fixes and enhancements.
I was trying to implement a "reflection" of a movie layer using QTKit and Core Animation. I wanted a single movie source and either two movie layers to share the the source, or a way to capture the current displayed image of one layer and transfer it to another. It turns out neither was possible prior to QuickTime 7.5. (You might be able to use to Core Video and OpenGL, but the QuickTime/Core Video API interface still hasn't been updated to support 64-bit…
Mercurial Forests: A Real World Example (LuaDoc with CMake)



(Update 2009/09/04: I added a new entry on Mercurial Subrepos which is slated to replace Forests.Link here)
In my last entry, we created a Git Superproject for LuaDoc and its dependencies. For comparison, let's repeat the example using the Mercurial Forest Extension.
Because the Forest is still an unofficial extension, you may need to configure/install things for your Mercurial installation. My example below assumes you have a working Forest extension installed. The following link contains instructions and a tutorial I based this example on.
http://www.selenic.com/mercurial/wiki/index.cgi/ForestExtension
The first step is to create the regular individual Mercurial repositories for each subproject. They can be found here:
Mercurial…Git Superproject and Submodules: A Real World Example (LuaDoc with CMake)



Not wanting to repeat that mistake again, I have implemented a Git Superproject and Submodules for a real world project that I needed to get fixed. Furthermore, the project is relatively lightweight and potentially cross-platform, so I have designed the example so you can participate too by accessing a public repository.
The project is LuaDoc. It is a documentation generator that is similar to Doxygen, except that it is designed explicitly for Lua. (Doxygen currently lacks Lua…
LuaObjCBridge & LuaCore Updates
I
've been working with the LuaObjCBridge (by Tom McClean) and LuaCore (by Gus Mueller). I've encountered some bugs, limitations, and things that needed improvement. As I'm already forgetting what changes I've made, I decided I better document them and push them back out for the public to test and improve. Because my changes may potentially break compatibility (not necessarily a bad thing though because some things just didn't work correctly in the original code base), I've pushed my changes into a separate repository.
Meanwhile, I've been using a lot of these changes to test ideas for the next generation LuaObjCBridge which will use BridgeSupport and likely libffi. If you are interested in contributing, please don't hesitate to contact me.
…
Somebody Found My Blog! (Update: Zeroconf Printer Advertising)
If anybody has been tracking my blog prior to this point, I apologize. I did not expect anybody to find it. (Google is too efficient at crawling.) Prior to this point, this blog was an experimental test for me and I wasn't yet announcing it publicly.
You might notice that there were a bunch of articles with dates starting from January pushed just today. That's because I started writing those articles back then, but had not finished writing/editing/revising them until today. I figured it was no big deal since nobody has seen my blog. Oops.
Today, I discovered that somebody has indeed been reading my blog (outside my private circle) because somebody left a comment, and a great one too! (More on that in a moment.)
I checked Google Analytics,…
Contacting Southwest Airlines
Southwest Airlines has a little application called Ding! which offers special limited time (hours) fares. I have relatives that love this program. But, maybe predictably, this blog entry has nothing to do with the concept of the application itself.
It turns out that the application has an annoying bug where the programmers left in code that prints debugging statements (via NSLog?) to the system log on Mac OS X (Leopard).
The big problem is that the application prints a huge number of messages. Coupled with the fact that users run this application non-stop to get the most benefit from it, this floods the system log and forces quicker log rotation, removing the chances to find important events in the system log.
While dealing with Apple on…
An Aggressive Intermediate Term Savings Strategy (Analysis on Balanced Funds)
In honor of the upcoming Tax Day, I'm going to gripe. The tax code is unfair and broken. (There, I did it. I don't feel any better.) While there are volumes of reasons to complain (literally), I'm going to focus in on a specific aspect: savings.
A case in point of the unfairness is savings (plain old, non-retirement accounts). The tax code is structured so there is a huge disincentive to save money, particularly for the short term or intermediate term.
You might be trying to save money for an emergency fund, save for a big purchase item such as a car or house, save for a big event such as a wedding, or just trying to plan for the future. But if you try saving for these types of things and your time span is less than the long term (say…
Git Superprojects & Mercurial Forests

I know most of the world is still trying to grok distributed SCM while it is something that I have simply come to expect. I probably should write up something about Git and Mercurial to help bridge the gap between my mindset and where most people probably (currently) are, as this writing will show my complete acceptance of the distributed model. But that article will have to wait as I am actually trying to grok how to use these tools in more advanced ways.
So today, I've decided I need to string together separate, generally unrelated projects as dependencies of a project I'm working on. As an example of what I'm talking about, I have a project that depends on the Sparkle Update Framework for Mac OS X and also Lua. It would be nice to…
Sandvox vs iWeb 2
So anybody who knows anything about iWeb 2 probably realizes that this template I'm currently using doesn't exist in iWeb. I'm now trying Sandvox by Karelia instead.
Sandvox is a web site building tool much like iWeb. In fact, it actually launched a little before iWeb was announced so the folks at Karelia had the misfortune of seeing their innovative product suddenly have a direct competitor from Apple almost overnight. Apparently this type of bad luck has happened to them before with a search product called Watson in which Apple soon introduced Sherlock.
Like iWeb, it uses prebuilt templates to do things, and you basically just substitute your own content. From my naive viewpoint, both programs look very similar from a feature set…
Upgrading to Debian Etch
Well, it's official. It's time to upgrade my Debian box.
CMake Lua


For anybody who accidentally stumbles on this, we're trying to organize a continuation of a CMake/Lua experiment. Dr. Ken Martin of Kitware recently decided to try embedding
Lua in CMake.
For those who don't know, CMake is a 'build system generator' or
'meta-build system'. You provide a build description in a simple script like language and CMake generates a (native) project that you request. Among the project types CMake can generate are Visual Studio, GNU Makefiles, Xcode, KDevelop, and more. This allows developers to have one single unified build description, but yet allow people to use their favorite IDEs and build systems. For anybody who is serious about cross-platform development, CMake is a must-look-at.
While CMake's build…
Quick Thoughts and Benchmarks on Moving to Gigabit Ethernet

So gigabit ethernet is finally ubiquitous enough that I (unintentionally) have two machines that both have it. My existing ethernet switch still works, but don't have enough ports on it so I sometimes end up having to unplug stuff and switch cables which is inconvenient.
I've been hesitant to invest in a new switch. My existing switch which is a 10/100 Netgear blue box switch originally gave me problems. About a year after my original purchase, the switch started malfunctioning and then stopped working. It was still under warranty, so Netgear replaced it, but I remember they were very slow about it (3 weeks?). Meanwhile, I was without a switch and ended up buying a temporary switch (a Linksys) to hold me over while waiting for Netgear to…
WaveInterference (OpenGL Shaders at CocoaHeads)

So as I try to think of things to fill in my blog, this is one of the significant ones because this is one of the reasons behind me leaving my anonymity behind.
At CocoaHeads in Silicon Valley some number of months ago, I gave a short demo on using OpenGL shaders to offload processing onto the graphics card. This had been prompted a month earlier by a student who gave a presentation on a Wave Interference program he made for science class. I noticed that the performance suggested it was using fixed pipeline drawing on the video card to render the Wave Interference patterns. I suggested at the time that shaders may make the thing stupidly fast (at the cost of complexity).
Anyway, just to prove to myself that I wasn't full of it, I decided…
Making Comments and Trackbacks harder than they should be
On Time Machine Errors and Data Integrity...
Advertising a legacy network printer with Bonjour (with a little help from launchd)

Rendezvous is truly revolutionary. It's one of the things that is going to have the largest impact on application design over the next couple of years. All the UIs, and all the security models, are going to have to be rethought once all applications are rendezvous-enabled. And that is going to happen.... We're just at the beginning of the second internet revolution, and Rendezvous is a big part of it. -- Tim O’Reilly, May. 2003
Leopard Printer Driver Gripes

My First Blog
Greetings! This is the first entry in my first blog. I’m not sure what to say.




View Comments