April 2011
1 post
ruby drive-by: autovivification
need multi-level hashes in a hurry? (assumes 1.9) h = Hash.new {|h,k| h[k] = Hash.new(&h.default_proc)} h["foo"]["bar"]["baz"] = 42 h["foo"] #=> {"bar"=>{"baz"=>42}}
Apr 15th
February 2011
1 post
ruby's dusty corners: -n
if you are a perl hacker, then what this does is probably no surprise to you.  if you specify “-n” as an argument to ruby, then it wraps your code in a ‘while gets() … end’ loop. lets pretend grep didn’t exist and i wanted a bit of code to loop through all my ruby files and print the lines where i was using the RUBYLIB constant.  i would create something like...
Feb 19th
December 2010
5 posts
Headius: Improved JRuby Startup by Deferring Gem... →
Dec 24th
ruby code to break your internal interpreter
Dec 21st
Down the 'ls' Rabbit Hole →
an amazingly detailed description of the linux system calls triggered when you run “ls”.
Dec 16th
How To Safely Store A Password | codahale.com →
Dec 13th
Nick Gauthier: Everything that is wrong with... →
i could give this guy a hug for neatly summing up problems with mock based testing
Dec 2nd
November 2010
3 posts
How to Make Zuse's Z3 a Universal Computer →
apparently, given a long enough looped tape, you can convert machines as simple as Zuse’s Z3 into a universal Turing machine
Nov 27th
Introduction to Skip Lists →
Nov 9th
writing ruby extensions →
Nov 7th
3 notes
September 2010
1 post
cool feature of ruby 1.9 - ripper
i recently stumbled across an interesting class in the ruby 1.9 standard library - ripper.  it generates an abstract syntax tree for a given bit of ruby code.  here are a couple examples of how to use it.
Sep 27th
August 2010
1 post
new projects - memprof-analyzer and...
memprof-analyzer is a tool that’s slowly evolved as i’ve tried to use memprof to analyze some rails projects. if you don’t know about memprof, drop what you are doing and read up about it. i think this is a game changing app for the ruby community, because memprof can finally provide some level of insight into the memory usage of the ruby interpreter. memprof-analyzer in...
Aug 9th
July 2010
1 post
How to avoid the assignment statement →
simple steps you can take to adopt a more functional coding style
Jul 14th
June 2010
1 post
sending midi sysex with core midi and ruby ffi
lately i’ve been trying to update my fork of midiator to be compatible with SnowLeopard and send/receive sysex messages. this is a really rough example of how to use ruby to send sysex, but it’s somewhere to start. i’m eventually going to incorporate this into midiator.
Jun 13th
1 note
February 2010
1 post
caught in X11 hell
in case anyone else has a Sony Bravia KDL-42V4100 and a video card that can’t figure out what to set the modeline to, here’s something that works for me. Modeline “1919x1080” 148.50 1919 2023 2060 2221 1080 1084 1089 1125 +hsync +vsync I have to set the resolution to 1919x1080 so it ignores the bogus DDC values it gets. The...
Feb 21st
December 2009
1 post
networking with clojure
here’s a basic example of sending UDP packets with clojure.  It was a pretty good exercise in importing Java libs and working with them in clojure.
Dec 28th
2 notes
November 2009
3 posts
Ruby has a functional swing in it's step
I’ve recently started reading the “Programming Clojure” book by Stuart Halloway.  The book is an engaging read even if you are like me and have a tiny amount of prior lisp experience.  While learning the functional elements of Clojure, it helped me appreciate how easy it is to use Ruby in a functional style.  Here are just two of many different ways to have a functional...
Nov 29th
impress your friends with spittle!
making web sprites by hand is now just plain silly.  with spittle you can now auto-generate sprites and css, leaving you plenty of time to shave other yaks.  check out the readme to get started!
Nov 20th
update on multi-touch table
thought i would update everyone on the progress so far.  i finally got the IR assemblies done.   I realized i needed a small fan to cool them down because they can get quite hot (the resistors are rated 1w).  i also decided to remove the computer power plugs i was using and replace them with radio shack polarized plugs. they are cheep, easy to use, and haven’t fallen apart yet like those...
Nov 8th
1 note
August 2009
3 posts
a letter from _why
because of his disappearance, i thought i would share a letter i had received from _why in 2005.  i had just started learning ruby after a year or so break from development and emailed him because i was trying to figure out the path to enlightenment. i’ve learned from this email to put less importance on what is right and instead try to learn from everything, including times when i’m...
Aug 20th
70 notes
why i test
it has been coming up in conversation frequently, so i’d like to give my perspective on why i believe testing is important. putting aside for the moment the importance of testing first and good vs bad tests, i’ll keep the focus on the mere existence of tests in your project. one of the most advantageous benefits of testing is that it’s the collection of everything you and your...
Aug 17th
refactoring help from custom initializers
came across an interesting problem today in refactoring ruby’s osc library.  i was in the middle the network message parsing section and needed additional functionality from the Message object that would require changing the initializer. since i didn’t want to break all the old code, i added a custom initializer for the new code.  this will allowed me to refactor in small steps,...
Aug 12th
July 2009
1 post
Finding Memory Leaks with Bleak House →
Jul 15th
June 2009
1 post
A Beginners’ Guide to Big O Notation « Rob Bell →
Jun 25th
May 2009
5 posts
Listena clearing house of ideas in this song…...
May 27th
1 note
1 tag
first look at my multi-touch table
i’ve finally got some pics together of the prototype i’m building for a reactable type multi touch table.  Since this is a diffused rear illumination style table, i needed some source of IR light.  This one is a partially finished IR light that will have up to 40 IR leds.  The power comes from an old 300w computer power supply i had around.  I realized that the particular leds i got...
May 25th
1 note
tuio-ruby in google summer of code!
Anirudh Sharma is hard at work extending Google Sketchup with tuio-ruby to create a multi-touch modeling environment.  ( Check out his proposal for more details ).  His blog has been documenting his progress so far, and he’s also got a video up a multi-touch project ( sparsh ) he was a part of.
May 23rd
Fibers & Cooperative Scheduling in Ruby →
May 22nd
Bacon Prayer of the Lord →
May 15th
April 2009
5 posts
Erlang-Style Thread Safety in Ruby →
Apr 27th
Connecting JConsole to a Java process: the missing... →
Apr 25th
ruby TUIO client useage
i was snooping around the inter-tubes and found a blog post about using my tuio client.  since i use Processing for any graphical front ends, i use jruby to run my hybird java/ruby TUIO projects.   since, the JVM uses native threads instead of “green” threads like c-ruby, there isn’t any waiting on other threads to execute nonsense.  i would think that something similar to thread...
Apr 23rd
Listenhow do you express your love of maven?  with this...
Apr 17th
TUIO client now supports event callbacks
no more polling for you (unless you want to)!  i’ve worked on the ruby tuio client to now support event driven programming.  there is an example of it’s usage in the new, aptly named example folder.
Apr 6th
March 2009
6 posts
TUIO client for Ruby
I’ve separated out the ruby TUIO client i’ve been working on to it’s own github project.  This is an alpha-works-on-my-machine release but it has served me faithfully in my ultimate midi controller that integrates with reacTIVision. I’m still trying to figure out how to get a gem to build on github, but that is coming soon enough.  It requires the OSC gem to run, and...
Mar 21st
makezine.com: The BeatBearing Tangible Rhythm... →
Mar 18th
quick into to MIDI
in describing some of my projects to others, i realized i started getting blank stares around the same point: MIDI.  first, i will tell you what it is not.  MIDI is not the bleeps that you hear from old video games, it is a protocol used by musical equipment to control devices.  so in my studio, i have a sequencer, which is just a program that sends commands like “turn this note on, turn...
Mar 17th
Listena rough sketch of a song i am working on.  check...
Mar 10th
Interactive Multitouch Display →
Mar 8th
My Agile 2009 Proposal →
Mar 3rd
February 2009
6 posts
Testing Anti-Patterns →
Feb 13th
the battle against patterns
i think i understand the battle against the GoF and patterns, some don’t need them (lisp, et al.) and some want to learn them the hard way. my inspiration for this post
Feb 12th
How Not To Sort By Average Rating →
Feb 12th
SOLID Development Principles – In Motivational... →
SOLID Development Principles – In Motivational Pictures
Feb 12th
don't repeat your process
i’ve finally been able to put a name to something that has been bugging me for a while. imagine you take a developer and cut and paste the same bit of code all over the application. most will develop a look of disgust and tell you to keep your code DRY ( don’t repeat yourself ). however, you can take this same DRY person and find that they repeat some of the same manual process over...
Feb 9th
ultimate midi controller
reacTIVision + ruby + jruby + processing + OSC + MIDI + ableton live = Ultimate MIDI Controller!!   github project coming soon….
Feb 3rd
January 2009
8 posts
alan kay: is computer science an oxymoron? →
Jan 21st
Web 2.0rhea hack mistaken for end of universe  →
Jan 12th
tobytripp's dotfiles - emacs awesomeness →
Jan 12th
wii remote triggering apple script
what happens when you take one part wii remote, mix in some ruby and then sprinkle some apple script on top? you get a dvd player remote control!
Jan 11th