Archive for the ‘Programming’ Category

Going away again

February 13th 2008

At some point soon I’ll be away again. So, I’ve made a new release of kdesvn-build so that people not tracking the trunk version of it can still use the nifty asynchronous download/build feature. (Sorry if the output still seems buggier, you can disable using –no-async if you don’t like it).

If I haven’t been very communicative recently I apologize, but I’ve been really busy. So stay safe and I’ll be back soon.

Posted by mpyne under Personal & kdesvn-build | 1 Comment »

KDE 4.0(.0)

January 12th 2008

So at long last the first release in the KDE 4 series, KDE 4.0 has been released.

A couple of days after they tagged 4.0 I switched to using KDE 4 as my working desktop. (btw, isn’t it odd that the tag name is 4.0.0 if the release was called 4.0?)

It was remarkably more stable and usable than it had been just 4 or so weeks before when I had tried it last. I managed to fix a couple of JuK bugs (one very minor, another a crash) before 4.0.0 was tagged. Unfortunately I didn’t get time to do nearly enough testing so JuK as shipped with 4.0 has several bugs which are already fixed, including:

  • Allow JuK to load the playlists and cache for KDE 3’s JuK (so you’ll need to wait for 4.0.1 to load your old collection. Sorry. :( )
  • Correctly save the collection list after running JuK for the first time (so you’ll need to wait for 4.0.1 to save your new collection. Sorry. :( )
  • JuK files in 4.0 will not be compatible with 4.0.1 due to the bug that prevented loading 3.5 data. But if JuK fails to load the files it will try again in a mode that should allow 4.0 files to load, so fret not.
  • Some icons that used to show up had their names changed and I didn’t update JuK. Fixed in 4.0.1 and greater.
  • I fixed a bug causing the Play Queue to show up twice on startup, and it was pretty random as to whether JuK would save whether you wanted the Play Queue shown or not on shutdown.
  • The track announcement popup is pretty much completely hosed in JuK. I would disable it until 4.0.1, which has bugfixes for cover icon size, and track popup positioning.
  • I fixed a bug where the list of playlist columns you wanted visible was not saved properly.

All of these issues are fixed in the 4.0 branch (what will be 4.0.1) and in trunk (4.1). There is still a bug where the History Playlist doesn’t have the extra “Time” column that it is supposed to have (and I’m not sure why it doesn’t). And of course JuK is still a little rough around the edges. But it is good enough for daily use I think even though the underlying code could probably still use some porting love on my part.

If you use kdesvn-build then it is possible to build the specific 4.0 release (using the tag 4.0.0 option pretty much everywhere) but I would recommend building the 4.0 branch instead if you’re going to be going to the trouble of using kdesvn-build. Especially since from what I under Gary L. Greene will be porting Konstruct to work with KDE 4 tarballs. Tarballs are mirrorable and put much much less load on our SVN servers. :)

Also I plan on pushing out the next kdesvn-build release at some point soon. kdesvn-build in /trunk supports downloading module updates while building which can be an impressive speedup. It introduces a few (minor) bugs which I may not have time to fix before I must release it or wait but I think the net benefits will be worth it.

Back to KDE 4 though, I wasn’t sure if I liked kickoff KRunner (the new Alt-F2 Run Dialog) but when I went to try and launch System Settings, as soon as I typed “system” it noticed what I was trying to type and brought up an entry to launch that program. Very helpful.

(Incidentally the reason I was doing that was to test switching cursor themes. I heard that in KDE 4.0 it worked without requiring a reboot of the X Server, and it worked for me so that’s pretty cool.)

So congrats to all the developers, testers, translators, artists, bug wranglers, marketers (I guess we have those now ;) and everyone else who worked so hard to pull of the next major release of KDE. I’ll try to keep doing my part (time permitting unfortunately).

Posted by mpyne under KDE & Programming & kdesvn-build | 3 Comments »

kio_perldoc

December 1st 2007

kio_perldoc: I’ll keep it short:

  • Ported to KDE 4.
  • The GENERATOR metainfo in the output has kio_perldoc now, so that proper blame may be placed.
  • The S<> tag in Pod now produces HTML which isn’t super broken. (Look for Mac OS in perlport)
  • Don’t try to load IMG tags. I wasn’t going to add this in except that it causes Konq 4 to crash for some reason.
  • Fix formatting of bulleted lists. Patch graciously provided by Bruce Ravel.
  • All C library functions are called like ::foo() now to avoid ambiguity. (e.g. with close())
  • Corrected a call to execlp(). If you ran kdeinit in a terminal you could actually see the man page come up…
  • Fix linkage for hyperlinks that refer to the same page.
  • The HTML output looks more like www.kde.org now.

Still needs CMake, Perl 5.8, etc. The KDE 3 version is 0.8.1, and KDE 4 version is 0.9, but it’s the same feature set.

Posted by mpyne under KDE & Programming & Useful Tricks | 1 Comment »

More gifts

November 29th 2007

All that work I was doing to add parallel updating and building to kdesvn-build gave me a great appreciation for one thing that Perl does right: copious documentation, even if you need to use a special program to view it (perldoc, which man-page-ifies it).

What I really wanted was a KIOSlave interface to perldoc that way I could view the documentation nicely hyperlinked in Konqueror. The KDevelop guys already had a kio_perldoc, but it wasn’t really too great. It simply dumped the output of perldoc more or less straight to konqueror, which misrendered it since it wasn’t HTML. It could also output plain text but that was HTML-ified using blockquote instead of pre which caused it to still look weird.

It was that way mainly because there’s no good way to export HTML from a perldoc file. Perl includes a pod2html but let’s just say it hasn’t kept up with the times too well. Plus it’s very hard to convert the hyperlinks produced by pod2html into something that perldoc would be able to redirect to itself, which defeated the purpose of having hyperlinks in the first place.

I eventually decided to do a little Perl magic to handle the conversion from .pod (which perldoc would output) to html that wasn’t crap. It took a bit of searching on CPAN to weed out the POD->HTML converters which either had way too many dependencies or didn’t produce suitable output. I eventually settled on Pod::HtmlEasy, a useful and customizable Pod->HTML converter that didn’t have too many dependencies and was suitable for standalone use.

Some merging of files and removal of unnecessary dependencies later, and I had a script which would run perldoc for me and automatically convert its output to HTML. All my KIOSlave had to do was call the script and dump its output straight to the receiving end.

The actual handling of that is probably more complicated than necessary. I think I will use popen() in the future just like every other similar KIOSlave instead of handling the children myself. But, it works pretty well:


It handles URIs of the form perldoc:/Net::HTTP to get module information, perldoc:/functions/select to look up documentation on Perl functions (like perldoc -f) and perldoc:/faq/search_terms to looks for your search terms in the perlfaqs (like perldoc -q). These URIs were all pioneered by the KDevelop KIOSlave.

The next step would probably be to port this to KDE 4 and coordinate with the KDevelop developers to either integrate this back into KDevelop or (my preference) get this into kdesdk since this is useful for many more developers than just KDevelop users. Also the generated HTML looks very similar to perl.org’s perldoc resources, I need to get it looking more like the kde.org website family (CSS help appreciated :)

You can grab it from my dumping ground. Although it is for KDE 3, you still need CMake to build it, as there’s no way I’m wasting bandwidth on autotools. :)

