Haskell is kind of terse

Prelude> -- Hey Haskell! Show me the distribution of totals of 3 six sided dice.
Prelude> import Data.List
Prelude Data.List> [ (head w, length w) | w < - (group $ sort [ x + y + z | x <- [1..6], y <- [1..6], z <- [1..6] ])]
Prelude Data.List>

So where’d that come from?

Here is how that one liner was built up bit by bit…

Continue reading “Haskell is kind of terse”

“The 2004 Election Was Stolen… Finally We Have Irrefutable Confirmation”

Democracy Now! | Harvey Wasserman on New Ohio Voting Report: “The 2004 Election Was Stolen… Finally We Have Irrefutable Confirmation”:

AMY GOODMAN: Harvey Wasserman, I wanted to switch gears—


AMY GOODMAN: —and ask you about voting. Ohio’s top election official, Secretary of State Jennifer Brunner, announced on Friday the voting systems that decided the 2004 election in Ohio were rife with “critical security failures.” You and Bob Fitrakis have reported extensively on the 2004 presidential vote in Ohio, your most recent book, What Happened in Ohio: A Documentary Record of Theft and Fraud in the 2004 Election. Your response to the report? What did you think was most important in her findings?

HARVEY WASSERMAN: Well, our initial response was “Yippee!” I mean, they finally, after all these years of us banging our—you know, we’re local boys. We live in Ohio, in Columbus. And we saw the election of 2004 stolen right in front of our faces. And we reported it extensively, and everybody laughed at us. And they said, “Oh, this couldn’t happen in America.” And we documented it in How the GOP Stole America’s 2004 Election and Is Rigging 2008. We documented scores of ways that this election was stolen. And we pointed out a myriad flaws that we saw right in our own neighborhoods, of what was done to keep people of color and young people from voting and to rig the vote count.

I mean, the servers for the computation of the Ohio vote count were in the same basement in Chattanooga, Tennessee that houses servers for the Republican National Committee. The programmers who did the stuff for Ken Blackwell, the Republican Secretary of State, were Republicans who did websites for the Bush administration. I mean, it’s amazing.


But the 2004 election was stolen. There is absolutely no doubt about it. A 6.7% shift in exit polls does not happen by chance. And, you know, so finally, we have irrefutable confirmation that what we were saying was true and that every piece of the puzzle in the Ohio 2004 election was flawed.

Although the Democratic victories in ’06 prove that whatever power corrupt Republicans have to steal elections is not nationwide, or is not significant enough to steal races that aren’t fairly close to begin with….


Haskell is kind of cool.

Back in about 2000-2001, I was doing first tech support and then configuration management work for a big company in Chicago, and, basically because I was lazy and curious I would spend more time than I should have reading, on the web, about programming, especially programming languages, especially unusual ones.

That was when I first started getting interested in Ruby, and read the online Pickaxe Book; that’s when I read beating the averages and wanted to be an Eager Young Lisp Cadet (much like the inimitable Bruce!), I downloaded Squeak and learned a little Smalltalk; and I got geeked about pure functional programming by reading John Hughes’ paper, Why Functional Programming Matters. Hey, anything but do the work I was being paid to do!

The Hughes paper led me to Haskell, and I read the Gentle Introduction to Haskell , at least up to the IO chapter, which linked forward to the Monads chapter, which was too much for my poor little brain.

The thing was, at the time, I wasn’t programming professionally or really much at all. I’d read about programming, done tiny little fun programs, done a lot of system scripting in Perl, and learned about the languages, but I’d never been a “real” programmer. This kept my mind open to wacky languages but it kept my understanding shallow.

A couple jobs later, I was doing actual programming for a living, but in Perl (the first language I’d actually used on the job, and so the one I was best at). While I wasn’t paying attention to it, Ruby suddenly became really popular thanks to this “web application framework” called Rails, maybe you’ve heard of it.

Now it seems like Haskell is starting to accumulate buzz. There’s almost as much jibberjabber on Reddit about Haskell (especially Monads) as there is about Ron “we can safely assume 95% of black males are criminals” Paul.

I’ve recently gone back to it, got a copy of the compiler working on my , and followed some of the good tutorials, and I finally realized that Haskell’s “monads” weren’t really as hard to understand or weird as I had thought.

I even wrote a little program that rolled dice. It compiled. It used the IO Monad. It used the Random Monad (indirectly — you can just pull random numbers into an IO Monad). It was maybe a dozen lines long, and verbose at that. I rewrote every part of it several times, so I wasn’t just cut and pasting code, butunderstood exactly how it was doing its thing, and I played around with the monad operators and “do-notation” and all that.

In the end it all turns out not to be a big deal.

OK, now what?

I’d love to go learn more about Haskell. But you know what? I don’t actually program in my spare time much. Just stupid little utility scripts from time to time. Convert videos from flv to mpg using mencoder. Generate clever passwords (I have a command line script that does what this does). Automate an rsync backup. I guess I could try writing those in Haskell instead of shell or Ruby, which is what I usually use. Maybe eventually it will lead to something interesting.

We’ll see. Haskell isn’t the only language that fascinates me but it’s the one I’ve had a long fascination with and done very with, mostly because of the silly “oh no I can’t grok monads” hurdle. I was prompted to write this up because I just started following the fascinating notes on haskell blog, whose author, Adam Turoff (a pointy-headed comp sci sounding name if there ever was one), wrote up a spiffy three-part intro to Haskell for ONLamp.com, beginning here.

Dodd Begins To Rock Out In The Senate (UPDATED: And Is Rock-Blocked By His Fellow Democrats)

Thank you Chris Dodd!:
The first real Senate filibuster (as opposed to threatened filibuster) in 12 years starts today. It began because of an unprecedented decision by Harry Reid to ignore the hold placed on a bill by a member of his own party. It’s about granting huge corporations retroactive immunity for crimes committed against millions of American citizens.

Hear a peep about this on the news? No? Me neither.

UPDATE: (Thanks, ONT) — All but 10 Democratic Senators sided with President Bush on this one. I don’t know if my senators did but statistically they probably did.

People complain about having only a two-party system; I’d be happy if we actually had two full-fledged potent parties instead of one and a half, one and a pathetic shadow of a political party.

However, apparently the story’s not over yet — its future is just complicated and unclear. There is still some hope that we’ll find out exactly who was wiretapping whom and why, and that people in the telcos who knowingly committed crimes will be held accountable.

I’m grateful that Chris Dodd took a stand, and Reid, wherever he really stands, is being forced to talk about the issue and at least say that he realizes retroactive immunity is a bad thing.

Unexpected Burst Of Awesomeness From Pete Hoekstra

Hoekstra pledges probe of destroyed CIA tapes – Muskegon Chronicle – MLive.com:

The top Republican on the House Intelligence Committee is defying the Bush administration and promising to investigate the destruction of CIA interrogation tapes.

The Justice Department has urged Congress not to look into the matter and advised intelligence officials not to cooperate with a legislative inquiry.

Speaking on “Fox News Sunday,” U.S. Rep. Peter Hoekstra said he thinks Congress will issue subpoenas.

He lambasted the intelligence community as “incompetent,” “arrogant” and “political.”

This is the same Pete Hoekstra who teamed up with Rick Santorum to tell the world that they had discovered the WMDs in Iraq that nobody else had noticed.

I’m not used to hearing about him doing anything remotely admirable.

We can only assume he has been kidnapped by aliens and replaced by a crude and hastily-put-together clone.

UPDATE: It occurs to me that he may just be resentful of the CIA for putting the kibosh on his loopy WMD claims, and looking for revenge. Well, whatever it takes.