As is so often the case..

August 5th, 2006

Sheer has a bit of not-very-well-written code to share. Because nothing immediately jumped out at me for fetching LJ, here is a perl script that will fetch the latest LJ entry from the RSS feed, compare it with a database. You can also find this data in Sheer’s newly created code directory, where he will share all open source code snippits in the future: http://www.sheer.us/code

#!/usr/bin/perl

use DBI;
use Data::Dumper;
use LWP::Simple;
use XML::Simple;

my $dbh = DBI->connect(“dbi:mysql:db=obfuscated”,”because i”,”dont want you accessing it”);

fetchdata();

# yes, this could be a *lot* better

sub fetchdata()
{
my $xml = XML::Simple->new();
my $webpage = ““;
$webpage = get(“http://sheer-panic.livejournal.com/data/rss”);

#print $webpage;

$debug = 0;

if(! defined $webpage) {
# die “sheer sucks”;
return 0;
}

my $doc = $xml->XMLin($webpage);

# return($doc->{GRPVOL}{PRV});

$item = $doc->{channel}{item}[0];

# print Dumper($item);
# print Dumper($doc);

$title = $item->{‘title’};
$titleq = $dbh->quote($title);
$link = $item->{‘link’};
$linkq = $dbh->quote($link);
$guid = $item->{‘guid’}{‘content’};
$guidq = $dbh->quote($guid);
$text = $item->{‘description’};
$textq = $dbh->quote($text);
$date = $item->{‘pubDate’};
$dateq = $dbh->quote($date);

$sth = $dbh->prepare(“SELECT lj_seq FROM lj WHERE link = ‘$link'”);
$sth->execute();

($seq) = $sth->fetchrow_array();

if($seq) {
print “we got it” if ($debug);
return;
} else {
print “Title: [$title]\nlink: [$link]\nGuid:[$guid]\ntext:[$text]\ndate:[$date]\n” if ($debug);

$query = “INSERT INTO lj VALUES (NULL,$linkq,$textq,$titleq,$dateq,$guidq,NOW())”;
print “query: $query\n” if ($debug);
$dbh->do($query);

}

}

#–
#– Table structure for table ‘lj’
#–

#CREATE TABLE lj (
# lj_seq int(11) NOT NULL auto_increment,
# link text,
# description text,
# title text,
# `date` varchar(255) default NULL,
# guid text,
# t timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
# PRIMARY KEY (lj_seq)
#) ENGINE=MyISAM DEFAULT CHARSET=latin1;
<

Sex and waterbeds and things one should never do with a microcontroller.

August 5th, 2006

I was recently discussing sex on a waterbed – this isn’t something that I’ve ever partaken of myself that I can remember, but it seems to me that the basic problem with sex on a waterbed would be that waterbeds tend to have resonant frequencies and they would tend to want to slosh at those frequencies and no others.

Leave it to sheer to come up with a solution to a problem that he’s never actually directly observed – and I suspect such a device already exists, but..

If you take a thing like a waterproof speaker, and place it with the cone side ‘in’ the waterbed, it should be possible to counteract the natural resonance of the waterbed and instead make it slosh to whatever rhythm the occupents of said bed are currently pursuing. It should also be fairly easy to come up with sensors that can detect that rhythem. (Why can’t I think how to spell rhythym today?) Alternates are a motor connected to a crankshaft-and-piston style affair that pushed the water out of the way. Or something – you all get the idea.

It’s probably a pity I’m not patenting this – I could make billions. Of course, chances are good that someone already has patented it, and chances are also pretty good that joe consumer is not going to be interested in this product. But if anyone wants to fedex me $5 million or so, I’ll get started on the prototypes right away.

795

August 5th, 2006

Well, I have joined the thousands of web sites that have ultimately given up on static html in favor of more convenient forms of self-expression. Sheer.us is now a index.php web site.

I don’t know why I feel that this marks me as a sellout.

It did make making a ‘days clean’ counter incredibly easy. I’m not proud of the number sitting on that counter, but..

Having taken this step, here are the next steps that I think I’d like to take:

1) Make a generic multiuser ‘days clean’ calander and export it as a resource for all those out there in networkland who are quitting something. Have some generic platitudes about what to do when you relapse/fall back down that show up when you push the ‘reset counter’ button, a field for putting in how many deuchmarks your personal habit costs you per day for those to which such things apply – I know code is already out there to put this on people’s web sites, but I still think it’d be a neat thing to do.

2) Index my entire photo collection and have the picture on the page change every time you index it

