PIXELFLOW :: an intergalactic discourse

Pixelflow

An Intergalactic Discourse

Vim Text Alignment

A lot of times, a little white-space can improve readability of a series of function calls, or a data structure, such as a hash.

If you are vimpire, check out tabular it can do things like:

and for your Cucumber steps you can turn

Into!

I won’t reinvent the wheel, so give this vimcasts.org screen cast a watch!

Chingu makes game programming fun.

Chingu is a library for ruby that wraps up common functions for displaying game sprites, playing music and sound, and handling input from the user. It’s based on Gosu.

It is seriously addicting. By exposing common game object features through ‘traits’, you can quickly get off the ground by mixing in modules into your game objects.

Just to get an idea of how simple it is, check out the examples folder or give my asteroids-like game a download nfgrebvqf

10 points if you can decipher the title =)

MagicRuby Roundup

You can catch some videos of the conference over at Viddler

The conference had a great turnout. Fellow ruby nerds came from Texas, and as far as Chicago! A welcome change of pace, since Acts_as_conference stopped 2 years ago.

Two of my favorite talks were:

Exceptional Ruby

Given by Avdi, Avdi Devblog and going over all the subtle nuances about exception bubbling, re-raising, exit codes, and threads.

Intro to Spatial Programming

Given by Pete, PeteOnRails Blog he shows several tools available for ruby to deal with geographic data, and map projections.

To Infinity and beyond!

To raise, or not to raise

When working with float values, it’s good to get familiar with how Ruby deals with them. When using division, what you can end up with is a Float, that is NaN or Infinity

Luckily you can use some helper functions to determine what kind of number it is!

As well as working with invalid numbers

Pay attention to the subtle differences between infinite? returning 1,-1, nil and finite? returning true/false.

Home, home on the range

Infinity is also quite useful for representing numbers without a bounds.

Great for that ‘Ultra Mega Robo Deathstar’ hosting plan you offer.

SVG hexagon logo

The logo for this site was made by dumping some numbers out of ruby (For coordinates on a unit circle), and crafting this SVG file by hand.

The result can be rendered as an image using:

  • librsvg’s command line rsvg
  • ImageMagick’s command line convert
1 3 Next »