Journal of Omnifarious

Thu, 2037-Dec-31

23:59 - To all of my friends

A note to all of my friends or those who would friend me

Could you also please friend by clicking here: and put that user (who is also me) in all the same groups you put me. If LJ ever lets you use your OpenID identity to log into an existing journal, this may be moot. but I'm not counting on that feature ever happening.

As an aside, if you click on the icon in , it takes you someplace different than clicking on the hopper [omnifarious.org] does. The takes you to the LJ user info page, and the hopper [omnifarious.org] part takes you to the homepage for the ID.

Tags: ,
Current Mood: [mood icon] working
[30 comments] [Leave a comment]

Sun, 2009-Nov-08

09:18 - Depressing story from Alabama

A nice, red state. Though, IMHO, it doesn't really matter, both sides play the same game in this regard. One sides talks pretty, and makes a show of supporting various social programs. But really, they aren't tackling the basic issues that lead to this kind of inequality in the first place.

As The Billionaires Plunder Alabama, U.S. Troops Occupy Towns…Illegally

Tags: , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] angry
[Leave a comment]

Sat, 2009-Nov-07

14:49 - 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.

Tags: ,
Current Location: 1309 NE 45th St, 98105
Current Mood: [mood icon] accomplished
[4 comments] [Leave a comment]

Fri, 2009-Nov-06

23:24 - [info]tazfrog and I just finished watching Krull

And it made me realize what's wrong with marriage in America. There is a complete lack of matrimonial flamethrowers. I think that this is just what we need to save marriage.

Tags: ,
Current Location: 47.69058, -122.35494
Current Mood: [mood icon] amused
[2 comments] [Leave a comment]

Sat, 2009-Oct-24

19:09 - Haloween parties

I hate costumes. I hate dressing up in general. I feel woefully incompetent at anything where physical appearance plays a big role. It's not that I think I'm inherently bad to look at or anything like that. It's that I think there is a certain skill to presenting yourself well from a pure visual appearance standpoint that I don't think I possess.

So I've been staying away from almost any event or social gathering in which clothing is mentioned.

Previously, I've gone for minimalist conceptual costumes as a way to avoid the whole question all together. "I'm a college student." (in actuality a bit bitter than I wasn't really a college student by the official definition and therefore didn't qualify for any financial aid) or "I'm an amorphous blob named Xylex who's eaten me and taken my form." or "Starman." (that was a bunch of big steel marbles I was holding in my hand, sadly they didn't glow).

Now, somehow, that isn't working for me. I'm not sure why, but I don't really want to try the conceptual costume route, and I don't really want to dress up either. I have nothing to dress up in and no skill at doing it. In fact, it's often a huge effort for me to get out to various events in the first place, and I kind of resent being presented with an additional requirement to dress a certain way if I'm going to be there.

Tags: ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] intimidated
[2 comments] [Leave a comment]

Fri, 2009-Oct-16

12:09 - 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.

Tags: , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] contemplative
[2 comments] [Leave a comment]

Tue, 2009-Oct-13

00:08 - 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...

Cut for brevity )

Tags: , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] contemplative
[7 comments] [Leave a comment]

Sat, 2009-Oct-10

01:34 - Wow, two fantastic pieces on the Virginia Tech shootings

There are two articles that, in my opinion, give an excellent analysis of the Virginia Tech shootings.

The first is a scholarly piece by a professor of sociology that carefully dissects the situation and the blame spinning around it to raise some serious questions about exactly why the shootings happened:

MOBBING AND THE VIRGINIA TECH MASSACRE

Another piece is very literary and subjective. The authority this author speaks from is having been in a very similar situation to Seung-Hui Cho. His intelligence and wit make his viewpoint a very compelling one:

The Truth About the VT Shooting

In my opinion, the first author understates the frequency of mobbing. I experienced it in elementary school, and to a lesser extent in high school. I've also experienced it once, in a fairly mild form, on a job.

