urxvtd

urxvt
urxvt in action.

Ever since I set up Arch Linux on my box, I tried to keep my system as fast, simple and light as possible. That primarily means only using CLI software instead of heavier and slower GUI applications. You also have to abandon bloated window and display managers like GNOME and KDE. I've been running awesome for about half a year now and I'm really satisfied with it. It's straightforward and fast; it gets the job done nicely.

Recently, I started to take this 'light' approach quite seriously. A lot of software that I didn't actively use anymore got thrown away and the few GUI applications left were narrowed down until there were two left: Firefox and KeePass.

As I haven't found a good CLI alternative to KeePass, I guess I have to stick with it. As for Firefox, there are some good alternatives that I will look into. There is - for one - uzbl which I already use parallel to Firefox. Additionally, you've got surf which is as minimal as it gets and vimprobable which is quite like the vimperator plugin for Firefox. Bear in mind that none of these are actually CLI applications. For that I already have elinks.

A feat I accomplished just today was to completely remove the last bit of GNOME software I ran: Gnome Terminal. I switched over to urxvt which I use in conjunction with its daemon urxvtd. The main thing that held me back over the last few months was laziness. Switching over to new software always means that you have to go through the hassle of configuring it, which can be quite stressful at times.
I don't regret it one bit, though. urxvtd is so much faster now. It's also easier to configure, as it doesn't use that dreaded XML format like Gnome Terminal did. If you're interested in the configuration, it'll be up soon on my github repo. I just have to fix some smaller issues before it can go up.

All in all, I'm really satisfied with my system now. One thing I never had in Windows is that kind of appreciation you get by building a system designed for your specific needs. It takes a lot of time and effort, but in the end it is really worth it. You might even learn a thing or two in the process.

/dev/random

There hasn't been much progress on the site over the past few weeks. That's mainly because I'd much rather work with perl than php. I've had a look at some perl solutions for hosting a site, but I don't really want to go through the hassle of dismantling all the php code present.
I also started playing Skyrim again, which hindered progress even more.
You could even go as far as to say this site got an arrow in the knee (I am truly sorry for that joke, but it had to be done). Seriously, though. How can you resist a game that gives you something like this? I think I spent about 2 hours just looking for the birthsign constallations in the sky recently.

On the brighter (development) side, the log-parser thingy in perl is coming along nicely. Too bad most of the traffic comes from bots and crawlers that scan this site.

Anyway, I don't really know what else to write about. I might implement some new features that I have been thinking about soon. In the meantime... this is where I get off.

vigil

I have to admit that I am a very curious person. As such, I'd really like to know more about all the visitors. On my old site, piwik used to collect such data, but because I'd like to avoid having to deal with SQL, I can't set it up here.
In regard to the amount of features, piwik is too heavy for me anyway. For such a small blog like this, a custom logging software is more suited.

After some consideration, I decided to write a small php script that collects data on a small scale and puts it into plain log files. I plan to create a perl log parser later so that I can work with the log files.

A word on privacy: The script stores the date of access, a masked IP (x.x.x.0), the user agent, the referer and the query string. After 1 month, old logs will be deleted.

atomizer

Up until now, /newblog lacked web syndication by atom or rss. Now this job is done by a small perl script I created today. I decided to use the atom format, because it is a better standard (with support, for example, for MIME-based content).

You can get the .xml file here. I did not want the whole content displayed in the atom feed, so I put in small summaries instead. Therefore, you still have to visit this site in order to get the whole article.

The perl script used to create the .xml file is available on the /newblog git repo.

dotfiles

Wanting to add an alias to my .bashrc today, I typed:

echo "alias df='df -hT'" > .bashrc

The second after entering this command, I realized. I realized that I just clobbered my bash configuration file. It was gone. Forever.
Not all of it, though. Obviously, only the alias remained and it mocked me with its presence. What a great difference a single greater-than sign can make.

I felt terrible. Like I had just critically injured a cute innocent animal and left it to die in agony.
After that small incident I spent an hour rewriting my .bashrc from scratch since I had not made any backups.

In order to avoid any future issues, I created a git repository with the most important configuration files. I actually had thought of doing so a while ago, but never realized it because I was too lazy. Well, that'll teach me!

pacman

PKGBUILD
A part of the PKGBUILD.