Posted by mpyne under KDE & Programming & Useful Tricks | 5 Comments »

kdesvn-build speed improvements (and some KMail)

October 31st 2007

I’ve started on work to implement a feature requested in bug 109619. Namely, to allow kdesvn-build to start the build process as soon as the first module has been updated from subversion and then to run the two updates in parallel as much as possible.

It’s harder to do than it sounds at first but I think I have something working. If you try it out (latest kdesvn-build from trunk/KDE/kdesdk/scripts) and it’s broken for you please let me know.

Also some KMail/Kontact tips for you: I don’t know why but I was under the impression that the “Mark Thread As->” feature required you to click on the root email of the thread in question. That’s not the case, any message in the thread will cause the whole thread to have the desired attribute applied. Also, if you ever get messages in your inbox that simply refuse to go away then you may have a bad message folder cache. At least for Maildir type accounts. In that case, shut down Kontact and KMail (including from the system tray), go to your Maildir folder (mine was ~/Mail) and look for hidden files of the type .folderName.index* (I had .inbox.index, .inbox.index.ids, and .inbox.index.sorted in mine).

RENAME these files to something else (I moved them to a backup directory), and then restart Kontact. It may take a couple of seconds to rescan your folder (although it was near instantaneous on my system) and then you should have your folder corrected with all the undeletable messages gone.