In this, it is very important that whenever someone seems to be 'out' with everybody, someone needs to make them 'in'. And by 'in' I don't mean taking it upon yourself to guide them into being orthodox. I mean really taking the time to be a part of their lives and see the world from their point of view.

The second author has a view of the world I sympathize with a great deal. It closely mirrors my own, though I feel more positively about people as individuals than he does. I find people individually to be flawed, but marvellous and wonderful. I find people as parts of large institutions or authority structures to be disturbing and horrible.

In getting through school a strategy I semi-consciously followed was to make sure that at least some of the teachers knew me as an individual. I worked as hard as I could to make the machinery of authority and control leave me alone because individuals would avoid making the choice to invoke it.

I now wonder how many people had experiences similar to mine.

Tags: , , , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] impressed
[2 comments] [Leave a comment]

Mon, 2009-Sep-28

11:27 - Response to 'Dehumanized: When math and science rule the school' by Mark Slouka

This is a response to this article: "Dehumanized: When math and science rule the school" by Mark Slouka. Initially I'm going to be tossing ideas against a wall because I feel his argument is broken in several different respects. Later I intend to try to go back to edit it to be more coherent. Or, at least, that's my intention right now. :-)

In his article he talks about how the humanities are being consistently and constantly dissed in favor of science and math education in our schools. He thinks this is a bad thing. I think he's right about the dissing, but I partially disagree that it's a bad thing, and I definitely disagree about why it's happened.

long rant )

Tags: , , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] annoyed
[4 comments] [Leave a comment]

Tue, 2009-Sep-15

14:21 - 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.

Tags: , , , , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] disappointed
[2 comments] [Leave a comment]

Sat, 2009-Sep-12

20:52 - 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.

Tags: ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] pleased
[1 comment] [Leave a comment]

Fri, 2009-Sep-11

11:58 - A really excellent post about moving to IPv6

This really excellent post makes the analogy of upgrading to IPv6 being like moving to longer phone numbers. Not that the analogy is perfect by any means, but it is useful for illustrating some important differences in the attitudes of people towards it.

One cogent commenter mentions:

The telephone equivalent of NAT is a PBX with built-in extensions, but you're right in that no one is suggesting that PBXes will relieve the burden of upgrading the phone system at some point.

Tags: , , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] anxious
[Leave a comment]

09:44 - You know, sometimes...

You know, sometimes this is exactly how I feel:

Tags: , , , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] amused
[3 comments] [Leave a comment]

Thu, 2009-Sep-10

08:27 - No more autoconf for endianess detection

autoconf is annoying to work with, and I think that programs that rely excessively on it for cross platform compatibility have issues of their own. Sometimes you really have no choice though.

Fortunately I recently discovered one place where I now do have a choice where I didn't before. This little code snippet can be optimized by gcc at compile time into a constant expression. That means that gcc realizes there is only one possible result and it uses that result in place of actually running the code in the function. Here is the code snippet:

inline bool is_little_endian()
{
   const union {
      ::std::tr1::uint32_t tval;
      unsigned char tchar[4];
   } testunion = { 0x11223344ul };
   return testunion.tchar[0] == 0x44u;
}

This is guaranteed to work on C99 systems, and, as I said, gcc is capable of recognizing it as a constant expression. This also means that if you have code like this:

   if (is_little_endian()) {
      do_something();
   } else {
      do_something_else();
   }

gcc will be smart enough to see that only one branch of that if will ever be taken and optimize the other completely out of your code.

Normally you'd want to use autoconf for this so you will have a preprocessor macro that will elide the code for you. The fact gcc can optimize this well means you don't have to do that to get efficient code.

Tags: ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] pleased
[2 comments] [Leave a comment]

Tue, 2009-Sep-08

01:11 - IPv6 addressing oddity

I've noticed an interesting oddity in IPv6 addressing...

