Sunday, February 22, 2009

Sometimes a Chimp is Just a Chimp

Has anyone, besides the pundits, been following the tempest in the tea pot that is the "dead chimp" cartoon?

What happened is, a cartoonist named Sean Delonas drew a cartoon for the New York Post.

The cartoon is clearly a reference to this event.

I don't really have a big opinion on the actual cartoon. It's the kind of "meh" humor that make up most political cartoons.

The tempest is coming from elements of the "official" left who do the following: Cartoonist says Stimulus bill is written by a crazed chimp. Barack Obama is the author of Stimulus bill. Therefore Cartoonist says Barack Obama is a crazed chimp. Racism. See?

Um, no. No I don't.

When I see the cartoon, all I see is what I think is the cartoonist is saying. "The nasty liberal Stimulus bill is so icky poo that it must be written by a crazed chimp." I don't see the "obvious" connection to racism. Don't get me wrong, I get the argument. I've listed it above. I just don't buy into it.

I don't profess that no one's ever portrayed Obama as a monkey. There is the stupid "curious george obama tshirt" (google it), but I just don't think the Post cartoon is an example of it.

What annoys me the most is how rabid the "official" left is on this.

First of all, many of the blog posts that I've seen don't reference the original monkey incident. That's dishonesty. It's a single link and any blog that doesn't at least reference it is trying to with their point by deception.

I also don't like the "agree with me or your a racist" attitude. You can disagree with an opinion and not burn a cross. I don't think that anyone that sees the cartoon as racist is a fool. I just think that they're reading in something that isn't there.

Before the tiring name calling starts, I'm a pretty hard core liberal. I loath Rush, despised Bush and think that listening to Ann Coulter is like watching a post syphilitic Al Capone talk about Chicago in the "good old days".

I've also seen these talking heads consume some of my best friends. Friends who've I've respected all my life have become talking head wanna-bes. They parrot the ideas ejaculated by media liars just to feel like they're in the know. They know it's crap but it's easier than thinking. I don't want to become one of those.

My biggest fear is that the mainstream Democratic party is going to be taken over by the left wing equivalent of Rush and the party is going to be as far left as the Republicans are to the right. If we walk off that cliff then we're not only going to be as big a pack of self righteous fools as the right, but we're also going to loose the support of the middle and get Daemon Reagan elected in 2012.

I'm not a liberal because I can play games and shout down my opponents, I'm a liberal because I like being right. If someone can show me where I'm wrong I'll change my opinion. Until then, "Bad monkey, no banana!"

Sunday, February 15, 2009

Getting real with "The Joker".

It may come as a shock to you all, but I'm kind of into comics. A computer nerd AND a comic nerd? What are the odds!

For those who don't follow comics, about 20 years ago a 12 issue miniseries called "The Watchmen" came out. It was gritty, it was profitable, it was copied. Whoo boy was it copied!

Unfortunately it was copied badly. In the Watchmen reality the heroes get shot and villains get sent to jail. The heroes stayed dead and the villains wait for parole. Close enough for Jazz.

In Watchmen copy world, heroes get shot, kicked, spit on and get their cars stolen. Villains get laid.

Not quite the same thing is it?

Let me give you an example: Reality Batman Vs Reality Joker.

In the DC world, Batman was recently killed. Bruce Wayne ate some raw oysters in a month with an "r" in it or some such nonsense and now he's tits up in the morgue.

This is the highlight of his life as of late.

He's also been accused of being a child molester, had a pile of Robins killed, got his spine snapped, his stately manor burned to the ground and ended up playing second fiddle to the villain in all of his movies. No wonder he's such a grouch!

We all know that he's going to come back in a year or so. It always follows the same script.
  • First all the heroes will get to emo. All villains will have a drunken orgy.
  • Then the heroes call each other names and fight over who gets to be the new Batman. The villains will make a YouTube video of zombie Batman having sex with zombie Robin.
  • A few heroes will run around in a Bat suit and fight crime. A few of the villains will hire strippers to dress like Batman and slide up and down their Batpoles.
  • None of the heroes will hit on Catwoman. All of the villains have already hit on Catwoman.

Once the novelty wears off things will get back to normal. We know it. We wait for it. We expect it.

