You are hereblogs / karltk's neck of the woods
karltk's neck of the woods
I hate ESD. I strongly dislike artsd. I was intrigued by NAS, but then I used it for a while. The idea of a sound server seems so appealing, but nobody appears to be able to get it to work, and least of all the PulseAudio people.
Of course I'm being too harsh here, but I'm royally fed up with sound not working out of the box like it should. It's 2008. People have farted on the Moon. How hard can it be to replay recordings of that on bog standard laptop?
It appears to my untrained eye that mplayer, vlc and miro all default to using PulseAudio on Hardy. It further appears that the PulseAudio server is not installed by default, at least not in Xubuntu. This gives rise to the royally entertaining snippets:
AO: [pulse] Failed to connect to server: Connection refused MPlayer interrupted by signal 11 in module: ao2_init - MPlayer crashed by bad usage of CPU/FPU/RAM.
bind: No such file or directory *** PULSEAUDIO: Unable to connect: Connection refused gxine has suffered a fatal internal error. To get a backtrace, run gxine in a debugger such as gdb.
INFO Playing item with renderer:
WARNING downloader: connection closed -- quitting INFO Shutting down downloaders... Segmentation fault
Is Linux ready for the mainstream? Is Ubuntu?
Anyway, the solution to the above problems are:
- sudo nano /etc/mplayer/mplayer.conf
And rewrite the ao= to
- sudo rm /usr/lib/xine/plugins/1.20/xineplug_ao_out_pulseaudio.so
Less cautious people than myself might instead add a ~/.mplayer/config with containing ao=alsa and rename, instead of remove, the pulseaudio support from the libxine1-misc-plugins package. But that's less cautious people.
The Flying Spaghetti Monster help you if you decide to go the other route: install PulseAudio. Despair, delirium and dismay lies down that path, and nothing else.
I have had my PS3 for almost a year now. and I've rarely had time to use it. Now that I finally do, I find that it's already outdated: the 1.92 firmware won't allow me to log on to the Playstation Store at all.
I would have upgraded the firmware without a second thought if it weren't for the "RSX issue". In firmwares prior to 2.10, the hypervisor contains a vulnerability which allows the operating system to access the nVidia G70-based GPU. My primary goal for bying the PS3 was to code multicore programs and playing with graphics, so I have some incentive to retain GPU access. Of course, downgrading firmwares isn't possible unless I buy a modchip, and this one is near impossible to solder.
However, even if I keep the RSX hole open by not upgrading the firmware, there's actually no OpenGL implementation that will work with the GPU. The closest thing is the Nouveau driver, but that's a long way off, and nobody appears to be working on the PS3-specific parts. I'm guessing that if anything will materialize from this, it will be far into the future.
All hope is not lost, however. There's a Cell-based driver for Mesa under development by Tungsten Graphics and friends. They claim to want full GLSL support eventually, but that will take a lot of time and effort.
I'll delay the firmware update for a few more days, and check if there are any opportunities I've overlooked. There's something fundamentally upsetting by being at the mercy of big corporations. I bought the box. I want to use it for writing my own programs. Why should that be such a crime?
Espen alerted me to a recent phenomenon that's ravaging them intarwebs these days: Anonymous, an underground culture whose slogan is "We are Anonymous. We do not forgive. We do not forget. We are legion." It's a self-organising, emerging, hacktivist culture that employs flash mobbing to great effect.
Their goal is to focus on the dubious practices of the Church of Scientology TM®© (CSI) by arranging protests all over the world every month. Many of the videos from these protests are available online on vimeo. Most of them are even more hiliarious than the originals, including the one starring Tom Cruise.
Xenu (also Xemu), pronounced /?zi?nu?//?zi?mu?, according to Scientology founder (and speculative fiction writer) L. Ron Hubbard, was the dictator of the "Galactic Confederacy" who, 75 million years ago, brought billions of his people to Earth in DC-8-like spacecraft, stacked them around volcanoes and killed them using hydrogen bombs. Scientology holds that their essences remained, and that they form around people in modern times, causing them spiritual harm. Members of the Church of Scientology widely deny or try to hide the Xenu story.
What's especially entertaining about Anonymous is their repertoire of great memes, like the longcat, a relative of the lolcat (how long is Longcat? looooong!), the V for Vendetta mask, and their great logo:
I've been using XFCE on my laptop for a while now, and there's a lot I like about it. It's clean, minimal and responsive. The majorest annoyance I've encountered is its propensity to move windows between desktops automatically.
Whenever a window gains focus, it will be moved to the currently active desktop. After a while, all the windows will have migrated to the same desktop, and the point of multiple desktop metaphor is pretty much moot.
This is especially annoying whenever I hit a link in the console, on IRC or in an e-mail: Firefox will move over to my current desktop, and I always have to "push it back" to its proper desktop. (Incidentally, Firefox always lives on desktop #2 in my world, whereas IRC is on desktop #1, and my real work happens on #3, #4 and #5).
I've looked at this issue before, not there's no documented way of fixing it. I jumped onto IRC today, and got the following:
22:05 < TheSheep> karltk: http://sheep.art.pl/2007-09-08_Firefox_jumping_between_workspaces_in_XFCE
The solution descriped there is simple, add
to your ~/.config/xfce4/xfwm4/xfwm4rc (then restart the XFCE window manager). This will ensure that the Firefox (and other programs) stay on their respective desktops, but that the active desktop changes, i.e. the window stays, you move. And that's the way I like it.
(Oh, and I love IRC. Say what you will about "everybody" using MSN and GTalk, but when I need some actual substance, there's no substitute for the realtime support on IRC.)
I decided to take a peek at Ruby again. There's something cute about the language. There's a also a bunch of tiny webapp libraries in their CTAN/CPAN-like gem collection. Doing something quick and really dirt was never easier:)
I then decided to add flickr and twitter feeds to my homepage, but I wanted the page to remain static. I picked down the twitter and flickr ruby libraries and go to work. The stability of these libraries leave something to be desired. It didn't take all that many minutes to debug most of the buggy parts, fire off a couple of suggestions for improvements/bug fixes, and start being productive. Using the flickr API to pick out four random photos from my photostream on flickr:
flickr = Flickr.new(API_KEY) user = flickr.users('karltk') if user.photos.length < 4 then ps = user.photos else ln = user.photos.length ps =  ps.push(user.photos[rand(ln)]) ps.push(user.photos[rand(ln)]) ps.push(user.photos[rand(ln)]) ps.push(user.photos[rand(ln)]) end urls = "" ps.each do |p| urls += "<a href=\"" + p.url + "\"><img src=\"" + p.source('Square') + "\"/></a>" end urls
Using the twitter API to fetch my four latest status updates:
feed = Twitter::Base.new('username', 'password').timeline(:user) msgs = "" feed[0,4].each do |s| tm = Time.parse(s.created_at) msgs += "<p><a href=\"http://twitter.com/karltk\"><b>(" + tm.strftime("%a %H:%M") + ")</b></a> " + s end msgs
The stings generated by each of these code fragments are inserted into a plain HTML template. The end result, with the twitter feed showing at the bottom right:
Den grønne streken er Stian på vei for å treffe meg (vi skulle drive litt geocaching på Fløyen). Den røde streken er etter at Stian forlot meg og slo følge med Håvard på veien hjem igjen.
This last week, I spent some free cycles hacking together a small project instantiation tool for Stratego/XT. It makes setting up a fresh Stratego project really simple by automatically populating the project space with a default directory layout, build system files and some minimal program and syntax samples.
To create a project p0, all you have to do is:
$ crap --new-project p0
This creates all the files necessary for a complete GNU Autotools-based build system, including a sample Stratego program (src/xmpl.str):
p0/ Makefile.am README.Developer README AUTHORS bootstrap p0.spec.in NEWS p0.pc.in configure.ac ChangeLog xmpl/ Makefile.am syn/ Makefile.am tests/ Makefile.am src/ Makefile.am xmpl.str
Once this is done, you can configure and compile the project,
$ ./bootstrap $ ./configure $ make all
$ make install
and even run the example transformation program:
$ echo "foo" | /usr/local/bin/xmpl "Hello, World!"
The example program expects an input on stdin [or in a file specified by the -i switch], and will always produce the output string "Hello, World!".
It appears that the title for part three of in my series "what will I do this summer" has been decided. (The 2006 title was A Summer of Research, when I was at Watson, and for 2007, A Summer of Finance, when I was working on Wall Street).
I've accepted a job in the department of surgery and emergency medicine, at the hospital in my home town. It feels rather strange to stay and work at Home (with a capital H) after all these years. So much has changed. So many people have left. Despite some population growth, Haugesund almost feels like a ghost town to me now.
I was fortunate enough to receive some other offers at completely different locations in the country, and while Vesterålen was extremely appealing for geographical (and midnightsunnical) reasons, my sense of practicality prevailed. I've still some remnants of a social network back home, I feel the need to see my close family on a regular basis again for a while, and let's not forget: accomodation is free:)
I realise that I've worked abroad for the last four summers now (The Netherlands, Canada, USA). Those have been really great experiences. I've some terrific memories from these engagements. While the surroundings will be decidedly less exotic this time around, I suspect the work itself will make up for that (not to mention the ability to turn in my tax statement by text message again).
I take strolls with my roommate, Håvard, quite often. Today, we touched on the subject of ODF vs OOXML after a longer discussion of document validation in general. That's when we hit upon the idea of the OOXML-validating mailfilter.
The idea is quite simple: In addition to your anti-virus, spamfilter, greylisting, and other filtering functionality you have on your mailserver, you add a small script which relies on unzip and xsltproc to validate any OOXML document that passes your way, and automatically rejects any non-conforming document with a stern warning, such as:
It appears that the document <file name>, created with <document producing program>, is corrupted. I will not be able to read this document properly. Please consider resending a conforming OOXML document, or use a different document format, such as ODF. Pedantically yours, <your name>