Posted by mpyne under KDE & Useful Tricks & kdesvn-build | 3 Comments »

Back again (with a book review too)

October 23rd 2007

Back from my last patrol. Now I’m close to being fully qualified. That will be nice to finally achieve.

I had been contacted by a representative of Packt Publishing before I left, who had read my article dealing with some QMail administration issues. They had a new book out, QMail Quickstarter by Kyle Wheeler and were wanting to know if I could review it.

I agreed to do so, with the proviso that it was unlikely they’d be able to get the book to me in time. I was right. :-). However I’ve taken some time to read it and think I can get a decent, if belated, review. Note: The review copy of the book was provided to me free of charge, for those who are concerned about that sort of thing.

The book is a relatively short affair, which bills itself as an easy to follow guide that can get you up and running quickly using QMail. It is certainly true as far as this is concerned. Even with the standard material at the beginning describing the book layout, what QMail is, blah blah blah you can be issuing commands to start the installation by about page 6 or so. After you have QMail installed the author describes how to configure QMail, and goes more in depth on the actual operation of QMail. He also demonstrates his knowledge of the resources available to the QMail community with his sampling of commonly-encountered problems (and solutions) and his descriptions of available patches for QMail. This includes patches to QMail to allow for better filtering when receiving messages over SMTP, patches to provide SPF and DomainKeys support, and recipient validation patches to help prevent “joe-jobs“.

There are, of course, several areas where the book comes up short:

  • The installation and configuration steps are well done overall with a procedure to follow that will lead you to a configured and working qmail installation. However, although several tricky points of concern are addressed (including build fixes for glibc > 2.3.1 and the well-known qmail prohibition on delivering to root), there’s not a lot of detail on what to do if something goes wrong. This is a minor point given that it’s a quickstarter guide and some knowledge of UNIX and Google use needs to be assumed implicitly.
  • Also, no mention is made of using distribution-provided packages. My QMail is the distribution provided one and the book works fine against it. However many distributions will apply patches to the QMail installation and it may be useful for the reader to know if they can use the distribution QMail and if so, to warn them that it may be already patched.
  • Speaking of patches, although they are often referenced, and the author does a very good job of explaining why they are (and are not) useful, he doesn’t go into a ton of detail on how to actually use them. If you follow the directions from the beginning you’ll likely have to recompile QMail at least one time as you’ll have it installed and mostly working before you realize that you want to install a patch.
  • And finally, just as an overall point the author is kind of hit and miss on providing procedures to do some of the neat things he references from about the middle of the book on. For example, he gives instructions on how to authenticate POP3 communications using checkpassword. The very next section describes webmail without so much as an appropriate program to look at. Likewise for DomainKeys (which have examples detailing how to use them) and SPF (which is described, including its weaknesses but without implementation help).

The book however has a lot to recommend it:

  • If you are someone who learns better from diagrams then you will like this book. It includes diagrams on the email flow of a qmail installation, including which portions are root, which portions share the same protection, etc. This diagram in particular makes the entire system much easier to understand, and makes it easy to pick out where to add filter programs (i.e. for virus scanning, user validation) or what you’d need to change/patch to add support for new features.
  • The included diagram/flowchart on virtual domains is also very useful although I don’t use virtual domains.
  • The book is filled with little tips, gotchas, and other notable things that you may miss if you’re not paying attention on your initial read-through (for instance, what happens to mail being delivered to an address with an empty alias file, or the headers qmail-inject uses to guess recipients and senders). I almost had wished they were more obvious but the book is a short read without much fluff so you owe it to yourself to just read through it.
  • The book covers the stuff that needs covered, like config file syntax, command syntax, how to use tcpserver and svscan for those going the whole DJB way, etc. Although the author may not spell out the most useful situations he covers enough between the examples and diagrams that it shouldn’t be hard to add that one feature you want (especially if you already have the program and you just need to place to plug it in).
  • He covers enough material in the book to at least glance on such topics as: .qmail/.forward files, aliases and defined users, QMTP, virtual domains, vpopmail, IMAP, Spam and virus filtering, encryption, mailing lists, logging, log analysis, and optimization techniques.

