Older blog entries for decklin (starting at number 38)

The coconuts problem in almost 80 chars:

perl -le'N:for(0..9999){$x=5*$_+1;for(1..5){$x=int($x*5/4+1);next N if$x%5!=1;}print$x;}'

I'm sure this can be improved, as I'm not much of a golfer (search Deja...), but it's still wonderfully evil. Note that the lower bound for where I have placed 9999 is good old familiar 1024... since bwtaylor has obviously taken a much more mathematical approach to the solution, perhaps he can enlighten us here. (And yes, I do have a non-obfuscated version of the above.)

Haven't gotten anywhere on the 12 coins problem. I once read a Piers Anthony book in which this puzzle played a semi-important part, so I'm sure the solution is rolling about in my subconscious somewhere.

If anyone wishes, I can type up the oracle problem...

Whee! My Debian account has finally been created. Time to get through the whole process: 6 weeks exactly. Not bad.

Hacked muddleftpd a bit. In doing so, I observed two things:

  1. All the bugs I fixed were C-ish things, such as not zero-terminating a buffer, dealing with endianness yourself, etc.
  2. Making fixes was made much harder due to the fact that almost every library function was wrapped in something that was supposed to prevent this. These wrappers are, of course, subtly different from the thousands of others like them that have been written from scratch.

Which says something to me about software in general... I think that problems which would fall under (1) are not inherent problems with C; they are symptomatic of poorly understanding and applying the C idiom (not to mention poorly applying the language itself when there's no need for it). Using a plethora of C-with-a-C++-accent constructs is indicative of the programmer thinking C doesn't have an idiom, which is just not true.

Continuing the language thread... For the past few days I have subscribed myself to perl6-language. The threads flying around there are some of the most interesting stuff I've read recently. If you can't deal with another hundred or more mailing list messages per day, take an hour or two and browse the RFCs.

I can see it now, the '=>' operator will be called cons-ing. And the new keword for accessing a pair will be CAR and CDR...
-- Chaim Frenkel (tongue in cheek) to Damian Conway

What [...] parodies everything in the world, yet leaves you feeling good about the world?
-- TorgoX, #perl

So many CS books to read, so little time... Reminder to self: do something about that MWM-hints patch, and read the tidy docs...

A place for everything, and everything in its place.

Sound of the moment: Chronic, Hardleaders, Reinforced. yum.

graydon: Thanks for restoring some modicum of sanity to the articles. ;-)

gjb: Please just make new diary entries.

<purl> Teach a man to fish and he may feed himself. Give a man a fish and he'll ask you if you could please cook it for him while you're at it.

*sigh*

I am depressed. It's because of this.

lilo: Of course, they've already sued the folks writing Pan. Everyone go read the 07-26 news item... ;-) Now, let's see if I can get myself in trouble:

perl -wne 'print unpack "u", $_;'

Lookit that! It's illegal!!!! No one would say that except evil pirate communists!!!

Not much coding happening. Instead of continuing work on my Mozilla package, I migrated the styles to a skin for the included packages. Once that's stable I will start thinking about the package again.

Rant time... Some weeks ago I sent a rewrite to the author of a perl script which used LWP. Last week, I see it's been updated with the major item being ``No longer depends on LWP.'' It's not really his fault; he just applied a patch from someone else and I doubt he knows better. But it really pisses me off that someone would rather spend 30 minutes writing and debugging their own code rather than 30 seconds installing LWP. Common modules are there for a reason. Newbies on clpm whine all the time, ``but I can't install LWP on that machine!!'', as if it's our fault. What exactly is the incentive for sysadmins to provide a complete, non-borken Perl installation if all the lusers just paste in cargo-cult buggy reimplementations of LWP::Simple?

Frobbing about with XShape* some more. I noticed there was a totally unrelated shape bug and fixed that... Need to review the implementation though.

Interestingly, GTK seems to grab the mouse when you double-click on a CList. So if you have a callback that segfaults, and you run the program under a debugger, your WM becomes useless. Well, at least twm does; that's all I tried to make sure it wasn't my fault. (in fact, that's all I ever run twm for, but it's quite useful... ;-)) The whole grabbing mechanism in X bothers me. It's too easy for bad code to muck up your whole session. There should be some way for Xlib to back out upon receiving a SIGSEGV or similar... I need to think about what the problems in implementing this would have been, because it's impossible that someone just forgot about it.

