Archive for December, 2012

Minds and software

Friday, December 28th, 2012

So, from time to time I tell people this, and I’m trying to work out a really good way of putting it for a upcoming album.

Our minds have, according to wikipedia, 100 billion neurons. A typical high performance computer, capable of producing very-nearly-real experiences, has about 2 billion transistors – our minds in fact have 20 times more neurons than the most powerful microprocessors made. In addition, a neuron is not a transistor. A more accurate approximation for a neuron might be a small microcontroller, or about 50,000 transistors.

This leads us to conclude, without even discussing things like synaptic interconnections, that our minds are vastly more powerful than the computer systems we use. If you believe the above approximations, the amount by which our brains could hypothetically outperform a computer system are astonishing. And yet, while the computer in front of me has no trouble simulating any sort of reality, my mind has a very hard time feeding me anything other than nightmares when I am asleep.

What is missing – or wrong – is the software that I am running. It is completely reasonable to think that my mind should be able to handle the day-to-day business of survival (work and the like) as a background task, while leaving my conscious foreground experience free for whatever adventures I would like to have, and should in addition be able to give me experiences that are not consistent with, for example, the physical laws of this universe (since my mind is trading in information)

Christmas CD

Friday, December 28th, 2012

It is a little late for me to post this, but I realized I hadn’t – I recorded a CD of christmas music for my friends – it’s solo piano, and available for download at http://www.sheer.us/stuff/xmas2012. It is all traditional holiday songs except for track 8, which is a impromptu jam that was recorded between other tracks, in one take. Personally, I’m the happiest with track 8 – I’ve already started my next album, which will be more electronic and have many more layers to it.

[technical] multi-master lsyncd replication and file locking

Friday, December 28th, 2012

I have recently started to use lsyncd to support automated replication of data for web servers. Because of the particular requirements of one of my customers, I needed to set up bidirectional syncing between two servers on two different coasts. This presented a good deal of trouble initially because the lsyncd on one coast would react to files being written to it by writing those files back to the other coast. This was fine for writes that happened quickly, but for writes that happen slowly, like large files being FTP’d, it would lead to file truncation and file permission issues.

The solution I found was to update to the latest lsyncd (2.1.4) which permitted specifying the rsync binary, and then provide a “wrapper” binary written in perl that would verify that all of the files to be synced were not currently being written to (via lsof). Below is the perl script (placed in /usr/local/bin/rsync-wrapper):


#!/usr/bin/perl

$args = “”;

while($arg = shift) {
$args .= $arg . ” “;
push(@z, $arg);
}

slog(“args: $args”);

$dest = pop(@z);
$src = pop(@z);
slog(“dest: $dest src: $src”);

if($args =~ /–force/) {
# exec
slog(“delay list”);
$delay = 1;
}

$list = “”;

while($in = <>) {
$list .= $in;
if($delay) {
$file = $in;
chop($file);
$filepath = $src . $file;
if(-f $filepath) {
$count = 0;
while(0 == ($result = system(“lsof $filepath”))) {
slog(“$count – result: $result path: $filepath”);
$count++;
sleep(1);
}
}
}
}

slog(“Exec rsync”);
open(LIST, “|/usr/bin/rsync ” . $args);
print LIST $list;
close(LIST);

sub slog {
my $msg = shift;
open(LOG, “>>/var/log/rsync-wrapper.log”);
print LOG $msg . “\n”;
close(LOG);
}

and the config file for lsyncd:


settings = {
logfile = “/var/log/lsyncd.log”,
statusFile = “/tmp/lsyncd.status”,
maxProcesses = 5,
delay = 0,
}

sync {
default.rsync,
source=”/home”,
target=”www.east.omitted.net::home”,
excludeFrom=”/etc/lsyncd/exclude”,
rsync = {
binary = “/usr/local/bin/rsync-wrapper”,
owner = true,
group = true,
}
}

Note that this is only one of several solutions I identified for this problem. If you are having similar problems and this doesn’t help, feel free to contact me for a list of them.

Fraud In France

Thursday, December 20th, 2012

As many of you know, I have been involved with a new band for the last few months, Fraud In France. On Dec 8, we performed a show at Cafe Racer, and I’ve extracted some of the best clips from it for your listening pleasure: Dec 8 at Cafe Racer. I’ve also been working on a couple of solo projects, one of which is done and will be revealed here in a few days, and the other of which I’m just getting started on, but I’m excited about.

I’m also looking forward to going to the Oracle Gathering Reunion on Dec 21st. And no, I don’t think the world is going to end. I hope it will change for the better, but then, I always hope that.

Gifts

Tuesday, December 4th, 2012

I’ve been asked by a couple of people what I want for christmas. This list isn’t serious, because some of the items on it cost as much as a used car, but here’s my current wishlist:

(Side note: I am just fine with used gifts / re-gifts of things I actually want-need. I have no need for new merchandise and I would rather my friends not spend the money.)

(Side note #2: Please don’t feel that you need to send me anything. Most especially, don’t send me “filler” gifts i.e. gifts that you would buy at a drugstore because you hadn’t gotten me anything and felt like you needed to – seriously, I have enough of a problem with hoarding without help 😉 If you can’t think of something that specifically fits me, your best gift is to not send me something. I hope this doesn’t sound harsh or mean. )

(Side note #3: In the vein of #2, if you’re trying to think of a gift that won’t add to my hoarde and have to be at some point gotten rid of, think of things like software or movies / media, which are always small and eminently regiftable if I already have a copy, or things like experiences.. a trip somewhere with you or a jam session with you.. which take no physical space and add to my treasure trove of memories)

*) A 12″, 300W RMS or more subwoofer module with a line in for my office
*) Amiga Forever
*) Blu-rays of the following movies:
Who framed roger rabbit
The matrix
Hackers
Pink Floyd’s Delicate Sound or Pulse tour
Any minds-eye-esque eye candy 😉
*) Kindle books.. anything you think I’d like to read. (Don’t bother sending Heinlien, Asimov, Prachett, or MacDonald though, or any of the Callahan’s series by Spider.. I already have them)
*) A copy of the basic ($1000) version of Vienna VST strings
*) A 61-key varient of the Access Virus
*) A basic six-string accoustic guitar (used is preferable but it must still be possible to tune it ;-))
*) Donations to any charity feeding the homeless or taking care of our four-footed friends which does not spend all the money on mailing repeated requests for more money. [Lately I feel like when I donate to a charity I’m wasting my money because they use my entire donation to spam me repeatedly asking for more money]
*) A Alesis AI-4
*) A small 4-track USB (OSX compatible) audio interface with two XLRs with phantom power and two 1/4″ inputs
*) A gig bag or light case for a low-profile 88-key keyboard
*) Double-layer jeans (now, if only I knew what size I was .. ;-))
*) For musicians: The best gift you can give me is a jam session.