[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

WordPress frustrations

Filed under: Hacking — Thomas @ 10:59

2009-01-12
10:59

For all the love wordpress gets from people who care about usability I still get surprised at how incredibly unusable wordpress can sometimes be.

Since last week I was unable to log in to my WordPress installation. You'd click login, and you'd end up on the same page, and there'd be no way to log in.

Yesterday I googled a little, and apparently this is so common that there is a whole page dedicated to this.

Step 2 on that page is:
Some WordPress Plugins may interfere with the login process. Disable all of your WordPress Plugins, either through the admin panel or by removing them from the /wp-content/plugins/ folder, so they will not be recognized by the program.

Excuse me ? You create a whole eco-system built on allowing anyone to code up a plugin for your system, but you allow your system to fail silently when said anyone makes a mistake ? I am surprised I wasn't bitten by this before, but granted, I have few plugins and definitely didn't touch them the last few months.

How WordPress cannot do some simple logging or error handling when it loads up random plugins during the login process is simply beyond me.

I moved the plugins/ directory out of the way and login worked. That was the extent of the help that debug page provided - of course it doesn't tell you how you can figure out which plugin is causing the problem.

In the end it was a file called markdown.cache - yes, just the cache file. Sigh.

Way to reassure us!

Filed under: Fun — Thomas @ 01:11

2009-01-08
01:11

LiveJournal.com is currently unavailable due to emergency maintenance. Don't worry, this has nothing to do with our recent company layoffs! It's a technical problem, not a lack-of-personnel problem.

Thank you for your patience.

GStreamer, appsink and CRC32

Filed under: GStreamer,Hacking,Python — Thomas @ 10:50

2009-01-07
10:50

Slowly flexing my GStreamer muscles again in preparation for a real application.

Yesterday I wanted something that allowed me to calculate CRC's of decoded audio files, to be able to calculate the CRC of a ripped file.

There's a few ways to do this using GStreamer, none of them code-free.

I assume the 'correct' way would be to write a filter element that calculates the CRC as buffers come in. In the olden days this would involve a lot of boiler plate code in C, and a small processing function.

Today, in C, this would be easier, since you could probably simply subclass basetransform.

You could write either in Python as well these days.

Then there's the 'get data out of GStreamer' approach. This used to be done using identity and the handoff signal.

The new, approved, API-stable way is to do this using appsink, one of two elements (with a helper library, of which I don't yet see the point) recently moved to gst-plugins-base.

Using appsink is probably the approach that involves the least code to write. You can set up a pipeline, set it to PLAYING, and just pull buffers in a blocking fashion (which is easier code to write, but harder to slap a GUI on later)

Here's the example code. You might note that there is an ugly try/except which I suspect is some bad handling inside gst-python or pygtk for errors during signal handling/emission.

It is a deceptively simple way to get data out of a pipeline and processed, and I'm glad we have a guaranteed way of doing this sort of operation now for the many people who want to dip their toes into GStreamer instead of diving in. I do hope they will at least consider the full dive still though.

Side note 1: GStreamer heads are free to share their opinion on what *should* be the correct way for data analysis operations like this. Years of brainwashing still lead me to believe that the answer would be 'write a filter element'.

Side note 2: I've been toying with the idea of making a python class for 'asynchronous operations' that would wrap a GObject main loop doing the processing, and implementations can then subclass and implement some simple methods. This would make it easy to attach that operation to a GUI element (for example, a progress bar) automatically, or adapt it into a linear, blocking operation for command line applications. I can't imagine this would be a novel idea, I'm sure someone else has done this already, anyone know what I'm talking about or have any suggestions ?

Ending the year

Filed under: Belgium,Life — Thomas @ 22:51

2008-12-28
22:51

Well, things aren't turning out quite the way we planned this week.

For one, I was planning to spend some time in the new little holiday house my parents bought at the seaside. My mother was making sure there was going to be internet for me to be able to work from there, and she somehow... forgot. And even as a high-paid consultant for one of Flanders' two biggest providers, her waiting time for getting net installed is 7 weeks.

That also means I get to see a lot less of Kristien than planned. She's busy all day in a theme park that used to be called 'de Meli', by sheer coincidence a mere kilometer from my parents' holiday house, entertaining the young children of Flanders dropping by for Ketnet Freeze.

Meanwhile, this week I finally had my neurologist appointment. I have a strange oversensitivity in the left part of my body that isn't quite painful but not pleasant either. I've been having it for over half a year now, thinking it was related to my tooth infection. Clearly it isn't since the tooth infection was removed three months ago - along with the tooth. The oversensitivity has made it hard for me sometimes to stay seated at work, which might explain to people reading this my various creative moments in seating during meetings.

While the doctor was hammering various parts of my body, he noticed a lump in my pants pocket. 'What's that ?' 'My wallet.' 'That big ?' 'Uh, yeah ?' 'Is it always there ? All day long ? Even while working ? Do you work sitting down ?' 'Yes, yes, yes, and yes.' Yes, I always put my wallet in my pants pocket, mostly not to lose it, but also because the wallet contains a keycard which is the only way to get back into the office after I went to the toilet. 'I wouldn't recommend always having your wallet there. The nerves to the areas you are complaining about are right below where your wallet now is.'

So, first, initial diagnose - walletitis. Obviously it might be completely unrelated, so further analysis is necessary. So I got House's favourite exam - the famous MRI ! I had it on second Christmas day, at 20:00. Amazing that there's still so many people in a hospital on second Christmas day and a Friday evening.

The MRI was mildly disappointing, though the checklist I had to complete to make sure I had no metally things in my body was a bit daunting. In the end you start doubting if you really did not get any kind of surgery that might be problematic for this exam. I had to get undressed, lie on a board, and was told not to move at all. She gave me some headphones for the noise, and told me it would take 20 minutes. Then she slid me in, and I started counting. I almost fell asleep a couple of times, because there is really nothing you can do in there and I didn't want to think about anything important because I wanted to keep counting. I got slid back out as I reached 961. Possibly my idea of a second is wildly off.

The next scan is in a month, I've been threatened with injections of tracer fluid for that one, I hope it won't be necessary.

Meanwhile, I was also fighting off a cold. Pretty annoying, because it meant that I basically wasn't able to get anything done of all the things I was planning to get done in this 'long weekend'. It's just too hard to think with a head full of snot and a buzz in your head.

Yesterday was the hardest day though - I woke up at 6 with a splitting headache. Got some Dafalgan, went back to sleep, woke up again two hours later, still with a headache. Took Dafalgan all through the day, went to sleep early, woke up, still with a headache. Today was a bit better, only took three, and hopefully tomorrow I will be all rested again. Just in time for work...

Here's to making the last day of the year a lot better than these past few ones! We will have some friends coming over, and I've been putting together a 6 course menu that I will prepare for them - pretty much on my own, since Kristien has few days off and wants to do nothing at all on the last day of the year, and I very much intend to make her wish come true. And besides, we paid enough for this great new open kitchen, I want to put it to good use...

Xorg contributions

Filed under: Hacking — Thomas @ 11:57

11:57

More than half a year ago I got a new computer for the living room, as quiet as possible, with an ATI 2400 based card. It took some tweaking to get X working, including using the "new" radeonhd driver, and learning enough about how XRandr works to cook up a simple one-line patch to get my card detected correctly and allow me to use multiple screens (I wanted to write Xinerama but apparently that's not the cool word to use anymore).

An X driver patch is only one step removed on the geek ladder from kernel patching, right ?

Anyway, as a good open source citizen I submitted this patch in the correct location, got some followup questions to try my card with HDMI attached, lugged my computer across the room to the TV, did the testing, sent the info, and assumed my patch would make it in, and forgot all about it.

Yesterday I did an upgrade, got a new X, and restarted, and I only had one screen working after booting. After scratching my had a little and relearning xrandr, I vaguely recalled me doing this patch half a year before, and checked if it was still valid. Seems it didn't land yet, sigh.

I know we're all busy in open source, but a one line patch verified by hand by someone owning the card to work, should be a no-brainer, right ? I'll repoke the relevant people and get it in this time.

I do have to say though it's definitely an improvement to have the whole X tree be split up, and to be able to take just one module, find a problem, create a one-line patch, and rebuild just the rpm package for that driver, instead of having to rebuild all of X for a simple change.

For those of you who happen to have Fedora 9 and the exact same card (GeCube ATI Radeon HD 2400Pro, with one VGA, one DVI, and one HDMI output), you can get the package from my Fedora 9 repository.

« Previous PageNext Page »
picture