Long Live Kim Deal; Kim Deal is Dead.

03/13/2015 § Leave a comment

Long Live Kim Deal; Kim Deal is Dead..

Long Live Kim Deal; Kim Deal is Dead.

03/13/2015 § Leave a comment

Gods take all forms; but Rock Gods take only one.

Disciple disappointment in any form leads to chaos and abandonment. Just ask Kim Deal, pictured above.

While Charlie Thompson plays pedal organ in Reykjavík, Kim frets about how to keep vodka out of her dressing room during their tour stop in Los Angeles.

Modern rock’s most influential band; the Pixies, made a documentary released in 2006 called loudQUIETloud; and this documentary is one of the most revealing stories about one women’s descent into drug abuse in the rock world since Janis Joplin.

In general, during the entire film, Charlie, Joey Santiago, and David Lovering seem to be interested in to further success and dollars of the film. Even Lovering speaking about his misguided interest in his worthless magic career brings a bit of freshness to his eyes.

But interspersed throughout THAT interview we see blurry scenes of Deal in a hospital gown or some such. Throughout the film its clear that Deal has been ‘dealing’ with addiction problems of one kind or another, yet her colleagues appear to have been able to make lives that the rest of us strive to.

Toptal: Cannibals or Can-Do (but with cannibalistic tendancies?)

03/12/2015 § Leave a comment

Toptal: Cannibals or Can-Do (but with cannibalistic tendancies?).

Toptal: Cannibals or Can-Do (but with cannibalistic tendancies?)

03/12/2015 § Leave a comment

SFMR presskit 1-14-15New Guineans are dark skinned- who is this?

As I write this I happen to be watching a documentary about the search for Michael Rockefeller on Netflix. As we all know, he was lost after his New Guinea research group’s canoe capsized about 3 miles off the shore of that large island in 1961. New Guinea is to this day populated by cannibals. Linux developers remind me of cannibals in some ways; they devour the remains of the code of their predecessors hoping to gain the power of those of their ancestors great incantations and prayers.

I, on the other hand, often feel like Michael; wide-eyed and wondering at the activity of the natives, how they are able to accomplish their great feats of skill, and marvel at the works of their ancients. “How did they manage to do THAT?” I ask in boyish wonder. Great temples of automation and protocol translation, foundations of kernel monotheism under mighty shrines of coded cleverness that I feel like I could never create. Artful relics of logic such as web.py and the high priests who chanted them into existence such as Aaron Schwartz, devoured even to his marrow in the hope that his strength would power his tribe.

“Hwæt! a great warrior he.”

This is how I sometimes feel posting in a forum filled with so many great coders. For example, I once posted what I thought was a fairly innocuous technical reply to some rant on Slashdot, only to be devoured by the techno-elite about how wrong and stupid I was. Whoah was me.

I now find myself with more time on my hands, time I’d prefer to spend writing code for cash, so ‘Once more unto the breach, dear friends, once more;
Or close the wall up with our source code dead!’, sorry for the paraphrase. in an effort to reach out to more sources of income I have made a fervent appeal to the good folks at Toptal.

Indeed, Toptal are not the tribe I fear; in fact, I believe they will do their utmost to elivate and season my flesh to its most tasty; its the tribes of flesh-eating warriors I fear. Will they mock my weak spells and attempts at immortality, wasting my flesh as feed for boar and other farmed animals, or will I go native, and gain a sort of immortality, living on in the code of my forebears?

Toptal, in their wisdom, ask that supplicats write some sort of entry about Toptal in their blogs. Well, I have done so, and in so doing fear for my very flesh, but also hope that I have embarked on the greatest journey of my life. A Journey into Heart of Darkness, or High Brasil? I’ll let you know in my next post. Ciao!

A Simpler MRU for GTKMM C++

08/15/2014 § Leave a comment

A Simpler MRU for GTKMM C++.

A Simpler MRU for GTKMM C++

08/15/2014 § Leave a comment

I guess I’m a glutton for punishment, or like the little bird who flies against the wind; I really enjoy developing desktop applications. Becomming something of a lost art, now its all about apps for phones and web applications. But I still really enjoy using my desktop and writing applications for it.

The complaint I most often hear from people opposed to adopting Linux as their desktop os is the lack of applications for it. Well, that won’t change until people start writing those apps.

As far as desktop application design goes, everything should be as simple as possible, or so m philosophy goes. All components of application design should follow that simple rule where its makes sense, and I see no reason for that principal to not be included in the humble RUF, or Recently Used File list, also known as the MRU, or Most recent, so on…

The MRU (from now on) is a tradition, should be available on any mouse driven GUI, and should be easy to implement in any toolkit or framework. Imagine my surprise when I started doing the research on using the MRU object as implemented in GTKMM; its pretty much the most complicated collection of classes I’ve ever seen. And to display only the recent files relevant to your application you need to employ some sort of filter, and then there’s all the complaints I read about those objects on the web, and after that I stopped worrying about it and wrote my own class.

