Posted by mike on September 28, 2009 – 4:41 pm
Just compiled mplayer with vdpau to make use of my nVidia 8600GT. On Arch Linux this is as simple as using ABS to rebuild the stock mplayer from extra. mplayer autodetects all supported features during configuration. The only issue I had was a linking error with libgif which was installed. Adding –disable-gif to the PKGBUILD fixed this. Then I added:
vo=vdpau,xv,
vc=ffh264vdpau,ffmpeg12vdpau,
to my .mplayer/config. I’m haven’t checked how much of a difference it has made to CPU usage however one added benefit is that mplayer would sometimes freeze the video when in fullscreen mode in xmonad when changing workspaces around. This is no longer happening. Bonus!
EDIT: Hmmm, it does still freeze but only now and then. Not sure if there is a pattern to it.
Just watched the first episodes of the new seasons of Dollhouse and The Mentalist. The Mentalist has a new character played by Terry Kinney who played Tim McManus in Oz. Oz was a fantastic show. Meanwhile in Dollhouse, Dr Saunders is acting quite strangely and Jamie Bamber guest stars.
Posted by mike on September 26, 2009 – 11:23 am
Bugger! Shut my laptop down last night and when I booted it up this morning it seems to be dead. It’s locking up, usually in the BIOS section though sometimes it gets as far as GRUB and once it made it to the console before locking up. This has been a great machine (Core 2 Duo) and I am sorry to see it go. It was happily running Arch Linux x86_64. The only downside to it was the ATI graphics. Not sure if I will replace it or maybe start using my netbook more. I’ll have a better look at it when I get home. Curently traveling for work. Will arrive home later today.
Posted by mike on September 21, 2009 – 8:18 pm
Filed under Haskell, xmonad
Have been playing around with my xmonad.hs file and have come up with my first bit of original Haskell though I have seen something similar in the config archive. Since I have been using xmonad I have been using something like this for my list of workspace names:
myWorkspaces :: [String]
myWorkspaces = ["1:dev", "2:web", "3:doc", "4:gfx", "5:tmp", "6:tmp", "7:tmp", "8:tmp", "9:tmp"]
This works fine and does the job but there are two things wrong with it.
- Numbering the workspaces manually makes re ordering them a nuisance. For example swapping “dev” and “web” means swapping the 1 and 2.
- Repeating the “tmp” is inelegant.
This is what I came up with tonight:
myWorkspaces :: [String]
myWorkspaces = map (\x -> show (fst x) ++ ":" ++ snd x)
(zip [1..9] $ words "dev web doc gfx" ++ repeat "tmp")
It’s a lot more code for sure but it is more maintainable.
- The number of workspaces can be changed simply by changing the list [1 ..9].
- Renaming the workspaces is as simple as editing the “dev web doc gfx” string.
These terms could be pulled out into a where clause to make it even easier. One cool thing is that the repeat “tmp” function actually generates an infinite list of “tmp” strings however due to Haskell’s lazy evaluation only enough “tmp” strings are generated to pad the list length out to match the length of the first list argument to the zip function. That is nifty.
It’s only a little chunk of code, which could probably be simplified, but it is a start. Baby steps.
Going to sit down in front of the TV tonight and watch The Andromeda Strain. I own the original 1971 movie on DVD as well as the novel and have watched/read them several times. I wasn’t aware there had been a remake made and am looking forward to seeing what the modern interpretation looks like.
Posted by mike on September 20, 2009 – 8:50 pm
I have been using xmonad as my window manager for quite a while now. I use it on a dual screen workstation, my laptop and a netbook and in each case it does the job flawlessly. It is insanely stable and for this reason I am still using it though I do struggle with Haskell and would like to try stumpwm one day as I would be more at home with Lisp.
My configuration hasn’t changed much for the last 6 months or so, not because my current setup is perfect, but because it does everything I need. Having said that I’m sure there are a few productivity boosting modules available in xmonad-contrib that I would find useful. As a first step today I switched to XMonad from Darcs instead of the Arch Linux packages. There are packages for xmonad-darcs and xmonad-contrib-darcs in the AUR however installing pre release applications from SCMs via ABS feels a little weird to me. I find it easier to keep a copy of the repository in my home directory and re-sync and build as needed. While I wanted to install xmonad-darcs manually I also didn’t want to have files installed into my root file system that were not managed by pacman. Thankfully the xmonad README file contains instructions for installing xmonad into your home directory. This is a as simple as:
runhaskell Setup.lhs configure --user --prefix=$HOME
runhaskell Setup.lhs build
runhaskell Setup.lhs install --user
xmonad-contrib can be installed in a similar way. Add ~/bin to the end of your PATH or the configure, compile, restart command normally bound to mod-q will not work. Now that I am running xmonad-darcs I am free to have a play with some of the modules that are only available in the current darcs version. Modules that I am currently configuring or wanting to look at include:
- XMonad.Actions.GridSelect
- XMonad.Actions.Submap
- XMonad.Actions.Search
- XMonad.Layout.HintedGrid
- XMonad.Layout.IM
- XMonad.Layout.LayoutHints
- XMonad.Layout.PerWorkspace
- XMonad.Util.NamedScratchpad
- XMonad.Layout.Tabbed
- XMonad.Prompt.Man
So far I have only looked at XMonad.Actions.GridSelect, XMonad.Layout.HintedGrid and XMonad.Actions.Search. Next up will be XMonad.Util.NamedScratchpad.
Last post I mentioned a pdf viewer called apvlv. Recently another post sprung up about yet another minimalist pdf viewer called zathura. It looks interesting as well and worth checking out.
Posted by mike on September 16, 2009 – 9:25 pm
In a move reminiscent of the break up of AT&T in the 80s the Australian government has legislated to separate Telstra’s retail and infrastructure divisions. It remains to be seen what effect this will have on Telstra but it should be interesting.
I have been playing a fair bit of Quake Live (1833 frags) which has made me miss the old days of Quake 3. The id software supplied binaries are 32 bit and the sound doesn’t work any more at least on my system. Fortunately I found an open source based Quake 3 distribution called ioquake based on the id software GPL source code release. ioquake3 compiles cleanly in a x86_64 environment and there is a package available for it in the AUR. It is interesting to compare the old levels to the new Quake Live versions. Quite a few had changed but it was difficult to say exactly how.
Lastly in a thread on the Arch Linux forums discussing lightweight pdf viewers bernarcher mentioned apvlv which I hadn’t heard of before. It is lightweight and uses vim like keyboard commands. Definitely worth looking into and I intend to check it out fully myself.
PS: RIP Patrick Swayze and Kanye West is a jackass.
Posted by mike on September 12, 2009 – 3:06 pm
The British government has finally apologised to the late Alan Turing. For anyone not familiar with the name his achievements in the area of computer science, mathematics and cryptography are numerous. He was a man who gave his country everything and in return his country took everything from him. Better late than never I guess.
Turing was a quite brilliant mathematician, most famous for his work on breaking the German Enigma codes. It is no exaggeration to say that, without his outstanding contribution, the history of World War Two could well have been very different. He truly was one of those individuals we can point to whose unique contribution helped to turn the tide of war. The debt of gratitude he is owed makes it all the more horrifying, therefore, that he was treated so inhumanely. In 1952, he was convicted of ‘gross indecency’ – in effect, tried for being gay. His sentence – and he was faced with the miserable choice of this or prison – was chemical castration by a series of injections of female hormones. He took his own life just two years later.
Source: http://www.number10.gov.uk/Page20571
Posted by mike on September 3, 2009 – 10:16 pm
Currently working on an assignment for my Internet Security unit and needed an open source crypto library. Had a look at a couple I already had installed on my workstation and a couple of others including:
Polarssl looked interesting though in the end I have decided on the Botan C++ library for a couple of reasons:
- It’s a C++ library and the application must be written in C++.
- The included documentation is great and includes build instructions, and a tutorial.
- Examples included.
- It builds clean, i.e. no warnings, with -Wall. I don’t understand why more developers don’t pay attention to this.
- Actively maintained. Last release was the 13th of August, 2009.
- Project has a good website.
Just downloaded it and built the library on Arch x86_64 with no problems. Final target machine is also x86_64 so it looks good. Not sure if I should go with a dynamic or static library. I don’t have root access to the final target machine so would need to use LD_LIBRARY_PATH to allow a dynamic library to load from a non standard directory.