Monthly Archives: September 2008

New version of datapacker

I wrote before about datapacker, but I didn’t really describe what it is or how it’s different from other similar programs.

So, here’s the basic problem the other day. I have a bunch of photos spanning nearly 20 years stored on my disk. I wanted to burn almost all of them to DVDs. I can craft rules with find(1) to select the photos I want, and then I need to split them up into individual DVDs. There are a number of tools that did that, but not quite powerful enough for what I want.

When you think about splitting things up like this, there are a lot of ways you can split things. Do you want to absolutely minimize the number of DVDs? Or do you keep things in a sorted order, and just start a new DVD when the first one fills up? Maybe you are adding an index to the first DVD, and need a different size for it.

Well, datapacker 1.0.1 can solve all of these problems. As its manpage states, “datapacker is a tool in the traditional Unix style; it can be used in pipes and call other tools.” datapacker accepts lists of files to work on as command-line parameters, piped in from find, piped in from find -print0. It can also output its results in various parser-friendly formats, call other programs directly in a manner similar to find -exec, or create hardlink or symlink forests for ease of burning to DVD (or whatever you’ll be doing with it).

So, what I did was this:


find Pictures -type f -and -not -iwholename "Pictures/2001/*.tif" -and \
-not -wholename "Pictures/Tabor/*" -print0 | \
datapacker -0Dp -s 4g --sort -a hardlink -b ~/bins/%03d -

So I generate a list of photos to process with find. Then datapacker is told to read the list of files to process in a null-separated way (-0), generate bins that mimic the source directory structure (-D), organize into bins preserving order (-p), use a 4GB size per bin (-s 4g), sort the input prior to processing (–sort), create hardlinks for the files (-a hardlink), and then name the bins with a 3-digit number under ~/bins, and finally, read the list of files from stdin (-). By using –sort and -p, the output will be sorted by year (Pictures/2000, Pictures/2001, etc), so that photos from all years aren’t all mixed in on the discs.

This generates 13 DVD-sized bins in a couple of seconds. A simple for loop then can use mkisofs or growisofs to burn them.

The datapacker manpage also contains an example for calling mkisofs directly for each bin, generating ISOs without even an intermediate hardlink forest.

So, when I wrote about datapacker last time, people asked how it differed from other tools. Many of them had different purposes in mind. So I’m not trying to say one tool or the other is better, just highlighting differences. Most of these appear to not have anything like datapacker –deep-links.

gaffiter: No xargs-convenient output, no option to pass results directly to shell commands. Far more complex source (1671 lines vs. 228 lines)

dirsplit: Park of mkisofs package. Uses a random iterative approach, few options.

packcd: Similar packing algorithm options, but few input/input options. No ability to read a large file list from stdin. Could have issues with command line length.

Jacob’s Words

Here are some words and phrases we’re hearing a lot lately. Along with a helpful translation guide.

shop baa: Shop Vac
shop baa hoesh: Shop Vac hose. We also get “see shop baa”, “shop baa on”, etc.
chain: train
chain veeoh: train video
tune vewwow: turn yellow (referring to a traffic light)
Hi Daddy!
Hi Mommy!
uhoh [item]: something bad happened to the item
wahdoh: water
spidoh: spider
spidoh buh: spider bug
cat Nash: the cat named Nash
teesh: taste (when he wants a bite of cake or something)
BIH teesh: BIG taste
tah corn: tall corn
baby
puppy
pa: grandpa
mama: grandma
mamapa: grandma and grandpa
ah housh: our house
fop: flop (onto a pillow)
ahh done: all done
fan
bubba: butterfly (he has a soft one he sleeps with). Or strawberry.
hoe: hold

Interesting take on the markets

Yesterday on NPR’s Diane Rehm show, one of the commentators made this point: (paraphrased)

The “bad debt” that all the banks are carrying, and that everyone talks about as the cause for this problem, is mortgage-backed securities. It’s bad because there are so many foreclosures, meaning that people aren’t paying back their loans. And that’s a problem because the banks turn out to have a much less solid investment than they thought.

