Older blog entries for JoeNotCharles (starting at number 15)

Advogato #6

Originally posted on Advogato on April 25, 2004:

I don’t imagine anyone actually cares about my web page at notcharles.ca, since all that’s there are a few old reviews and stuff, but I might as well announce that it’s going away…

Commentary: Never mind, nobody cares about the rest of this. (That applies to entery #7 too.) My god, has it been 4 years since I’ve had a web site?

Well, that’s it - everything useful from my Advogato account is here. That didn’t last very long. Now to get some new content up. Let’s see if it takes this time.

Syndicated 2008-04-18 05:40:18 from I Am Not Charles

Advogato #5

Originally posted on Advogato on April 16, 2004:

Hmm, I notice from the entry just below my last one that Parrot is getting really impressive. Must… resist… new project…

Commentary: Ha ha, Parrot? Really? Four years later, how much work has been sunk into Parrot and what exactly does anyone have to show for it?

Syndicated 2008-04-18 05:36:08 from I Am Not Charles

Advogato #4

Originally posted on Advogato on April 16, 2004:

pcolijn just posted some Gnome API usability gripes that exactly mirror what I felt the one time I tried to write a Gnome app a few years ago. I’m disappointed to see the state of the documentation apparently hasn’t improved much. KDE’s is way ahead.

At the time, I didn’t even have the option of using a C++ binding to avoid having to fiddle with all the low-level GObject funkiness, because gtk– sucked ass. I understand it was discontinued, then recontinued, then changed maintainers, or something. Anyway, Peter, have you looked at C++ bindings at all?

Commentary: the precise post of Peter’s I was replying to is here, and his reply is here. I just took a brief swing through the Gnome API docs and they look much better than they did.

Syndicated 2008-04-18 05:25:40 from I Am Not Charles

Advogato #3

Originally posted on Advogato on April 15, 2004:

I just read an interesting take on where Google is heading. Choice quote:

They have this huge map of the Web and are aware of how people move around in the virtual space it represents. They have the perfect place to store this map (one of the world’s largest computers that’s all but incapable of crashing). And they are clever at reading this map. Google knows what people write about, what they search for, what they shop for, they know who wants to advertise and how effective those advertisements are, and they’re about to know how we communicate with friends and loved ones. What can they do with all that? Just about anything that collection of Ph.Ds can dream up.

It’s an exciting idea. The author then falls off the track completely by concluding that Google should build a desktop OS.

Why in God’s name would they want to do that? I doubt they could make any money directly. First, the design of the desktop itself isn’t something their PhD’s and giant database can help with - as we’ve found out, it mainly involves a lot of tweaking. Second, there’s too much competition, and if they win all they get is the chance to sell something that most people will only buy once. The stakes are what Microsoft and Apple has - the chance to control the API - but they already have that as far as the Google server is concernced! Much better to make their Google tools crossplatform, and just piggyback off whatever OS is winning.

Commentary: four years later, and not much has changed. The OS is looking less and less relevant and Google has finally released the “everyone on earth can have an account” part of “a huge computer with a custom operating system that everyone on earth can have an account on”. (That’s from the link, but didn’t make it into the part I quoted.)

Syndicated 2008-04-18 05:14:39 from I Am Not Charles

Advogato #2

Originally posted on Advogato on March 25, 2004:

Wonderful timing - just after I got all excited in my last post, Mark Hahn announced Prothon, a prototype-based language closely based on Python.

Pros: they advertise a better interpreter (but why not just use the same terp for Python?), no rough edges like the __init__ problem.

Cons: not actually Python compatible, so you can’t use existing class libraries.

I imagine I’ll look quickly at it, say, “Very nice,” and then keep using Python. Because this is pre-alpha, and Python works now. And hacking with metaclasses is fun!

Commentary: prothon.org is dead, and I assume the language went with it. I stopped following it because the author kept adding his own pet syntax changes and preferences that had nothing to do with prototypes, so it got farther and farther from Python.

Syndicated 2008-04-18 05:06:10 from I Am Not Charles

How do I set my domain name?

Originally posted on AlumNit (back when it was open.nit.ca) on May 11, 2004:

A simple sounding question that nobody can answer:

Q: How do I set my domain name under Debian?
A: You don’t.
Q: So, when I type “hostname –fqdn”, where does it get the fqdn from?

You might run into this problem when installing something that refuses to start because “You have no domain name” (am-utils, for instance). “hostname –fqdn” will tell you what this program is complaining about.

Just forget about /etc/hostname and other distractions - it’s the resolver’s job to figure out your domain name. If you’re on a LAN with a competent DNS server (notably, if you get your address through dhcp), just make sure your own host is not in /etc/hosts, and “hostname –fqdn” will go ask DNS. If you have a static address (like if you’re setting up a home network), just add yourself, domain name and all, to /etc/hosts. If you’re getting a dynamic IP but the DNS server isn’t giving you the right thing - well, cry, I guess.

Commentary: Seems pretty obvious when you put it that way, but it took me ages to figure out what was wrong back in the day. I probably should have emphasized “keep your own hostname out of /etc/hosts” more, since that’s the only counter-intuitive part.

I noticed this while I was following links from my Advogato entries. Apart from the Python stuff it’s the only thing there that would fit in on a technical blog. Sooner or later I’ll move all the Python code here instead of just linking to it, and then everything will be in one place and there’ll be no reason to go back there.

Except for the CellPhoneServiceRant, which is pretty funny as a two-year record of my struggles.

Syndicated 2008-04-18 05:02:15 from I Am Not Charles

Advogato #1

Originally posted on Advogato on March 22, 2004:

Fun with Python

A. M. Kuchling, in rec.arts.int-fiction, just showed me a really neat Python trick which he attributed to Michael Hudson. But first, some background:

I use a special-purpose language called Inform to write interactive fiction. It’s sort of a hybrid between standard class-based and prototype-based OO languages - there’s a shorthand to create a single object and add properties and methods to it, but if you want to create a bunch of identical objects you still need to create a class for them. It’s very handy for world modelling. Most of the specialized IF languages use the same scheme.

I’ve been thinking for a while about using a standard language - Python or Ruby, by preference - since every IF language has annoyances and weirdnesses. This involves writing a standard library for world-modelling, which is a big job. There are already a few for Python, but they’re really cumbersome compared to the Inform standard library, because creating a new object with a few specialized behaviours always involves both a new class and a new object.

Behold - prototyped Python (direct from amk’s post)! Now we get to see how well the whitespace survives it’s trip through HTML and back:

Wow. The answer to that is “not at all”. The <pre> tag appears to do precisely nothing.

Instead, the code is on my Wiki page at work. To summarize: it lets you say “class SpecialRoom(Room)” and get both a class SpecialRoom and an instance (also conveniently named SpecialRoom) automatically.

This still has a few weirdnesses. Unlike a true prototype-based language, there are still classes and objects, so you can’t directly say “issubclass(SpecialRoom, Room)” - you need to “issubclass(SpecialRoom.__class__, Room.__class__)”. I’ll need to experiment and read up some more to find out exactly how the class and the instance differ, and decide how to make it more seamless (or even if it’s worth it). This also can’t handle dynamically creating objects, which can be handled by adding a clone() method:

 def clone(self): class anon(self): pass return anon 

Except I’m not sure exactly where to put this. I tried initializing it in Prototype.__new__, which works fine but apparently isn’t correct - that’s what Prototype.__init__ is for, except it’s not actually getting called in the above code.

Still, this is lots of fun! Massive new project, here I come…

Commentary: The massive new project never materialized. I updated the wiki link to go directly to the relevant page, where you can see why - it’s a big disorganized mess of “here’s one way to do it” and “here’s another way to do it”. It was an interesting subject, though, and Python’s gotten a bunch of new features since then (decorators came out just after the original post) so I should really get back to that. It would be nice to pull it all together into a complete solution.

Syndicated 2008-04-18 04:39:20 from I Am Not Charles

pcolijn: What a coincidence, I just fried a server too. It wasn't holding a huge file collection, so I just took a Micro home with me to replace it. I haven't checked if the video card's okay, but you can have it if so.

Ok, ok, so there was no DDOS. (I said there had to be something else going on, didn't I?) What actually happened is that I attempted an "svn import", which rapidly ate all my memory and started killing things. Today I tried again, and this time stuff other than apache died. Version 1.0 my ass.

Still unexplained is why there were 129 apache processes available to kill yesterday - on such a low-traffic box I've never seen more than about 10 running at one time.

I don't imagine anyone actually cares about my web page at notcharles.ca, since all that's there are a few old reviews and stuff, but I might as well announce that it's going away. Somebody is DDOS'ing my web server, and this isn't something I feel I need to deal with.

(Well, no, not really. It's just your bog-standard pathetic buffer overrun attempt that's been showing up in my logs since forever - this one's 32805 characters long - except now one comes in every couple of minutes instead of every couple of days. It's been doing that since the end of March, but a few days ago it ramped up and today my old Celeron finally ran out of memory and fell over. Weakest DOS ever.)

This means Broomstick at bloody-disgusting.com is going to have to start leeching his user icon from somewhere else. Sorry, Broomstick. You might try http://www.monkeydyne.com/rmcs/, which is where I got that pic from in the first place, but they're more vengeful than I am and I'm almost certain they have a no-leeching policy.

I suspect there's something else going on, since Apache was going absolutely nuts with the spawning and reaping of processes - far more than a piddly "URI too long" error every couple of minutes should account for. But I don't really care what was wrong with it - shutting it off is the easiest way to deal with this.

Unfortunately, one friend of mine was also hosting a roleplaying wiki there, so shutting it down isn't a very nice thing to do to him. Hope he can find somewhere else to host it.

6 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!