::ffff:n.n.n.n refers to IPv4 only hosts so that a program written for IPv6 only and running on a dual stack machine can address IPv4 only hosts. There is another class of address that is similar, but not quite the same, and I don't actually understand when it would ever be used, and that class is called "IPv4 compatible IPv6 addresses" and they are of the form ::n.n.n.n.

Interestingly the IPv6 IN6ADDR_ANY address is ::, which is equivalent to ::0.0.0.0. Fortunately, the IPv4 INADDR_ANY address is 0.0.0.0 (also known as 'this host on this network' in the 'Special Addresses' section of RFC 1700) so there doesn't seem to be any real problem.

And finally, the real problem. The IPv6 equivalent of localhost or IPv4's 127.0.0.1 is ::1, and this is equivalent to ::0.0.0.1 which makes it an 'IPv4 compatible IPv6 address'. But the IPv4 address it maps to is, according to RFC 1700, some kind of local identifier for a host on a network. That seems like an odd conflict and inconsistency to me, and I'm not really sure what it means.

Of course, I've never seen any addresses in the 0.0.0.0/8 block be used at all aside from 0.0.0.0 itself, so it's likely not a real problem. But I'm still curious.

Edit 16:36: I have the answer. According to RFC 4291 section 2.5.5.1 meaning of ::n.n.n.n addresses as 'IPv4 compatible IPv6 address' is deprecated so there is no longer any overlap in meaning between the special IPv6 addresses ::1 and :: and any IPv4 address.

Well, that was the right decision, the distinction between ::ffff:n.n.n.n addresses and ::n.n.n.n addresses was confusing and unclear anyway.

Tags: ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] curious
[3 comments] [Leave a comment]

Sun, 2009-Sep-06

13:19 - Public service for russians part 2 - Никто не осмелится назвать это тайным заговором

The entire article didn't fit in my first post, so I had to break it into 2.

Russian translation of "None Dare Call it Conspiracy" - part 2 )

Tags: ,
Current Mood: [mood icon] determined
[Leave a comment]

13:14 - Public service for russians part 1 - Никто не осмелится назвать это тайным заговором

This is the russian version of an article published in GQ magazine, but only in their print version. The publishers of GQ wanted to make sure nobody in Russia saw this and so they only published it in print, in the US, and not on the web or any other country. They did it because they are chicken. LJ has a lot of russian readers, so I thought I would post a copy here.

This article is about how Vladimir Putin's rise to power almost certainly happened because the political structure surrounding him orchestrated a series of bombings of occupied russian apartment buildings that they then blamed on the Chechans. Almost every russian who has pushed this theory in any kind of significant way is dead. One was killed by polonium poisoning in a case that made the US news.

It also illustrates the fallacy behind some of the 9/11 conspiracies. The russian conspiracy unraveled for any number of reasons. People noticed something strange going on and reported inconvenient and highly damaging facts. The motivations of the supposed culprits were vague (Chcehnya had already won its independence). Physical facts didn't support official stories. With 9/11 conspiracies people almost exclusively talk about physical facts that seem to have many interpretations, only some of which support the conspiracy theorists arguments. In particular, nobody has talked and I'm pretty sure someone would've.

Anyway, here, behind the cut, is the russian version of the story. The original copy of this translation also contains pictures of the english version of the article that you can read, if you are so inclined.

Russian translation of "None Dare Call it Conspiracy" part 1 )