pacman, Arch's package manager is probably one of the best package managers I have used. Granted, as the only ones I came across were yum (and dpkg with some of its front-ends) this statement may be biased, but I'm not here to discuss that.
A feature that is most satisfying and fun about pacman is the possibility of building packages yourself with relative ease. All you need is the makepkg tool, the sources of the program you want to build and a PKGBUILD bash script.

The general rule is: if you can build it manually, you can create a package for it. In its core, the PKGBUILD script contains nothing more than relevant package information and a series of commands needed to successfully build a program from source.
After that, makepkg takes over and creates a .tar.xz package for you. This package can then be installed with pacman.

I put this to the test yesterday by trying to create a vim-hg package containing the latest source code revision from vim's mercurial repo.
After 2 hours of coding and reading up on the subject, I had created my first working pacman package.
I was really surprised to see how straightforward and easy makepkg and pacman work; compared to building a rpm package, it's a walk in the park.

tmpfs and Firefox

Recently I experimented a bit with temporary file systems (tmpfs) and shared memory on my Linux machine. When stored in volatile random-access memory, retrieval of data is much faster and the system responsiveness increases significantly.

Relocating program configuration, logs or cache files into such a file system reduces the number of disk reads (or writes, respectively). Using the browser.cache.disk.parent_directory setting in about:config I put Firefox's cache into my local shared memory file system /dev/shm.
In retrospect, I should have done this earlier; Firefox is way faster now.

Digging around in the ArchWiki I found an article describing a way to put your whole Firefox profile to a temporary file system. In comparison to only putting your cache into tmpfs, this is highly recommended as most of the actions regarding history and settings are nearly instantaneous now.

I have yet to see how big the cache can get, so I don't know the limitations. Running without Firefox and performing everyday tasks, my system uses about 300MB of memory (of 2GB). With Firefox running, the usage sometimes reaches up to 800MB, but I never saw it exceeding this number so I guess I'm good to go.
It also remains to be seen how Firefox reacts when running parallel to memory consuming applications.
Nevertheless, I highly recommend putting your Firefox profile and cache into a temporary file system.

cowsay

Putting cowsay and fortune together never disappoints.


 ____________________________________________________________________________ 
/ My calculator is my shepherd, I shall not want                             \
| It maketh me accurate to ten significant figures,                          |
|         and it leadeth me in scientific notation to 99 digits.             |
| It restoreth my square roots and guideth me along paths of floating        |
|         decimal points for the sake of precision.                          |
| Yea, tho I walk through the valley of surprise quizzes,                    |
|         I will fear no prof, for my calculator is there to hearten me.     |
| It prepareth a log table to comfort me, it prepareth an                    |
|         arc sin for me in the presence of my teachers.                     |
| It annoints my homework with correct solutions, my interpolations are      |
|         over.                                                              |
| Surely, both precision and accuracy shall follow me all the days of my     |
\         life, and I shall dwell in the house of Texas instruments forever. /
 ---------------------------------------------------------------------------- 
    \
     \
    ^__^         /
    (==)\_______/  _________
    (__)\       )=(  ____|_ \_____
        ||----w |  \ \     \_____ |
        ||     ||   ||           ||

pmpds

Instead of doing important work for school, I spent the last two days coding a perl script that monitors MPD and submits any played tracks to last.fm. I am quite satisfied with what I came up with in such a short time, as it's my first big perl project.

The scrobbler has full functionality, including now-playing information, caching and support for MPD's idle function.
Interested? Head over to the github project page, where you can find more information.

Arbiter

I experimented with the quote format a bit and as of now, most of the quote sources will not be shown anymore. I found that most of them made the site look a bit cluttered because they were no longer hidden.
As the only real choices were either to remove or hide them dynamically (the latter is not possible with php), I removed them in the end.

While this means that there's no easy way of finding a source, you can still look them up yourself, which in itself is a nice way of discovering new and interesting stuff. Quite a few of the quotes are rather obscure, so I went ahead and added links to them.

Recently I had the idea of adding a tagging system to /newblog and this will probably be the next 'big' thing I'll be working on. I'm also toying with the idea of some kind of syntax-highlighting framework for embedded code. I've had a look at some third-party modules but I am still undecided whether to use one of these or create one myself.