2010-08-14

Disabling PulseAudio in Ubuntu

PulseAudio really wants to stay running, but I want to run JACK instead if doing audio recording work. In Ubuntu 10, PulseAudio appears to be run from init, which respawns it automatically. To get it to go away:

echo "autospawn = no" >> ~/.pulse/client.conf
pulseaudio --kill

2010-06-09

Sort characters in a string in Tcl

This could be handy for identifying anagrams, for example.

% join [lsort [split abacab {}]] {}
aaabbc

For case-insensitivity:

% join [lsort [split [string tolower PaTeD] {}]] {}
adept

To return just the set of characters used:

% join [lsort -unique [split [string tolower Mississippi] {}]] {}
imps