Daniel Moch's Weblog

Announcing Xhotplug

I'm pleased to announce the initial, beta release of xhotplug, a small utility for automatically responding to X11 montor attach/detach events.

Read more…

Using QEMU Without Pulling Your Hair Out

I make it a rule to choose my tools carefully and to invest the time to learn them deeply. QEMU has been one of those tools that I've wanted to learn how to use for a long time, but was always a bit intimidated. I actually had been able to use it indirectly via libvirt, but it felt like I was cheating my rule by using one tool to manage another. Despite my vague sense of guilt, things continued this way until I read a recent(ish) introductory post on QEMU by Drew DeVault. The article is well written (as per usual for DeVault), and you'd do well to read it before continuing here. The point is that it was the kick in the pants I needed to finally roll up my sleeves and learn some QEMU.

Read more…

You Should Be Using Tags In Vim

Note: This is a crosspost of an entry I wrote in this year's vimways.org advent calendar. If you're interested in Vim, I recommend you pop on over there and read the other articles too.

I love you; you complete me.

  • Dr. Evil

I first came to Vim by recommendation. I was looking for a good Python IDE (at the time I was new to the language) and one recommendation was to use Vim with a variety of plugins added on top. That Vim could do a lot of the things I thought only an IDE could do came as a bit of a shock. I spent a summer as an intern using Emacs at a Unix terminal, but didn't have enough curiosity at the time to use it any differently from notepad.exe. I spent that summer wishing I had automatic features for completion, indentation, and all the things that made me appreciate the IDE's I used in college. How naive I was!

Read more…

Zsh Compinit ... RTFM

This week I dealt with a problem that had been bugging me. I noticed that the time a took to start a new Zsh terminal session went from essentially instant to around 4 seconds 1. I take some pride in running a lightweight system, so the thought of having to wait a few seconds for my terminal emulator to display a prompt feels like a personal affront. My system wasn't just behaving badly, it was challenging me by way of insult.

Accepting the challenge laid before me, I took to my favorite search engine to see what tools were available to help me understand what was suddenly performing so poorly. Oh, okay. This post says that Zsh includes a script profiler. All I need to do is turn it on in my .zshrc file, like so:

Read more…

Getting Started On Mastodon

If I've identified a trend in my social media preferences, it's that I prefer not to use social media. That's not to say that I don't use it, just that I often feel conflicted when I do. On the one hand, this is where my friends are, and online networks have become a sort of pseudo-public square. (My choice of words there is deliberate ... "pseudo" as in "fake." I actually don't think online networks work as a true replacement for a public square, but that's a post for another time.) Skip out on social media altogether and you basically opt-out of a lot of opportunities to rub elbows with people, which, despite all of the good and the bad that entails, I still think is worthwhile.

On the other hand, popular social networks are for-profit companies that invariably make their money by turning their users into their product, which is packaged and sold to online advertisers. I don't know about you, but to me that feels a bit dehumanizing. Sure, that model of business existed long before social networks did, at least in the abstract, but let's not kid ourselves—the way we're packaged and sold to advertisers is far different in the hands of social networks than at any time in history. Magazines and television networks could guess at the kinds of readers and viewers they attracted, and companies like Nielson could even provide some hard data to back up their guesswork, but what they didn't have was gobs of very personal data from which to draw conclusions about us. Apart from our reading/viewing habits, older forms of media had comparatively little to work with.

Read more…