Instead of spending $100 billion or more bailing out bank after bank, the government ought to spend that money to stabilize the real estate sector. Invest it in programs to help people stay in their homes and avoid foreclosure. This will help both the individuals, and simultaneously fix the problems with the banks, because the mortgage-backed securities will regain their value.

Sounds way too sensible to do, doesn’t it?

After all, we wouldn’t want to encourage risky behavior on the part of the common folk that don’t know better. No, we only want to encourage that with our large multi-national financial institutions that can wreck the entire economy.

Switched from KDE to xmonad

Within the last couple of days, I’ve started using xmonad, a tiling window manager, instead of KDE. Tiling window managers automatically position most windows on your screen, freeing you from having to move, rearrange, and resize them all the time. It sounds scary at first, but it turns out to be incredibly nice and efficient. There are some nice videos and testimonials at the xmonad homepage.

I’ve switched all the devices I use frequently to xmonad. That includes everything from my 9.1″ Eee (1024×600) to my 24″ workstation at work (1920×1200). I’ve only been using it for 2 days, but already I feel more productive. Also my wrist feels happier because I have almost completely eliminated the need to use a mouse.

xmonad simultaneously feels shiny and modern, and old school. It is perfectly usable as your main interface. Mod-p brings up a dmenu-based quick program launcher, keyboard-oriented of course. No more opening up terminals to launch programs, or worse, having to use the mouse to navigate a menu for them.

There’s a lot of documentation available for xmonad, including an “about xmonad” document, a guided tour, and a step-by-step guide to configuring xmonad that I wrote up.

I’ve been using KDE for at least 8 years now, if not more. WindowMaker, fvwm2, fvwm, etc. before that. This is my first step with tiling window managers, and I like it. You can, of course, use xmonad with KDE. Or you can go “old school” and set up a status bar and tray yourself, as I’ve done. KDE seems quite superfluous when xmonad is in use. I think I’ve replaced a gig of KDE software with a 2MB window manager. Whee!

Take a look at xmonad. If you like the keyboard or the shell, you’ll be hooked.

Command-Line RSS Reader

So, does anybody know of a command-line RSS reader? I want something that will save state and output recent entries in a nicely parsable manner. Maybe URL\tTitle\tDecscription\n or somesuch.

So here’s why I’m asking.

I got to thinking that it might be nice to automatically post to Twitter when I’ve got a new blog post up, rather than manually have to say “just wrote a blog post.”

Then I also got to thinking that when I see an interesting URL that I’m going to Twitter about, I’m also almost always adding it as a bookmark to Delicious. Why not make a fortwitter tag on Delicious, and automatically post my comments about them to Twitter, saving me having to do it twice?

So I’ve got Twidge that can be nicely used in a shell script to do this stuff. I’m hoping to avoid having to write a shell script-friendly RSS aggregator. But I’m just prone to do it if nobody else has already, though I’d really like to avoid reinventing the wheel.

New Twitter Client: Twidge

I’ve lately been thinking about Twitter. I wanted some way to quickly post tweets from the command line. But I also wanted to be able to receive them in a non-intrusive way on all my machines. And I wanted to work with Twitter and Identi.ca both.

Nothing quite existed to do that, so I wrote Twidge.

Twidge is a command-line Twitter client. It can be run quite nicely interactively, with output piped through less. Or you can run it as a unidirectional or bidirectional mail gateway. Or you can use its parser-friendly output options to integrate it with shell scripts or other programs.

It’s got an 11-page manual (which is also its manpage). User-friendly in the best tradition of command line programs.

And it’s released today. The source packages include the debian/ directory for you to use for building them, but I’ve also posted an i386 binary that runs on etch and sid on my webpage, until it gets out of NEW.

See the homepage for more info.

Oh, it’s written in Haskell, by the way.

I should stop watching Sarah Palin interviews.