But this dog pile of sadness only happens to the heroes. They never take a major dump on an A-list villain. I'm not talking dropping some unremembered fad based villain like "The Rubic's Cuban" (the commie puzzler!) I'm talking about a five star Alpha-Male villain.

I elect "The Joker!"

For the last few decades Batman has been little more that the Jokers butt monkey. All the biggest Batman movies have really been Joker movies. The best Batman graphic novels have be Joker based. Best Batman cartoon voice? Mark Hamill's Joker from "Batman: The Animated Series".

The writers wizz on Batman constantly. Batman has Robin. The Joker gets Harley. Robin is cute, but Harley puts out! No wonder the Joker is always smiling.

Batman spent his entire life studying to be Batman. He know Bat-fu and is rich and has tons of cool Bat crap. I get that.

Superman is strange visitor from another planet who came to Earth with powers and abilities far beyond those of mortal men. Ok.

The Joker... is a dick. That's it. He's a dick. He shows up one day, stops at the Good Will for a lavender jacket, acts like a dick and he's running with the big boys.

Let's get real on his ass.

Before we can smack down the Joker, we need a hero in his league.

Joke vs Superman? It would be one punch and then a large stain. Joker can't hang with the S-man.

Joker vs Batman? Who's going to give Batman a banana when he's a good butt monkey? Nah. Batman has "issues" with Joker. And by "issues" I mean he's a butt monkey.

Wendy and Marvin from the Super Friends? Maybe. They all have the same fashion sense. Up no. They had Wonderdog. Wonderdog was retarded, but he was a big dog and a big dog is more than a match for the Joker's bad fashion sense. Hell, Gleek could probably kick the Joker's ass.

Hmmm.

I make up, and nominate "Melvin Palmowitz", better known as "The Completely Normal Guy."

Here's the origin: Melvin works at a toll booth up on the Gotham interstate. One day someone gives him a quarter with a Joker face on it. Melvin says "Hey, this isn't president Obama, what's the deal?"

It turns out to be a "Joker Quarter". (You know you have a good police force when escaped criminals have time to mint coins.) The Joker says that he sells them on late night infomercials and now Melvin has to be his new butt monkey because Batman keeps dieing and getting crippled.

Everywhere Melvin goes, he sees the Joker grinning and looking threateningly at his children and making sawing signs on his throat when ever Melvin goes to stroke his pet alpaca (The Lockport Alpaca, come for the wool, stay for the mullet!)

The police are, of course, oblivious to all this. It's not like it's the 800th time the Jokers escaped. It's not like he's wearing a lavender jacket. It nothing like he's got a pancake white face and is the most recognizable villain in the entire world. Nope. No Jokers here. Carry on!

So Melvin is forced to go along with the Joker's next zany plot to kill millions of Americans, most of which have guns and would shoot the Joker the first time they saw him, yet oddly, they don't.

Melvin is called to the warehouse where the Joker gets his evil shipments. FedEx can find the Joker, the cops can't.

The Joker is explaining his plans and dancing around and calling Melvin a butt monkey. Melvin is wishing that the Gotham police had higher entrance requirements.

Melvin sees a big pair of scissors sitting by the shipping receivable receipts. He picks up the scissors, sneaks up behind the Joker and stabs him in the neck. No big speeches. No fancy Vulcan neck stab. Just a plain old American puncture, the way god wants a neck stabbed!

The Joker, being a dick in a lavender jacket, is not known for his stab proof neck. He gets a "Did you? Are those scissors in my neck?" look on his face, and falls over dead.

Melvin, realizing he is no longer a butt monkey, wipes off his finger prints from the scissors, drives home and pets his wife and alpaca. We never hear from Melvin again! The Joker says dead!

There's no way Melvin would get caught. The cops show up and see Joker dead. They're happy! They're hanging around the crime scene singing and dancing and putting funny hats on the Joker's corpse. The Joker has killed something like 1000 cops at one time or the other. They're not going to lift a finger to find his killer.

What would Batman do? Cry? Would he swoop in and threaten stoolies until he was too pooped to swoop? That wouldn't get him anywhere. What do stoolies know about toll takers?

