August, 2003

Untitled

Submitted by reeses on Fri, 2003-08-29 04:26.

I have this picture of my cats on my desktop, which I don't look at a lot anyway, but it's there when I shut down, or when I log in. It looks rather like the cover of Meet The Beatles or With The Beatles, but less bad than the latter, and I thought about editing out the background and just having the cats sitting in a black field like the cover of the album, both, both of which I have in vinyl, just like every other Beatles album. I was thinking that the oldest cats are getting old, each now seven years old, which is about the halfway point, if further, for cats, especially since both cats are...filling out a bit, and the part of living with pets that I hate is approaching. I can't stand having pets, because pets die.

Now, this picture on my desktop bothers me and makes me sad, because I miss the cats now and I will miss them more when they're gone instead of me being gone, because they won't come back while I will. But I can't switch pictures because sometimes the picture is like a small part of the thing, and it's like writing G-d because you can't undo the other thing.

Untitled

Submitted by reeses on Wed, 2003-08-27 22:39.

Morons. Have you never heard of Lisp?

Untitled

Submitted by reeses on Mon, 2003-08-25 02:59.

I am not dead. I just...skipped town for a bit. I'll be back for a day or two next weekend, then probably again a couple weeks after that. I predict only erratic visits to DC for the remainder of the year. Kat's back, and made the clinic she wanted, so I wouldn't see her anyway.

You may all stop calling my mother and offering your condolences. Keep sending the flowers, though.

And no, I didn't get thrown in prison in Prague. I am at this time not incarcerated, charged, or under suspicion for any offenses against man or god. Or livestock. Or deadstock.

Untitled

Submitted by reeses on Sat, 2003-08-23 17:22.

#!/usr/bin/perl


my $url = "http://www.google.com/search?q=";

foreach $arg (@ARGV) {
if ( $arg eq "+" ) {
$url = "$url+%2B";
} else {
$url = "$url+$arg";
}
}

my $cmd = qq{lynx -dump -accept_all_cookies "$url" | grep calc_img.gif | sed "s/.*= //"};

my $result = `$cmd`;

print $result . " ";

People mock my perl-fu. I don't know why.


$ ./calc.pl feet in a mile
5 280 feet

$ ./calc.pl avogadros number
6.02214199 � 10^23

$ ./calc.pl feet in avogadros number miles
3.17969097 � 10^27 feet

Untitled

Submitted by reeses on Thu, 2003-08-07 00:12.

I'm defining a word:

Apologiarrhea (n) apologia, late latin, + rhein, to flow:

The terminal phase of flamewars in "evolved" discussion fora (such as comp.lang.lisp without Erik Naggum), wherein recent combatants self-deprecatingly and profusely apologise, claiming idiocy and thick-skullery as the cause for their contribution to the disagreement in the first place.

Untitled

Submitted by reeses on Sat, 2003-08-02 17:10.

Some of you may not be aware of this, but I'm a pretentious a-hole, especially about building software.

No, really. If you don't believe me, just take it in arguendo for this post.

Having worked in the software and intarw3b areas for the past however long, I've dragged behind me a bit of troll line, snagging a few friends who also have some contact with the industry. As happens, these are often other technical folk. As very often happens in the technical community, many of them are perl programmers, much as I might try to dissuade them from speaking to me. As you may know, Perl is a distasteful, ugly scripting language that shouldn't be use for any real programs. It should only be used to glue real programs together, and never reviewed or maintained, because it's impossible to read.

So, imagine my growing surprise over the past many months, as I read the apocalypses and exigeses coming from lwall and Damian Conway. This Perl 6 thing is shaping up to address almost everything I've complained about contemporary mainstream programming environments.

If I had an option of environments to use while building software for money, I'd probably pick some mixture of lisp and Smalltalk, with perhaps a Haskell or even Oz thrown into the mix. I'd have objects, and generic containers, and real macros, and closures, and late binding, and multiple (at least double) dispatch, and currying. So, shiver me timbers when I read this very line from exegesis 6:

This Exegesis explores the new subroutine semantics described in Apocalypse 6. Those new semantics greatly increase the power and flexibility of subroutine definitions, providing required and optional formal parameters, named and positional arguments, a new and extended operator overloading syntax, a far more sophisticated type system, multiple dispatch, compile-time macros, currying, and subroutine wrappers.

My eager anticipation for Perl 6 grows on a daily basis. It's taking a language I have never bothered to learn well (see the example below), because of aesthetic disdain, and turning it into the only programming environment I would ever need. It has almost every programming feature that was invented in the 70s and early 80s, the ones ignored by the rest of the commodity languages community, slammed into one gorgeous compiler/interpreter. Previously, I had looked forward only to Parrot, so I could make use of the cornucopia of Perl modules from civilised scripting environments, like Ruby, or Scheme-on-Parrot. But the language, as described so far, has made Parrot largely irrelevent.

I swear, if Apocalypse/Exegesis 7 talk about concurrent programming and Horn clauses, I'm going to crap my pants.

It's obvious that, after Perl 6 appears on the scene (or at least, Perl 6.1) there will be absolutely no reason to use any other programming environment. Everyone will migrate to Perl, or other languages will start borrowing from Perl, just as they currently do from Smalltalk, Lisp, ML, or whatever your paradigm fancies.

Or will we?

In looking at some of the developments on the horizon, such as the maturation of C#, the growing importance of Oz and Haskell, the growing utility of mainstream IDEs such as IntelliJ IDEA, Eclipse, or even Visual BASIC, there are so many bloody reasons to be optimistic about the future of programming, to think that we're on the cusp of the golden age of programming. Good God, I can't wait.

Untitled

Submitted by reeses on Sat, 2003-08-02 03:09.

Lame perl of the day. Suck the sprocs out of a whoracle database and generate a crude call/dependency graph. This may be useful if you have scads of procs that call one another. It pulls the procs (as contained in user_source), and dumps an object suitable for passing to graphviz.


#!/usr/local/blackboard/apps/perl/bin/perl -w

use DBI;

my $dbh = DBI->connect('dbi:Oracle:sid', 'uid', 'passwd',
{RaiseError=>1, PrintError=>1, AutoCommit=>0})
or die "Could not connect!";


my $stProcs = $dbh->prepare( qq[select distinct name from user_source]);

$stProcs->execute;
%procNames = ();

my $recProc;

while ( ($recProc) = $stProcs->fetchrow_array ) {
$procNames{$recProc} = '1';
}

$stProcs->finish;

my $stLines = $dbh->prepare(qq[select name, text from user_source]);

$stLines->execute;

my $name;
my $text;

print "digraph graph_name { ";

while (($name, $text) = $stLines->fetchrow_array ) {
foreach (split ' ', $text) {
if ( defined $procNames{uc $_} && (uc $_ ne $name) ) {
print " " . lc $name . " -> $_; ";
}
}
}

$stLines->finish;

$dbh->disconnect;

print "} ";