3) Include my most recent public journal entry – I’m not sure how this would work exactly, my suspicion is I would want to fetch it via RSS every few hours and keep a local copy cached. Sample code appriciated if anyone’s got it.

4) Finally get around to setting up ‘sheer radio’ – something that takes random songs, or 10 minute random clips out of jam sessions, and plays them over the wshr tuners.

Yet more projects I’ll never get around to. Just what I needed.. 😉

I’ve no end of ideas – it’s just tricky to impliment even a small percentage of them.

Chunks of infinity

August 5th, 2006

Okay, so, presuming that DNA can be represented in binary form – not something I’d care to lay money on, it may be one of those problems like vinyl vs. CDs…

Oh dear.

It is completely impossible to represent the output of a analog instrument accurately as a digital signal, of *any* precision. 16 bits, 24 bits, 32 bits, 64 bits, 44khz, 96khz, go as far as you like, you still won’t have actually captured the instrument. Of course, the difference between what you captured and what is actually there is so infintestimally small that only very sensitive equipment can pick it up – and certainly small enough that no human ear can hear it. But it is there. DNA may express accurately as a digital signal, or it may not. We haven’t yet had the technology – as far as I know – to write a DNA sequence into a computer and then somehow bring it back out and create a lifeform based on it. I’d appriciate it if that’s not true if someone would point it out to me – but as far as I know ‘gene splicing’ is a mechanical thing thus far.

Anyway.. presuming that it can be, both me and any virii I may catch (copy data out of) are just very, very large numbers. I know that I’ve been going on about this for a while and I will probably continue to go on about it for a while, although I’m sure that sooner or later I’ll give it up in favor of musing about something else that’s completely irrelevant to anything.

That said, why is it that I am a self-aware life form protected by human law and my virii are not? For that matter, why is it that if a bear kills a man, the bear is free to go, whereas if I kill a man, I’m jailed for 20 years? (Not that I consider killing someone a moral activity, or that I would do such a thing [I hope]).

Does anyone *know* that AIDS isn’t sentient? We may not be *aware* of the sensory data that it is receiving, much in the same way that it probably isn’t aware of the sensory data we’re receiving. It may be blissfully unaware of killing us just as we are blissfully unaware of killing thousands of virii and bacteria a day.

For that matter, we don’t know if its self-aware. We’re not even all that clear on what self-aware means. I remember going to the aquarium with my sister and watching a fish, and having it swivil it’s eyes around – and I swear it was watching me. Fish don’t have much in the way of memory, supposedly – except that a salmon can swim back to the river which it was born in years after its birth. Perhaps we’re not seeing the whole picture..

I feel guilty about eating fish. I don’t eat cow, but lately I’ve been craving cow and feeling guilty about wanting to eat cow. And I wonder if cow would feel guilty about eating me – they do seem to be vegetarian.

..

August 2nd, 2006

A few dusty pictures that I found while on my search for treasure.

Music etc..

August 2nd, 2006

Today was the annual Seattle Night Out block party. Two years ago, my band Mischief Committee played for the first time anywhere. Today, we played for what may be the last time anywhere. (Depending on if Tory gets it togeather to have us play at a house party before we all head our seperate ways.)

We’re pretty much breaking up because everyone is moving to a different state.. Joe is going back to Michigan, I’m going to SoCal (hopefully, if I ever get a house etc), and Tory is – staying here, apparently. It’s hard to tell who’s getting the best deal.