I have a lot of respect for Murry Cumming and the GTKMM team, and the whole GTK+ project, its a huge effort to maintain a unified set of APIs and keep them working for a moving platform like GNU/Linux/Gnome, I am surely aware. I’m also aware that there are usually a huge number of underlying reasons as to why a developer or organization implements a feature set the way they do. But sometimes you just want a thing to just work the way you want them to.

When I got a little deeper into how GTKMM’s RecentChooser classes (there’s the base class Widget, a dialog object, an action object, as well as a menu object, then the filter you need to employ, and on and on) I simply shrugged my shoulders and told myself “I’m not doing that”. I get all the variations, obviously the action object is so you can add a history option to an edit menu, whatever. I just wanted the user to click on a dynamic menu that contained an MRU.

So with the history out of the way I bring you a simpler method using the STL and GTKMM’s own menu api:

My current application for the gnome Desktop is a classic Model-View-Controller impl with a Menu Bar, and of course under the File item is my MRU.

An MRU at the simplest level is a FIFO, and std::deque is perfect for that job. In my application’s data class (a collections of structs, really) reference to a std::deque object.

I started by adding some file menu entries, file 1..4, and binding them to a dummy function. I knew I could change the menu label and bind them to an actual function later (from my application’s Glib::ustring ui_info);
(word press is having conniptions with the xml-heavy Gtk UI string, so look in the sample code for this)
(And from my app’s Gtk::ActionGroup object):
"file1", "Reopen this file"),
sigc::mem_fun(*this, &ExampleWindow::on_dummy));
"file1", "Reopen this file"),
sigc::mem_fun(*this, &ExampleWindow::on_dummy));
"file1", "Reopen this file"),
sigc::mem_fun(*this, &ExampleWindow::on_dummy));
"file1", "Reopen this file"),
sigc::mem_fun(*this, &ExampleWindow::on_dummy));

The “on_dummy” method is just an empty method, we need that because the ActionGroup template demands it be filled in, we’ll fill it in with the real method later.

My file open menu item, when activated, as well as opening a file, takes the path it got from a file picker and sends it to a method that inserts the file into the deque object, after checking the current size of the deque:

In a header file we have these declarations (more on the signal array later):
std::deque mru; // our deque object
sigc::connection mru_sig[4]; // dynamic menu signals

Then in the implementation file, in our “mru manager” method, app is just a pointer to an “application structure”, a struct with the deque object, among other things:

// If the deque is more than four, we need to pop one file off the que
if(app->mru.size() >= 4)
// then add the new file

Pretty simple stuff. Now, every time a file is opened it’ll be placed in our deque object, and round robin rotated to the bottom of the list ever time a new file is placed on it. In this case I’m keeping the number of recent files at 4, but it would be simple enough to adjust that number or make it user configurable if one wanted by adding an integer class member and using it instead of the “4” constant above.

Then comes the re-assignment of the menu signals, earlier in the method code I point to some empty Gtk::Widgets with a simple array of pointers:

Glib::RefPtr _refUIManager; // Typical GTKMM stuff
Gtk::Widget* file[4];

file[0] = _refUIManager->get_widget("/ui/MenuBar/FileMenu/file1");
file[1] = _refUIManager->get_widget("/ui/MenuBar/FileMenu/file2");
file[2] = _refUIManager->get_widget("/ui/MenuBar/FileMenu/file3");
file[3] = _refUIManager->get_widget("/ui/MenuBar/FileMenu/file4");

