Older blog entries for Omnifarious (starting at number 143)

I hate perl

Case in point, the Net::IP module. The documentation looks nice. It handles IPv6 and IPv4 addresses. It looks clean and simple.

Then, I decided I would like to be able to have IPv4 mapped IPv6 addresses match the IPv4 address ranges I'm singling out for special treatment. So I look into its tool for extracting an IPv4 address from an IPv6 address.

The call, ip_get_embedded_ipv4 doesn't seem to work on IPv6 addresses created with 'new'. It only works on IPv6 addresses represented as strings. This leads me to dive into the implementation.

I discover that the is no coherent internal representation. Just a lot of different attributes that are used at different times for different purposes and are converted from one another as needed.

Additionally, there appears to be no way to import particular symbols of certain classes from the module. You have to import them using the import statements specified in the documentation or take your chances on whether or not it will work. This is because the import mechanism and which symbols are global or not is handled in a fairly ad-hoc sort of way and re-implemented in each module according to the whims of the author.

It's really quite surprising the module works at all. And I'm left feeling like I really ought to re-write it if I want something I can count on.

In reality, looking at the module's implementation was a mistake. This is always what happens to me when I look at a perl module. Either it works in a completely mysterious way using language mechanisms I've never seen used before, or it works in a way that's totally broken and practically guaranteed to break for any use that varies from the specific use-cases described in the documentation. Frequently both are the case. Aigh! Run away!

I hope I can convince my new workplace to stop using perl.

Syndicated 2010-03-18 18:14:05 (Updated 2010-03-18 18:16:08) from omnifarious

31 Jan 2010 (updated 1 Feb 2010 at 09:20 UTC) »

Why I hate all of Apple's new hardware

The iPod, the iPhone, and the new iPad. I hate them all. They are a horrible abomination that appeals to the worst in us, the part that thinks if we all just let someone else handle all the details for us that everything will be OK and we don't need or want to take any personal responsibility for the things we own, for the attitude that convenience beats freedom.

And this isn't because they are small and not a 'full-fledged' computer or anything like that. I would love a world full of tiny useful gadgets that help people get stuff done without getting in their way. No, I hate them because you can't open them up and tinker with them. You can't make them do anything you want them to do, you can only make them do what Apple wants you to be able to do.

And this author has distilled for me at least one incredibly important reason why this freedom is so important in his short essay "Tinkerer's Sunset".

I got my start with computers because of that exact sense. This is the ultimate gadget! I can make it do absolutely ANYTHING! I just have to figure out how to tell it in a language it can understand.

None of the products I mention have that. They all treat 'developers' as a special class that you have to jump through hoops to become a member of (and what kid is going to go do that?). And even then, people who choose to be in that class still don't get to make the machine do anything, just what Apple approves of. That is very, very not OK.

I'm not an Apple hater here. I own one of their laptops because I get root access on it, just like I would own an iPhone if I got root access on it. The laptop is a good piece of hardware, and it's the only laptop I've ever used that I've really enjoyed using.

The most excusable of them all is the iPod. It masquerades as a simple, single-purpose device. But even then, the fact that Apple purposefully hobbles the platform in various ways in order to try to keep you from doing things Apple doesn't want you to do has kept me from even considering buying one.

