Archive | Ruby

21 January 2010 ~ 0 Comments

Github account and repos

Well, it’s long overdue, but I’m finally using some form of VCS for maintaining the code that I write at home.
Up until a few weeks ago I was basically keeping a ‘Code’ directory in Dropbox and that was about it. Now I’m using git on each computer (i.e. notebook, desktop, etc.) and made a [...]

Continue Reading

01 December 2009 ~ 0 Comments

Gosu with Chipmunk physics

Gosu is a super-easy 2D game development library with a handy Ruby interface. Chipmunk is a fast 2D physics library, that plays nicely with Gosu.
Mix them together and what do you get? Me having a great time making little blocks fall from the sky:

The Chipmunk Ruby documentation is a bit lacking, but it [...]

Continue Reading

01 December 2009 ~ 0 Comments

Animated Collatz sequence using Gosu

Continuing my obsession with the Collatz conjecture, I took some of my Ruby code from the other day and mixed in some Gosu 2D animations.
Basically, I randomly seed a bunch of objects and then let them bounce their way through the sequence until they bottom out at 1, and then drop them. There’s a [...]

Continue Reading

07 November 2009 ~ 2 Comments

Gosu tutorial

Ran through the Gosu Ruby Tutorial tonight…

I’m having a lot of fun with this. :)

Continue Reading

31 October 2009 ~ 1 Comment

Calculate a hailstone sequence

One of the Project Euler problems deals with the Collatz conjecture, which can basically be summed up like this:
We take any whole number n greater than 0. If n is even, we halve it (n/2), else we do “triple plus one” and get 3n+1. The conjecture is that for all numbers this process converges to [...]

Continue Reading

Tags: , , ,