Tuesday, March 31, 2009


Top Secret Dance Off. OMFG, my world just shook. The future is happening right now humans. Evolve!


0x8000 - on numberplanet.com, a neat site.


Monday, March 30, 2009


Force reinstall a package

If you've gone and corrupted a package by trying to install a version that you hacked (like I just did), you can reinstall it by going:

rpm -e --nodeps PACKAGE
yum install PACKAGE

rich ui

Sunday, March 29, 2009

Saturday, March 28, 2009


Capactive sensing for fun and profit. A great book out there called:

Capacitive Sensors, Larry K. Baxter, IEEE Press, NJ 1997


A better link for capsense.


That was the coolest and easiest project ever! I have a capacative sensor with my arduino using just a couple wires and a resistor!

Well, actually a few resistors since I didn't have a 10M Ohm resistor hanging around I put a bunch of 1M Ohm resistors in series.

So, you hook up pins 8 and 9 to your breadboard, and then put a 10M Ohm resistor between them. Then you hookup an antenna (in my case a sheet of aluminum foil) to pin 9. It looks something like this:

Then you run the following code on your Arduino (thanks loads to Paul Badger for the code:

// CapSense.pde
// Paul Badger 2007

// Fun with capacitive sensing and some machine code - for the Arduino (or Wiring Boards).
// Note that the machine code is based on Arduino Board and will probably require some changes for Wiring Board
// This works with a high value (1-10M) resistor between an output pin and an input pin.
// When the output pin changes it changes the state of the input pin in a time constant determined by R * C
// where R is the resistor and C is the capacitance of the pin plus any capacitance present at the sensor.
// It is possible when using this setup to see some variation in capacitance when one's hand is 3 to 4 inches from the sensors
// Try experimenting with larger sensors. Lower values of R will probably yield higher reliability.
// Use 1 M resistor (or less maybe) for absolute touch to activate.
// With a 10 M resistor the sensor will start to respond 1-2 inches away

// Setup
// Connect a 10M resistor between pins 8 and 9 on the Arduino Board
// Connect a small piece of alluminum or copper foil to a short wire and also connect it to pin 9

// When using this in an installation or device it's going to be important to use shielded cable if the wire between the sensor is
// more than a few inches long, or it runs by anything that is not supposed to be sensed.
// Calibration is also probably going to be an issue.
// Instead of "hard wiring" threshold values - store the "non touched" values in a variable on startup - and then compare.
// If your sensed object is many feet from the Arduino Board you're probably going to be better off using the Quantum cap sensors.

// Machine code and Port stuff from a forum post by ARP http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1169088394/0#0

int i;
unsigned int x, y;
float accum, fout, fval = .07; // these are variables for a simple low-pass (smoothing) filter - fval of 1 = no filter - .001 = max filter

void setup() {

DDRB=B101; // DDR is the pin direction register - governs inputs and outputs- 1's are outputs
// Arduino pin 8 output, pin 9 input, pin 10 output for "guard pin"
// preceding line is equivalent to three lines below
// pinMode(8, OUTPUT); // output pin
// pinMode(9, INPUT); // input pin
// pinMode(10, OUTPUT); // guard pin
digitalWrite(10, LOW); //could also be HIGH - don't use this pin for changing output though

void loop() {
y = 0; // clear out variables
x = 0;

for (i=0; i < 4 ; i++ ){ // do it four times to build up an average - not really neccessary but takes out some jitter

// LOW-to-HIGH transition
PORTB = PORTB | 1; // Same as line below - shows programmer chops but doesn't really buy any more speed
// digitalWrite(8, HIGH);
// output pin is PortB0 (Arduino 8), sensor pin is PortB1 (Arduinio 9)

while ((PINB & B10) != B10 ) { // while the sense pin is not high
// while (digitalRead(9) != 1) // same as above port manipulation above - only 20 times slower!

// HIGH-to-LOW transition
PORTB = PORTB & 0xFE; // Same as line below - these shows programmer chops but doesn't really buy any more speed
//digitalWrite(8, LOW);
while((PINB & B10) != 0 ){ // while pin is not low -- same as below only 20 times faster
// while(digitalRead(9) != 0 ) // same as above port manipulation - only 20 times slower!


fout = (fval * (float)x) + ((1-fval) * accum); // Easy smoothing filter "fval" determines amount of new data in fout
accum = fout;

Serial.print((long)x, DEC); // raw data - Low to High
Serial.print( " ");
Serial.print((long)y, DEC); // raw data - High to Low
Serial.print( " ");
Serial.println( (long)fout, DEC); // Smoothed Low to High

It output three numbers, the raw data for low to high, high to low and and a smoothed version of low to high.

Now, I want to make multiple antennas. I wonder how many I can wire together with one Arduino board? Can I run everything off of pin 8?

Will let you know how it goes.


Easy capacative sensing with Arduino. I'm breadboarding this right now.

Metal sculpture as antennas for new performance instrument?

Make a Theremin


A new community of orcas have been discovered in the Gulf of Mexico. Good news.

Friday, March 27, 2009



kill -0. Neat, it's a way to see if a process exists:

chris@chris-laptop:~$ sleep 60 &
[1] 1316
prompt:~$ kill -0 1316 # process id of the sleep command
prompt:~$ echo $?
prompt:~$ kill -0 65535 # process does not exist
bash: kill: (65535) - No such process
prompt:~$ echo $?
prompt:~$ sudo kill -0 27835 # a kernel process
prompt:~$ echo $?

Thursday, March 26, 2009

flash sound

How to make sound in Flash 10. And more.

Wow, so cool!



Man, "montage" in ImageMagick was just what I needed for this project:

montage frames/out-2-frame-1.jpg frames/out-2-frame-50.jpg frames/out-2-frame-100.jpg frames/out-2-frame-150.jpg out.jpg


Wednesday, March 25, 2009


yum install rubygems ruby-devel -y
yum install mysql mysql-devel mysql-server

gem install rails mongrel mongrel_cluster mime-types capistrano cheat gruff piston
gem install mysql -- --with-mysql-dir=/usr/ --with-mysql-lib=/usr/lib/mysql/ --with-mysql-include=/usr/include/mysql/

cd /usr ; /usr/bin/mysqld_safe &

yum install ImageMagick-devel -y
gem install rmagick
gem sources -a http://gems.github.com
gem install mislav-will_paginate
gem install SQS

jmf processor

If you get the error message:

Failed to create a processor: javax.media.NoProcessorException: Cannot find a Processor for: ./bluescreen2.mov

You need to give it the complete URL:

java Merge file:///home/sness/bluescreen2.mov file:///home/sness/bluescreen2.mov

Sunday, March 22, 2009

Chemical Brothers: Let Forever Be

this is my life everyday.

Nouvelle Vague - Love will tear us apart (LIVE)


Nouvelle Vague - Too Drunk to Fuck (Audio)

Dead Kennedys-Too Drunk To Fuck



Actually, forget multitouch. I want to do an no-touch-omni-touch-emg interaction system this summer.


Ohm64 - Want have.

MMF - Max Multitouch Framework - demo #1

Multitouch with MAX.


pymt demo reel from Thomas Hansen on Vimeo.

PyMT - Simple multitouch with Python. Oh yeah baby. yes, yes, yes.

This summer my hardware project is going to be to build a multitouch surface for sness.


Thursday, March 19, 2009

Oh Snap! - Nite Game

The bass player, Darren is a fellow M.Sc. student here at UVIC. Go Darren!

Tuesday, March 17, 2009


ignite show. Watch and learn.

sixth sense

sixth sense

'SixthSense' is a wearable gestural interface that augments the physical world around us with digital information and lets us use natural hand gestures to interact with that information.

bring the funk

Interactive LED Panels
Meggy Jr RGB - Want have.
Meggy Jr
Kyle Phillips - is a Minneapolis-based interaction designer and developer actively working on installation and web experiences.

Monday, March 16, 2009

oh snap!

My friend Darren's band Oh Snap just released their second video

Sunday, March 15, 2009


Some links for what I'm going to be doing in April, getting Vlad the Deployer + Phusion Passenger working on my new Slicehost servers. Both money and time will be saved:

Phusion Passenger
How-To Setup a Linux Server for Ruby on Rails - with Phusion Passenger and GitHub - Except I'll be using my own git server. Excellent article.
Vlad the Deployer and Git - Actually, the new vlad contains git support natively. Nice.
Vlad deployment recipe for Phusion Passenger


gesture music



dronebox 2

advanced cacophonator (bunt)



For a long time I've been using Capistrano and Mongrel for my Ruby on Rails needs, but they've been getting on my nerves for a while, so after exams are all done I'll be switching to:

Vlad the Deployer and Phusion Passenger aka mod_rails.

I'm also going to be switching from my iWeb hosting to slice host, I've heard great things about them, and my serving needs are much lower now than they used to be.

Saturday, March 14, 2009


Merit badges for electronics. I want one.


aws rocks

AWS "sucks the air out of the room." Cuts EC2 costs by 50%

Wow. It already rocked so much, I might just have to migrate my dedicated server to fully AWS now. I've had quite a bit of experience with AWS, with EC2, S3 and SWS, and it has all been positive.



The Evolution of HTML

And also a chance for me to say my favorite maxim:

Evolve, human!


beauty eh

Beautiful TeX fonts.

I'm really digging Computer Modern Bright

push it

Irresponsible Push

I love it:

feature. I just need to test it. We'll be able to release it in 2-3 weeks.
Luis: Push now. Release it.
Developer:What? Live?
Luis: Yes, push push push.

Then the untested feature is released (with bugs of course).

Luis: There are bugs! It's live. People are seeing the bugs! We're gonna lose users. FIX IT. Fix it now!

Then the developer goes nuts for the next 30 minutes fixing the issue, and voila: what was going to take 2-3 weeks took less than an hour.


Friday, March 13, 2009

Thursday, March 12, 2009

percent sign

Percent sign in HTML is:


ruby nice puts

A really nice little trick in Ruby to do formatted output.

puts "%3.6f" % unscaled

You can also use sprintf:

a = sprintf("%3.3f %3.3f",curr.to_f/60.0,diff)

ruby binary

a = 125
puts a.to_s(2)

I <3 ruby.

Kutiman-Thru-you - 01 - Mother of All Funk Chords


navigateToURL is the new getURL.



To check if a ifstream in C++ still can get data:

ifstream Read


if (Read.good()) {



The Periodic Table of Typefaces

I want it as a huge poster for my wall.




Operating System Interface Design Between 1981-2009. The original Mac OS and IRIX brought back good memories.



I am currently doing things with Marsyas that it never was intended to do, but that the way my old UNIX hacker ways demand. Specifically, I'm writing small little programs in Marsyas that take RealVecSources as input, and output to an AudioSink or a SoundFileSink. This is so that I can put small programs together, each of which does one thing well into a bigger whole.

The way you usually do this in Marsyas is to write another module, which is great, but I'm just doing an assignment for class, and it's so much easier to do the processing in Ruby rather than C++.

The trick to using a RealVecSource with a SoundFileSink is that it's only after you fill the RealVecSource with data through it's data control that the network knows what data you're going to be sending through the network.

So, instead of doing something like this:

MarSystem* net = mng.create("Series", "net");
net->addMarSystem(mng.create("RealvecSource", "src"));
net->addMarSystem(mng.create("SoundFileSink", "dest"));

while (!done) {
net->updctrl("RealvecSource/src/mrs_realvec/data", r);

You want to do something more like:

MarSystem* net = mng.create("Series", "net");
net->addMarSystem(mng.create("RealvecSource", "src"));
net->addMarSystem(mng.create("SoundFileSink", "dest"));

bool init = false;
while (!done) {
realvec r(1.0,3,4);
net->updctrl("RealvecSource/src/mrs_realvec/data", r);

if (!init) {

Same thing for AudioSink:

MarSystem* net = mng.create("Series", "net");
net->addMarSystem(mng.create("RealvecSource", "src"));
net->addMarSystem(mng.create("SoundFileSink", "dest"));

bool init = false;
while (!done) {
realvec r(1.0,3,4);
net->updctrl("RealvecSource/src/mrs_realvec/data", r);

if (!init) {
net->updctrl("AudioSink/dest/mrs_bool/initAudio", true);

Wednesday, March 11, 2009

more beautiful forms



The Cult of Done Manifesto

Reproduced here:

1. There are three states of being. Not knowing, action and completion.
2. Accept that everything is a draft. It helps to get it done.
3. There is no editing stage.
4. Pretending you know what you're doing is almost the same as knowing what you are doing, so just accept that you know what you're doing even if you don't and do it.
5. Banish procrastination. If you wait more than a week to get an idea done, abandon it.
6. The point of being done is not to finish but to get other things done.
7. Once you're done you can throw it away.
8. Laugh at perfection. It's boring and keeps you from being done.
9. People without dirty hands are wrong. Doing something makes you right.
10. Failure counts as done. So do mistakes.
11. Destruction is a variant of done.
12. If you have an idea and publish it on the internet, that counts as a ghost of done.
13. Done is the engine of more.

Tuesday, March 10, 2009


vc domain winning nerdtainment paradise ohsnapmusiccom our content original programming founder launched entertainment science videos happy award student stars own give exclusive housewife lover victoria entreprenuer geek write mixed mac master simplebucketcom mobile people university artists devices all hi me software entrepreneurjill movies bring internets music various business most computer band girl trades wwwvideoofthedaycom writer like graduate shiny



git er done



The Rubber Duck Method of Debugging:

> There is an entire development methodology (whose name escapes me at the
> moment) that makes use of that very phenomenon.

We called it the Rubber Duck method of debugging. It goes like this:

1) Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck
(bathtub variety)
2) Place rubber duck on desk and inform it you are just going to go over
some code with it, if that's all right.
3) Explain to the duck what you code is supposed to do, and then go into
detail and explain things line by line
4) At some point you will tell the duck what you are doing next and then
realise that that is not in fact what you are actually doing. The duck
will sit there serenely, happy in the knowledge that it has helped you
on your way.

Works every time. Actually, if you don't have a rubber duck you could at
a pinch ask a fellow programmer or engineer to sit in.



The way that real men implement strlen. Woah, now that's a strlen.

Monday, March 09, 2009


History of programming languages, from the creators. A great set of interviews:




Learn tcpdump.



Kepler Overview - NASA's first mission capable of finding Earth-size and smaller planets around other stars.



Ext4 data loss - The importance of doing things right when writing to files is going to be critical with some of the new filesystems out there.

Do this:

open and read file ~/.kde/foo/bar/baz
fd = open("~/.kde/foo/bar/baz.new", O_WRONLY|O_TRUNC|O_CREAT)
write(fd, buf-of-new-contents-of-file, size-of-new-contents-of-file)
fsync(fd) --- and check the error return from the fsync
rename("~/.kde/foo/bar/baz", "~/.kde/foo/bar/baz~") --- this is optional
rename("~/.kde/foo/bar/baz.new", "~/.kde/foo/bar/baz")


How To Successfully Compete With Open Source Software - These are things that we in the FLOSS community need to take into account.


Ruby-style Blocks in Python

Yes, blocks in Ruby are very sexy, one of the nicest parts about Ruby.



employees.select {|e| e.salary > developer.salary}


employees.select(lambda e: e.salary > developer.salary)


Sunday, March 08, 2009


2019 by microsoft. actually very cool.


There is a subtle theme here...

Saturday, March 07, 2009

Friday, March 06, 2009


sprouted grain bread. I have got to try making this.



Playing Rock Band with a real guitar. Future coming now.

Cillit bang techno remix




Making pasta

Noodle - From the German word "nudel"

Spaghetti - Italian for little strings

Linguine - Italian for little tongues

Vermicelli - Italian for little worms

The recipe I'm using is from How to Make Pasta

I'm not using a machine, doing it all by hand. I now want to start making ravioli by hand.

Combine 2 cups all-purpose flour and 1/4 teaspoon salt on pastry board, culling board, or countertop; make well in center. Whisk 3 eggs, 1 tablespoon milk, and1 teaspoon olive oil in small bowl until well blended; gradually pour into well in flour mixture while mixing with fork or fingertips to form ball of dough.


Thursday, March 05, 2009

orchive v2

Just launched a new version of The Orchive. Check it out, let me know what you think.

Mahadevibot Variations

Just uploaded this video of Andy playing the Mahadevibot with the Radiodrum. Andy rocks.


Wednesday, March 04, 2009


OMFG, Daft Punk is making the musical score for Tron 2. I am so excited on so many different levels.

Monday, March 02, 2009



A little bit of C++ that I whipped up to convert to and from binary, since I didn't find anything too inspiring online:

string binary(int v, int bits) {

int p;

string s = "";

for (int i = bits; i >= 0; i--) {
p = pow(2,i);
if (v & (1 << i)) {
s += "1";
} else {
s += "0";

return s;

Convert a bitstream to a floating point number between 0 and 1. It's a smart little function
because it figures out the range from the length of the input string

float convert_bitstring_to_float(string s) {

float v = 0;

int len = s.length();

for (int i = 0; i < len; i++) {
cout << "i=" << i << " s[i]=" << s[i] << endl;
if (s[len-i-1] == '1') {
v += (1 << i);

return v / (pow(2,len));



Whenever you use figures, always (and I mean ALWAYS EVER FOREVER ALWAYS) put \caption first, and \label second like this:

\caption{Some Image}

Sunday, March 01, 2009

Look Around You - Computer Games

Look Around You - Music


recordmydesktop --on-the-fly-encoding --full-shots -fps 29.97 -width 720 -height 528 -x 20 -y 40

keyjnote -f -g 724x532 python-before-eggs.pdf

mencoder out.ogv -ovc libdv -oac pcm -vf scale=720:480 -o editme.dv

cinelerra (or After Effects, Adobe Premier, Final Cut Pro)

mencoder cinelerra.ogg -vf scale=640:480 -af volnorm=1:0.5 -ovc lavc -oac twolame -o final.avi


KeyJnote - is a program that displays PDF presentation slides with style. Smooth alpha-blended slide transitions are provided for the sake of eye candy, but in addition to this, KeyJnote offers some unique tools that are very useful for presentations.


How To Produce A Linux Screencast

1) Use "recordmydesktop"
2) Convert to raw .dv format (which is huge)
3) Edit in some program
4) Convert to something that YouTube or Vimeo likes


getting tail

Tail Recursion

Which I found by looking at:


Which led to:

Getting started with Clojure

But what led me to all of this was:

Ruby's Most Underused Keyword (spoiler, it's "redo")

sf git

SourceForge gets Git. And there was great rejoicing.