It's my hardware! MINE! I should get to do whatever the heck I want to with it. This whole 'joint ownership' thing (especially when they pretend it isn't happening) with some large corporation is totally broken. It really distresses me that so many choose convenience over freedom (hint: it doesn't have to be a dichotomy, and I suspect that Google will get this right). My only, rather bitter, consolation is that such people will get the future they deserve.

Note, that I am most definitely not insisting that everybody should open up their appliances and tinker with them. I don't want you all to become developers or anything like that.

What I'm insisting on is that you choose appliances that you can open up and tinker with. Not because you know you want to, but because having the freedom to do so taken away from you is very bad for everybody, especially children who will never get the chance to learn they enjoy tinkering because their corporate overlords forbid them from doing so.

Unfortunately, people who buy such devices may also end up, by their aggregate choices, dragging me into a future that I don't want. Network effects (as in marketing speak network effects) are king on computers. If freedom destroying gadgets become popular, it starts to become really hard to use anything but freedom destroying gadgets.

Edited 2010-02-01 00:14 PST: People who commented before then are commenting on a diatribe where I didn't try nearly so hard to separate the nice things the gadget does from the freedom destroying effects of the policies of the corporation that makes it.

Syndicated 2010-01-31 19:32:38 (Updated 2010-02-01 08:15:51) from Lover of Ideas

This captures my feelings perfectly

I found a fantastic quote that I have to save, though it's only funny (or really irritating) to computer programmers.

Question: What's the difference between Java and Javascript?

One is essentially a toy, designed for writing small pieces of code, and traditionally used and abused by inexperienced programmers.

The other is a scripting language for web browsers.

Syndicated 2010-01-25 20:08:28 from Lover of Ideas

I'm pleased with myself

In answering a question on StackOverflow I appear to have independently re-invented the Curiously Recurring Template idiom as applied to polymorphic copy construction.

Until I tried to answer that person's question I never realized there was such a nice and convenient way to avoid having to copy&paste cookie-cutter clone methods.

Syndicated 2010-01-14 17:10:38 from Lover of Ideas

Clearwire is being very annoying

I purchased Clearwire for [info]tazfrog because Speakeasy was being annoying about getting DSL into her place (so annoying that I dropped them myself) and Comcast was totally unpalatable for any number of reasons.

It worked out well. I set up a nice Linux based router for her that would automatically configure a nice 6to4 IPv6 tunnel with the public IP address that Clearwire assigned to it. It would act as a NAT and a firewall for all the machines inside the network.

Well, recently Clearwire 'upgraded' all of their boxes. And now the boxes assign themselves the public IP address and force all of your computers to use NAT. No more IPv6 tunnel. It's very, very irritating, and also just plain wrong. If you get a fake IP address, you aren't really getting Internet service.

They claim that Motorola, the manufacturer of these boxes, just delivered them that way and there is no way to turn the NATting behavior off. The nice support person gave me a way to log into the web UI of the Motorola box and set up port forwards and such (which doesn't really help for what I actually want to do). But poking around the UI makes it seem like Motorola was intending to support more modes of operation and just never got around to finishing them.

I'm kinda peeved. I was considering outright anger as I was suspecting this was a policy decision on Clearwire's part. But it appears to be simply incompetence and not a policy decision. Being evil by accident seems somehow more excusable than being evil on purpose. And I think giving people NATted IP addresses is definitely evil and wrong. It's not real Internet service.

It's like the phone company putting you behind a PBX and not telling you the extension. Sure you can make all the calls you want, but nobody can call you. And, of course, when you complain you're asked "Of course you have phone service! You can call anybody you want to. What? Why would anybody want to call you?! You're just a dumb consumer! Everybody wants to call in to the radio shows and stuff, that's what the phone is for. We can't be bothered to support your little 1% use-case here! Look, if you want people to talk to you, just dial up one of those conference line places like everybody else. They'll hook you up.".

Syndicated 2009-12-11 07:51:45 (Updated 2009-12-11 07:54:36) from Lover of Ideas

My first Erlang program!

I put my first Erlang program in a pastebin. It's a concurrent prime sieve. Likely not the most efficient way to do things, but I'm still all pleased with myself. :-)

I may or may not choose to program more sophisticated things in Erlang, but I figured a passing familiarity was in order. Especially since I'm thinking of using CouchDB for something and it's written in Erlang. While knowing Erlang isn't necessary to understand CouchDB, I figure that it certainly can't hurt.

Syndicated 2009-11-07 22:56:33 (Updated 2009-11-07 22:58:10) from Lover of Ideas

NP completeness and the singularity

In many books about the singularity, the idea comes up of having your thought processes run on some interesting and imaginative substrate. Say, as an emergent property of a flock of pigeons. While this might well be possible, I think NP completeness places some hard limits on exactly what an external observer can determine about such systems.

There is an interesting problem that might be NP complete called the graph isomorphism problem. The graph isomorphism problem deals with proving that two different graphs have a one-to-one mapping showing them to be a simple transformation of each other.

So, if you have two different entities claiming to be the same entity running on a different substrate it's very hard to tell if they really are unless they tell you the mapping.

A plot element in some post-singularity novels is the idea of someone hiding themselves in various places by having themselves run on a wide variety of unusual substrates. A sort of steganography of consciousness. If the graph isomorphism problem is NP complete, then finding entities of human-level complexity who are doing this is likely practically impossible. Even the resources of a matrioshka brain are likely not enough to do the computation required to find them.

Syndicated 2009-10-16 19:09:29 from Lover of Ideas

13 Oct 2009 (updated 14 Oct 2009 at 04:14 UTC) »

Sexism in the FOSS movement...

This question, generalized to the software field as a whole has been of great interest to me for a long time. And the main conclusions I've come to are that the whole topic is very complex and nuanced and there aren't a lot of simple answers.

Most interesting to me are the knee-jerk reactions, many of which are in evidence in this articles on Slashdot titled "FOSS Sexism Claims Met With Ire and Denial".

I will address a few of them here...

Your race or gender shouldn't matter on the Internet since everybody is just text.

Well, that's true, to a point. But the real truth is that everybody uses pronouns for themselves or others. And we have one set of names we usually use for girls, and another set for boys. Gender is a deep, built-in aspect of almost any communication.

It is, of course, possible to convincingly fake being a boy, or fake being white. But why should you have to? Why should you have to hide some important part of your identity in order to be taken seriously?

Open Source is a meritocracy.

Well, yes and no. Women in Open Source stick out like a sore thumb because there are so few of them. One source I read quotes a figure of 1.5% for the percentage of women involved and given my observation that figure is completely believable. If you are a girl, you will be treated differently simply because you are such a novelty. Anybody who denies this is denying a basic fact about how people act.

Feminists ate my dog!

Well, OK, not exactly. But I see a large class of comments about how some random (often academic) feminist said some really awful thing, and how now their whole view of feminism is tainted.

First, open your eyes. I agree that statements like "All men are rapists." are pretty hateful and certainly not at all helpful. But for many statements of that ilk it's difficult to tell if a particular feminist actually said that, or if someone just put words in his or her mouth after misinterpreting what was written. Also, in my experience, most people who identify themselves as feminist do not hold views that are even remotely similar to statements like that. Most are reasonable people who just think women should have the same opportunities and rights as men.

Secondly, the issue isn't even related. So, some random feminist said something you find really distressing. What's that got to do with sexism in the FOSS movement? Are you trying to say it doesn't exist (if that's true, why only 1.5% women?)? Are you trying to say that your perception of people who identify themselves as feminist justifies mistreating all women? That's pretty messed up. Really, this is just a distraction so you can avoid thinking about the actual problem.

