Oops, I deleted ~/bin !

Well, damn, I had a lot of things in there. I'm not sure what I'm going to… git to the rescue! A bit of manpage-reading later, and after issuing the command git reset --hard HEAD, I have ~/bin back! The first real benefit of using git on ~ :D

Switching cold-turky from Opera to Uzbl

Today I decided to switch cold turkey from Opera to Uzbl. I've gone a whole night (so far) without opening Opera, which I think is pretty good. I've found that Uzbl's minimalism is helping me to concentrate on what I'm actually doing more — with Opera I would just open several tabs, and get through them. In Uzbl I am forced to open each page individually and read it, the visual incentive to read fast just isn't there. I'm still getting used to navigation with the keyboard, and find myself using a mouse fairly frequently, which I'm trying to cut down on. One nice effect of this is that it no longer feels completely unnatural to use access keys to navigate the Habari admin panel.

I do keep forgetting to switch to insert mode when I need to type, though, which is a pain. I'm sure I'll get used to it soon though.

I didn't actually realise what a good piece of software Uzbl was until now. Good work everyone :)

A dilemma indeed.

A thought that occurred to me just now is that there is no system online for the sharing of moderately-lengthy thoughts. There is space for the super-short status updates, Facebook, Twitter, and Identica serve that purpose. There is a place for structured messages and ideas on blogs, but nowhere just to say "[x] happened, it made me think of [y], from which I decided [z]".

While FB status messages seem to be able to take any length, and so solve this problem, evidently they are just designed for status updates. This can be seen from the prompt of "What's on your mind?", as well as the position of the message on the screen - right next to your name, indicating it should be a thought or emotion composed in the third person (a rule which many break, making the FB home page look horribly confusing). And so, FB is not the place for these thoughts. Microblogging sites have a limit of 140 characters, so they are definitely not suitable, and blogs are too formal and structured a medium for rambling, undeveloped, thoughts.

There should be a system half way between microblogging and blogging. I propose, for want of a better term, "miniblogging". From now on, I shall be treating this blog as a miniblog/blog combination. So I shall make some reasonable-length, 'normal' blog posts, but far more rambling thoughts too long, or in the wrong person, to fit on a different medium.

punt: A simple s-expression based language

punt (all lowercase because it looks and sounds cool) is a sexp-based language written in pure C. Amazingly, it only has one built-in function, 'use', which makes all of the rest work. punt itself consists of an interpreter and a set of modules to run standard functions. While it may look like Lisp, it's very different. Here's an example hello world:

(use 'io')
(fput (stdout) 'Arch is the best!\n')

As you can see, the 'io' module is loaded with the 'use' command, which provides 'fput' and 'stdout' (amongst other things). I haven't really looked into the language much yet - but it looks very interesting.

Zsh Global Aliases

I'm a huge fan of aliases. I have 77 of them. And, believe it or not, I use them all. Most of them are just aliases for passing arguments to commands I use all the time, but a few others are more like one-line functions. If you also note that my functions file has 19 functions, you can see that I like to customise my shell environment a lot, and, in fact, when SSH'd into another computer (or just using another one) I attempt to use my aliases/functions and it takes me a minute or two to remember that they are in fact things I've created, not standard tools.

Now, consider my delight when I discovered global aliases. These aliases will be expanded anywhere in a line, so even less typing is needed. My .zsh_aliases file now contains these lines:

# Global (in-line) aliases
alias -g G='| grep'
alias -g M='| most'
alias -g X='| xargs'
alias -g H='| head'
alias -g T='| tail'

So, what if I want to get, say, the last 15 things I installed? cat /var/log/pacman.log G "] installed" T -n15 would do the trick. As you can see:

17:12:40 % cat /var/log/pacman.log G "] installed" T -n15
[2009-06-02 21:24] installed lirc-utils (0.8.5-1)
[2009-06-03 18:42] installed nathive (0.811-2)
[2009-06-03 20:46] installed ack (1.88-1)
[2009-06-04 19:14] installed python-eyed3 (0.6.17-1)
[2009-06-06 11:55] installed python-scipy (0.7.0-1)
[2009-06-06 14:05] installed lib32-libxslt (1.1.24-2)
[2009-06-06 14:05] installed bin32-wine (1.1.22-1)
[2009-06-06 14:35] installed pacgraph (20090606-2)
[2009-06-06 16:49] installed bchunk (1.2.0-1)
[2009-06-07 08:53] installed live-media (2009.04.20-1)
[2009-06-07 09:05] installed vlc-dev (1.0.0_rc3-1)
[2009-06-07 19:39] installed antiword (0.37-1)
[2009-06-08 16:25] installed shaman (1.0.9-1)
[2009-06-08 20:40] installed slib (3b1-1)
[2009-06-08 20:56] installed scm (5e5-1)

While I'm probably only a few steps away from having a working environment fit to enter an "Obfusticated Shell" competition, and seeing me type away in urxvtc will probably confuse the hell out of most people, I've never been more productive. I've only scratched the surface with global aliases, I expect to add many more as the weeks go by, until I have a collection impressive enough to warrant a .zsh_galiases file. If you use Zsh, or some other shell witch has global alias functionality, I hope I've convinced you that they are wonderful. If you don't, why not give Zsh a try? It's compatible with bash (but due to the extended globbing you may need to go through your scripts and escape a few extra characters), and has some very nice features.

Pages:  1 2 Next →

User