deekayen: So I wouldn't usually bring up politics, but... I had to complain to a US Senator today for forging an Approved: header (hi Kalev) and suggesting that people attach an image to all their emails/postings. Bleh. It's a shame as I'm all for Nader... If this wasn't something that mattered to me I'd have already scored a point against whatever cause he was supporting.

Iain: Hey, someone else found RMF. No, I'm not registered, but it seems that one can't go about 6 hours without someone mentioning it in my favorite IRC channel.

Skip This department: I still can't lie. Another 75 milligrams...

I think it was here that someone mentioned Linus's posting about symlinks -- The web archives updated today, so I was able to read it. I was glad to find out I've been doing exactly what Linus has for some time now ;-)

Still waiting for debian-devel archives to be pushed to the web site, because I lost (itchy delete finger) the email about the new keyserver, and I want to know what's going on with that when I sent my key to key-maint. If a fellow Debianer reads this, It'd be appreciated if you could bounce it to me. [Update 11:30 AM: thanks to brother for sending it, you can ignore this request now.]

Got up reeeealy early (parents are gone, taking care of the puppy) and ran into my AM (who lives in .au) on #debian.

Packaged dagrab and aewm for debian, with many more minor cleanups in aewm to facilitate packaging. Wrote one man page so far, 2 to go. Need to ITP today. Todo before I release this one is to fix the shaped window handling as per azz's suggestion.

Also, did a small patch for xchat to make script loading better. Perl makes it really easy to write poorly styled code, and even I am guilty of this...

[Update 11:30 AM: Apparently people who don't know me (a radio show I e-mailed) have trouble guessing my gender from my name. I'm male... I'm curious as to whether anyone here was wondering.]

[and some more... I think something should be done about /person, it's over 700kb. Whine whine whine gimme search etc. ;-)]

Argh. I am extremely pissed. You'd think my license is clear enough:

Copyright (c) 1998-2000 Decklin Foster. All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND. IN NO EVENT SHALL THE AUTHOR BE HELD LIABLE FOR ANY DAMAGES CONNECTED WITH THE USE OF THIS PROGRAM.

This program is free software. You are granted permission, free of charge, to copy this program, modify it, and distribute/publish/sell copies of it, as long as this license is not modified or removed from the copyright notice. You may also use parts of this program's code in your own software, if you agree to distribute it under this license.

Nowhere in there does it say, ``You can take this code, modify part of it, strip out the license, replace it with the GPL, and credit yourself.'' Please understand that I'm not biased against the GPL -- it could have been any other license.

And this person is distributing a binary and a Star Wars .jpg in the tarball. And the modified portion of the source has been clumped together into one horribly formatted file.

And I was not even contacted once.

Furrfu.

I feel dirty. No, I'm not telling you. It involves Perl.

jschauma: That's hilarious. I found a mirror of the auction page if anyone is interested.

Heather just posted the greatest thing to linux-elitists.

We're off to build the lizard, the wonderful lizard of Moz...

In the bizzare forms of recovery department:

Hardly got any sleep last night, but my hard drive is mostly fixed. Currently moving whatever I don't need all the time off on CDs. For some reason, disaster-type incidents like this leave me stressed out all day. So to concentrate on something else, I turned gaim into a multi-binary package. After a lot of code-package-recode cycles, I finally feel confident that I can debianize just about anything easily. stu (no account, so: Robert S. Edmonds) was quite happy that I did his homework ;-)

I've gotten through new-maintainer! Whee! Just waiting on a reply from the S*cr*t D*b*an C*b*l to my AM's reccomendation. Note to self: I really need to fix muddleftpd's logging before I dupload it. I hope I can figure out a patch to send upstream before the next release.

And meta stuff: I wonder what the point of this latest article is, other that arguing. Hi craig. ;-) I know everyone has opinions, and that's good, but after a while on the net opinions just become not all that interesting compared to actual discussion. There, I think i've guaranteed at least one flame back at me now...

Mozilla seems especially fast today. I finally got around to cron-ifying the build earlier this week, which has been quite helpful. Skin is almost ``there'' as well.

Tired. Very tired. Do not stay up all night with fsck and debugfs, kids. Good night.

Ugh ugh ugh. I have been grappling with fsck for maybe 4 hours now. This is not fun. Pray to the gods of data recovery for me...

On the bright side, I will have a big juicy bug report to send to tytso, once I write up the logs I've been saving. I guess not all is lost.

29 older 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!