He could use his alleged amazing deductive powers. Deduct a way! Warehouses have millions of people tracking through them, and the cops won't stop doing a conga line around the stiff, so Batman's screwed.

Besides, doesn't Batman have other, bigger criminals to fail to catch. Maybe the Joker was killed by that probabilistic villain "The Rock/Paper and/or Scissor" (He'll kick your ass 1 out of 3 times.) Nope, it's just Melvin and a found pair of scissors.

Like it? I think if they're trying to make comics more "realistic" then this story works. The Joker is just a dick. Sometimes dicks get stabbed.

Really.

Sunday, January 25, 2009

The Semi-Cult of "Super Jail"

"Super Jail" is a cartoon on Cartoon Network's "Adult Swim".

The premise is that Super Jail itself is a Super Max prison. It's physically isolated so prisoners actually have a lot of freedom to run around and have fun and on occasion start a riot and slaughter each other. That's pretty much the plot of every episode.

The art is virtuously ugly. They try to make the ugly art part of the ugly feel of the cartoon. The sort of succeed, but it's still ugly.

The mindset is above "Assy McGee" (as is everything) but below "Metalocalypse". They all pale compared to "Secret Squirrel".

All in all it's just another show on "Adult Swim". Watch it if you want, but don't kill yourself getting to the TV.

However...

There is more to Super Jail than meets the eye. Something culty.

At the end of each episode a character name "Jacknife" escapes. Who cares, right? It turns out that, indirectly, a lot of people do.

The next Super Jail begins with Jacknife being recaptured. Each episode the capture is elaborate and different. This isn't Bart Simpson writing something new on a blackboard, it's a whole new intro. It's these intros have developed their own cult following.

For example, the episode called "Mr. Grumpy-Pants" has the following intro:

Open on a children's hospital in winter. Shot of a ward full of dying children. Hey look, it's Santy Claus! Nope, it's Santy Jacknife. Santy Jacknife steals all the kids meds. A medical monitor turns into Jailbot, the ruthless, unstoppable prisoner retrieval robot. Jailbot chases Jacknife. Jacknife uses sick children as obstacles. Sick children are run over by Jailbot. Jacknife is cornered. All the remaining children are crying. Jailbot is touched. Jailbot turns into a sleigh, strangles Jacknife into submission and flys off while projecting a hologram of reindeer in front of the sleigh. It really was Santa Claus! We love you, Jailbot!

But wait! There's more!

Que the rocking theme music. It's 30 seconds of pure garage rock. Pretty munch anyone with a Stratocaster, a Fender "Champ" and a history of fuzz petal abuse could do the same. You gotta crank up the fuzz. I think fuzzy rock could save both music and the Internet.

During the theme, our antihero Jacknife is dangling by his wrist from Jailbot, who is now a helicopter. As Jailbot flies back to Super Jail, scenery flies by, all of which is new and warrants notice.

After that, I've got a 50/50 chance of changing the channel. I'm not alone. I've run into a few people who hate the show, but always watch the intro. The show isn't developing a cult following, the show's intro is.

There are people who are waiting for the theme to be turned into a full song so they can buy it off the net. They have no intention of buying the Super Jail DVD, they just want the theme.

If the theme doesn't suck when they fill it out, and it isn't strangled by Digital Rights Management (DRM), I may even buy it.

You can watch the intros to Super Jail at www.adultswim.com. I think entire episodes are there, but I've never watched one all the way through.

It's a cult thing.

Friday, December 12, 2008

How to Capture Sound From an Analog Microphone in ALSA Using Linux.

Intro

This is, in the compute biz, what we call a "wid". Wid is short for "What I Did". Not a lot of theory, I just show you what I did to record sound from my crappy on board VIA 8237 sound chip using Linux and a $10 microphone.

The sound isn't professional by any stretch of the imagination, but it's great for voice notes and sending messages.

The Prep.

This assumes that you already have ALSA hooked up and sound is working.

Start your output volume at mid-range. The level coming in from microphones varies wildly. You don't want it too low or you'll miss it if you get it working and you don't want it too high and have it blow a speaker.

Find a test .wav file and play it with the "aplay" command. This is just to make sure everything is working. You can search for wave files on your Linux box with the command

