Nov. 16th, 2009

elfs: (Default)
On Fox News Sunday, Liz Cheney, the daughter of Dick, said, "Whatever Republican takes the mantle in 2012 he will have to face these incredible challenges we're facing, and they'll have to undo the damage this president has done."

WTF? It has been absolutely amazing to listen all weekend to the right cowering in their caves and refusing to come out and admit that justice and the rule of law are moral and national goods, all the while decrying the US Military for being a cesspit of political correctness that let terrorists inflitrate and commit horrors. And now Ms. Cheney comes out and says that, because our national standing in the world has gone up Obama is "doing damage?"

Yo, Liz, read this for "damage:"

Rebuilding Its Economy, Iraq Shuns U.S. Businesses (NYT):
American companies are not seeing much lasting benefit from their country's investment in Iraq. Some American businesses have calculated that the high security costs and fear of violence make Iraq a business no-go area. Even those who are interested and want to come are hampered by American companies' reputation here for overcharging and shoddy workmanship, an outgrowth of the first years of the occupation, and a lasting and widespread anti-Americanism.
Her father can't even do war profiteering correctly. That's what we get for KBR poisoning our own troops with poorly refrigerated food and even killing some of them with electrified showers.
elfs: (Default)

Google last week released Google Go, a new programming language designed to be “more C-like” (a kind of python/C#/Java mash-up of a language) with support for Erlang’s excellent concurrency management, which allows you to write programs that can do lots of different little things at the same time on machines that have multiple CPU’s. It’s odd that Google that should come out with this at about the same time that I started looking into Python’s high-concurrency variant, Stackless, because both Stackless Python and Go purport to do the same thing: bring high-quality concurrency management to the average developer in a syntax more familiar than Erlang’s, which is somewhat baroque.

While looking through both, I came across Dalke’s comparison of Stackless Python versus Go. Not even taking into account the compile time (which is one of Go’s big features, according to Google), Dalke compared both and found that Stackless Python was faster. His comparison, he wrote, maybe wasn’t valid because the machines on which he ran some of the comparison were close, but not the same.

So, here’s the deal: on a Thinkpad T60, running on the console with no notable load whatsoever, I ran Dalke’s two programs, both of which spin off 100,000 threads of execution and then sum them all up at the end.

The “real” time to run the Go program was 0.976 seconds (average after ten runs). The “real” time to run the Python program was 0.562 seconds (average after ten runs). The Python program, which must make an interpretive pass before executing, was almost twice as fast as the Go program. (It was 1.73 times as fast, which matches up approximately with Dalke’s 1.8).

In fact, you can see the consequences of this in the way the other figures come out: the amount of time dedicated to CPU for both is wildly different. Both spent approximately the same amount of time executing the user’s code (python: 0.496 seconds, go: 0.514 seconds), but time spent by the kernel managing the code’s requests for resources is way off (python: 0.053 seconds, go: 0.446 second).

It may be that Go is simply doing something wrong and this can be fixed, making Go a competitive language. An alternative explanation is that Stackless Python has an erroneous implementation of lightweight concurrency and someday it’s going to be found and high-performance computing pythonistas are going to be sadly embarrassed until they fix the bug and come into compliance with Go’s slower but wiser approach.

But I wouldn’t bet on that.

Kent Beck recently said of Google Wave, “it’s a bad sign for wave that no one can yet say what it is indispensable for. not just cool (it’s definitely that), but indispensable.”  The same can be said of Google Go:  There’s nothing about it I can’t live without, and other implementations of the same ideas seem to be ahead of the game.  Stackless Python not only has Erlang-esque concurrency and reasonable build and execution times, but it has a familiar syntax (which can be easily picked by by Perl, Ruby, and PHP developers), a comprehensive and well-respected standard library, and notably successful deployed applications.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com
elfs: (Default)

Danger, Will Robinson!
Saturday was your typical morning. After a catch-all breakfast, we headed out to Kouryou-chan's school for the monthly cleanup routine. It was exceptionally routine. We were the only people there, so Omaha weeded and picked up while I did the gutters. As I got around to the Primary Garden, though, I spotted this new cable running from the post on the edge of the property down to under the eaves, where it links in with a bunch of other cables that lead from the post to an elevated roof post.

My biggest guess is that this is a data cable for collecting information from the new digital power meter on the property. But that doesn't look safe at all to me, and I didn't go anywhere near it while cleaning out the gutters in that section.

We bailed after two hours, all necessary work done. I had a brief talk with Kouryou-chan about the difference between honor, reputation (thank you, Lois), and character, and why we did these chores even when no one was watching.

We went home, had lunch, cleaned up, and then headed out to the Saturday dance practice, where I was immediately roped into being a prop for the school's annual Nutcracker, as "a parent" for the opening party scene.

I protested. I have three left feet! But no dice, Omaha was doing it too, so I quickly learned my routine, coming in on the stage, bowing to the real dancers, then heading stage right to play watermelon-cantelope silently with the other parental players and herding the very little children, the ones in pre-ballet, through the circuit laid out on the marley floor.

It was fun, the other parents were helpful, the children were delightful, as well as the one older dancer girl assigned to play the role of the maid, one of those irrepressibly happy people who just seemed damned glad to be doing something. The girl who plays Clara, in contrast, is very serious, with her face set and determined as she demonstrates her toe-standing skills. She's a good dancer, but has to work on that audience-pleasing stage-presence thing.

After the practice was over, we went home where I spent much of the afternoon hacking. For dinner I made halibut chowder (yum!), and we played a round of Sorry! before bed.
elfs: (Default)

Parsing HTML with regex summons tainted souls into the realm of the living.

If you hack HTML for a living, this will make you giggle.  And given that I’ve used regex in my tests to assert the presence of classes and objects in a page, I guess I’m guilty.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 3rd, 2026 06:49 pm
Powered by Dreamwidth Studios