Threshold Filter in GLSL

24. Jun 2008 Comments 1 comment

I’ve been recently playing a little bit with GLSL/Core Image shaders. One of the earliest limitations I ran into was the fact that you cannot have conditional results. In other word, if you do an if/else test, the output of your shader cannot depend on it. (Not entirely sure why you’d want to use if/else [...]

Standalone RubyCocoa Applications

01. Jun 2008 Comments 0 comments

RubyCocoa is one of the most fascinating tools on OSX. It makes it more than easy to rapidly prototype and try ideas with Cocoa. But unfortunately, out of the box, a RubyCocoa project seems to require an Objective-C shell to start it up. That means firing up XCode for every single prototype you’re playing with.

It [...]

Speeding up VS.NET - Startup Times

01. May 2008 Comments 0 comments

If you’re developing on Windows, chances are you are using VS.NET. And if you’re using VS.NET, you’ll probably feel like the thing could go much faster. Well, it turns out it can - I spent a weekend researching how to do that, so here are the results for the startup process. (I’m taking 2005 only [...]

Reason #947 why C++ is dangerous - and certainly not type-safe

24. Apr 2008 Comments 8 comments

Here’s the statement in question:

Vec3 v = (2,3,0)  

After running it, v is set to (0,0,0) - can you spot why?

In case you couldn’t, here’s what happens. C++ encounters (0,3,0) and evaluates to 0 - because comma-separated expressions evaluate left-to-right and return the rightmost expression. That’s strike one right there - the comma operator is a [...]

HOWTO: Building Mapnik on OSX Leopard

23. Apr 2008 Comments 0 comments

I recently decided to get involved in Aaron Swartz’s latest project, watchdog.net. And since one of the most interesting jobs to me was investigating an alternative to Google Maps, I took the plunge and tried to look at Mapnik.

First challenge - just getting it to build on OSX. It seems like a trivial task, especially [...]

My personal history

20. Apr 2008 Comments 0 comments

Bowing to the shell history meme:

history|awk ‘{a[$2]++} END{for(i in a){printf “%5d\t%s \n”,a[i],i}}’|sort -rn|head

55 sudo 45 ls 42 git 32 cd 25 gem 23 vi 21 ruby 15 man 13 echo 7 /bin/rm

Heh. Turns out most of my work on the command line involves [...]

The sad state of DVCS for Windows

19. Apr 2008 Comments 2 comments

I have recently started exploring DVCS - distributed version control systems.

The power they offer you as a developer is amazing, especially if you use them with a patch management solution like quilt. The ability to juggle branches and patches with almost zero cost is extremely empowering. (At the same time, it’s also dangerous. It’s a [...]

You’ve got to be kidding me

15. Apr 2008 Comments 0 comments

During my work adventures, I have the ‘fortune‘ of working with Windows threads. One thing that’s nice to have is a name for each thread so you can actually tell them apart. Turns out, there is no easy call to set a thread name.

However, there is an officially approved way to set a thread name:

// // [...]

Ruby, OSX, and OpenGL

14. Apr 2008 Comments 0 comments

This is one of the wonderful detours programming takes me on from time to time. What I really wanted to do is work a little bit more on my neural network code. Next up was a back-propagation algorithm for learning. There are plenty of examples of it, but few that give a decent explanation of [...]