oni blog

gitto

I've been meaning to do two things for quite some time:

  1. Write a utility for tracking the status of my various git repositories.
  2. Write a program in Guile scheme.

A few days ago I accomplished both and I named it gitto.

It is a simple utility that allows you to register some repositories on your computer and it will list how many changes there are to push and pull, if the working directory is "dirty" and how old the last known commit on the upstream branch it, which it shows as last updated.

More details can be found here, including a link to the source. It requires at least guile 2.0.x and some version of git.

I still have to at least add docstrings and perhaps even a texinfo document, and I haven't released any version yet, but feel free to try it and be sure to let me know any suggestions/complaints/rants/bugs you might have or find.

Permalink

My new keyboard

I have been using GNU Emacs for a few years now, at first only in my spare time, and for about 1.5 years also for work. Since I've started using it for work my init file has exploded in size and my knowledge of both emacs and emacs-lisp have as well.

As a result of using it full time, I have started paying more attention to what I'm doing and how I can do it faster or more efficiently. Sometimes this means writing a function, and possibly hooking it up to some key combination, but sometimes it also means changing the way you use your PC.

The first change was trying more and more to leave the mouse behind and use the keyboard for everything. In emacs this is easy, there are many window managers that offer this, mostly tiling, and for browsers this is somewhat more difficult.

After switching to an almost completely keyboard-based system, I was starting to feel pain in my left pinkie. It was getting tired of always having to travel to the lower left bottom of my keyboard in order to press that darn CTRL key that I use oh so very much. So I switched my CTRL and Caps Lock keys, as is suggested by many an emacs user.

Following that, much later, was the desire to type more efficiently. I've read a long time ago already that QWERTY was designed to be slow and that it is unbelievable that we all still use it. Now, as I don't like mangling my keyboard by using a layout that it was never designed for and which was never designed for it, like dvorak, I chose colemak. I've now gotten the hang of it, for the most part, and I'm happy with it, it types pretty nicely and still fits well on a QWERTY keyboard.

At this point, I'm at the stage where a friend of mine commented to me, once, that he would just love to see a burglar/thief make heads or tails of the setup I'm using, since my keyboard doesn't show the keys in the right place, when you log in you're greeted by an empty screen with no hints on how to proceed, the CTRL key is not the CTRL key and the mouse does absolutely nothing.

But, after a while of using colemak and paying attention to my typing and paying attention to tips about how to type, like use the modifier on the opposite side of the keyboard in relation to the character you have to use with it, I got frustrated by my keyboard. Using the modifier opposite of the key you're using with it doesn't work well if they're hidden away from your hands, all the way down in the lower right and left corners. So I started keeping an eye out for keyboards that would better fit my needs.

After weeks, months, of seeing absolutely nothing that interested me I finally came across Xah Lee's Ergonomic Keyboards Gallery, I see my vision has come to life. The Truly Ergonomic Keyboard seems like exactly what I'm looking for, finally a keyboard that has big modifier keys on both sides.

From the moment I saw it I knew I wanted it, but impulse buys are never a good idea, so I slept on it, talked to some people I respect and I thought about it, it is €230 after-all. Then after a few days there I am, ordering it, having just weeks before proclaimed that I couldn't fathom ever paying more than some €20 for one.

Unfortunately it was still in production, or at least this batch was, and I had to wait. I went to pick it up a few days ago, an extra charge of €64.12 was added by customs. The people that brought me there were intrigued and surprised by my purchase and didn't really understand it, but they thought it looked cool nonetheless.

Now I have it and have been using it for a few days. Man is it different. It's like learning colemak all over again, although luckily this seems to be going faster.

The few moments I have where I don't screw up every single word and have to type everything at least thrice I feel comfortable using it. Having both the Control and Shift keys near the sides of my hands, big and high up is convenient. Being able to press RET with either my thumbs or my index fingers is much more comfortable than my right pinkie. It also makes a nice sound when I'm typing and the keys are not all that resistant, so I don't have to press hard, on either the modifiers or the keys, which would be a pretty big downer.

Of course it's not all perfect. I still have to press M-x with just my left hand, since the right ALT key is an AltGR key, which is completely different and doesn't seem to be recognized as a modifier by any program, instead being a direct switch on the keyboard itself. But in this case I could look into reprogramming the keyboard's firmware, which it supports and allows, to switch the two alt keys, or I could use xmodmap. Having my Super key in the top-center portion of my keyboard is an adjustment, I usually use it as the modifier key for everything window-manager related. And, of course, having often-used keys such as (back)slashes and brackets/accolades in far-away places is different. But I'm sure I will overcome these difficulties once I get a little more used to it.

Well, writing this post should help, I feel my proficiency has grown about 10%.

Anyway, if you're writing a lot on the computer, or you use a lot of modifier keys with programs like emacs, I won't yet recommend buying it, but I will recommend taking a serious look at it, it might be just what you are looking for, even if you don't yet know you're looking for it. In the end it cost me €293,12 and I haven't regretted it yet. In fact, I already felt completely lost when using my netbook, to which I did not connect my new keyboard.

Permalink

New config project

After reading that it was very easy to use Literate Programming for one's emacs init file and discovering that it's also a lot of fun to do, I was thinking that I could easily use this for all my configuration files.

Of course, not all programs have org-babel, so they can't all have something like this in their init file:

(require 'org)
(require 'ob-tangle)

(org-babel-load-file "~/.emacs.d/rinit.org")

Which, for emacs, tangles (extracts the code) and then loads the generated file. So something else has to be done.

On the other side of things, I, fairly recently, had a run-in with some Makefiles, which got me thinking that make is a very interesting tool and that it could be used to help with a lot of other tasks as well, much like I perceive Rake does. I just wasn't able to find where exactly it would fit (other than, of course, as compilation instructions for my projects).

Now, yesterday I got the idea of using org-mode to literate-program all my configuration files and then use make to tangle and install them. This would mean that I could easily keep documentation about decisions in configuration files and such in an easy to read format, easily export these files to somewhere on the web and practice my make skills to make everything easy.

Here is the result. I'm still working on it, as you can see my emacs init file still has a long way to go, my focus is on getting it in org-mode first and actually get it well-documented later. I've published it here, what I have at least, in case you would like to read about my mostly uninteresting configuration files.

Permalink

Literate emacs init

A little while back I saw Sacha Chua mention using org-mode for literate programming. I'd heard of literate programming, but its use escaped me. Still, reading that and looking at what noweb is I started thinking that it would indeed be a great way of documenting code, especially something my emacs init file, since that is not a serious software project ans some weird stuff goes on in there.

I still didn't really get the hang of it. It seemed like a lot of work to get into it and how exactly it fit together with using org-mode didn't really hit me so I pushed it aside for the moment.

Today I see her presenting her new literately programming init file with some links to other resources and I just had to try it too.

I haven't gotten very far yet, but what I have so far I have put here. It's just the generated HTML file, no org source, and I'm still messing around with the colors and stuff, but it's fun to see the result already.

I don't know if I'm actually going to use it, since my init file's sloc count is 1038 and its total line count is 1280 lines I fear that adding even more documentation (= lines) would make my init file very bulky. It is still fun to see and experiment with, though.

Permalink

Older posts

Date: 2012-07-03 02:26:18 CEST

Validate XHTML 1.0