Another indicator that we live in a f***ed up world

September 3rd, 2006

The wikipedia has a operating budget of about $1.2 million a year – and they currently are reporting a $160k shortfall.

The corperation for public broadcasting is whining because they have had their budget cut from $400 million to $300 million.

Okay, I love PBS, but…

For blank’s sake.. $300 million dollars in government funding, plus all of the private and corperate funding.. and, if you all haven’t noticed, PBS basically runs ads just like any other broadcast system, they just call them ‘thanking our sponsers’.. well, okay, if you all want to kid yourselves like that..

The wikipedia! has! no! ads!. It offers information which may be biased or incorrect, but at least has a better chance of maybe bearing some resemblence to the truth than any other encyclopedia compiled to date. And they’ve got a budget shortfall, when their total budget is probably less than PBS spends on their fancy window offices.

Why can’t the U.s. government just kick a couple of million dollars over to the wikipedia people? Kind of, you know, eliminate any worry that they might not be able to keep the lights on next year?

Actually, it occurs to me that a mostly unbiased forum for collecting knowledge might be considered a bad thing by the current administration. Maybe even a very bad thing.

But I’m going to try and put on my optimism hat and hope everything comes out for the best.

In the meantime, I’m donating everything I would have put into politics this month into the wikipedia instead. Probably do more good there.

SQL database of primes

September 3rd, 2006

So, I’m generating a SQL database of the first million primes as part of one of those random side tangents that I go off on occasionally. So far I’m up to half a million, and I’ve made several optimizations. I don’t know that my primefinder is actually valid, so I’m including it for you all to critique:

#!/usr/bin/perl

# version: 0.06
$debug = 1;

use DBI;
use Time::Local;

$dbh = DBI->connect(“dbi:mysql:db=primes”,undef,undef) || die “Failed to connect to database”;

$SIG{INT} = \&shutdown;

# first, locate our current position

($current) = $dbh->selectrow_array(“SELECT loc FROM current_location”);

$counter = $current;

#$lastprime = 1;

($lastprime) = $dbh->selectrow_array(“SELECT MAX(prime_number) FROM primes”);

$counter = ($lastprime + 1) if($lastprime > $counter);

while(1) {

if(is_prime($counter)) {
$span = $counter – $lastprime;
$lastprime = $counter;
log_prime($counter, $span);
print “$counter ($span)\n” if($debug);
}

if(! ($counter % 1000)) {
$dbh->do(“UPDATE current_location SET loc = $counter, ts = now()”);
}

$counter++;

}

sub is_prime {

my $number = shift;

# could use much improvement

return 0 if ($number == 1);
return 0 if (($number != 2) && (($number % 2) == 0));

# $maxprime = (int($number / 2) + 1);
$maxprime = (int(sqrt($number)) + 1);

# test against all known primes thus far

$sth = $dbh->prepare(“SELECT prime_number FROM primes WHERE prime_number < $maxprime"); $sth->execute();

while(($pp) = $sth->fetchrow_array()) {
# return 0 if(($number != $pp) && (int($number / $pp)) == ($number / $pp));
return 0 if(($number != $pp) && (($number % $pp) == 0));
}

$sth->finish();

return 1;
}

sub log_prime {
my $number = shift;
my $span = shift;

$dbh->do(“INSERT INTO primes VALUES (NULL,$number,$span,now())”);
}

sub shutdown {

$dbh->do(“UPDATE current_location SET loc = $counter, ts = now()”);
exit(0);
}

Nuts.

September 1st, 2006

Fun little page I found:

http://www-groups.dcs.st-and.ac.uk/~history/HistTopics/Prime_numbers.html

Is it a bad sign that as I get older, I increasingly enjoy things like this?

Grr grr

August 30th, 2006

According to the tail end of http://en.wikipedia.org/wiki/Flash_memory, this article is ‘too technical’. Personally, I think it’s just the right amount of technical – any less technical and it wouldn’t get all of the ideas across. Chances are if you’re looking up flash memory specifically, you’re not scared by technical details. The wikipedia people shouldn’t scare away their more technical authors, IMHO.

Oh well. Nothing’s perfect.

you all will be pleased to know…

August 23rd, 2006

that my backup of my laptop completed with 0 errors.

Boy, do I feel sheepish..

August 22nd, 2006

1) The location to download WinZip 9 is in the FAQ.
2) My laptop seems to be backing up happily. Just to be sure, though, I will try to avoid using it until the backup completes.
3) I have got to do something about my negative attitude.

August 22nd, 2006

This day just gets better and better – I set the date forward on the wintel I’m using temporarily while my laptop is backing up, and it now will not run the WinZip eval version. So, I grab my winzip unlock code that I actually purchased from WinZip, and type it in.. and no dice. Oops, it was for V9.

Go to look for V9 on the web.. and it’s not there, except from people I wouldn’t download from on a bet. Winzip took it down to force people to buy V10, apparently.

Fight the urge to program my fax machine to send them 10,000 faxes saying ‘You Suck’.

Email their tech support. We’ll see what they say.

August 22nd, 2006

I gave up smoking many months ago, but this is one of those times when I really wish I had a cig.

My computer has gotten further along the backup process this time, and hasn’t crashed yet, but I’m chewing on my fingernails hoping that this situation continues. Currently, it’s estimating the job at about 4 hours. I have a somewhat slower but still acceptably fast Wintel desktop that I just fixed a few days ago that I can use instead.. although the focus on the monitor is nowhere near as good as the laptop – I wish that my super-hyper-excessive video card had a DVI port..

I may have to go computer-parts-shopping this afternoon. I’m really unhappy about this – I really didn’t need this today. The question is, do I deal with blurry video that will hurt my eyes, or do I go buy a fix?

LJ feature request

August 22nd, 2006

I really think that LJ should allow Anonymous posters to include a psuedonym. Then I’d have some idea who to thank for finding those matching transformers for me…

Oh, dear…

August 22nd, 2006

Started backup, went for about 10 minutes and then system went down, *hard*. BSOD, kernal panic, yada yada dumping memory have a nice day.

So I don’t know what to think. Drive made similar clicking noise before crash. Upon reboot, system did not come up cleanly or usably. Turned power off at switch, turned back on, system seems normal now, trying another backup. Fingers crossed.