20110524

grep 2.8

So I was sitting around today, lamenting the fact that grep isn't multithreaded, and decided to actually do something about it.  Since all of the appropriate Google searches just seem to list other people lamenting the same fact, I started messing around with things.  Turns out, I can get a 20-50% speedup just by doing this:

find $files -type f -print0 | xargs -0 -n10 -P8 grep -H $ARGS "$pattern"

(Word to the Wise: There is also a similar, but very wrong way to do it...)

find $files -print0 | xargs -0 -n10 -P8 grep -H -r "$pattern"

 So after tuning the threading numbers there, and feeling pretty good about myself, I decided to look up the mainline GNU Grep source, and see if there wasn't something I could do to help.  So I pull up the current source, and upgrade my box to use grep 2.8 instead of Gentoo's stable 2.5.4, and Holy Snapdragon!  (Yes, I actually said that...)  I got a 10x-60x speedup on the workloads I was testing.  Yes, you read that right.  My tests that were taking 48-80 seconds, were now finishing in 1-2 seconds.  I dunno what kinda magic they threw into grep 2.8 but good work guys.  Still no multithreading, but with the new version, I have real trouble just finding a workload that needs it.

So, my Gentoo countrymen, if ever there were a time to use unstable, this is it!

20110507

Skype and Gentoo amd64

I have a weird problem where my skype video intermittently (read mostly) doesn't work.

I found a solution here:
http://papers.ch/?p=94

Apparently it doesn't figure out it needs to load the 32-bit versions of v4l ...

20110505

Bash-ism

Fun fact of the day: "echo *" and "echo */" do not do the same thing... (with the obvious distinction).

20110419

Standards of Proof

Standards of Proof in the Internet Age

The Dark Ages
1960?-1970?: Published Work

Birth of the Internet
1970-1979: Electronic Article by a University Professor
ca 1980: a posting on Usenet

The Web
late 1980s - early 1990s: some grad student's personal website
ca 1992: AOL encyclopedia article
ca 1996: a page on GeoCities
late 1990s: corporate sponsored web pages

Social Networking
early 2000s: some guys Blog
ca 2006: a video on YouTube
2007: a Wikipedia article
2009: some celebrity's Twitter feed
2010: a poll of your Facebook followers

Source: My Personal Thoughts, April 2011.
(Some of the above mentioned sources were consulted for historical accuracy... the rest was fabricated.)

20110323

Firefox 4 animations....

I just installed Firefox 4, and the juries still out, but I needed to disable the tab animations just to make it usable.

What is with people and fancy UI animations these days?  I mean, they're fun to write, and they're cool for about 10 seconds, and then it's just annoying.  Like, after I've clicked a button, or closed a tab, I'm done with it.  I've already moved on, and am paying attention to something else, so if it suddenly starts flashing, or blinking, or sliding, it's completely distracting.

But thank you Firefox 4 developers for adding an option to disable it!  The nice thing about open source is there's usually someone who complains loud enough to get an option added.  :-D

20110227

Copyright and Eminent Domain

Can Congress legally restrict the copyright terms if it wanted to?  Or, having granted a property right, are they restricted to claiming eminent domain, and issuing compensation for seizure of private property as required by the Constitution?  They certainly seem capable of extending copyright (having previously done so). 

Perhaps one could argue that a copyright is essentially a state-granted monopoly rather than a property right, and is thus subject to various restrictions, that Congress has the right to change and regulate at any time.  Of course, those with vested (and yet unvested, if Congress extends it again) interests in promoting the term "Intellectual Property" would no doubt disagree.  Perhaps we should start calling it "Intellectual Monopoly Rights" and see if it remains as popular.

Dunno.  Food for thought.

Ungrammatical Constructions?

I would like to take a moment to lament the construction of the word "do-gooder."

My postulated etymology for the construction of the word is as follows:

First, we take the transitive use of the verb "to do," meaning "to bring about or accomplish."  So far, so good (no pun intended).

Next, we need to give it an object.  Take the noun "good."  Well, it's not really a noun... it's more of an adjective.  WordNet defines it as "having desirable or positive qualities."  To turn an adjective into a noun, we (of the English language persuasion), typically add the suffix "-ness."  But in English, the term "goodness" has more of a moral connotation, and loosely means "the quality of being good," just like "redness" and "coldness" denote abstractly the quality of being red or cold respectively.  What we really want is a way to refer to the set of things having goodness, at least to the degree at which the adjective "good" can be applied.  So really, we want the object of our verb to be the compound noun "good things," where the word "things" is implicitly restricted by the context to mean "things one can do," or more commonly, tasks or deeds.  So our basic particle of meaning here, is "to do good deeds," but in the interest of brevity, we're going to neologize the noun "good" to mean "good deeds."  It's perhaps a tiny stretch of meaning, but I don't want begrudge a man the lack of an obviously implied word.

Now, we're going to conjugate our phrase, yielding "do good."  Which, if you are willing to accept in parlance my derivation for the noun form of "good" above, becomes a perfectly acceptable action.  One can say "I do good," and "he does good" with impunity.  But for the purposes of our future construction, we really need to consolidate the phrase "do good," into a single word.  So, we create an intransitive form "do-good" by binding the word "good" as the object of the action "to do."  This is not entirely well-formed English, as one cannot reasonably say "I do-good" or "he is do-gooding" without the obvious problem of conjugating what used to be a noun.  But nevertheless we will operate!  (Cardano ca 1545).

To finish our construction, we will add the common suffix "-er" as in "woodcutter" or "farmer" to add the role distinction of "one who performs a task" (or at least "that which performs a task" if you want to include such inanimate persons as "staplers" in it's ranks).  Thus, we finally have "do-gooder," meaning "one who performs the task of doing good deeds," or more succinctly "one who does good" (by performing redundancy elimination, and dropping the implied "deeds" and "task").  But, if one is willing to admit it acceptable to restrict the category of "good things" to "good deeds," and drop the qualifier to accept the neologism "good" to mean "good deeds" in context, then I call to question, why we needed to include the operative verb "good" in this at all?  A "potter" is not "one who pots," but "one who effects pots," so to speak.  Why then, can't we simply refer to a "gooder" as "one who performs good things" and call it a day?  This seems to me, both more succinct, and avoids the grammatical awkwardness of the "do-good" construction.  But alas, 'tis not so.

To summarize then, we have:

"to do" + ("good" + "deeds") => "to do good deeds" => "to do good" => "do good" => to "do-good" => "do-good" + -er => "do-gooder"

QED?