The final verdict? It depends on what you need. It is $25, which although cheap for a computer book is probably slightly more expensive than its size would have you believe. However if you are new to QMail then you should get this book as you will save enough time overall to be worth the $25. If you are already familiar with QMail and have a working installation then the book could be useful as a reference but you’ll probably be OK with Google and the man pages you already have.


Also of note: kdesvn-build has been updated to version 1.5. If you haven’t already removed kdeaddons from your .kdesvn-buildrc you probably should as it’s gone from SVN. Likewise with kdenonbeta (1.5 has fixed unsermake support to deal with the new layout). Other than that there’s not a lot of major new stuff in the latest release.

Posted by mpyne under Book Review & KDE & kdesvn-build | 1 Comment »

JuK love

June 26th 2007

As a parting gift to the KDE 3.5 series, I’ve gone and finally fixed a few annoying bugs in JuK. This includes bug 116181, which prevented the internet image search feature from working for most people (and then prevented it from working for everyone), bug 126032, which caused the last item in the Play Queue to play twice before shifting back to normal playback, and bug 131238, which resulted in right-clicks in the History playlist showing the wrong column names.

Of course, all of these fixes have been forward-ported to KDE 4. The KDE 4 version of JuK also includes a few minor touchups to the internet image search dialog. I’d like to thank the coders at Yahoo for providing a very easy to use interface to their image search API. Amazon also provides a nice image search API (which is specialized for cover art no less) but the terms of use were not really what Scott and I were willing to add.

Posted by mpyne under KDE & Programming | 2 Comments »

kdesvn-build 1.4

May 3rd 2007

I’ve released kdesvn-build 1.4 just now. It includes a couple of minor bugfixes, the default options and modules have been revised, and now kdesvn-build supports using the KDE FTP Subversion nightly snapshots when checking out trunk KDE modules. (Thanks to dirk for fixing the FTP mirror script to support kdesvn-build).

In other news I’m back from riding with a different boat to augment my qualifications since I was let off of my last patrol early due to my son being born premature. I ended up going back to work basically as soon as I got back so I’m still catching up on my TODO list (both work and home) but things are progressing.

But anyways, it’s 2 hours past my bedtime so I’m off. :)

Posted by mpyne under KDE & Navy & kdesvn-build | No Comments »

It’s a good thing I exist

January 31st 2007

Because I wanted to install clee’s updated SPC player plugin for gstreamer, I went and created a couple of ebuilds for Gentoo Linux.

The overlay for Portage is here, and includes two ebuilds, one for the required libopenspc library, and another for gst-spc. Note that if you install libopenspc, then the gst-plugins-bad-0.10.4 package also contains the gst-spc plugin. I didn’t feel like installing all the broken plugins just for spc which is why I split it out into a separate ebuild (you also save all the download time ;-).

In theory libopenspc and gst-spc should work on non-x86 platforms, unlike the last version of gst-spc that clee and I developed. It works just fine so far in AMD64 and I can’t see any reason why PPC would be different (except for endianness ;) so feel free to try it out.

Looking for good SPC music? I recommend Zophar’s Domain or SNES Music. The soundtracks for any of the Final Fantasy games are good, along with Donkey Kong Country (IMHO).

At some point I need to finish my taglib bindings for SPC support so I can work on making SPCs play in JuK. :-)

Posted by mpyne under Programming | No Comments »

I’m back

January 22nd 2007

So I’m finally back from my first patrol. The patrol itself went pretty well, we did a successful test launch and I learned a crap load about the engineering systems (but I still have oh so much to learn). There have been quite a few changes in things while I was gone as well.

Continue Reading »

Posted by mpyne under KDE & Personal & Pictures & Programming | 3 Comments »

Next »