My only worry is that the guy who talked the most might end up dying as a result of this article. :-(

Tags: ,
Current Mood: [mood icon] determined
[Leave a comment]

Fri, 2009-Sep-04

23:21 - Ugly C++ technique that I'm still proud of thinking of

I'm quite pleased with myself. :-) I've been participating on stackoverflow.com recently. HazyBlueDot had an interesting question in which (s)he was trying to use ::boost::function to get around a broken library interface.

In particular, the library interface allowed you to register a callback function, but it did not provide you a way of giving it a void * or something to pass back to you so you could put its call of your function back in context. HazyBlueDot was trying to use boost::function in combination with boost::bind to add in the pointer and then call his own function. The only problem is that the result boost::function object then couldn't produce an ordinary function pointer to pass to the callback.

This, of course, cannot be done in a static language like C++. It requires on the fly generation of first-class functions. C++ simply can't do that. But, there are various interesting tricks you can pull to generate functions at compile time with templates in ways that can help with this problem, even if they can fully solve it.

I'm particularly pleased with my solution, which looked something like this:

Cut so that people who find that source code makes their eyes bleed don't have to look )

This basically allows you to automatically generate a 'thunk' function, a normal non-member function that can be passed to the callback, that then calls another function and adds the contents of a global variable you specify as a template parameter. It doesn't fully solve the problem, but it partially solves it. And I think in this case it will do something pretty close to what HazyBlueDot wants.

Tags: , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] pleased
Current Music: Aimee Mann - One
[Leave a comment]

Mon, 2009-Aug-31

14:23 - Empathy and OTR

Empathy has been starting to make it into Linux distributions as the default IM client. I think this is a mistake at this juncture, and this bug about Empathy not supporting OTR is one of the larger reasons why.

Another reason why is that Empathy seems to be connected with several different libraries and there is no clear sense as to what functionality lives where. It appears to be something of a spaghetti mess of libraries. I mostly figured this out because of repeated calls to 'code it or shut up' in response to the bug I posted.

One of my responses was good enough that someone else felt the need to cross-post a link to it in the Launchpad bug about lack of OTR support in Empathy.

I will cross-post it here:

My comment on OTR in Empathy at bugs.freedesktop.org )

Someone else goes on later to suggest that Empathy support some horrible idea like TLS over XMPP. Which, in addition to being an awful idea for any number of reasons, also fails to address the issue of support for any protocol aside from XMPP.

In order for encryption to be useful in a communications system, everybody has to be able to use it whether they want it or not. It should be a first-class feature designed in from the very beginning, not tacked on as an afterthought (something that OTR in pidgin fails at) and certainly not treated as unimportant because only a few really want it.

Tags: , ,
Current Location: 2237 NW 62nd ST, 98107
Current Mood: [mood icon] annoyed
[1 comment] [Leave a comment]

Sun, 2009-Aug-30

13:38 - Is this really faster?

This:

unsigned int clipdigit(unsigned int * const v)
{
   unsigned int digit = (*v) % 10;
   (*v) /= 10;
   return digit;
}
is turned into this:
.globl clipdigit
	.type	clipdigit, @function
clipdigit:
.LFB11:
	.cfi_startproc
	movl	(%rdi), %ecx
	movl	$-858993459, %edx
	movl	%ecx, %eax
	mull	%edx
	shrl	$3, %edx
	leal	0(,%rdx,8), %eax
	movl	%edx, (%rdi)
	leal	(%rax,%rdx,2), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE11:
	.size	clipdigit, .-clipdigit

As a small hint/bit of explanation, 232 - 858993459 = 3435973837 = 235 / 10 + 2.

Is mull really that much faster than divl on x86_64 machines?

I was expecting to get code more like this rather straightforward bit:

.globl clipdigit
	.type	clipdigit, @function
clipdigit:
.LFB11:
	.cfi_startproc
	movl	(%rdi), %eax
        movl    $10, %ecx
        xorl    %edx, %edx
        divl    %ecx
        movl    %eax, (%rdi)
        movl    %edx, %eax
	ret
	.cfi_endproc
.LFE11:
	.size	clipdigit, .-clipdigit


It turns out in testing that the second clip of code is much, much slower than the first clip. The strange mull method is about 5 times faster than the straightforward divl method. Wow, divl seems really broken if it's that slow.

Tags: ,
Current Mood: [mood icon] confused
[5 comments] [Leave a comment]

Navigate: (Previous 20 Entries)