Archive for September, 2002

Refactoring Some Chicken Star Soup

foreach (@body) {
        chomp $_;
        next if /^#/;
        $line =~ s,<template>,
        if (m{(<template>)}) {
                push @unwrap, undef;
                $line = '<template>';
        if (m{(</template>)}) {
                push @unwrap, $line;
                $line = undef;
                push @unwrap, "
        if (@unwrap) {
                if ( m/^ [^s=]+ s+ 
                        =           # an '=' sign, er.
                        s* /x      # optional whitespace
                        m/^ [.*]$/x   
                        $line =~ s/^#/
                        $line .= "
                        push @unwrap, $line;
                        $line = $_;
                } else {
                        $line .= $_;
push @unwrap, " ";

This simple little bit of code I hacked up takes the body of an email message, strips off everything outside the opening <template> tag and after the closing </template> tag, and passes it to Config::General for tokenizing.

The magic part of this is where it “unwraps” lines that would wrap in the user’s MUA, such as url=, where the value of ‘url’ is too long to fit on one line of the user’s MUA, and wraps down to the next line.

I’m nearly done with this one, just a few more “junk input” regression tests to go before release time.

pilot-link 0.11.5

    Nearly complete, a few more tests on Irix and BSD before a new one. snprintf() and getopt_long() are proving problematic with AC_LIBOBJ and friends on Irix 6.4.

    Many thanks to tridge for lending me the shell on the Irix box, and for giving me some ideas to look into, and to jpr for doing a bunch of legwork.

Lawyers, Attorneys, and “Goodfellas”

Lawyers, Attorneys, and “Goodfellas”

    Personal injury attorneys are useless. The whole justice system is a crock, full of people handing you off to the next person, who doesn’t care about your case, only cares whether or not you can feed their pockets.

    So I get a ton of bills for my medical treatment from the caveman who headsmashed me at the beach, and am supposed to hold them until all of my medical treatment is completed, then submit them for reimbursement in one final lump sum.

    Meanwhile, 6 months later, when all treatment is complete after I’ve been invoiced and had to pay for everything out of pocket, my credit is trashed, and the accused could still flee, and not pay a single cent of my bills. They put the accused (who has already plead guilty) on probation, and give him another year. Meanwhile, I’m out thousands of dollars, my credit is further ruined, and he can still refuse to pay, or flee.

    And according to the attorney I just spoke with moments ago, “ attorney in the state will take your case, unless he has assets they can sue him for”. I don’t want his assets, I want my out-of-pocket expenses reimbursed!

    They refuse to do an asset check up-front, and suggested I just hire a private investigator to do it on my own. If I’m going to hire someone to find out if he has assets, I’b be better off making “a few phone calls”, and I’ll be sure to get my money back, and then some, without ever having to go near the legal system. It would probably be cheaper in the long run..

ObPerl Fu vs. Refactoring

     while (my ($key, $value) = each %{$config{'template'}}) {
         printf "    %s%s: %s", $key, "." x(20 - length($key)), $value . " ";

    That little snippet reduced about 60 lines of code down to that single printf() in the middle. How lovely

Still no job..

    312 days

Quotable Quotes


Quotable Quotes

    goingware, interesting quotes, but the Caesar one may not be as accurate as you first believe. After doing some research, I found an interesting WiKi on this exact quote. I also found someone else who attributes it to William Shakespeare. A search of the complete works of Shakespeare returns nothing.

    While on the subject, here’s a few other interesting ones:

    George F. Kennan, 1987. Professor Emeritus at the Institute for Advanced Study and former US Ambassador to the Soviet Union.

    “Were the Soviet Union to sink tomorrow under the waters of the ocean, the American military-industrial establishment would have to go on, substantially unchanged, until some other adversary could be invented. Anything else would be an unacceptable shock to the American economy.”

    Former Sec’y of State Henry Kissinger speaking at Evian, France, May 21, 1992 Bilderburgers meeting.

    It is then that all peoples of the world will plead with world leaders to deliver them from this evil. The one thing every man fears is the unknown. When presented with this scenario, individual rights will be willingly relinquished for the guarantee of their well being granted to them by their world government.”

    Adolph Hitler, My New World Order, Proclamation to the German Nation at Berlin, February 1, 1933

    “The National Government will regard it as its first and foremost duty to revive in the nation the spirit of unity and cooperation. It will preserve and defend those basic principles on which our nation has been built. It regards Christianity as the foundation of our national morality, and the family as the basis of national life.”

The Day’s Events

    I woke up at 3:30am this morning, and started working right away. I got more done before 5:30am today than I’ve did all day yesterday with the neighbors playing basketball with bowling balls in every room.

    Today; one word: Perl

    Possible developer/sysadmin job in… Iceland.

    Mother’s birthdays coming up (there are now two).

Handera Palm Emulator

    Finally got the Handera ROM images working (thanks to Jes and dgibson for their assistance re: -gstabs in POSE_CXXFLAGS). Turns out having the Handera skins in /usr/share/pose/Skins didn’t work like the rest of the POSE emulations, they had to be in ~/Skins.

    Handera’s online registration system is completely inept, and still hasn’t responded to my request. It’s supposed to be minutes, it’s been days now. Their website is disgusting too, looks like it was designed by a class of 5th graders. I decided to yank the rom from the REAL device with pi-getrom, and use dd to bite off the first 32k of smallrom.

    dd if=handera330.rom bs=1 skip=32768 of=out.rom

    All this for some screenshots of OUR application in THEIR device.

Lots of cool stuff coming. Just finishing up on one of the tools now, may have to pull an all-nighter on this one, I don’t want to put it down until it’s done. Can’t get distracted.


    Status: None, 301 days. I wish I could find a paying job.

Firm-Man 1/2 Ironman Triathlon

E and her team placed third out of 26 women’s teams, 90 teams total, 670 entrants in Sunday’s Firmman Ironman Triathlon. Individual stats and Team stats are available. Look at the top placers, amazing.

Great job! I was jealous I couldn’t do the bike leg, but maybe soon..

September 11, 2001

    I won’t dwell on it, but we all feel the pain of those lost.

    I’ve put my collection of images online also, hundreds of which have never been seen in public before. You can find them here. I started collecting these the day it happened, and stopped about 2 weeks later. There’s quite a few gruesome pictures there of jumpers, human parts falling, and other things.

    I’ve amassed quite a collection. 879 items in 59 pages. It took Gallery awhile to import them all, but it worked out well.


    What is it about neighbors that makes them believe they can “smoke out” other neighbors.

    They have three kids, and to contact them down the road, they come outside, and scream their names at the top of their lungs down the street, 20 times!!

    They park all over the driveway (two cars wide, leading to a 2-car garage, 1/2 of which we are entitled to), so we have to snake around their cars to park there or get our cars out of the driveway in the morning.

    Our downstairs neighbors also think it’s ok to slam EVERY SINGLE DOOR, every time they open or close it. Every door, drawer, and cabinet they can manage to open, slams at absolute full velocity. It sounds like someone is playing basketball with a bowling ball down there, all day, every day.

    We’ve told them to stop it, because I am working here all day, but they don’t give a damn. Now it’s reaching critical velocity, and I’m about to start jumping as hard as I can on the floor every time they do it.

    This is beyond ignorant or obnoxious, this is intentional and maliscious, and these people do NOT want to see my dragons come out.


    Status: None, 300 days.

Diary of a Diary


lilo, apparently you don’t quite understand how the diary rating system works. I have personally rated approximately 4 diary entries, total. What you’ve seen in the report for myself, rasmus and others does not mean we sit here all day and rate people’s diaries. Please go re-read the code again. We have lives. Please consider worrying more about your own, than making assertions about ours.

These petty little attacks you make on those who don’t agree with your “philosophies” don’t bode well for your perceived status in the “community” you claim to support. Once again, you show how far you can read into a situation that has absolutely nothing at all to do with you. Nobody has a “personal agenda” that the rating system here on Advogato is being used to exploit.

Also, that little stunt with the FSF has generated some “offline” interest. Call have been made, and there are quite a few people (including at least two well-funded companies) who are now witholding their donations to the FSF, until they can guarantee that not one single cent of their FSF-destined funds makes its way to PDPC or the lilo-fund.

Other Advogato Abuse
The eBay laptop fraud saga continues. I was contacted on August 1st by an officer in the New York Police department regarding Brian Silverman, aka “electro_depot” from my diary entry about it here. Since the beginning, my diary was the only one that would show up in a google search on electro_depot. Over 120 people have contacted me regarding that diary entry, including one person who created his own website to combat the fraud. He also directly mentions why he started the site due to finding my diary entry here. There’s also a Yahoo group on it as well.

The end result is that I joined the Yahoo group, and was banned because I explained the details of the fraud, and because I received my laptop, after a very “firm” phone call with Brian Silverman. The replies I made to other people on that group were also deleted, preserving only the opinion of the original poster, which, I might add, was entirely incorrect and misleading to the victims of this fraud.

So now we have a spammer on Advogato, adam12497, who has used advogato like a classified advertisement in the newspaper, trying to draw people’s attention to his Yahoo group on the matter, abusing what Advogato stands for. I’ve emailed raph twice about it. I stand with raph on the issue of deleting persons here, but I think this one makes a very strong exception to that rule, since his only purpose was to hijack my diary entry and come up alphabetically before me in google, to get people to join Yahoo, instead of read the details of the real fraud that happened.

raph, I just came up with a great idea (spawned by the wonderful macros in The Everything Engine (prominently used on PerlMonks). Can we get a <diary>138</diary> tag pair here to link to older diary entries, instead of directly linking to them?

Other News..

E and I went out the other night and caught up with an old friend of mine from CT that I hadn’t seen in a few years. It was good to catch up and get out of the house for a bit.

I’ve been rebuilding boxes here, trying to get things set up for the SourceFubar scale-up. Lots of new neat stuff in store.. stay tuned!

I’ve also been spending a lot of time cranking out more perl code than I can shake two sticks at. I’ve finally gotten my updated copy of Programming Perl 3rd ed., aka “the Camel book”. My copy was 9 years old, and is quite out of date, given current concepts. I also picked up Perl & LWP to help with my current projects (spiders, screen scraping, lots and lots of HTML parsing). I also updated my copy of the C Primer Plus, another Waite Group gem. Mine was 2 editions too old. It’s interesting to walk through some old code and see how much you can squeeze out of it. Code reduction is really a wonderful thing, as long as it doesn’t slip into obfuscation. I managed to take 170 lines of perl in a CGI I wrote recently, and compress it down to 8 lines of code instead.

foreach my $line (@lines) {
$line =~ /@/ or next;  # skip things without an @
$line =~ /([wx80-xFF]+)s([wx80-xFF]+)s<(.*?@.*?)>/g or next;
my ($fname, $lname, $addr) = ($1, $2, $3);
$addr =~ s/@/&#064;/g;
$addr =~ s/./&#46;/g;
print div({-style=>'float: left; text-align: left;'},
"$fname $lname");
print div({-style=>'text-align: right;'},
"<a href="mailto&#58;$addr">$addr</a>");

This little gem actually is the tail end of a sub that parses the Plucker CREDITS file for names and emails listed therein, and obfuscates their email addresses to thwart spam harvesting engines, then wraps the code into some very pretty HTML that is shown to the user. It looks like this after these 8 lines are written out. The problem was that perl can’t natively regex unicode/UTF-8 characters as “words” when they contain non-[a-Z][0-9] in them. Sorting them by that is a whole other issue untouched yet.

More to come on these fronts soon..

Status: None, 290 days. I got so bored looking for work and finding none, I wrote a script that I wrapped in an iframe on my my PerlMonks home node that calculates how long I’ve been out of work:

<script language="JavaScript">
    var today = new Date();
    var stdate = new Date("Nov 16, 2001")
    var msPerDay = 24 * 60 * 60 * 1000;
    var days = ( today.getTime() - stdate.getTime() ) / msPerDay;
    days = Math.round(days);
    document.write("Status: Unemployed<br />Duration: " + days + " days");

Bad Behavior has blocked 104 access attempts in the last 7 days.