locate wav | egrep 'wav$'

If you can't find one, pull something down from the Net.

Hook Up the Microphone.

Plug in your microphone to the proper port on your sound card. It's usually red or pink and often has a little, hard to read, glyph of a microphone beside it.

Set Up the Mixer.


Start alsamixer.

I use the command line alsamixer to activate the microphone. A graphic mixer might get the job done, but I don't feel like fiddling around them.

I put alsamixer in it's own window so I can tweak things while testing.

Use the TAB key to set the "View" Mode to "All".

Some of the capture options show up in the playback screen. To minimize looking for the right setting, view all of them at once.

Turn on the Required Options.

This is the list of options that I believe need to be set. Because different sound chips boot up in different modes this list may not be complete. Also, the values I list are just values that work for me. There's nothing magic about the them.

Use the arrow keys to move from option to option.

Move to the "Mic" option. Hit the space bar. The work "CAPTUR" should show up in red. I set the level to 71.

Select "Mic Boost". If it's listed as off (under "Item"), then press the "M" key to turn it on.

If you've plugged your microphone into a jack in the front panel of your computer, (make *SURE* the panel is wired up), then use the "M" key to turn on "Mic Front Input".

If you have more than one microphone port, make sure "Mic Select" is set to the proper microphone. I use Mic1.

Select "Capture". Hit the space bar. The work "CAPTUR" should show up in red. I set the level to 67.

Try a Capture.

Now to try a capture. I use the following, which captures sound from the microphone and plays it out the speakers (with a slight delay). It keeps running until you exit with Control-C, so you can keep it running while you tweak things.

arecord -f dat -t wav -D hw:0,0 - | aplay -

The hw:0,0 comes from Card 0, Device 0, which I got from

arecord --list-devices

Don't worry if the sound is too soft. You can fix that with sound processing software. Make sure you have "Mic Boost" on if your chip supports it.

To save your sound to a .wav file, use:

arecord -f dat -t wav -D hw:0,0 foo.wav

From there you convert it as you see fit.

What I Really Use.

At this point almost any sound program should work for you. I'm pretty hardcore command line, so I use "sox" to tweak the sound.

To turn up the sound on a .wav file under Sox use something like

sox foo.wav -v 7 bar.wav

Because sox can also do audio capture while tweaking the volume I do both in one command.

sox -t alsa default -v 7 foo.wav ; aplay foo.wav

Outro.


This is as far as I've gotten and all seems well. I'm sure I'll use this technology to change the world, but for now I'm having too much fun singing bad Sinatra.

Friday, October 10, 2008

Gnome Needs a Scripting Language.

Gnome needs a scripting language that fills the same scripting role in Gnome that Bourne shell fills for the command line.

A few days back I wrote a little script that pops up a window, gets some input from the keyboard, runs a program and then exits. I banged it out in about 2 hours in Perl using the Gtk2 library. Piece o' cake.

The problem is that I really can't distribute the program. Even if I assume that all Gnome systems have Perl, it's not safe to assume that they all have the Gtk2 libraries installed.

If I want to make my little script available I'm going to have to rewrite it in C? That can't be right! Linux always has scripts. It's one of the things that separates Linux from the lower beasts!

I decided to check out the current state of Gnome scripting on Google. Um, we're exactly where we were a decade ago. 10 years ago people were bitching about the lack of an official scripting language for Gnome and we're still bitching today.

Let's stop bitching and fix this insult to Gnomehood. For now we'll call the language "gscript" to save typing. If there is already a "gscript", then accept my apologies and lets get on with life.

What Gscript Needs to Be.

Here is a list of what I think gscript needs, in approximate order of importance.

  • It has to exist. This first entry isn't as stupid as it sounds. Good Gnome interfaces have existed for many of the existing scripting languages for years, but none of these scripts/interfaces are *guaranteed* to be there. Seriously, in the past decade, how many GTK/script have you used? For it to be useful, gscript has to come with Gnome. If you're using Gnome, then gnome-terminal may be optional, gscript is required!
  • It needs to be a Gnome scripting language, not just another scripting language that comes with Gnome. This is *important*! There has to has interfaces to all major parts of Gnome, not just GTK. Things like GConf and EggTrayIcon and user menus have to be accessible to gscript. When a new version of Gnome comes out, it comes with a synced version of gscript. It's not optional.
  • It should have useful defaults. Banging out a simple script should be, well simple. About as simple as this:
#!/usr/bin/gscript

init;
guts = gtkbutton(label => "Hello World", callback => exit);
; Note: A default also menu gets created here.
start_app(body => guts);
  • It should work with both GTK and Gnome. I'm not really sure what separates GTK from Gnome, but if the script doesn't need the Gnome stuff, then it should be able to use just GTK.
  • It should do things the Gnome way. One of the big bitches about Gnome is there's always a new way to do something. No one ever explains, in simple terms, why the new way is better and how to use it properly. If the right way to read a keypress from an international keyboard is to use the foobar interface, then gscript uses the foobar interface.
  • Gscript should be simple. We're not trying to replace C or Python or COBOL. The day will never come when 90% of Gnome is written in gscript. It should exist to fill the niche that shell scripts do on the command line. Anything else is gravy.
  • Gscript shouldn't be too simple. We've all worked with languages that are so simple that they're useless. It should have all the control structures of a real language with scoped variables and real data types. At a minimum it should have native lists, hashes, numbers and strings (anything else?). It should also have modules and classes to handle medium size programming. GTK-Bash would be a lousy choice.
  • It should be embeddable. Gnome is moving to things like cellphones. Why not kill two birds with one stone? Embeddable languages are useful and this will help keep the language small and simple.
  • Screw the ASCII code. Enough already! International support should be the default, not an add on. Those strange voices across the big salty pond are other programmers. If they speak Chinese then they should be able to script in Chinese.
  • Screw C! Most scripters don't come from a C background anymore because they don't need to. Computers are a zillion times faster than they were when I was a whelp, and no one is going to put gscript code in the kernel. Gscript should be fast enough to be useful. After that ease of use and flexibility are paramount.
  • Lets not create a new language unless we have to. I believe we can leverage an existing language.
  • If we have to create a new language, lets go for it! A lot of current languages are anachronistic retreads of boring old languages. Why strive to suck?
My Opinion on Existing Options.

Let's run through some of the existing options. Despite my list above, most of what's needed already exists. It's just not included with Gnome by default.

  • Perl or Python : Both of these play very nice with Gnome/GTK. The problem I see with these two languages are that they're both serious overkill for this problem. Also choosing one over the other would come with a pre-built pissing contest. I don't want to see their GTK libraries curtailed. I personally use Perl::Gtk2 and love it. I just don't think they would be the best fit for gscript.
  • Tcl/GTk : Tcl tries too hard to be simple, which makes it painful for all but the smallest of programs. If it scaled better it would have taken over the world by now. Gscript should strive to be what Tcl/Tk failed to be.
  • Zenity : Its great for popping up windows in shell scripts, but it doesn't really let you run actual scripts. A new gscript programmer would be able to implement zenity in about a day.
  • lua-gtk, guile-gnome and ruby-Gnome2 : Of all the languages I talk about, these 3 strike me as the most plausible. They fit most, if not all of the requirements, they have and existing community and, according to http://www.gtk.org/language-bindings.html, they already have viable bindings. Anyone with experience care to chime in?
  • Squeek : Aw c'mon. The official Gnome scripting language being Smalltalk would rock! We could write Gnome scripts that expand programmer's minds and then go give the KDE folks noogies. Pull this off and we P0WN by existing. It may not be the most practical of the choices, but I'll bet it would be the most fun.
  • SomeOther : I'm open to suggestions. Give me your opinions. Any other projects already started? Just remember Gscript is not trying to replace all the other scripting languages. We just need a good choice that we can get officially distributed with Gnome.
In Summary.

Gnome not having an window aware scripting language is a decade old embarrassment. It goes against all that is Linux. The embarrassment is compounded by the fact that we have a lot of options that are ready to go, or could be ready to go in, literally, a matter of days. We just need to choose one.

Once a language is chosen, then the only big step is getting it included with the Gnome base packages. Anyone have an in with the Gnome "powers that be"? If not, then wanna write a script to storm a castle?