I saw the interview on ABC last night and tonight. It surprised me that she quite clearly didn’t understand what the Bush Doctrine is (Charlie Gibson had to explain it to her). She dodged and evaded too many questions to count. Every foreign policy question she turned into an oil question, citing Alaska, as if somehow Alaska has played a key part in international conflict in the last decade.

Charlie asked her about the budget deficit, the economy. He got her implied assent that Bush hadn’t done well, and asked her to name three concrete ways she’d change. She dodged for a minute. He tried again. She cited lower taxes, better oversight, and I forget the third. Anyhow, it didn’t sound very different to me — and not very specific either. It’s so general that everybody from Ron Paul to the green party can agree to it.

He asked her about the deficit, and what she and McCain would do to fix it. She stumbled for a minute, then said “I certainly wouldn’t cut veterans benefits” and spent the next minute talking about how important veterans are. Which is a whole other topic. She never did say how they’d cut the deficit, just that in some magical way, they’d find inefficiencies. McCain’s had over a year to name them, and I haven’t seen the specifics yet.

I came away feeling more concerned about her than I expected. She reminds me of Bush in 2000. Cocky, self-confident, a shallow thinker on every topic, and utterly unprepared.

This process of getting to know McCain’s unknown pick is not going so well, I think.

Twitter and Identica Dilemma

Since July, I’ve been trying out Twitter and its open-source competitor identi.ca. Both are microblogging sites, with Twitter being the largest and most well-established of them.

Both let you follow people with their 140-character updates via the web, or with alerts on your phone.

My dilemma involves how to make this work for me.

For some people, I’d like to get an alert as soon as they post an update. For others, maybe get a non-intrusive alert a couple of times a day. I want to get these notices on my computers, whichever one I’m using.

In theory, Twitter lets you follow updates on IM with Jabber. But their Jabber gateway has been down for literally a month now, and though they still have a note saying it will be back RSN, there’s little hope.

Identi.ca has a working Jabber gateway. But unlike Twitter, you can only specify if you want notices from everyone, or nobody; with Twitter, you can sign up for IM notices from just a few people. I already have a Jabber client on all my machines.

So here are my options:

First, I could just use the Twitter and Identica web interfaces only. Not really all that appealing; I don’t want to have to go load up a webpage a few times a day. Also it is annoying to have to open a web browser, pull up a web page, just to enter 60 characters of status.

Second, I could use Twitterfox and Identifox firefox plugins. They look nice, but add yet more bloat to Firefox — and that’s two more plugins per machine to set up and maintain, not to mention that one machine is not aware of what I’ve already seen elsewhere. They do make it easier to post updates.

Third, I could use RSS feeds for reading in bloglines. Not all that realtime though.

Fourth, I could set up two Identica accounts, one which sends all notices to my IM and one which doesn’t. It’d be annoying, and still doesn’t solve my problem with Twitter at all.

Fifth, I could install some Twitter-watching app on all my machines. That’s annoying as it’s yet another piece of software to maintain everywhere, and yet another one to keep updated, AND if that wasn’t annoying enough, they still don’t know what I’ve seen everywhere.

How are all of you using Twitter or Identica?

Also, I’m curious how all these companies that use Twitter and instantly find out when anyone mentions Dell or JetBlue are able to do that. I don’t see a “search everyone’s tweets” feature anywhere.

A Wasilla Resident Writes about Sarah Palin

There is a very interesting email that’s been getting attention, written by a resident of Wasilla, AK, Sarah Palin’s hometown. It covers the good and the bad about her, and is the first thing I’ve seen that gives real insight into her governing style. Among other things, it mentioned that she inherited a city with no debt and left it with over $22 million of debt. The Alaska budget has been growing at 10% a year since she took over, not shrinking. Palin also fired a lot of experienced city staff when she took over, and brought in her inexperienced cronies. And she fired the librarian after the librarian refused to ban books that Palin didn’t like.

And she has a real chance of becoming president.

Scary stuff.

Oh, and Snopes verified the email as authentic.