PHP has finally taken the plunge into the 1960s by implementing GOTO. Here's an implementation for Java.
A patch for a serious Java bug. No longer needed as of June 16.
Max & Michael have written a Max/MSP driver based on the multitouch code.
This is a little test applet to shows the touch points as reported by the MacBook multitouch pad. The drivers seems to be able to track an impressive 11 fingers at once.

My CSS-fu is weak; please use a recent browser.

Some rights reserved.

Random, semi-related image by atomicshark.

PlaySound OSX

For some reason there is no standard utility to play a sound file from a shell script. Well, here's one.

To use it, you just type

playsound foo.wav

You can download just the executable (Intel | PPC | ZIP file), or the source below. Place the file in /usr/local/bin, or wherever you feel comfortable with it. Such as inside your polish IM client :-)

Downlod this snippet as playsound.m

#import <Cocoa/Cocoa.h>

@interface Delegate : NSObject { }
@end

@implementation Delegate
- (void) sound: (NSSound *) sound didFinishPlaying: (BOOL) aBool
{
  [[NSApplication sharedApplication] terminate: nil];
}
@end


int main (int argc, char *argv[])
{
  if(argc!=2) {
    NSLog(@"usage: %s cowbell.wav", argv[0]);
    exit(1);
  }

  [[NSAutoreleasePool alloc] init];
  
  NSSound *sound = [[NSSound alloc]
		     initWithContentsOfFile: 
		       [NSString stringWithCString: argv[1]]
		     byReference: YES];
  
  [sound setDelegate: [[[Delegate alloc] init] autorelease]];
  [sound play];

  [[NSRunLoop currentRunLoop] run];

  return 1; // failed
}

Downlod this snippet as Makefile

test: playsound
	./playsound '/Applications/Mail.app/Contents/Resources/Mail Sent.aiff'
playsound: playsound.m Makefile
	gcc -o $@ -Wall -Os -framework Cocoa $<

Comments