The paths refer to the ui file menus in the Gtk XML gui, if you’re familiar with Gtk desktop programming with GTKMM you should be aware of how that works. We’ll need these as references for the dynamic menus we’ll be connecting the activation signals to. Speaking of which, here’s how those signals are connected to our menu items;
int n = 0;
for(deque::iterator it =
app->mru.begin(); it mru.end(); ++it) {
const Glib::ustring& label =
(*it).substr((*it).find_last_of("//") + 1, (*it).length());
app->mru_sig[n] = dynamic_cast(file[n])->signal_activate().
connect(sigc::bind(sigc::mem_fun(*this, &ExampleWindow::on_mru), label));

if(dynamic_cast(file[n])->get_label().length() > 0)

We iterate through our list of 4 file paths, take out the last bit for the name we display in the menus, and then we do a generic signal disconnect on the item. If we don’t signals will stack up on the item and we’d have several file paths flying at our “open file” method.

We then connect a new signal bound with the path data we want the menu item to open.

The signal method is simplicity itself:

on_mru(Glib::ustring& label)
deque::iterator it = _app->mru.begin();
for(; it mru.end(); ++it) {
const Glib::ustring& text =
(*it).substr((*it).find_last_of("//") + 1, (*it).length());
if(text.find(label) != string::npos)
cout << (*it).c_str() << endl;

The bound text from the label is searched for in the deque object, if we have a match we have our full path to the recently processed file.

There, a functioning MRU for a Gnome Desktop Application without the hassle of Gtk:: RecentChooser. Couple that with a way of serializing the list* for between sessions and you have a full fledged MRU feature for your app.

There’s always room for improvement; traditionally MRU’s have key accelerators “1, 2, 3…” and that would be a nice touch, and simple to add. And ideally this should be a fully encapsulated object, a drop-in, rather than the collection of methods to a main class as presented here.

The sample code shows a simple implementation using GTKMM 2.4, but I don’t believe there’s anything in the code preventing it being converted to 3.0. I hope this will help developers create more applications for Linux, we need all we can get!

There’s a very simple sample you can grab here, build it with:

g++ -Wall -std=c++11 examplewindow.cc main.cc -o menu `pkg-config --cflags --libs gtkmm-2.4`

*Keep your fingers crossed, I may publish a much simpler alternative to Gconfmm.

The Truth

02/20/2014 § Leave a comment


Eight months after I was born John Fitzgerald Kennedy, the 35th President of the United States, was assassinated in Dallas, Texas. Any facts after this have been disputed, argued about, written about, filmed about, ad infinitum, for decades. I was a buff, an “enthusiast”, an assassination nerd, for a few years. Then I sat down with all the facts in front of me, put them together, and made sense out of them, while at the same time ignoring the hype and the nonsense.

Right about that time Oliver Stone made “JFK”, a film based in large part on the book by former New Orleans District Attorney Jim Garrison, A book I had read a few years before. I firmly place both book and film in the “nonsense” category and dismiss both. Dismiss also for a second the eyewitness accounts, the Warren Commission, all other 2nd hand accounts, witnessing, evidence. You should do the same as well- for the reasons I’ll detail shortly. I just want to be clear; any reasonable person who looks at the facts of the assassination would do well to do the same. There’s only one reasonable conclusion a reasonable person who examines those facts can come to.

Here are a list of to my mind the most important facts of the assassination that people tend to gloss over or dismiss in a myriad of ways, but are in fact the most damning for Oswald:

  • Marina Oswald confirmed taking the backyard photos of Oswald posing with the Carcano rifle used in the assassination
  • Marina also confirmed the same rifle was the one found in the Book Depository
  • Oswald’s prints were found on the rifle
  • Oswald tested positive for gunpowder residue with a simple paraffin (or “Dermal Nitrate”) test after being apprehended at the theater

Anything else just adds to the so-called mystery of the whole affair. Rather than being some dark conspiracy the incident is really just exactly as it appears; a horrible circus of incredible incidents that came together to form a perfect storm.

Oswald was a product of a broken home, and had a huge narcissistic monkey on his back. All his life he was driven to be more than he was, but he just wanted to will this fantasy into existence. He wasn’t willing to work for greatness. Over and over again with the tools to greatness well out of his reach he does things that are within his power to make that greatness happen. After defecting to the Soviet Union he is a celebrity, for a while. When that wears off he come back to the US. Then he thinks Cuba is his path to revival, and so on. He’s a sad sack until he sees his path to infamy. There is no way in any real world that any spooks or black hats would invest time, energy, or money using Oswald as any kind of Agent of Change. Oswald sensed that in himself, and so became an Agent of Change all by himself, with his own agenda.

Stone’s JFK is another piece of work. Its based on Garrison’s “On the Trail of the Assassins” which in itself is a big fantasy. The book is based on Garrison’s step-by-step destruction of a respected New Orleans business man Clay Shaw because Garrison saw a news paper article that mentioned Shaw attending a party that may have catered to homosexual tastes. He later finds drug addict Perry Russo who spins a tall tale about Shaw and David Ferrie, another New Orleans personality at a party where they apparently make plans to assassinate Kennedy.

Garrison is a strange character in his own right. He’s been involved in the darker corners of New Orleans politics himself having been indicted in an odd little pinball scheme, and over and over again bringing up charges on people in and around New Orleans who angered him in one way or another, only to get the charges dropped when outside light was shown on his accusations.

Perry Russo himself wasn’t able to corroborate his own stories about Shaw, Ferrie, and Oswald that became the basis of Garrison’s book.

So put Garrison and Stone’s flaming bag of poop aside for good. Here’s another factoid about the whole affair that never sat right with me: if it was a conspiracy, the very scope of it and the length of it would make it the most successful conspiracy ever. Think about the number of people who would need to be involved; from Lyndon Johnson, the Vice President, to the ambulance drivers in Dallas, the secret service, the Warren Commissioners. Earl Warren was involved in a cover-up of the assassination of President Kennedy?

Earl Warren was born in Los Angeles, CA in 1891, and grew up in Bakersfield, CA, where his father worked for the Southern Pacific Rail Road. He then attended UC Berkeley, then became a lawyer and joined the army in 1917. After coming home to California he developed a reputation as a corruption-fighting DA. As he rose higher in the state legislature he continued to hone this reputation, being known to be honest to a fault, and a liberal crusader, as shown by his leadership in Brown v. Board of Education, a landmark decision. He also worked hard to nationalize the Bill Of Rights, and with Griswold v. Connecticut he showed that US Citizens have a constitutional right to privacy. Legal and legislative accomplishments aside, Warren had a reputation for being a frankly honest man, period.

Point of all this is; do you really expect me to swallow that Warren was part of a conspiracy to assassinate Kennedy, something he most certainly would have had to been a part of? I don’t think so.


Get every new post delivered to your Inbox.