Women should just buck up, take it like a man and stop whining!

Well, many of them do. But not pointing out a problem doesn't help deal with the problem now does it?

And the problem exists. The 1.5% figure isn't a lie. While I'm willing to entertain the idea of a biological difference of some kind generally predisposing women or men towards different things, I'm not willing to believe that any such difference would result in such a profound split. Maybe, just maybe a 60%<->40% split. Maybe. But most definitely not 1.5%<->98.5%. Only cultural and social forces could create such a profound split.

My favorite mental picture here is the overlapping bell curves. Sure the averages may be a little different, but many more people live in the place where the bell curves overlap than live in the place where only members of one distribution live.

Those, I think, are the major knee-jerk responses I see. None of them are particularly helpful for actually confronting the issue. They are all evasions or denials of one kind or another.

Among people who recognize the problem, there are a number of knee-jerk solutions I see proposed. Many of them have the effect of banishing sexuality and gender identity from increasingly widening spheres of human interaction. I don't think the answer lies that way at all. I think it is both bad for people, and not very workable.

People are sexual, and that is a core part of who we are. Men and women exist and are different in important ways. Banishing sexuality or gender identity is a denial of both of those facts.

One technique I wish women used more is table turning. Men are not frequently depicted as sexual objects and women are. If you notice that professional presentations are depicting women as sexual objects, create some of your own that do the reverse. If you're called on it, point to the other presentation and ask why it was OK for them.

I don't think that kind of objectification is to be encouraged in professional presentations. It detracts from the subject matter. But men will have a tendency to ignore it or tut-tut about it without doing anything. Once men are at the uncomfortable end of things, maybe we'll get it.

Syndicated 2009-10-13 07:08:48 (Updated 2009-10-13 18:09:54) from Lover of Ideas

Well, my collaborator wants a patent :-(

And the only way I'll let myself be associated with a patent is if it's clear the patent will never be asserted against any software meeting the open source definition or meeting the free software definition. This is a concession he's unwilling to make. In particular, he wants some kind of definition for 'commercial' against which the patent can be asserted.

Oh, well. I'm going to generously allow him to use it in proprietary software if he so chooses. I'm trying to think up a set of conditions that will make sure the source never appears in public so nobody is ever tempted to put themselves in the way of a patent, should he choose to file one.

He thinks I'm completely nuts, and also thinks my principles are antithetical to his ability to make a living. *sigh* That's not how things work. The only power in ideas is if they're shared widely and freely.

I think the idea is a neat idea, but not that neat. Like all ideas it builds on and incorporates existing ones. For all I know, someone has already thought of doing something like it. I know at least one project of mine was something close.

Syndicated 2009-09-15 21:21:47 (Updated 2009-09-15 21:25:08) from Lover of Ideas

Yay! It works!

Because of an agreement with my collaborator I have to keep a bit quiet about exactly what it is for now. But I've been working hard on it for the past 4-6 weeks or so. And it's mostly in that "It'll crash at the drop of a hat (by design) but the major functionality works." state, so it needs a lot of polishing before I'll really consider it worthwhile.

It's an implementation of a really interesting idea related to how pure functional programs handle I/O. More than that, I'm not going to share just yet. :-)

I will say that there is a lot of potentially re-usable C++ code in there for wrapping up various Unix and networking concepts in a nice pleasant wrapper. I've always thought that the way Python wraps all that stuff up in a framework that throws exceptions is very nice for rapid prototyping, and also nice for cleaner error handling.

Syndicated 2009-09-13 03:52:37 (Updated 2009-09-13 03:56:07) from Lover of Ideas

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