Sadly, we’ve never been better. I’ve never had so many people tell me how wonderful a set was – even at Fluffy Bunny, which had 10X as many people as this event. We got one complaint, from a neighbor two blocks away.. (two blocks away.. and the system wasn’t even wide open. Heh. Heh. Muhahahah). There were enough people talking about how good the set was afterwords that not even I could think that they didn’t really mean it and were just trying to be nice..

And yet, I’m sad. Depressed. K. stayed in the house for the set, which shouldn’t bother me but does, and growled at me afterwords about a number of minor things. And.. I don’t know. I heard a lot of mistakes, a lot of things I could have done better and some things taht other people could have done better. I fear I’ve turned into Mr. Tanner, only hearing the flaws.

July 30th, 2006

Okay, I apologize for the dark and depressing nature of the last post. I’m in a slightly better mood today, and I admit that my darkest moods are definately over the top.

I’ve been working on cleaning my office.. it’s gone from complete disaster to just difficult to look at, which I guess I feel good about. (Formerly it was impossible to get to my chair, much less to the other side of the room. Now it’s just a mess to the extent that it’s emotionally crushing, but not to the extent that it’s a serious hazard to health.)

I also installed the UPS yesterday, so now even in a power failure I can continue computing. (except that the ethernet hubs aren’t on it – mental note to self, fix that.)

I also got the printer to end all printers the other day. I apologize if I’ve already gone on about this.. this thing weighs 62 lbs, is a color copier, fax machine, color laser printer, and oooh is the output pretty.. it’s nothing compared with some of the toys Scott has to play with, but still..

I haven’t figured out exactly what I’m going to do with it yet, but one thing I am going to do is print posters and stick them up on my walls.

my offspring..

July 30th, 2006

http://www.sheer.us/pics/nathan/Natalie-Scan-Photo-2006.jpg
http://www.sheer.us/pics/nathan/Natalie-Scan-Photo-2006-2.jpg

Since I no longer believe it is ethical to create life without that life’s permission (and it’s basically impossible, as far as I can tell, to get permission prior to the creation) I’m not sure how I feel about N. – obviously I don’t want him/her to stop existing (unless he/she really, really chooses to) but I feel very guilty at this point for having created him/her – I guess when worrying about teenage pregnancy and whatnot I worried about the more pragmatic matters like how I would pay for half a kid and what the girl’s parents would do to me, but not the more existential things like how life is painful and how there are horrible things like cancer and natural disasters and how at the very best you’re going to get to die of old age with system after system going offline in incredibly painful ways and how no one should be bringing more people into this world to suffer thusly..

So, yeah, I feel guilty about N.

Bleh.

S.

..

July 30th, 2006

Once again I am playing (mostly unsuccessfully) with mixing down multitrack audio.

So, live from Wayne’s World in Seattle, WA we have the Art Theives :

http://www.sheer.us/stuff/ArtTheives/

(I also was playing keys on Black Magic Woman)

Star Trek XII – the search for more gain..

July 29th, 2006

So, like most of the network denziens of the year 2000, I use a wireless network. 802.11g, no WEP (I use application-level security when such things are appropriate). And, because I live in a lath-plaster house, I spend most of my time staring at signal level meters that show one bar at best.

Recently, I had reason to go to Fry’s electronics to pick up a high-gain antenna or three. I got one USB adapter with a 8dB antenna (it looks like a little microwave dish, it’s adorable) and a signal strength meter, and that’s kind of cool, and I got a 10dB omni and a 15dB ‘corner’ (i.e. 90 degree slice) antenna and put them up.

The results could best be described as ‘strange’.

With just the corner antenna operating, I get 5 out of 5 signal on my laptop in the room that previously would regularly disconnect because of poor signal quality. However, when I add the omni to the mix (my access point has two antenna connectors which go, as far as I can tell, to two seperate transcevers) the signal goes *down* to about three bars. As near as I can tell, I’m better off throughout the entire house, signal strength wise, with just the 15db corner.

This makes NO sense. There are even places in the *shadow* of the corner antenna that do better with just the corner than with the corner and the omni. It’s like the omni is 180 degrees out of phase or something…

Anyone have any ideas?