10 Apr 2000 argent   » (Master)

Furrfu, I've actually been pushed over the top to Master level. I don't feel much like a Master right now.

See.

Today was a no-hacking day. Spent some time pondering extensions to wmforum for work, but I haven't been able to get past my perl writing block. The language is so unpleasant I'll do anything to avoid working in it, including cleaning up my office. Why couldn't Larry Wall have been exposed to something decent like Smalltalk before deciding to replace sh, sed, and awk with a linguists wet dream and programmer's nightmare. And why doesn't this do what I think it does?

for ($file) {
    /^\.\./ && failPage 500, "Illegal file name";
    /\// && failPage 500, "Illegal file name";
    other checks go here
}

Yeh, I can do a bunch of things like if($file =~ /^\.\./ || $file =~ /\//) { failPage 500, "Illegal file name"; } but I'm trying to get into the perl mindset. If you're going to do something evil then you should accept that evil in all its fullness and go all the way. Don't hold back. I think I can get it to work with something like failPage(500, "Illegal file name") if /^\.\./; but IIRC that's the wrong idiom... you want to put the important stuff first.

The alternative is to blow off perl and just duplicate the cookie-handling and MySql grovelling in a language where someone actually designed the syntax like tcl or even forth, but that still requires understanding the perl code...

Recovery, in the form of digging holes and plugging them with Texas Mountain Laurel, is tempting... but I really need to get cracking on this damn project.

[why the hell doesn't this thing let me put <code> tags in here... look at what I hadda do!]

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!