After years of using VMWare, I suddenly had to migrate to VirtualBox; I’ve been using VirtualBox for quite some time now, but not in the way I use VMWare.
First I thought it will be a short-lived trip, but now I’m happily stuck. I still had the image of VBox the way it was in the version 1.x in the head. What a blow it was to fully explore 4.x, in my case 4.0.6!
Here are few optimization techniques that were handy to me recently; they mostly concern 2D graphics programming, where these patterns often emerge, but are helpful anywhere where you have to iterate and update data.
- don’t do if‘s
- map all you can
- don’t float
- cache your reads
I always forget this, thought it’s trivial.
To change the program you use for diff-ing, for editing of the commit logs, and much more, edit the ~/.subversion/config file, e.g.
editor-cmd = vim
diff-cmd = meld
The file is well commented, so you should find your way around it easily.
Note: with update to Ubuntu 11.04, meld stopped to work as an SVN diff program for me (seems like support for ‘-v’ parameter has been dropped); this can be solved easily – just create a new script, e.g. /usr/bin/svnmeld containing:
meld "$6" "$7"
then chmod it as executable, and use diff-cmd = svnmeld in your SVN config file.
The setup is pretty trivial, but configuration has few glitches.
For some reason, Delete and Insert keys are combined on my laptop (ASUS). You have to press fn key and Delete key to get Insert.
The simple system-wide solution to this is the xmodmap utility; this utility allows you to map any key to any other key.
In my case, I decided to use Pause key instead of Insert (how often do you need the Pause key anyways?), and this is all you have to do:
xmodmap -e "keysym Pause = Insert Insert Insert Insert"
Add it to rc‘s to get this automatically run on system startup.
Note: in the xmodmap command above, the 1st Insert is a key press with no modifier pressed, 2nd with Shift, 3rd with Ctrl, 4th with Ctrl+Shift.
Just got a new laptop, Asus U52F, awesome machine, but just as with any new hardware, there are few glitches.
The major one for me was, that the headphones did not work at all – got sound playing only from the speakers, with headphones jack plugged in or not.
Lets face it – there is no one programming language for all.
Sure, there is [language of your choice]. But how often do you go online to look for an algorithm to solve problem at hand, and the example source code you find is exactly in the [language of your choice]?
There are many books and texts about Lisp on the net, so I’ll leave out the “common” stuff, and I’ll try to show in this article one aspect of what makes Lisp the “most hackable” language out there.
If you think that tuples in .Net4 are awesome, or that F# is innovative, then you can stop here. This article is not for you… Seriously, don’t waste your time…
If, on the other hand, you ever wondered why your favourite language does not have this and this feature, ever wanted to hack the compiler (and/or really did), or found yourself writing bunch of a very similar code and spent days thinking of a way to refactor the code despite the limitations of the language at hand, then Lisp is The language for you.
This article is heavily based on Setup a Subversion Server in 4 Minutes by Tony Spencer.
To setup subversion (svn) server, all you need is the subversion package installed; on most systems, this already includes all the necessities – the client (svn), the repository tools (svnadmin), and the server (svnserve).
Every now and then, you might run into a situation where your *nix installation won’t start due to a corrupted/damaged journal, be it due to power failure or disk failure.