Refactoring Some Chicken Star Soup

foreach (@body) {
        chomp $_;
        next if /^#/;
        $line =~ s,<template>,
<template>,m;
        if (m{(<template>)}) {
                push @unwrap, undef;
                $line = '<template>';
                next;
        }
        if (m{(</template>)}) {
                push @unwrap, $line;
                $line = undef;
                push @unwrap, "
</template>;";
                last;
        }
        if (@unwrap) {
                if ( m/^ [^s=]+ s+ 
                        =           # an '=' sign, er.
                        s* /x      # optional whitespace
                                or
                        m/^ [.*]$/x   
                )
                {
                        $line =~ s/^#/
#/m;
                        $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=http://www.foo.com/, 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, “..no 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

Tags:

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.

Employment

    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.

Neighbors

    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.

Employment

    Status: None, 300 days.

Diary of a Diary

Tags:

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..

Employment
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");
</script>

OpenProjects sells out… again.

jpick said: “Also, the reason he’s asking for money from the users is that he doesn’t want to “sell out” the network to corporate interests.

Really? Is that why he was shopping OPN around to Corel, VA and Redhat in December of 2000? Go ahead and ask him, see if he denies it.

jpick also said: “A lot of free software hackers are in the same position – their principles aren’t always compatible with their need to put food on their table for themselves and their kids.

A lot of Free Software hackers are also out of work, or are working in fields completely unrelated to their Free Software work. I would venture to guess that 60% or more of the Free Software authors have never been paid a single dollar for their work on said software, nor have they asked for it twice a day, every day. We do this because we believe in it, not because we want to get paid for it, though that’s a nice benefit, but we still get “real” jobs and pay for food on the table.

I don’t like the rumors and untruths being slandered around about lilo or the network that he happens to be a user on either, but I deal in facts, and the facts I have are not enough to convince me he believes in the same community spirit that I do.

Update: I found a very interesting blog entry that seems to validate some of my concerns about the vision.

5 Times a Charm, the IBM saga continues

The T23 goes back to IBM again for the 5th time in less than 2 months for the same lockup problems that the previous 4 repair incidents were supposed to address.
I just received it yesterday, unboxed it, and an hour later, it started locking up. They replaced the system board, mini-PCI wifi/modem card, antenna and apparently the LCD (the dead pixel that was there is now gone), flashed the BIOS, and replaced the IDE drive.
They’ve basically replaced every single part in this laptop now exept the black. I’m not sure if they’ve replaced the CPU when they did the system board replacements, but the only three pieces remaining is the CPU, RAM, and case itself. The machine will lock up with any drive, any BIOS version, any combination of RAM, in any OS, and in the BIOS. I can reproduce the BIOS lockup every single time by walking through some of the options in order, with or without an IDE drive in the laptop.
It looks like it now could be only one of a small handful or things that could cause this:

  1. The CPU is overheating, and unseating itself from the socket (it’s not soldered in, it’s in a Zif).
  2. The case itself is heating up, causing some “adjustment” inside, which causes the machine to lock.
  3. The case is malformed to the point where under certain heat/humidity/cooling conditions, it causes the system to “ground” itself, locking it.

    Anyway, it’s going back again for repair. Is there a Lemon Law on this?

Sorrow

    Another tragedy in the family, this one very unexpected. With respect to those involved, I’ll leave the details out. Having no family myself, I find it very hard to understand and deal with the grieving period in cases like this.

Patent for triple-double click with a half-gainer

    Though I have moral issues with Amazon’s single-click patenting, and I don’t use them personally any longer, providing an easier way for others to use them has now prompted me to set up an Amazon wishlist for those people who have been asking to help out, but aren’t quite sure how. I’ll add more stuff as I think of it.

Community Supported Development

    I’ve also set up an area for people to donate through PayPal to help support Plucker and pilot-link on both of the project websites. Once I clear up my personal responsibilities with development on both of those projects, I’ll be focusing on maturing SourceFubar a bit more. I need to get some more racking in here first though.

Anyone have any old networking gear they need to rid themselves of? Racks? nU size enclosures?

RIAA Killed the Music Industry

While driving 8 hours home from Buffalo this evening, I got to thinking about an idea I had about 5 years ago, when RealAudio was a bit more popular than it seems to be today (with the advent of Shoutacast/etc., nobody goes to RealMusic to listen to streams).

Driving along for 10 miles while the radio just cycles around in scan, not picking up a single station… and when I drove through Nebraska 2 years ago on my way to California, the same story, except it cycled for about 4 hours of driving, not a single radio station to be found… my idea was that car audio needs to be hooked up so that we can “stream” radio stations from the internet, into our car stereo.

Yes, initially it would be of lesser quality than CD music, but certainly better “reaching” than current stations. I could be in California, driving on the ’01, and be listening to my favorite Boston station, 107.3. I could also stream ambient from my favorite shoutcast station, or from my own station at home, populated with thousands of my own cd’s in ogg format.

The RIAA would sooner see this technology dead before it even gets off the ground (cough, prior art!). If I’m in my car, streaming from an internet radio station, or from a “real” station who happens to have an internet presence, I would be more inclined to buy the actual physical disk of the music for my own collection if I heard it on the radio. Why the RIAA doesn’t get this, I’ll never know. Just hearing them claim that they aren’t charging enough makes my blood boil.

Artists are starving, making $40k a year in salary, barely able to pay off their advances, and the RIAA rakes in billions on the sale, resale, tax on blank recordable media, royalties on media, royalties and fines on streaming stations reproducing that media, DRM players, and so on.. and they still insist they aren’t charging enough. What? You want to make sure you charge so much that nobody can afford it, and therefore can’t rip it and put it on the internet?

I’ve never downloaded a single mp3 from the internet, ever, nor do I intend to. I don’t see the need. I hear music I want on the radio or streamed from non-RIAA-sanctioned places, I like the music, I buy the actual physical media to make that music mine.

The RIAA is killing the music industry. I’m glad that artists are now producing their own music, realizing that they don’t need the RIAA or their cartel of labels to get their music to their fans. The technology is there, it’s cheaper than it used to be, and it’s only going to get better. I just hope the RIAA dies or begins to start breathing the same oxygen the rest of us down on Planet Earth breathe, before unconstitutional laws get passed that take us decades and 3 terms of politicians to remove from the books.

The RIAA missed the boat years ago on using The Internet as a music distribution medium. We all have big bandwidth now (pr0n and mp3s probably were the single-largest contributors driving the need for biggre and faster pipes, ironically enough), we all have access to CDR and CDRW burners, media is cheap and accessible, color printers are abundant.

Think about it.. you log into RIAA-Label-Music-Store.com, pick a list of songs you want from your favorite artist, pay a fee, download an ISO image of those songs, burn it to CDR, download the artwork, print it on your color printer, and away you go. RIAA just cut out the middleman (distribution and record stores), they made a profit, you have the songs, and everybody is happy.

Since they completely missed that, they’re making it impenetrably prohibitive to get real music at affordable prices to common audiophiles, and are now working to make sure the public at large (incorrectly) assumes that the RIAA invented sound, and we should all be “thankful” to them for that, and pay them their yearly “tax” on sound.

I’ve recently been made aware that the RIAA charges $500.00/USD to streaming stations that have an open port, but don’t stream a single note of sound through it, simply because they can stream music means they need to be taxed. I’ve decided that I’m going to stream ‘strings /dev/urandom > /dev/dsp’ all day long on my connections, and let the RIAA come down on that, claiming copyright infringement. I personally think everyone who objects to their extortional behavior do the same.

Sometimes I really wonder what kind of oxygen they’re breathing down at RIAA headquarters. It’s obviously not the same kind I’m breathing here in Westerly.

</rant>

pilot-link 0.11.3

Caught a last-minute bug in pilot-link within hours after the 0.11.2 release, and released 0.11.3 to fix that. OOPS!

That makes 4 releases in less than a month. EESH!

Needles and Ink

    Stevey, speaking as one with 3 piercings and full sleeves shoulder to wrist, I can say we are around, there are many of us. I don’t look like a developer when I attend conferences, which is somtimes a good thing. I was in ‘Skin and Ink’ in 1998 for my work, after going to ‘Inkin the Valley’ in Philadelphia. One of the photographers wanted to do a shoot of the work.

    Funny thing happened when one of the “live” reporters at the conference stopped me as I walked by (note, he was “live” on the air) and asked “Sir, sir, you with the tattoos. How many tattos do you have?” and I replied “One, it’s just not all connected yet.”

    The one on my right arm needs color, but the artist seems to not like returning phone calls, and he’s never at the shop.

    People without ink don’t seem to get the addiction to tattoos. The smell of green soap, the sounds of the needlebars, the hilarious customers…

    Spending 20 minutes in a chair for someone new to tattoos, all they remember is “pain”.

    Spending 4.5 hours in the chair while they work under your bicep and armpit, gives you a whole new appreciaion for the art, and you don’t even feel the needlebars.

pilot-link 0.11.2 and abusive Web Spiders

Tags:

pilot-link 0.11.2

    Just released 0.11.2 a few minutes ago, with several critical bugfixes, BSD/OS 4.3 support, and now with a first pass at FreeBSD and OSX native USB device support. Now it’s time to walk through the code with lclint() and valgrind and see what else I can squeeze out.

    Whew. 3 releases in a less than a month, all with a faulty laptop limping along during the process.

    Now back to my new Plucker website design and email-only interface to Plucker. Seems there’s a few bugs in Config::Simple that I have to work around right now. I have some neat remote directory rendering code in the new design too, and much more interactivity.

    I hope this brings us a larger userbase, and a community willing to support our efforts.

“No soup for you, google, permanently!”

    Due to excessive abuse from google’s spiders, I have now permanently blocked their entire netblock from every single machine that I maintain… which is quite a few. I just removed the iptables rules I had on one production machine, thus unblocking them, and almost immediately 40 concurrent instances of their spider slammed directly into my ViewCVS and Chora instance, going after every single file, version, diff, query, and view linked from there (about 20 projects), completely ignoring robots.txt in the process.

    No more for them. Buh-bye.

Employment

    Status: None, 263 days.

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