kuarepoti-dju - the josef multilingual blogosphere


Text-based presentations: Peek at Pyntor

Categories: — josef @ 19:17

Alex asked for text-based presentation software. One decision to take is whether to use text mode only for the creation (e.g. LaTeX presentation classes such as Beamer or Prosper) or for the presentation itself. There’s TPP, the Text Presentation Program, written in Ruby which works fine.

A good choice in between is Pyntor, which is AFAICT the only fully modular presentation program on this planet. And of course it supports TPP slides, but also gives you the full power of Python for any graphical effects. A number of modules, e.g. for displaying SVG, are already included.

Disclaimer: I’m slightly biased towards Pyntor because I wrote it :) It’s not actively maintained at the moment but I’ll glady accept wishlist items.



Categories: — josef @ 23:37

My slides for the FOSDEM Lightning talks were just sent in, nothing can go wrong, except that I’m the last speaker on Sunday and could be trapped into drinking Belgian beer while missing my flight back to Berlin. The devroom slides are also mostly finished.

Now I just need to find the magic KDE boothbox, for it needs to be sent to CLT («Innovation thanks to Freedom»).

Finally, on to creating more slides for my lectures. «The internet as a device» will raise enough questions to close the link to the FOSDEM research room, and will hopefully appeal more to my students than other people’s approaches.


Weekend hacking report

Categories: — josef @ 21:04

After buying a new jacket and several other real-life errands on Saturday, I’ve spent most of the weekend hacking like I haven’t been able for a long time anymore. Not joining IRC or reading too many news proved very valuable for the desired level of productivity. Reaching #11 on CIA today, commit 9700 went into GGZ SVN. The next snapshot (0.99.2) is scheduled to happen live at FOSDEM, and one week before we’ll finally wrap up the changes on the stable branch to release
Most of the recent work in trunk went into the libraries for game developers using C, Python and Ruby. They’re all in a good shape now, and C++ will follow soon. Two side products were created: First, a Python module pyancillary to transmit sockets over other sockets, still not supported by Python out of the box. And second, a new tool ggz-faketable to launch GGZ-enabled game servers and clients from a single tool, allowing central debugging and behaviour analysis of the components without interference of networking issues and without the complexity that running ggzd and client-side game launchers usually involve. And then there was even enough time on Sunday to refresh my pitifully small knowledge of Türkçe, although in light of the trip to Belgium concentrating on Français and Vlaams would be more useful…


Semantically enriched confusion

Categories: — josef @ 20:18

KDE, with its 500 employees, gained 10.9 million dollars in revenue in 2007. However, the future looks tough with Linux (from Seattle) starting to enter the market as a competitor.

Sounds weird, huh? Such content will likely increase on the web if people who think they get semantic relationships (while in reality they don’t) want to create some fortune with little effort. The example in question comes from Zoominfo. However, this is by no means the only site relying on automatic data extraction to build up relationship graphs.
On Pipl, a people search site, the kdelibs relations show some guy named Kio Kio as being our most important contributor. This ‘name’ sounds surreal enough to warrant a combination of those sites with nonsense paper generators to see if the acceptance rate at dubious conferences could be increased.


Upcoming events - help representing KDE to the locals

Categories: — josef @ 20:36

Missed the KDE 4 release event? No problem, help us preparing some cool stuff for the following events:

FOSDEM, Bruxelles, Belgium, February 23-24.

10th CLT, Chemnitz, Saxony, March 1-2.
(Es werden noch Helfer gesucht, bitte via kde-events oder bei mir melden.)

KDE @ fisl 9.0, Porto Alegre, Brasil, April 17-19.
(Voy a viajar en las regiones de Montevideo y Buenos Aires después el evento. Un encuentro con proponentes del software libre sería deseado.)

Everyone else… help sorting out the current events.kde.org/spread.kde.org lull.


En busca del tesoro andaluz

Categories: — josef @ 09:02

Those who remember aKademy 2005 in Málaga might want to pay another (virtual) visit to the area. The game Nimuh is probably aimed at the younger generation although I really enjoy playing it. Nevertheless I only made it to the level of Sevilla, having conquered Huelva and then deciding that the remaining free time of today must be invested into preparing slides for my upcoming lectures.
While its free CC licence will cause some debate, as it prevents commercial distributors from shipping it, I think it is both nice and important to see free high-quality games with a certain locality aspect, since it puts the community in advantage to major publishers regarding scalability and authenticity. The development of Nimuh is supported by the regional government of Andalucía, and I wish others will follow suit.


Roadmap for multiplayer in KDE 4.1

Categories: — josef @ 21:01

This is an update to the previous roadmap for KDE 4.0. What we have achieved already is game client support, including player statistics, per-room rankings, chat and all the low-level networking transports for quantised and raw packets.

In KDE 4.1, we’re going to provide game server developer with kggzdmod, which mirrors the API of kggzmod to keep the learning curve at an acceptable level. With kggzmod, it will be very easy to manage players, spectators, bots of varying levels, abandoned seats, player and team scoring, savegames and (soon enough) game continuations.

In addition, kggzcore will replace the venerable ggzcore++ library for writing core clients. The old core client (game client launcher) KGGZ, which was first written when KDE 2.0 was close to beta release, will be replaced, too. The name KGGZ already serves nicely as a generic term for all GGZ components in kdegames, hence a new name is sought for the core client. I just checked in the first sources. As opposed to ggzcore++, no more artifacts of the underlying C library will be visible. However, it will still be present, so kdegames will get a new optional dependency. If people volunteer, then we can substitute this part as well, which is mostly state keeping and XML parsing and tons of other minor tasks.

KSquares recently received the initial commit for multiplayer support, although some bits are still lacking.

The GGZ snapshot 0.99.1 will be released soon. For the next snapshot after it, GGZ support shall be complete for all 4 programming languages: C, C++, Python and Ruby.

We’re also still looking for any hero who wants to host a server for us which is currently sitting around idle, searching for a power plug and a network cable. Please contact me if your rack is not full already and you want to become a big name for the free desktop gaming community.


The wicked world of wireless woes

Categories: — josef @ 11:24

I want to operate my new notebook in master mode. With my old notebook, the MadWifi driver supported this for the Atheros-based internal adapter on its own. With my new notebook, I have several choices, none of which seem to be particularly supported:

  • The internal Intel-based adapter runs with iwl4965 which doesn’t support master mode. In such cases, one can use the HostAP daemon which among other chipsets supports the generic mac80211 layer (named devicescape) on top of which the iwl4965 is built. Unfortunately, the Debian package ships hostapd with devicescape disabled, and trying to build it on my own also failed due to incompatibilities with a new kernel (2.6.22).
  • The external Prism2-based adapter works with Linux-WLAN-ng, which doesn’t support WPA but otherwise works well. Unfortunately, the linux-wlan-ng driver isn’t supported by hostapd. There’s also the hostap driver (without the -d) which supports Prism2 chips, is naturally supported by hostapd and even became part of the kernel sources recently, EXCEPT that it doesn’t support USB-connected Prism2 devices, and mine is one of those.
  • The external Ralink-based adapter is not supported with its native driver (rt61). The new driver version (rx200) is based on mac80211 and will likely lead to the same issues that the iwl4965 has.

Oh well. Of course WLAN adapters are cheap nowadays, but I still would like to see the existing hardware supported :-)


Switch to new GGZ project server

Categories: — josef @ 20:20

At hq.ggzgamingzone.org the GGZ project has found a new home. Since the server is located in Germany, the old one has been renamed to us.ggzgamingzone.org and will remain available for the time being to the developers and for various other projects.

The installation took quite some time. Instead of just moving over the old files, most if not all was installed from scratch. New software such as greylistd, integrit, buildbot, lurker and awstats was also added (although we once had awstats already).

There doesn’t seem to be a way around greylisting. This is what happened within the first hour after the installation:

  2 items, matching   4 requests, are currently whitelisted
  0 items, matching   0 requests, are currently blacklisted
108 items, matching 112 requests, are currently greylisted

I suppose there will be some more work to do on the server in the following days. Afterwards, we should increase our efforts to find a dedicated game server where we can run the software for us and on behalf of other game projects. Sponsors welcome, but be aware of the minimum requirements :)


Linux on Lifebook

Categories: — josef @ 21:55

Due to some interest, my random blog posts about the issues of running free software on a FSC Lifebook E series notebook (the model E8410 specifically) were translated, updated and consolidated on a new URL:
Linux on Lifebook.

It’s probably amazingly stubborn for me to waste my time with hardware issues. But if it saves other people many hours of configuration work and sends some signals to FSC that we’re still waiting for some specs, then it was worth the effort. With the release of Linux 2.6.24 within the next hours, two of the issues will already be solved, but many more remain :(

I also helped configuring a friend’s old notebook today, and surprisingly the first configuration report site we found was written by Lennart. The world is small.


Eye-candy and mobility: how to beat e17 and blackbox

Categories: — josef @ 13:38

I’m running e17 occasionally (complete with the entrance login manager) and there’s nothing bad about it from a visual point of view, in fact it is quite attractive and makes many non-Linux users take a look at the screen. I also run blackbox sometimes in hacking mode to eliminate any source of distraction. Blackbox cannot participate in GUI comparisons (it doesn’t really have any), however it is more suitable for the mobile area. Why? If you run dstat(1), you’ll see that after some time (when all caches have been flushed), there’s no disk activity anymore, the disk can spin down and the computer becomes idle. With enlightenment, something constantly wants to write on disk. The culprit is indeed the ‘enlightenment’ binary, although I haven’t yet had the time and urge to look why this is the case. Using strace(1) one can at least see that write() and mmap() are called constantly, and each second open() is called on both the theme directory (wtf?) and the ACPI governor settings.

Now here’s how to beat both e17 and blackbox: Create a visually appealing desktop which doesn’t ever touch the disk unless I tell it to do so. Do not wake up the CPU unneedlessly. Save my battery. Test this out with the current KDE 4 release and all of its applications. Check your QTimers and whatever elese might trigger such events. The KDE 3 default desktop is good at it, although not perfect, so there are still some areas for improvement.


Trying to stay focused

Categories: — josef @ 15:23

My stack of tasks grew higher than what I could still manage. A reduction of work was required in some areas so that enough energy would stay available for others. Thankfully, Jeremy has agreed to be the new maintainer for KNewStuff2. There is a lot of potential in collaborative data sharing, but only if the work towards this goal is also shared.

Likewise, I unsubscribed from 36 mailing lists (while keeping about 30) to not be distracted too much. About a third of them are KDE lists, including kde-c-d and most others except for games, services and research. The remainder includes many university-related lists, partially old cruft, and other projects in general, such as Brazilian softwarelivre.org lists and some freedesktop.org-related ones. Highly interesting, but nevertheless too much for my daily schedule were especially the following ones which I originally joined only for small bits but then stayed for longer since I found them inspiring:

  • Mozilla dev-tech-xforms (where I just wanted to present auto-generated XForms from XML Schema)
  • GNU libc-alpha (where I just wanted to report on a bug in gai)
  • GNOME’s desktop-devel-list (where I just joined to discuss making GGZ a dependency for gnome-games)
  • Python’s i18n-sig (where I just wanted to find out about the undocumented python -X option for full Unicode)
  • OpenSUSE’s opensuse-buildservice (where I just wanted to get a package built some time ago)

On the upside, you can now expect a lower latency from me on the other lists :-)


Online gaming: Looking for ingredients and cooks

Categories: — josef @ 01:20

It’s time again to look back at what has been achieved already in terms of integrating online gaming into the desktop and where to go from now.

KDE 4.0 will be ready soon. It only ships with 2 GGZ-enabled games instead of the 3 that were planned, however patches exist for at least one more so my gut feeling would be that there’ll be about 4 or 5 of them in KDE 4.1. The oddly named KGGZ page has been updated to reflect this development.
GNOME 2.22 will already have 4 games, one more than in 2.20. GGZ was recently made a required dependency for the upcoming release. This shall ensure that no gnome-games without online gaming support appear in the wild due to incomplete distro packages. Yay!

Some days ago, the rather old idea to couple GGZ-based online gaming with Jabber came up once again. This time I somehow felt a need to evaluate the idea with more attention.
The foremost question of putting ggzd on top of a Jabber server or the other way around has been solved quickly. It makes indeed more sense to rely on the existing installation base and developer pace of the Jabber community and add GGZ functionality as a plugin to the extent possible.
While light-weight Kopete and Pidgin integration already exist for GGZ, it only works for two-player games and is badly maintained. The only real advantage of the light-weight approach is that it can be adapted quickly to any IM client. Now, the planned heavy-weight approach, which will likely result in another XEP, requires many modifications to the IM clients. It sounds like a good idea to offload all that to, say, the Kopete guys, but then this backfires fast as someone will have to do the servers-side integration work. Anyway, that’s the route taking us to the next level.

Among the Jabber servers, only jabberd2, jabberd(14) and ejabberd seem to be wide-spread and under active development. Having played around with jabberd14 a bit, it seems like a good base ingredient, especially its injection system for communication with external applications. But more ingredients are needed. For example, jabberd14 doesn’t offer group chat (XEP 045) - and of course GGZ rooms need to be mapped to chat rooms, so the mu-conference extension comes to mind.
Furthermore, user roles and privileges must be mapped to JIDs. I haven’t yet found a good solution, and many of the XEPs that look promising have severe shortcomings. The most obvious one being XEP 196 (user gaming), which is way too limited for generic game types.
More issue such as jabberd14’s inability to handle anonymous logins exist and in many such cases the clients are equally at fault. A mail about the findings has been sent to ggz-dev recently and will likely get updated soon after further experimentation. People knowledgeable in Jabber hacking and/or specs are invited to contribute to the upcoming online gaming XEP and its proof-of-concept implementation. If none of the mentioned ingredients scares you, you’ll likely be a good cook!


Rebooting made in Germany

Categories: — josef @ 22:50

For whatever reason, German transportation companies refuse to use reliable systems for their passenger information screens. Resilience against bumpy roads is probably hard to achieve, but based on discussions I had with some of them and especially live experience, one can conclude that most of the outages and reboots are due to crappy software.

The images below are just moments where such systems came across my way in summer and autumn 2007 in Berlin, Frankfurt and Saxon Switzerland. Please folks, upgrade now!


The desperate need for a Freedom Grid system

Categories: — josef @ 16:35

There are many concurrent ongoing dangers in the world of Free Software. Among them, you will finde software patents, hidden restrictions in obnoxious licences and trademark lawsuits which seem to be absolutely unavoidable unless one has deep pockets filled with money for defence. Recently, expensive interoperability clauses have been added to the mix. Formerly, protection against such issues was achieved by adding condemnations to existing licences. With the GPLv3, such protection comes built-in. (This change is still argued about, but it’s certainly a good idea to not having to draft up the clauses on your own. The GNU project is known to be political in many ways, and in most cases that’s a good thing.)

However, there is more to it, and probably I haven’t been explicit enough in the past. In order to provide a posting for future reference, I want to elaborate on the danger of service lock-in.

In the old days, vendor lock-in was on the radar of free software developers. Many systems based on Linux and BSD are used to host internet applications, so many that in fact the server side was considered safe and forces gathered to conquer the desktop. The real push towards a free desktop began 10 years ago - with KDE and GNOME being founded, bringing many powerful applications to the average users. But that’s still 10 years ago - and times have changed.

Today, many user use a free desktop to check their GMail, then tune in to some Shoutcast beats, and finally think of doing their daily backup by uploading some files to Amazon S3. At the end of the day, they did use some free client applications - but likewise they did leave precious data at proprietary service providers. When freedom and privacy are equally challenged, people should shout loudly and stop using those services. But instead, they spend their time developing more interfaces for them.

Alternatives do exist. The necessary software to build scalable internet applications is being created by many projects. But that’s not enough. The community should come together and also provide services based on the software - a single individual cannot run a data centre, but combined, it is well possible to provide a huge grid, run in a non-commercial fashion, with thousands of terabytes of storage capacity, and a processing power which is already familiar to those who read about or participated in dnet-style applications. It would be a Freedom grid, running entirely free software so that it could (modulo its power) be replicated anywhere.

Now, whom do you trust more - some geeks running such software or some big corporations with a smiling web 2.0 face? The trust issue could certainly be solved, and in the end, both freedom and privacy could be preserved.

There are currently several initiatives to join if you agree with what has been proposed, or if you at least understand the background issues. First of all, the KDE project runs a service development list. Second, the German research programme Theseus is calling for participants from outside the project consortium, which naturally calls for some FLOSS participation to make such results available to the general public instead of just to a small set of privileged companies. Third, make other people aware of this issue, and don’t use non-free services by yourself.

Note: I know I don’t serve as a good example here by linking to sites such as freshmeat which do not provide access to their source code, let alone their database (the XML-RPC interface only covers a fraction of the overall site functionality). I hope that something can be done about that in the future. The FSF/UNESCO directory is not a full replacement as
the maintenance of its contents is more cathedral-style as it ought to be.


Design mistake in udev - and more horrible Kubuntu upgrade stories

Categories: — josef @ 14:10

Today I upgraded from 7.04 to 7.10, which was reported to be a smooth upgrade by many people. I cannot complain about the upgrade process itself, as there were no evil package dependency issues like they happened when going 6.06 -> 7.04.

However, there are a couple of issues. First of all, the udev rules include a file 85-evms.rules. Took me a while to find that beast - it’s been responsible for constantly querying my CD-ROM drive, causing a loud clickery every 2 seconds, and certainly reducing its MTBF. My first idea was to run /etc/init.d/udev stop. Ha - udev manages pseudo-devices (PTY) as well, and so I was left in a limbo, unable to open any konsole/xterm kind of application. Great for debugging especially since SSH wasn’t running yet, so this upgrade forced me into a reboot. Welcome to the 80s! Removing this file and restarting udev helped. Those who use EVMS are getting punished still I assume.

Second, but that’s really more a KDM issue, it wouldn’t let me log in because the PAM plugin missed a symbol. The new KDM was already installed, but the old one turned up when logging out of the X11 session. This could be done better, conceptually.

Another issue is that amixer is shutdown with the wrong parameters on halt.

A debian bug report recently was closed without giving a solution to the problem of not being able to access the scanner directly after installing the sane family of packages. Just to mention that the rantfest could go on with other distros as well. Having a bit of a headache, I won’t therefore file bug reports against Kubuntu right now.


My new job @ Turkish secret service

Categories: — josef @ 21:32

To many people I seem to have disappeared recently. However, I had just changed my location to İstanbul to assume my new role of being a special agent for the Turkish secret service. This exciting new job was kept secret even from myself, until I learned about it on the Mısır Çarşısı, the Egyptian Bazaar, while trying to buy some Lokum-like sweets, as the following dialogue tries to reconstruct (with the vendor phrases translated into English to keep it simple):

  • Me: Merhaba.
  • Vendor: Hey Sir, what can I do for you.
  • Me: Yüz gram of… pointing to the unknown sweets
  • Vendor: Ah, Türkçe… where are you from?
  • Me: Doğu Almanyalıyım.
  • Vendor: So you learnt Turkish there?
  • Me: Hayır, öğrendim burada İstanbul’da.
  • Vendor: Hm, how long have you been here?
  • Me: Bir hafta.

At this point, the vendor stops packaging up the sweets, sits down and looks at me.

  • Vendor: There’s something fishy here. You’re from the police… or from the secret service!

Later I figured that I must be a very lousy special agent because I was uncovered. Nevertheless, the sweets were really good ones.


Semantically enriched language learning

Categories: — josef @ 17:32

Here am I, sitting in my room trying to learn Turkish, as my policy is to always learn the language of a country that is to be conquered by me. Depending on the time I have available before the travel, this turns out to be a good strategy sometimes (I write mails in Portuñol on a regular basis) and is rather unsuccessful at other times (my Dutch turned out to be insufficient for even basic communication recently). The material I have for this new task now is a somewhat suitable travel language guide that I bought for a bit less than four euros a while back, and several websites. Thanks to lykien.com for their GFDL’d course btw.

However, I’m not happy with the resources available. While a guided course is nice, I often need to know (especially when translating texts) what stem word a certain word is derived from. Even more so for the agglutinating languages like Turkish. Even the more expensive language guides are often no help in this regard. I start to think that geeks simply learn languages differently. The tools should not get in their way of learning with different speeds or into different directions.

The image above shows some very basic semantic relations between some Turkish words and their German translations. This image is incomplete; with the five words alone, dozens of derivatives and related words as well as phrases could be linked. Furthermore, the exact rules used for forming such words could be linked as well. Is it the small vowel harmony that is being used here? What is the stem word and the tempus? Is it an irregular case? (Fortunately, this latter question would be rare with Turkish texts.)

My wish is to see such learning support tools implemented for the desktop. Vocabulary trainers already exist in KDE-Edu for example, but they’re very basic. With the advent of semantic format support in kdelibs, it should be feasible to create even advanced tools such as phrase decompositions and explanations based on a set of words and some rules attached to them.
Users could easily add all of the content, maybe even using the Semantic MediaWiki software which wouldn’t even require them to adopt to new methods of authoring.

Now, back to conventional-style learning :/


Triple Play comes to your desktop

Categories: — josef @ 22:57

Apparently, Andrea’s talks on Ruby game development are well-received. She’s going to present more cool talks at Ruby East at the end of the month and at RubyConf at the beginning of November.

Given that the talks are going to feature multiplayer tech development, I feel obligated to gear up a bit and provide full Ruby bindings for GGZ client and server development.
While the RubyToe server has already been featured in the previous talk, I came up with a proof-of-concept client for it using just Qt4 in addition to the new bindings. As outlined in an article on auto-generated network protocols, the amount of coding necessary can be reduced drastically when all of this comes together.
According to our QtRuby mæstro Richard Dale, there was a small skew in the Qt4 bindings which has since been fixed in SVN. The implication is that only QtGui is used right now while for the networking part the standard Ruby socket extension comes into play. A big issue with this class is that once it is set up on a file descriptor, the ioctl(…, FIONREAD, …) to check the number of incoming bytes doesn’t work anymore. Thankfully, it was possible to work around this in a rather elegant way.

The ggz-ruby playground contains all the sources, including the low-level (wrapped) GGZMod and the slightly higher-level (and pure ruby) RGGZMod classes.
To learn about the next steps and see some cool screenshots, attend the conferences listed above. Granted, there are still some weeks down the road… what about joining the effort to make it a pleasant wait? :)


Viva Brasil! ODF para todos!

Categories: — josef @ 09:01

As a member of FFII I’m proud to announce that Brasil has defeated Germany 1x0 in the fight against a useless, proprietary, redundant and underspecified office format. Some detail can be found on noooxml.org, more in-depth reports (in Portuguese) at softwarelivre.org.

As a German I’m disgusted how the German Institute for Standardisation handled the fast-tracking on their side. As a matter of fact, I’ve submitted my proposal for Open DIN A4X, a similarly underspecified paper format which deviates slightly from DIN A4 and requires some knowledge of legacy paper handling. Up until now, DIN was unable to provide me with a price tag I’d have to pay to push it through, they didn’t even reply to me. I urge all Germans to come up with other innovative paper formats and submit them to DIN while they have their “summer of 2007 special offer” for fast-tracking such world class ideas.


Ruby Hoedown event

Categories: — josef @ 07:04

If you live in or near North Carolina, or if you are rubyist enough to afford a flight to that area, don’t miss the Ruby Hoedown event at the coming weekend which takes place at the RedHat HQ in Raleigh.
Among other great talks about programming in Ruby, Andrea O.K. Wright is going to present slides about game development in Ruby, which includes a section on GGZ technology for online gaming.
Yup - that’s the same technology which is being used in the dominant free desktops and several other games. If you want to know why Ruby powers GGZ, sign up.


Joining desktop and web forces

Categories: — josef @ 14:14

Usually I refrain from bragging about technologies which are still under heavy development. However, since our barefoot friends seem to have a somewhat different position on the integration of online services into the desktop than I have, I’d like to invite fellow developers to see what our common position looks like.

A brand-new mailing list named kde-services-devel has just now been made available for those who feel that just having a desktop with a few widgets and icons is not enough.

As examples of integration technologies under development, you’ll find the IPC-WS bridge in the webtech folder in playground-libs. Now D-Bus and SOAP are not exactly the best representatives of IPC and RPC protocols, respectively, but they provide good tooling and developer support, so they were selected to serve as an example for this approach.

The OpenDesktopID project in the same folder is an attempt to leverage OpenID for the desktop. This means that any application which can access KIO’s cookie jar will be able to be part of the authentication scheme which gets more and more use among web applications. Again, using OpenID for the implementation is a rather pragmatic choice, as there are other contenders.

A lot more web technologies and services were already developed in the past and are in use every day. Their further development and integration can and should as well be discussed at this list.


Hack status

Categories: — josef @ 13:54

Being someone who often only finds time for hacking when being offline somewhere, I’ve needed a simple tool to report to myself which projects I’ve been working on the day (or night) before, so I can finish the work and eventually commit. The script now came to life under the name hackstatus.

hackstatus script example

That and other scripts are maintained in a private repository (which humourously isn’t included in the list above, as only public repos are), and I’ve now put them together and uploaded them in case anyone likes them. Just click on the image. The big set of modified files above introduces internationalised strings for carrying translations for multiple languages at once around in a server application. The data structure is called ggz_intlstring and in KNewStuff2 there’s a similar one, a class named KTranslatable. I’ve often had the need for having several translations in one string, and I wonder why there are no standard classes and structures for this, and, on a related note, no standard procedure of handling this in XML (where xml:lang exists but isn’t fully used as it could be, e.g. for multi-language text). One certainly doesn’t want to reparse configuration files just because a language is changing.


The RESTful way to online gaming

Categories: — josef @ 16:39

GGZ is to games what the free desktops are to applications: an environment they run in, providing a certain set of services you can rely on, and a few default games/apps shipped by default, even though the real value is in being used by 3rd party authors.

With the GGZ player communities growing, one needs better tools to ensure that everything runs smooth. There are a lot of social issues, like sometimes nasty players joining, that simply cannot be avoided by any technical tools - rather, the community itself should be empowered to solve the issues among themselves. A lot of web sites became highly popular among developers not because of the content of their web pages, but because their infrastructure can be leveraged by developers who write 3rd party tools. The GGZ Community infrastructure is now being made available via a REST-style Web Service interface as well. The design of each resource is carefully considered to match both the internal data management and the expectations of developers from the outside. It will also help separating our community web portal from the database, if we decide to use it for this application.

To give an example, player objects can be added by anyone (POST). The public data of the players can be retrieved by anyone (GET). However, when trying to modify the object (PUT or DELETE), HTTP authentication kicks in and requires the current username and password of the player object.
Add team management, statistics and all that, and one can easily integrate game reports into webpages.

What is really unfortunate about the whole issue is that the players themselves will not understand anything of what I wrote above, and think I’m wasting my time instead of adding more flashy games. But we’re not just here for all the buzz, we’re here to provide a free environment for game development, and there’s no single gaming platform on this planet as open and accessible as ours. It’s a pity that some game developers still haven’t heard the bell ringing :-)


KNewStuff2 coming closer

Categories: — josef @ 12:02

Thanks to doxygen, the class structure below presents nicely how workflows will work in KNewStuff2. The red classes represent
the dialogs for upload and download, which are known already. The yellow classes represent the class hierarchy of the new engine,
which will transparently handle DXS if available from the provider. Right now, only the KDE-Edu repository is available via DXS
in an experimental fashion. A lot more should be during the next weeks, when we port the applications. Nevertheless, KNewStuff2
will of course work with older repositories. This is what one calls Application Wire Interface compatibility :)
Finally, the green classes represent entities which are supposed to be used by applications, mostly in a read-only fashion. Headers for
the other classes will be installed, but should not be used unless new workflows, dialogs and so on need to be implemented. The idea
of a GHNS-enabled KIO slave was raised many times, this might be such a project.

KNewStuff will (have to) be moved to kdelibs today. Things will break, help porting if you want, mostly by telling how your application
picks up the data.

Update: I forgot to mention that LWN carries a story about KNewStuff2 development.


KNewStuff2: small steps ahead

Categories: — josef @ 15:33

KNewStuff2 is probably the slowest in a series of new libraries for KDE 4. All the glamour already went to other libs, which are summarised on the KDE 4 Architecture page at techbase. I didn’t deem it appropriate to invent a new name for the rewrite, hence appending the 2 is all it takes to make a difference. Under the hood, however, most of the code is rewritten and a lot of new features are being added gradually.

As I’m a bit short of time, there are no strict deadlines other than it will have to be ready for the α release. Everything has been ported to KDE 4 and CMake already, a process which happened in parallel with the old codebase, now known as knewstuff1-kde4 (living in trunk) as opposed to knewstuff2-kde4 (living in the branch until some Monday).

There’s also some news about Hotstuff, a server-side data processing framework for GHNS. In a recent discussion with Annma, the need to manage remotely administered SVN repositories came up - such as for authors who maintain their data in KDE’s SVN to avoid dependencies on the availability of dedicated servers and still want it to show up in the dialog easily.
Those who look into Hotstuff WebSVN from time to time will be glad to know that with just a few lines of changed code (in rev #341) this functionality is now supported by Hotstuff. It already had a versioning backend for traditional uploads (e.g. through HTTP(S)) which does now handle this second way of dealing with versions. In order to put up a cool demo, I’d need the AnonSVN locations of the directories. What will need to be done is to store meta information properly alongside the files, in case this is not already done. Certain fields such as author, date and version might even be retrieved directly from SVN. One could even write a pre-commit hook which checks for syntactic validity, but the SVN-Python hooks are a PITA to work with. The real Python way would be to abstract from the SVN API and to deliver the list of changed or added files and directories as simple lists of objects. Anyone up to fixing this?


Sorting out the Java mess

Categories: — josef @ 18:15

Java can be considered the lingua franca in the area I’m working in. I’m always positively surprised when a student or two come up with ideas in other languages, but for the most part, there doesn’t seem to be a way around Java, since this is the only halfway-quality language most students can handle.

With Java becoming GPL, ideological problems should vanish. Or so one thinks. Of course, the idea is nice, and I whole-heartedly support it, but a lot of work will be needed to turn it into a reality. During this year’s upcoming FOSDEM event, OpenJDK/Sun people and Classpath people want to meet. This isn’t the first such meeting, but AFAIK the first big one since the GPL announcement which coincided with the last Ubuntu meeting which already had some Sun and Classpath (or Java-Debian, for that matter) people on board.

The issues I see are manyfold. Java has gained a lot of capabilities in terms of implementations of existing JSR specifications. Before JDK 1.6, one has needed a few additional libraries of what is now available for Java proper. Especially for Apache libraries, which are ASL 2.0-licenced for most parts, this means a GPLd Java runtime will be preferred by GPL application authors. However, the build system must still support the Apache libraries just in case the JDK is not at 1.6 yet. Furthermore, the GPLv3 seems to clear up the (already highly theoretic) incompatibility between ASL 2.0 and GPLv2.

Such additions to the Java core are not new. Already in the past, a lot of XML capabilities were added and therefore fallbacks must be available in case the JDK or at least the JRE at the deployment site is too old.

For one of my upcoming releases next Monday, I finally had to look a bit more into this and see which Sun Java and GNU Classpath implementations would fit my bill.
Interestingly, this flashed my mind on many fronts, since quite a few weird runtime errors I’ve seen can be attributed to version incompatibilities.
The outcome is that JDK 1.5 wins, while JDK 1.6 is not ripe yet and JDK 1.4 is way too old and requires too many additional libraries. Classpath 0.93 is nearly there, but I added some bug reports to their tracker.

We’re incrementally getting there. Of course, the flashy parts such as mobile phone emulators are still proprietary software, and time will tell if they will ever get opened up. They’re not available for Mac users, but they’re available for Linux, so the majority of complaints of them being non-free should interestingly enough come from the Mac crowd :)

As soon as everything is free, distros might offer Java installed by default and therefore turn into a rocking development platform for this language. However, since Java has been kind of isolated for so long, it comes with its own build infrastructure (ant, maven) and its own repository, which doesn’t really handle versioning well. Proper packaging will help in identifying compatibility issues.

It remains to be seen how third-party Java developers, especially IBM, will react to these developments. Some certainly nice IBM Java tools are still proprietary software, which makes them unsuitable for students to explore and to improve. Anyway, after nearly 2 years of working with Java software extensively, the overall opinion is that it has improved to the better, and cheers go out to those who made it happen.


More on multiplayer in KDE 4

Categories: — josef @ 15:44

A week ago I mentioned some of the multiplayer plans. I deliberately left out any mention to ggzcomm, the code generator for abstract game protocol descriptions, mostly because the parts of it which are relevant to KDE games were not really implemented yet. This has changed!

The aim of ggzcomm is to declare that the networking code is not the business of the network game developer anymore. Crafting networking code by hand is nice and all, but it often leads to errors which go undetected, often resulting in security flaws which have to be fixed again and again.
Furthermore, especially in the world of GGZ a lot of games come with several frontends. Changing the protocol requires code changes to any of them.

Enter ggzcomm. It was born about four years ago as I could not find any similar tool (and I still haven’t found any for FLOSS development specifically while there are a lot of higher-level MDA thingies around).

Currently, opcode-based messaging can be generated for C+, C++, Python and Ruby, using a variety of networking libraries. Those will be run-time dependencies whereas ggzcomm itself (which is a couple-thousands-line-of-code ruby script) is not of course.
For Python and Ruby as target languages we could of course implement some cool runtime adaptation stuff once the development is stabilising a bit.

XML-based messaging can be switched on as an option at least for C++ and Python. This is a very new feature which is useful for debugging. Of course, for production use one switches back to opcode-based messaging. XML is nice, but huh, what about the performance penalty and TCP/IP traffic overhead? Interoperability is still ensured by having a source in XML, without falling into the SOAP/XML messaging trap.

Right now ggzcomm handles sequences, loops and conditions. A must-have features are safety code injections. For example, if a loop is iterating over all players in a Chinese Checkers/Halma game, the number of loops can be constrained to be no lesser than two and no more than six.

It might not be the solution to all games, and granted, auto-generated code always looks kind of ugly since taste differs. But my wish is that where it is possible to use auto-generated networking code, we should use it.


Multiplayer in KDE 4

Categories: — josef @ 17:41

For a couple of months now the KDE Games Breeding Area has been surprisingly active again. One of the initial reasons certainly was the need to get something done for KDE 4, but then it all comes together and one idea follows the other pretty quickly. Several topics are being worked on in parallel and both regular meetings and casual talk happens on IRC (irc.freenode.net #kdegames).

While I better don’t contribute “fancy” self-drawn icons, there is something really missing from all of kdegames and this is a community-oriented gaming framework - one where you can simply chat up your friends to join you in slashing and ripping apart evil monsters (translation for kids: to roll a dice or two).
Now it happens that there was the kggzmod library dormant in GGZ SVN and I took the chance of finishing its implementation, which is for KDE 3. That being done, it not only was equipped with full API docs but also a KDE 4 port.

The example game (KConnectX) has also been ported to KDE 4. What still needs porting is the GUI framework around kggzmod, which includes a seats dialog for player management and statistics, maybe also a common chat dialog and for the future a connection dialog for individual games, for people who want to launch them from KDE’s menu instead of from GGZ core clients.

The long-term roadmap is to overhaul the ggzcore++ library as well so both the KDE core client (kggz) can be made more attractive and the games can run in the embedded ggzcore mode which allows them to have a connection dialog on their own in the first place. But this is rather targeted at KDE 4.1 I’d say, as I think I’ve got some other obligations.

More on that over the weekend…


On the road… (USA)

Categories: — josef @ 03:05

Some days ago I was invited to the FSG OpenPrinting Summit which was co-hosted with the IEEE-ISTO PWG meeting. My affiliation was mainly with my university and the topic of GUI generation from formal models. However, the KDE print dialog could serve as a target for eventual implementations. Those will take some while though - I’m not aware of any free auto-layout algorithms at the moment which would be suitable for this task.
The OpenUsability folks shared a room with me.
The PWG meeting was a bit more abstract but learning about all the specs, most of them being related to some XML-based modelling, was certainly something I appreciate.

This week is mostly spent in Mountain View, California. Being hosted at the Googleplex (note: link doesn’t really work in konqueror) is nice. It is just a few meters away from San Francisco Bay and there is a certain humour in the naming of the streets over here.

Meanwhile, the Kubuntu break-out room is running at full steam. I dared to do some PyQt4 porting of the language-selector application… let’s see how this will turn out. It’s not easy to be productive here, there are too many interesting sessions going on. In particular, some up-to-date information on free java, security updates and of couse the obligatory the local haute-cuisine.
Some packaging work is also due this week, to prepare easy-to-use installations of online gaming portals. There is close to none infrastructure available for such tasks (similar to GForge or other complex web applications), and I’m certainly awaiting some improvements here.

Beside the hack factor, what one gets out of those travels is experiencing other cultures, nice landscapes and… coins!
Coins collectors are the ones who constantly grab the change money in stores and refuse to give back any of it to the cashiers, and then, back at home, spend hours to order their collections. Whenever I’m not hacking, I’m one of them. It’s still an expensive hobby though.



Categories: — josef @ 13:47

This is a permanent entry which will be updated from time to time, similar to the activity/publications entry.
I thought it is about time to document what kind of machines I have and had. I had such an overview page some years ago but it got lost. Here we go…

The only machines in operation are Vista, Nada (still), Madrugada, Caramba and Samba.
The backup computer Noosphere2 seems to be broken but final death is not confirmed yet.

Samba is my latest work notebook, the successor of Nada. It was inaugurated in late 2007.
Specs: FSC Lifebook E8410, Intel Core 2 Duo T7500 (2*2,20 GHz), 2 GB RAM, 120 GB HDD running Debian/sid

Caramba replaces Noosphere2 as private backup computer and general-purpose PC. It was bought in pieces and assembled just like its predecessors, and is very light since no external drives are present, although for safety reasons a RAID-1 has been created. A 19′’ TFT accompanies the machine.
Specs: AMD Athlon64 X2 3800+, 1 GB RAM, 2*250 GB HDD running Debian/etch

Madrugada is a cute subnotebook, model JVC MP-XP 7210. It was bought as a used machine and although limited in its capabilities is very useful sometimes, especially on travel.
Specs: Intel Pentium III 800 MHz, 256 MB RAM, 30 GB HDD running Debian/etch

Nada is a work-sponsored hacking notebook, and as such the successor to Armada and Bizarre. I got it already as a used notebook in late 2006 and so I hope it will survive long enough.
Specs: Intel Pentium M 1700 MHz, 768 MB RAM, 60 GB HDD running Debian/sid

Vista is my main computer at work, a FSC Esprimo machine. The name was influenced by the great panorama view on the skyline of my city. I also go by josef|vista on IRC when logged on there, which is almost always as I never switch the thing off.
Vista is equipped with a nice 20′’ TFT.
Specs: AMD Athlon 64 X2 Dual-Core 3800+, 1 GB RAM, 85 GB HDD running Kubuntu 6.06 (Dapper Drake)

Armada was a notebook I’d temporarily been donated by a friend of my brother. As the name suggests, it’s a Compaq Armada M700, certainly not the fastest notebook on earth but I can do some hacking when travelling. Unfortunately I only could keep it for some weeks in autumn 2006.
Specs: Intel Pentium III 450 MHz, 256 MB RAM, 20 GB HDD running Kubuntu 6.06 (Dapper Drake).

Bizarre was my previous notebook, a new-world Apple iBook of the second series. Bought in early 2003 it lived until mid-2006.
Specs: IBM G3 PowerPC 750FX (700 MHz), 256 MB RAM, 20 GB HDD running Debian sid (mostly what later became sarge and etch) and OS X 10.2 (not really used).
Replacements: power adapter in mid-2005

Itajuba was the computer in the lab of UNIFEI where I studied in 2004.
Specs: Intel Pentium II 700 MHz(?), 128 MB RAM, 20 GB HDD (?) running my very own TUDix upgraded to Debian/unstable
Note: memories fading, will need some backed-up notes on that one

Noosphere2 started out as main private machine in mid-2002 under the name Noosphere, influenced by ESR’s hacker tales. After a drastic surgery, it changed its purpose to be my backup computer and so I decided to modify the name.
Specs: AMD Athlon XP 2000+, 512 MB RAM, 80 GB HDD running Kubuntu 5.04 (Hoary Hedgehog) and FreeBSD 5.x/6.x.
Replacements: hard disk in early 2005, CD burner addition in late 2004

Résistance has been the main machine before Noosphere. It was bought in 1999 and assembled, including the 17′’ monitor which later served Noosphere as well. Its first name was Athlon500, following the old naming scheme. After Noosphere was bought, it served as server and gateway and thus got its name.
Specs: AMD Athlon 500 (first series with Slot-A), 128 MB RAM, 13 GB HDD running Debian sid (mostly what later became woody) as well as some other OSes (OpenBSD, Hurd).
Replacements: CD burner addition somewhen in 2003

Pentium133 was my first own machine, bought in one piece with a 15′’ CRT monitor in 1996.
It was factory-equipped with MS-DOS and Windows but was switched over to Linux in 1999.
A lot of DOS-based development was perfomed on this machine.
Specs: Intel Pentium 133 MHz, 16 MB RAM, 1 GB HDD running MS-DOS 5.22/Windows 3.11, SuSE Linux 6.1 and Mandrake 7.x.
Replacements: CD-ROM drive addition and exchange in 1998

Schorsch had the honour to be the first computer I’ve ever extensively worked with, an Olivetti machine bought in late 1992. It was actually only named so in retrofit around late 1997.
Specs: Intel i286, 1 MB RAM, 120 MB HDD running MS-DOS 5.0/GeoWorks.
Replacements: The 14′’ colour monitor failed around 1998 and a monochrome one had to be put into place

Other devices not really usable as a generic computer:

Zaurus is a Sharp Zaurus SL-5500 donated in 2002 by Sharp. It was used to do some embedded GUI hacking.
Specs: (Intel) StrongARM 200 MHz, 96 MB RAM/ROM, 32 MB of which are used as RAM, running some embedded Linux.


Like a new life

Categories: — josef @ 19:18

Not being a student anymore, I enjoy the continuous work in the field of research I’ve already been involved with for several months, while still maintaining a big chunk of free time to care about my projects.

First of all, attending aKademy 2006 broke my iBook, a long-time companion of mine and practically the only machine I had. (Interestingly, aKademy 2005 broke its power supply already - a curse?)
Apart from that, it was an overall nice conference. I had two BoFs, one about games and one about web services. In addition, I attended the one about edutainment since it usually shares a high number of issues with game development, and spreading software libre/livre into education is a very important process in my view.

Dublin was followed by London with a small personal GGZ developer meeting. The 3 attendants celebrated the largest project meeting ever :)

London was followed by Dresden which hosted the national Week of Computer Science. We warmed up with a nightly geek culture presentation event and then proceeded to the yearly climax in local free software advocacy, the Linux-Info-Tag event with maybe 500-600 visitors. Thanks to frinring for the detailed reports.

We had an excellent week in collaboration with the Wikipedians who held their 2nd Wikipedia-Tag in our city. What really amazed me is that they managed to bring Wikipedia to the people on the street by providing it free of connection cost at public internet terminals together with our local public transport holding.

The already fully-packed event week was finished with the matrix-like opening ceremony for our new faculty of computer science. My office there provides a great view over the skyline of our city, which led me to name my new computer vista. This is why I go by this nick on IRC now and everyone who associates this with a certain kind of vapourware is pretty much uninformed about which desktop I really use.

I’m now looking forward to some interesting research work, particularly the visit of the FSG OpenPrinting Summit where I hope to contribute some of my work on dynamic user interfaces.


Video: Web services on your desktop

Categories: — josef @ 14:10

Kung, the dynamic web service invocation tool which resides in KDE PIM, recently gained usefulness due to the support of WSGUI concepts, and therefore the ability to generate user-friendly GUIs. The main work was done on an editor for the creation of XML files for these hints, and the editor was named Kejsare, of course.
Using xvidcap, I managed to create a desktop video of the editor in use. It is meant to be played at 7 FPS, due to my computer being too slow for real-time recording.

The source is also available of course, but it’s a rugged tarball not really meant for consumption by compilation-addicted users.

More topics in this research area between web services and GUI generation will be discussed at an appropriate aKademy BoF on September 27th.


KDE 4 ad-hack meeting

Categories: — josef @ 10:42

Frinring invited tokoe and me for a spontaneous hacking day. We spent a whole day in his kitchen and tried to move forward with a few outstanding issues in KDE 4 development.

Frinring’s day started with a whole lot of CMake troubles. He then used the time to introduce us to some plans for the future of the Contacts applet. Note that the one on appsy is a bit outdated, check out the new sources from playground.

Some usage of the Akonadi service was then discussed with tokoe. This was really about a lot of PIM stuff I have no clue about but there’s an interesting graphics which was sent to kde-pim, explaining how QFileWatcher will make your desktop a bit more dynamic, and consolidating the various UI implementations for user-friendly selection lists.

My part was working on the WSGUI editor mostly. It will be released in one month, and relies on some web service and widget factory stuff from the Kode framework which is living inside KDE PIM (but is otherwise usable independently from it).
In particular, the dynamic web service invocation tool Kung will get a second rendering engine, based on Qt Designer’s UI files with custom widgets. The current work is being done in the schema-refactor branch. The XSD API in particular needs some improvements, this is what mlarouche is working on mostly.

The obligatory photo, missing myself:

And now back to lurking mode, until my thesis and the associated software will be done.


LinuxTag 2006: Free entrance - Konq story!

Categories: — josef @ 10:08

People who want to visit LinuxTag in May this year and think: uh, the expenses will add up again, can optimise their budget and get a free eTicket in advance directly from the KDE booth team. We’re going to shell out 20 of them to Planet KDE readers (but feel free to spread this!) on a FCFS basis.

In order to get one, write a one-page story about a day in life of Konqi (or Katie), like from when he gets up to what he/she does all day. The stories will be collected and be published as a PDF during LinuxTag.
My email address is waiting for story submissions, and all we need is a valid return mail address for the ticket.

If you want to stay longer or help on the booth actively, we’d be even more glad to hear from you - in this case, please do not apply for eTickets, we’ll have regular exhibitor passes. But you’re still free to write Konq stories in this case.

Update: No, story language does not matter, write in whatever language you’re fluent in. We’re a localised project after all.


April 10 is Cool Projects Day

Categories: — josef @ 17:51

While space travel fans will look forward to April 12 (День космонавтики, or Cosmonaut Day), or April 11, the National Hero’s Day in Costa Rica, today also is a commemorable day. Not just because 36 years ago, Paul McCartney announced he’d leave the Beatles, but also because in 2006, many cool projects were released in a new version again.

Cool Projects Day


Nouvelles du jour

Categories: — josef @ 15:40

There’s now an article on GGZ on Jeux Libres, thanks to phh.
But this is not the only news. We’ve got board game engines for Sudoku and Shogi, the Debian packages see some more uploads, and finally, the web tools like Mantis for bug tracking or Trac for a web interface to SVN were introduced or upgraded.

GGZBoard alone encompasses more than 4500 lines of Python code now, whereas the rest of GGZ-Python has been sexied up so that new game projects like OpenRTS can use GGZ to build a gaming community.

We also run for the Trophées du Libre again, even though the event is still some months ahead.


遊樂場: CLT & OSDC Taiwan 2006

Categories: — josef @ 19:13

After giving the talk on GGZ at Chemnitzer Linux-Tage the past weekend, another talk will be given at OSDC Taiwan in April. See http://www.osdc.tw/schedule/ for the planned schedule. This will be the first GGZ talk ever to be given not by me, so kudos to yinjieh for spreading the word!

Also, GGZ 遊樂場 0.0.13 will be released soon. Stay tuned!

And if you wondered what 遊樂場 means: it translates to Gaming Zone.

Whereas 測試 only meant Test. Ooops :)


Innovation vs. whining

Categories: — josef @ 14:53

While I appreciate the efforts of the apachelogger to bring more gaming texts onto the front pages of the planet, it might be worth pointing out the positive game development in our world.

Many people don’t know for instance that there is a GPL’d Qt-based 3D game designer which will soon be ported to Qt4. Now 3DOM hasn’t been maintained for years, but Blender for sure is a suitable modeller to get started with QCake.

Also, KDE has very good online gaming integration. While the free software world probably won’t win over players from proprietary games, there’s no reason to at least take back infrastructure control from them.

If anybody wants to improve the state of Gaming on Linux in the long run, bug the distributors to not treat game projects, and especially game productivity tools like QCake, like 2nd class packages.


struct sockaddr is evil

Categories: — josef @ 16:50

When accept()ing a connection, one gets connection information about the peer host. Usually, this isn’t stored in userspace, but the kernel keeps track of it all the time. The normal way of getting this information is, and always has been, calling getpeername() on an open file descriptor. Afterwards, inet_ntop() or better getnameinfo() will be able to convert this structure to a numeric host (IP address) or human-readable host name.

What your parents and man pages never told you, even though RFC2553 is a couple of years old: Instead of casting a struct sockaddr to struct sockaddr_in, a struct sockaddr_storage must be casted. Funny enough, for most other operations using a struct sockaddr is working even with IPv6.

getpeername(fd, (struct sockaddr*)&addr, &addrsize);
blah((void*)&(((struct sockaddr_in*)&addr)->sin_addr))…

Thankfully, there is now ggz_getpeername(fd, resolve) to avoid using brain-dead casting-is-cool APIs.


La vuelta

Categories: — josef @ 14:12

Yo voy a pasar la semana siguiente en Málaga, Andalucía de nuevo, encontrandome con la gente de KDE Hispano y dando una ponencia a la Conferencia Internacional de Software Libre sobre la colaboración del proyecto KDE con otros proyectos en aspectos del desarrollamiento como usabilidad, cualidad y más.

Eso es solo para retrenar mi Español :)


Advanced Python Hacking III

Categories: — josef @ 11:38

Just when one thinks enough is enough!, it’s actually just starting… More functional features for Python please!
Here they come:

  • partial function application
  • lazy evaluation

The meaning of partial function application is that when a function is called with less arguments than it would need according to its specification, the return value is actually another function which can then be called with the remaining arguments in order to get the result. This makes it possible to pass around the half-baked function and can optimise repetitive coding a lot.

Go Python:

#!/usr/bin/env python
import partial
# bar returns a tuple of its two arguments
def bar(a, b):
print “<bar> a =", a, “b =", b
return (a, b)
# Let’s make it partial now!
# First call: get intermediate function object
partialfunc = bar(3)
print partialfunc
# Second call: finish the computation
result = partialfunc(4)
print result

Just for the reference, the whole debug output is given now so the functionality can be traced alongside the calls…

[partial] called bar with (3,) and {}
[partial] - first slot 0
[partial] - assign 3 to slot 0 as argname a
[partial] = partial result:
[partial] = 1 out of 2 arguments
<partial .__partialclass instance at 0x30079bc0>
[partial] called bar with (4,) and {}
[partial] - first slot 1
[partial] - assign 4 to slot 1 as argname b
[partial] = full result:
[partial] = (3, 4)
(3, 4)

Now, a somewhat more difficult topic is lazy evaluation. Not possible with Python? Well, not easily, but still possible to some extent. It means that if a function is called, the actual computation is not done unless the final value is required. Calling foo(bar(), 2) does not call bar() if e.g. foo only uses the second argument, and thus saves precious computation time. Code ahead:

# Some addition function
def bar(a, b):
return a + b
# Make it lazy!
# See how the type is not int, but type-instance instead
x = bar(3, 4)
print “Type", type(x)
# Now it really gets calculated internally to 7
print “double (= 14?)", x * 2
print “Type", type(x)
# From now on, the 7 is cached internally
print x + 11
# … and so on

As has been shown, functional programming with Python is much more than what is written in the documentation. Free your mind and use the powerful features!


Advanced Python Hacking II

Categories: — josef @ 12:34

Python is not just an object-oriented imperative programming language, but also contains several features known from functional programming, such as higher-order functions, list comprehension, map/reduce/filter functions and lambda terms. However, more advanced concepts are not present in the language. Can they be emulated with existing Python facilities?

It turns out that this is indeed the case for some features.

  • Infinite data structures
  • embedding Haskell code
  • others (upcoming…)

Infinite data structures are for example lists which are generated and can be traversed for many thousands of years without reaching the end. In Haskell, lazy evaluation makes this possible. Things are a bit less native in Python, but using generator-style sequence objects, infinite lists can be brought to the programmer:

# Generator ‘Y’ around Fibonacci function
seq = Y(fib)
# Let’s print some slice of this list
seqslice = seq[5:20]
print seqslice
# Eternal iteration…
for y in seqslice:
print y

Y is in this case the generator sequence object. Note that lazy evaluation is one of the features which probably cannot be done in Python without modifying the interpreter, so the zip() function will return a Memory Error.
But, we’re cool, eh?

# Our own zip which handles infinite structures
def xzip(l1, l2):
return lambda x: (l1(x), l2(x))
# Make a companion function to fib()
def id(n):
return n
# Use it like this
for t in Y(xzip(id, fib)):
print t

Now let’s make things even more cool: How about freely mixing Python and Haskell code?
Getting the best out of both worlds is the goal of the haskellembed module. A quick functionality overview:

#!/usr/bin/env python
# Import the haskellembed module
import haskellembed
# Define some code (could also be in external *.hs file)
code = “"”
– konstanter Wert
fs :: Int
fs = 4
– Addition um konstanten Wert
fs2 :: Int -> Int
fs2 n = n + 1
– Rekursive Berechnung der Fibonacci-Funktion
fs3 :: Int -> Int
fs3 1 = 1
fs3 2 = 1
fs3 n = fs3 (n - 2) + fs3 (n - 1)
– Wildcards
fs4 :: Int -> Int -> Int
fs4 n _ = n * 3
– Guards
fs5 :: Int -> Int
fs5 n | n > 0 = 42
| otherwise = -10
– Lambda-Notation
fs6 = x y -> x + y
# Now, convert Haskell to Python on the fly
# and inject the public functions into our namespace
# Alternatively, without giving globals(), a sandbox is created in h which lets you access internals as well and inject as needed
h = haskellembed.convert(code, globals())
# Finally, just use the Haskell functions!
print fs6(10, 20)

The cool thing is that using Python functions from within the Haskell code now becomes natural. Just use time.time() in an expression and voilà, as long as Hugs or other interpreters accept the code, Python will execute it just fine.

Of course, the conversion support is limited to the above examples for the time being. But interesting times are ahead, adding more features can be done within minutes.


Advanced Python Hacking

Categories: — josef @ 16:06

While preparing for an exam and thinking about which kind of course to offer for students at one of the upcoming events at University, a hopelessly non-performing recursive Fibonacci calculation made me think about caching function values in a generic way for constant functions and, as an extension, eventually constant functions. It resulted in a cache module for Python.

Consider the following code snipped:

#!/usr/bin/env python
import cache
def fib(n):
if n < 3:
tmp = 1
tmp = fib(n - 1) + fib(n - 2)
return tmp

Now, calling fib(35) takes many minutes to complete. Already fib(20) takes about half a minute and more than 150049 function calls!
(The absolute time is worsened a lot by the benchmark redirections - but still the number of calls should indicate that the recursive calculation is not a good idea.)

Now, let’s enable the cache:

cache.cache(fib, globals())

That’s all! fib(35) finishes in less than a second, needing only 47 invocations, of which 22 yield cache hits and 25 yield cache misses.
Using a backing file means that cache values can be reused from previous runs - which is a nice feature for long running programs so crashes won’t harm.


Now a single iteration is sufficient for calculating fib(35)!

Another advanced usage is that of an eventually constant function. One of this kind is a download function, which lets you use the cache module as a WWW proxy:

#!/usr/bin/env python
import cache
import random
# Simulate an error-prone file download
def download(file):
x = random.randint(0, 1)
return (None, “xyz")[x]
cache.cacheretry(download, globals(), None)
print “– Download:”
print download("x")
print download("x")
print download("x")

With the cacheretry statement, the eventual constness is made known to the cache module.
Of course, several different Python methods can be cached at once.

Download the file cache.py to use it right away. It comes with quite a bit of documentation (at least compared to my usual habit of not documenting source code at all).


RR&S: DNS, /etc/hosts and you

Categories: — josef @ 16:07

Resolving host names, that is, finding a connection-level address from their human-readable representation, is a standard task in client applications which need to connect to a server. This is quite a complex task: Information about such mappings might be spread, and new additions like IPv6 or internationalized domain names (IDN) are appearing once in a while, although admittedly not often.

These properties make it desirable to use a ready-made library to perform hostname lookups. But of course, there’s plenty of choice, so which possibilities exist out there? Let’s look at the most common ones: System library functions (libc, resolv, anl), adns, firedns and Qt.

A fairly simple interface to DNS servers is provided by the resolver function res_query(), which has its root in the BIND sources and shipped with BSD 4.3 initially. The usage takes a name, constants for the class (always ns_c_in for Internet resources) and type (always ns_t_a for hostname lookups), as well as a string buffer provided by the application. For IPv6 however, ns_t_aaaa would have to be used additionally.
Before using the call, res_init() should be called, although this is not a requirement. The call to res_query() might block the application, which is a big drawback. Another issue for the real-world usage is that this library really only supports DNS queries, therefore not taking the contents of /etc/hosts into account, which severely limits its usability for network-less development machines, for instance.
Note that the glibc version is modified a bit so that no global state is kept within the library, thus enabling resolv to be used with threads. Note also that the returned IP address is really a string, which might or might not have to be converted to a network address structure using inet_pton(), which again has the drawback of not being IPv6-transparent, albeit it can support this address family.

Probably the most well-known “classic” function is gethostbyname(). It appeared in BSD 4.3 and has also been a POSIX standard function. The call is synchronous, and supports looking up IPv6 addresses. It queries the /etc/hosts file, DNS and other name servers like NIS, depending on the global configuration in /etc/host.conf. This function is reasonably easy to use (except for a few OS incompatibilities which might occur), but is not acceptable for use with interactive programs since it will block the execution thread. To overcome this limitation, a second thread could be created manually, but gethostbyname() is not threadsafe since it uses a library-internal static buffer, so gethostbyname_r had to be introduced to let the application programmer specify a buffer.

Note that IPv6 support was not present initially, for which the substitute function getipnodebyname() has been introduced, according to RFC 2553. This function was obsoleted soon, both by adding address family support to a variant called gethostbyname2(), which is glibc-only, and other functions.

Finally, gethostbyname() has been superseeded by getaddrinfo(), or GAI for short. This function does a little more than resolving hostnames, for instance it can resolve service names as well. Otherwise, it is similar to the gethostbyname2_r() call with IPv6 support and application-provided threadsafe buffers, but also including the undesirable blocking behaviour. This function has also been named in RFC 2553.

This is a not-yet-standardised extension to GAI, and provides a function called getaddrinfo_a() and several other support functions. As the name suggests, it supports asynchronous hostname lookups, and is present so far in recent versions of the glibc library, where it relies on the AIO layer. The features are similar to getaddrinfo(). Of note is that the notification might happen in two flavours, either by thread creation or by being signalled. Both are not really optimal for all kinds of applications, although it’s not terribly hard to handle the notifications. These are the drawback costs one pays for letting the system library do the polling for the results.

One of the oldest resolver libraries which natively support asynchronous operation, in addition to synchronous mode. The adns library is initialized with a global state variable, while for each query or status check a structure is initialized by allocating memory. The main functions to use are adns_init(), adns_submit(), adns_processany() and adns_check(). A few things are noteworthy. First, it embeds well with applications since the internally used file descriptor is made available, which means notification can happen within the regular execution thread, for instance using select(). Second, a lot of information is provided, in many cases in form of a struct or union so that the relevant parts can be accessed easily, like the resolved hostname as a string and as a network address structure, depending on the further processing needs.
One drawback is shared with the resolv library, however: The file /etc/hosts is not used, an accessible DNS server is required for the library to work. Another one is that IPv6 is not supported yet.

Looking at the big picture, firedns is similar to the adns library, although there are a few differences. For example, IPv6 is supported, although no transparent support is given - similar to the resolv library, both IPv4 and IPv6 queries have to be done separately. Integration happens similarly using a file descriptor which must be polled. A drawback shared with adns is that only real DNS queries are performed.

A special contender in this comparison is the Qt library, which is a library for creating C++ applications, providing both GUI and non-GUI classes and a fairly complete platform-independent programming platform. In Qt3, the QDns class was available, which took the hostname and optionally the wanted resource type, and then processed the query asynchronously until a result was available. Then, a Qt signal was sent, which basically means calling back a C++ method (or Slot in qt speak), in which a QValueList contained entries of type QHostAddress, which in turn could be passed further along to Qt networking functions or reveal the IP address in string format. IPv6 addresses and the /etc/hosts file are supported by Qt. In Qt4, QDns was renamed to QHostInfo, which provides a simplyfied interface, abstracting away from DNS terminology such as resource types. Also, support for IDN (via Punycode) was introduced.

It is difficult to really find the “best of breed” when all methods of resolving have their drawbacks. For Qt-based applications, using the Qt resolver is the most compelling and most sensible way of getting the work done. For all others, especially graphical clients to network services, it gets really difficult.

Let’s do a simple score table:

libc/resolv: hosts -1, ipv6 +/-0, idn -1, nonblocking -1, score = -3
libc/gethostbyname: hosts +1, ipv6 +1, idn -1, nonblocking -1, score = 0
libc/getaddrinfo: hosts +1, ipv6 +1, idn +1, nonblocking -1, score = 2
libc/anl: hosts +1, ipv6 +1, idn +1, nonblocking +1, score = 4
adns: hosts -1, ipv6 -1, idn -1, nonblocking +1, score = -2
firedns: hosts -1, ipv6 +/-0, idn -1, nonblocking +1, score = -1
Qt: hosts +1, ipv6 +1, idn +1, nonblocking +1, score = 4

There is a clear distinction between the favorites and the others, but depending on the usage, this might not tell much - for instance, C programmers will not be able to use Qt!

For this reason, the GGZ library for networking and other programming aids, libggz, has taken a twofold approach. It provides a function named ggz_resolvename() and a function to set a result callback. If libggz has been configured with support for the anl library (providing gethostyname_a()), this callback is called whenever the results are available, or otherwise directly after a blocking call, transparently to the programmer.
Since libggz has a convenience method for creating sockets, called ggz_make_socket(), the developer is even relieved from resolving the socket first by setting up a callback for ggz_make_socket(), which if activated already holds the file descriptor, ready to be used on either IPv4 or IPv6 connections. The only remaining drawback would be missing IDN support, although even this is covered for all getaddrinfo() calls with some IDN flags when using recent glibc versions (>= 2.3.4) which are compiled with IDN support.

Otherwise this is really the recommended way to go for application developers: No blocking calls (when configured correctly), inclusion of /etc/hosts, IPv6 support and convenient API.


RR&S: Temporary files and transactional file handling

Categories: — josef @ 19:44

Temporary file handling on POSIX-ish systems is a mine field - there are a lot
of standard (yet harmful) functions available, and close to none standard (and
harmless) ones, with mkstemp() and tmpfile() probably being the exceptions.

But does harmlessness also bring usefulness? Let’s look at what a current
modus operandi of creating temporary files is. A file shall be created,
no matter what its name is, but the resulting name should be known for
continued processing - maybe, because it is registered somewhere.

The tmpfile() function only exists for anonymous temporary files, thus it
is out of question here.
The current method for solving the would thus be:
- using mkstemp(), providing a template
- calling fdopen() on the file descriptor
- registering the modified template as file name
Alternatively, using mktemp() and open() with O_EXCL would work, too.
Note that the recommendation against mktemp() due to security issues is not
valid when using O_EXCL (unless on NFS), but it might still involve an
inconvenient race.

To refine the only remaining alternative, the following library function
is proposed.

FILE *f = tmpatomic(const char *directory, char *template, int templatesize, int backingfile);

The parameters are as follows:

- directory: Directory where the final file shall be created.
- template: Modifyable string buffer which will contain the filename. If templatesize
is set to zero, template must contain a certain C format string.
- templatesize: Template buffer size in bytes, or zero for format-string.
One byte needs to be reserved for the string terminator in the former case.
- backingfile: If set to 1, the file is really created as a temporary file first,
and only renamed to its final filename after calling fclose().

This sounds a bit over-engineered, but it will actually help with the most common
use cases.
Design considerations are:
- With the help of the backingfile switch, atomicity for file creation is achieved,
without requiring the programmer to handle the rename() call.
- The flexible template handling guarantees that tempfile creation will not fail
until the maximum possible file name length has been reached, and in the case
of providing a format string (like “tmp-%s-%i") more control can be executed
over which name and random characters will be used.
Additionally, one can exclude the randomness entirely in case only transactional
file creation is wanted.
- The implementation can hide the O_EXCL problem and NFS special-casing as follows:
Both the backing file and the temp file are “safely” opened, that is, using O_EXCL
in the normal case and using symbolic link refcounting on NFS.
Since ownership of both is then guaranteed exclusively, the renaming can be
performed without interception. Of special convenience would be that renaming
could take place across partition boundaries, as to hide file system-specific
details about mount points.
Note that without any advanced file system support, the final file can only
be opened upon the fclose() call, which might then fail with EEXIST.
In this case, a facility to make the name of the backing file available would
be needed, or to tell the truth, the whole backing file concept would not
work and two distinct functions for temp file creation and renaming would
be needed again. This does not invalidate the other advantages though.
Alternatively, if the application can live with a zero-byte final file
in the case of a crash, this issue could be considered solved, too.

In summary, here are two useful applications:

tmpatomic("/tmp", “XXX", 3, 0);

- A classic temporary file

tmpatomic("/var/lib/myapp", “game-%i", 0, 1);

- A file which is created temporarily and then moved atomically to its destination

tmpatomic("/home/user", “some.conf", 0, 1);

- Deterministic transactional file creation

It is not easy to define what the root of the evil is which makes such complex
designs necessary. The inability of some file systems to “reserve” names until
the files are either created or a cleanup run is done (after a crash) is certainly
part of the issue.
Likewise, one should think out of the box to let the file naming be part of flose()
instead of fopen(): No matter where the file is created first, it should be stored
safely afterwards. This resembles the backing file principle, and from current
practice it is known, that in the case of name conflicts a routine to select
an alternative name would have to be called anyway - which could simply be another
random name in this case, but requires to give a (modifyable) buffer to a function
like tmpatomicclose().

Rants, Ramblings & Solutions

Categories: — josef @ 19:42

This is a new article series devoted to the brain-dead-ness of POSIX interfaces, Unix legacy constructs and the like. I simply felt like writing about those issues would help the cause more (i.e. cause people to think about it) than hurt it (i.e. discredit me). That being said, everything is mostly written during the night, when I’m really sleepy at times and without internet access for further validation, and does not inhibit paper publication quality.

This is a permanent entry; below the individual articles will be linked in the future. Note that I’m going to abbreviate the series title with RR&S.


The world ends at 35

Categories: — josef @ 15:37

Recently, while working on adding multiplayer capabilities to Ludo, I ran across this never-seen-before error message:

$ ggzd -F
Ignoring game server_arimaa, already at MAX_GAME_TYPES
Invalid GameType specified in room server_arimaa
No GameType given for room server_arimaa
GGZ Server: started

What did it mean? Well, apparently there was a limit which was never supposed to be crossed:

$ grep MAX_GAME_TYPES svn-version/ggzd/ggzd/ggzd.h
#define MAX_GAME_TYPES 35

Oddly enough, we DID cross this limit now, with the help of some external games.

$ ls BUILD/etc/ggzd/games/
ccheckers.dsc escape.dsc ggzcards-hearts.dsc goserver.dsc reversi.dsc spades.dsc
chess.dsc freelords-server.dsc ggzcards-lapocha.dsc hastings.dsc rubytoe.dsc teg.dsc
civserver.dsc geekgame.dsc ggzcards-spades.dsc kamikaze.dsc server_arimaa.dsc tictactoe.dsc
combat.dsc ggzcards-bridge.dsc ggzcards-suaro.dsc keepalive.dsc server_checkers.dsc tuxman.dsc
connectx.dsc ggzcards.dsc ggzcards-sueca.dsc krosswater.dsc server_hnefatafl.dsc widelands.dsc
dots.dsc ggzcards-fortytwo.dsc ggzcards-whist.dsc muehle.dsc server_ludo.dsc xadrez-chines-server.dsc
$ ls BUILD/etc/ggzd/games/ | wc -l

The new limit is now 50 gametypes. Let’s see how long it will take to get to this point…


December wrap-up

Categories: — josef @ 11:32

There was a lot of snow during the weekend, and a lot of time for me to work on overdue projects again. So, what did I do during the last days?

A trip with PyKDE resulted in a usable application (not of interest unless you’re much into statistics), and a soon-to-be-usable application, which is a frontend for a generic board game framework.

Also, not only is the Dot now hosted by OSU-OSL, but to relieve KStuff.org from the burden that it has on the current small v-server, there is now new.kstuff.org in the OSU-OSL virtual machine park, although it doesn’t have any content yet. This will change over the next days to weeks, as what will be installed there will also be developed further in parallel.


FARnodes 1.0 Released!

Categories: — josef @ 17:51

The FARnodes Simulation and Remote Execution Environment for Distributed Algorithms has been released today.
Features include:

  • Discrete simulator engine written in Python
  • Remote execution manager, graphical frontends, statistics analysis tools
  • Support for FAR and partial synchrony models
  • Failure detection modules (EA-FD, PS-FD)
  • Backend selection (UDP, TCP, internal) depending on desired channel reliability
  • Sample simulation scripts, some even proven for LAN/WAN usage
  • Documentation with a lot of diagrams, as well as an API description

Get it while it’s hot: http://web.inf.tu-dresden.de/~js177634/beleg/

This release marks the end of my Beleg work. The defense will still take place but finally some statically allocated time has been freed for other use.

FARnodes 1.0 Teaser
Image: Live consensus run in November 2005 over 3 continents


Random GGZ activities

Categories: — josef @ 18:26

This is what is happening in GGZ-land right now:

  • RubyToe, the Tic-Tac-Toe server based on the RuGGZdMod library wrapper, is being worked on; the goal is to have the wrapper and its demo application working for version 0.0.13
  • New Debian packages announced; in fact they exist already and need to be uploaded
  • some people planning to revive the wxWindows client
  • massive web page updates with separate engine pages and icons to indicate the game frontend

So much, stay tuned…


Málaga summary

Categories: — josef @ 16:45

As everyone posts summaries about the last one or two weeks, here comes mine also, and the fact that internet will be switched off in 30 minutes makes me confident I won’t spend too much time on it.
It’s really a nice city, not overly tourist-filled as I feared before, instead full of Spanish and Andalusian culture, some of which (say, language) I managed to absorb. Already on the second day I walked through the whole city, always looking for the shadow side of the street. I didn’t get a sunburn but on my way back I slightly lost the orientation and arrived not far from the residence, but north of it. If it hadn’t get dark already, I could have gone for a walk in the mountains also.
Quite the opposite was being on the beach for two times, with a third time still on the schedule for today.

For the record, there was some hacking involved too, but as one easily get distracted on such events, the more important aspect is about the meetings and personal talks. We had a (small) KNewStuff BOF with the outcome of cleaning up some XML right now and implementing the most urgent dialog features for KDE 3.5. More long-term goals for KDE 4 were discussed on the Edu BOF and are now on my TODO list, as are other wishlist items brought to me personally, via mail, bug entries or blog/planet posts.
Some mockups can be seen here. One important change will be a more wikipedia-esque Kollaborative Desktop Environment, with having a smaller administrative interface (basically only for approving other work), and giving users directly the possibility to translate entries or give other kind of feedback.

I also gave 3 talks, one just presenting a Qt-centric work already done, and two more about present and future development. Each of them turned up some QA session directly afterwards or by approaching me after the talk, so the preparation was not done in vain :)
Having said this, everyone should look forward to the next event already, but one should not forget to thanks this year’s organisers for their work put into the event. It was very comfortable all the time, and as one can only imagine when looking on the photos, there were lots of funny moments.


Counting down: Back to flight

Categories: — josef @ 14:20

Last week I finished with my exams for this semester and finally have the time for hacking again. If CIA wouldn’t be broken these days one could probably even see it. Along with this newly found activity came a system upgrade - X.org was long overdue a couple of other packages as well.

As expected, I’m working on aKademy preparation - there are only 8 days left until my trip will start and a couple of talks will have to be prepared. Each talk should introduce some new stuff, so not only am I preparing the slides, but also working on the software which will be talked about. Just today I more or less finished the slides about KDE games, but a few diagrams are still missing, and that will be the challenging part for me. As you might know, even a few non-KDE game developers plan to join us at aKademy so we can discuss some future plans at large there.
Those who are interested might also have a look at the wiki.debian.net games page. Many distributors still have to do their homework when it comes to games, unfortunately, and I plan to work a bit on this task also.

The kstuff.org slides are next on my list. Therefore, I plan to spend the whole evening working on a shiny example setup and collecting some of the ideas that have been floating around recently. Tell me if there’s anything special you really want to see included ;)
In the meantime, KDE from SVN keeps compiling and it really feels good to have access to a fast computer again, so the turnaround times are kept very low. Good to see the availability of compilation machines in Málaga as well for that matter.

When this is done, getting hold of my Spanish book again will be the single most important task left to do.

P.S. Lurid title, but I haven’t been in a plane for many months now and I just love it.


GGZ development continues

Categories: — josef @ 20:47

After the switch to Subversion a few days ago, the summer holidays finally gave me some time to start some serious hacking on GGZ again. Recently the new Libraries section went live on dev.g.o and explains the wealth of libs we currently offer. It was a bit fast though, because only today libggzdmod++ was founded based on old sources used in various game servers such as Widelands, Tuxman, Muehle and Geekgame.
The library contains the C++ classes for Net/MNet, a multicast-enabled network transport library with convenient buffering support, and the GGZGameServer class as a ggzdmod abstraction, handling joins, leaves, data and error events and so on.

Other new features include a Connect-the-Dots savegame handler for the GGZ Community portal, and upcoming support for improved integration of player photos, buddy lists and non-anonymous AIs. On top of this, the build system has been improved again, removing long-lasting trouble with both source-based and binary-based distributions: When a game module file is registered, it can now be turned into a copying so that it can be registered later by running a loop over the list of files, and more importantly, it can be de-registered automatically.


Desktop Exchange Service: Progress

Categories: — josef @ 12:30

Today early in the morning I implemented OpenSearch support to the Hotstuff backend. Hotstuff is a bunch of Perl scripts which takes care of everything happending on the server. Now there’s hotstuff-search.pl for OpenSearch, hotstuff-scan.pl to verify and integrate uploaded content, hotstuff-downloads.pl to count the number of downloads and hotstuff-http.pl to enable HTTP uploads. The hotstuff-scan script has recently been extended to be able to operate on feeds directly, so that existing repositories can easily be imported for tests.

GHNS OpenSearch

Now to the client side. The current KNewStuff dialog is showing its age, and while there’s some Senior’s Health Care programme taking place in branches/work/knewstuff-features for KDE 3.5, we clearly need a better dialog for KDE 4. The HTML-based one currently used in KPDF is very nice already, however HTML isn’t really the best interface when it comes to usability, so which parts should be displayed as HTML and which shouldn’t has yet to be determined.

Now when not using a traditional HTTP/FTP provider, but instead the Desktop Exchange Service, a lot of advantages will improve the GHNS integration. First of all, it’s no longer necessary to download all items (or the latest 50 or so), but instead a narrowly-defined selection can be retrieved, based on categories and search terms. Second, user authentication happens transparently thanks to kio_http, so that the anonymous-only access will be supplemented by an authorised access. Third, based on the second advantage, direct interaction such as comments or ratings will be possible. The screenshot below is just a mockup, however the command line interface works quite well already.

GHNS Popup

In parallel to the software above, a new web interface is currently being built, using a template system so it can be reused - in KDE website style for the KDE edu page, for instance. The codename for this engine i Cocodrilo and as the name suggests, it should be more or less ready for aKademy.


Talk about Free Games

Categories: — josef @ 07:21

Next weekend (on Saturday, July 16) I’m going to give a talk entitled The World of the Free Games at the Pforzheimer Linux-Infotag. Thankfully there’s someone (hi kniffo) driving down there also as the location is close to where LinuxTag Karlsruhe took place, and it’s not quite the norm for me to travel to the other end of Germany once per month….

The topics will include: Early game efforts (like BSD games or Nethack), the development of games before the hype started (Freeciv, for instance), the big hype in Linux games in 1999 and the history from then onwards. Of course, some adverts for GGZ will also be included.


Organising my slides with Dispositionator

Categories: — josef @ 17:32

Yesterday in the evening I asked around on #debian.de whether anybody knew a tool which, although not easy to define, would be something in between an online picture gallery and a CMS. What I tried to accomplish was the catalogisation of my talks which I give occasionally, together with slides and papers, optional translations and various derivates of different formats, such as the HTML export. In addition, the tool should allow sorting and filtering the entries, and it should be easy to integrate it into existing webpages, which more or less makes templates obligatory.

Well, just a few hours into the idea (no, I didn’t sleep much last night) the release 0.1 of Dispositionator saw the light. It is only the 2nd Cool Projects newcomer this year (after TarDiff), and I’m glad that finally I had time to hack something on my own again.
Technically, a lot of details could be improved, but even the first version already does a pretty good job. Support for export and import of XML data with Pentabarf comes to mind and, equally interesting, a desktop frontend for integration with KPresenter and the like.

The origin of the name is influenced by Pyntor, a presentation tool written in Python. The only logical choice of name had to include a latino word (be it Spanish or Portuguese or even both) and it should express that I want to make my slides available to everyone in an easy way. Voilà, making them disponível is what the intent was about.

An awkward detail was that this time I forgot to set the licence in the freshmeat announcement and it was set (automatically?) to “Free to use but restricted". This, sir, is not quite the truth :-)


Back from LinuxTag

Categories: — josef @ 20:45

As danimo has posted a lot already, I’ll restrict my entry to just saying we arrived back home as well. A news roundup will follow soon. Today I won’t be able to complete it but tomorrow seems like a good day for this task. I’d already like to thank all those involved. If there are any materials (photos, texts) for a summary story, please forward those to me.

To catch up with the recent SVN changes will be the most challenging task now :)


Artists are great

Categories: — josef @ 09:41

It has only been some days that kde-artists.org is running, but the suggestion to include a forum section where application authors can request artwork has proven successful already.
Instead of creating the 25th icon theme or Yet Another Wallpaper, artists have the chance to help especially 3rd party projects with unique artwork, which is nearly guaranteed to be used by the project, instead of just being “one of many” as is the case with let’s say generic icon sets. While the main KDE desktop looks great already, many apps still suffer from insufficient artwork.

So today I watched and voilà got a logo for GHNS and an icon for a game project. Cute, isn’t it?

There are, unfortunately, still some flaws with the site. One of them (the display of full names instead of nicknames) I already reported, the other one is that it requires JavaScript, which is bad, since Konqueror from KDE 3.3 at least won’t cope with it.

On a side note, anyone knows how to use TaskJuggler in order to effectively plan the KDE booth for LinuxTag? I’ve tried to incorporate all the wishes, different arrival and departure times, different knowledge of KDE areas and so forth by hand, but it seems that automating this would for once be a chance to save time, and also promote TaskJuggler and its KDE frontend as time management software. However I admit I didn’t really try hard yet and probably won’t need it anymore this year.

Update 22:38: the artist-developer interaction was thought of by many other people as well, often for a longer time already, as is the case with the forum, which has existed for many months


Freelords running on GGZ; gcc 4.0

Categories: — josef @ 22:56

The turn-based strategy game Freelords is getting GGZ support. This means that if people want to play against each other online, they don’t have to look for a server anymore. Instead, they simply log into GGZ and then all join the Freelords - Experimental room, which will hopefully soon not be experimental anymore.
The web interface already has a basic savegame handler so that played games can be watched on the web. Somewhat tricky is the integration of network input with the ParaGUI main loop, since apparently there’s no way around polling for data. More on this soon.

On a side note, GGZ from CVS compiles with GCC 4 now. More or less each module had its share among the commits which fixed the sources, and while some of them were merely disturbing casting nitpicks, some real bugs could be found too.


Me, the sysadmin: Sarge upgrade

Categories: — josef @ 20:40

I’ve upgraded my server to sarge. It was pressing for some time, and needing subversion as I convert the KDE CVSfilter to Commitfilter I simply had to do this. (Note - one of the two links won’t work depending on your DNS. Good luck.)

So I started:

$ uname -a
Linux vs011 2.4.26-1um #4 Tue Apr 20 17:09:55 PDT 2004 i686 unknown
$ uptime
17:59:20 up 305 days, 8:09, 1 user, load average: 0.51, 0.43, 0.38

Not bad, eh? And then: vim /etc/apt/sources.list; apt-get update; apt-get dist-upgrade
The transition went smooth, although there are some oddities, and I’m going to list them here.

  1. when updating python 2.1 to 2.3, the pygame package is removed instead of updated
  2. there are conflicts where there shouldn’t be: proftpd vs. vsftpd, inetd vs. xinetd - it’s perfectly fine to have them installed side by side, no need to let them conflict!
  3. all the small cron jobs, which are cluttered around and asked for conffile change permission, should go away
  4. the helper scripts should dismiss all keyboard input before displaying their questions. This is a real programming bug
  5. somehow related to xinetd, it disabled some services in inetd.conf but not all of them. Huh?

Of course I disabled all services before the upgrade (except for SSH), and I had to reenable them afterwards. The conversion of exim3 to exim4 was painless. Also, Apache continues to work as expected. The biggest fish, mailman, is yet to be done, as are the databases. But since I wanted to work with subversion, here we go:

svn co svn://svn.kde.org:/home/kde/trunk/KDE/kdelibs

And it just hangs and does nothing. No timeout, no message, no network traffic - nothing. Damn. With anonsvn, it tells me: connection refused. Damn, again.


Release of GGZ 0.0.11

Categories: — josef @ 20:03

Yep, it’s finally true - GGZ 0.0.11 has gone gold!
To celebrate I did not only roll the tarballs, but also wrote an article aimed at administrators and packagers. You can read it here.

What is new in version 0.0.11, you might ask? For networkers, there’s IPv6 support and the SILC plugin for our chatbot, as well as reconnection support, HTML MOTD in addition to ANSI-escaped text MOTDs, initial password submission and registration including the email so lost passwords can be resent or reset. For gamers, there’s savegames in chess and a kick-ass Ludo client for local game against the AI, which admittedly is rather dumb. Also Koenig, the chess game, does now offer single-player mode. Then there’s a whole lot of new documentation, about 60% have been rewritten entirely, and they contain many graphics and diagrams now to make it easier to understand the structures and processes. Another cool patch on the server side which has been included enables players to abandon their seats, thus still being punished or rewarded when the game ends without them. And many more… look at the announcement to view all of it!

Downloads will be enabled step by step as soon as the mirror servers are catching on. Many thanks to Dotsrc (the former SUNsite!), ibiblio, BelNet and KGT.
And no, PLEASE do not offer additional mirrors anymore, we don’t really need millions of them. What is needed right now is a dedicated project server to host CVS, the bug tracker, the mailing lists and mail forwarders, the master website and the shell logins for developers, as well as several automated scripts to generate statistics and the like.

Hash: SHA1

c060660aed9061030aff5b502800068e ggz-client-libs-0.0.11.tar.gz
35ca8fe127ce8a802f69f609c6fb5bd0 ggz-community-0.0.11.tar.gz
4c2c12634510b5546c5f9c0b55a2b384 ggz-docs-0.0.11.tar.gz
8aff4d8cc87c5174670d807574976cfe ggz-gnome-client-0.0.11.tar.gz
cc56748ba9b6f2113264e5e7073670ad ggz-grubby-0.0.11.tar.gz
cb9aef98d19b6f55507f9b92b0f9f831 ggz-gtk-client-0.0.11.tar.gz
ac07b5d58bd3d5a885078c6561342637 ggz-gtk-games-0.0.11.tar.gz
d19589789040e0e064904dd79d911b02 ggz-kde-client-0.0.11.tar.gz
47990b872f6f9cb36d697f8fa737cfd0 ggz-kde-games-0.0.11.tar.gz
d31dcfcf78ad5f1aae0f5c3789b7c41c ggz-python-0.0.11.tar.gz
7e11f98a6e926cffdcbc7df6ceb200aa ggz-sdl-games-0.0.11.tar.gz
f4ccb7d76adba5091e0aa0cc4f981abc ggz-server-0.0.11.tar.gz
f36ce7ca35e147867fc694148c617e86 ggz-txt-client-0.0.11.tar.gz
e942d9e19687c632656ff3e5bab20499 ggz-utils-0.0.11.tar.gz
6a3cac71b3b444c7b46dc27d166402e4 libggz-0.0.11.tar.gz
Version: GnuPG v1.2.5 (GNU/Linux)


Of course, rolling out a release always takes several hours. However with nice QA tools such as TarDiff it’s much easier to spot hick-ups, and in the end it’s still fun.


GGZ release preparations

Categories: — josef @ 23:13

While being offline for a day, I looked into the list of open issues for GGZ 0.0.11.
There is not so much to fix anymore, compared to two weeks ago, so targetting the next weekend is quite realistic. The only patch not yet committed is the one which allows reconnections to happen automatically after a drop of the connection. This is achieved by introducing a new state (RECONNECTING) and a modifier to the initialization:


It will then setup a timer using the alarm() and signal() functions from glibc, and try to reconnect periodically. This is what irssi does for instance, and I thought it’s quite cool to have. Now all the clients will support it automatically - even the chatbot which usually dies if the server is shut down.


KDE at LinuxTag

Categories: — josef @ 23:18

We’re still looking for booth staffers for this year’s LinuxTag event in Karlsruhe, Germany. Today the conference programme was published and it seems that there are 8 KDE-related talks to be presented. I listed them at the wiki page.

In other news, some might have read about the GNOME Art downloader already, which shows great similarities with a KNewStuff download dialog, except it doesn’t handle any post-installation functionality yet. Nevertheless it’ll be a good idea to come up with a shared spec on freedesktop.org, although I’ve now been waiting for some time already to get the appropriate mailing list.
In the meantime, people can check out some more docs. This page should link to the first draft of the spec soon.



Categories: — josef @ 13:09

The German magazine c’t had the idea of letting people write articles, blog entries or link to such about the Hommingberger Gepardenforelle, a ficional fish with its own homepage, to see how search engines would react. Within hours tens of thousands of search results were available. Now some funny boys have started to code Hommingberger Gepardenforelle (The Game). It’s written in pygame (yeah!) and looks quite nice. Try it out!


More features

Categories: — josef @ 18:05

Beside extending the protocol specifications (ggzmod spec and ggzdmod spec), I compiled a new “GGZ Game Modules” document today, including three diagrams. This should make it easier for new hackers to get an own module up and running or port an existing game.

Since TEG development seems to be alive again, it was time to implement the savegame stuff. Now it is possible to review a map which has been used. This is very rough and doesn’t even include the player names yet but it should be enough to give an impression of what can be done.

TEG map


Community move

Categories: — josef @ 18:21

GGZ Community has moved to a French server. Along with the update, GGZ is now reachable over IPv6! Thanks to the 4 years old patch from riq.

Savegames for Chess are underway. They basically work for pawn moves, and could even be extended to piece captures, but unfortunately libcgc doesn’t store the piece type in its linked list of moves. That’s a pity.


Top KMail Enhancement of 2005

Categories: — josef @ 09:14

As a seasoned KMail hacker, I get lots of requests from our KDE customers about the ability to streamline the delivery of mail in order to increase the efficiency and strengthen the corporate culture. After consulting with my friends from the Exchange Group, I decided to go ahead with a revolutionary concept which will put us in front of the competition.
You might be aware that 90% of your inbox consists of nice direct-marketing material, thoroughly compiled collections of unmatched offers! So why care about the other 10% - concentrate on the good messages and manage your assets with Get Hot New Spam!!!

Get Hot New Spam!


¿Hablas español?

Categories: — josef @ 18:46

A new developer has joined our ranks, welcome Luis Pérez Meliá. He is currently providing Spanish translation for kde-games and kde-client, as well as some web pages.

On a related note, we’re now mirrored by ibiblio as well, so finally a download mirror in the US is available to our users. This is not that much of an issue for tarballs, but as soon as game data is made available there (via GHNS), even users of distributor-supplied GGZ packages will start usurping some bandwidth.


Multiple search providers

Categories: — josef @ 21:31

Somebody wanted to be offered a selection of search providers in the konqueror search plugin.
This is a bit nasty since the KURIFilter is normally configured only once, so we need two patches. With configuration change notification, this won’t be needed anymore.

The patches are here and here.

KDE multisearch


Categories: — josef @ 14:50

The latest development takes place in the area of (server-side) savegames. Games are equipped with a standard way of keeping a game log or savegame on hard disk, associated with the respective match. Then, a lot of things are possible: Continuation of hard-aborted games (i.e. in the case of a server crash), game replays, and downloading/viewing the log and result on the web via GGZ Community.
It has been implemented for TTT already (what else did you expect), and chess is next, since there’s a standard format all games understand (PGN). Afterwards it’ll be the turn of GGZBoard.


Networking without networking source code

Categories: — josef @ 15:38

An idea I had back in 2002 already, but only now is implemented so that it actually works:
Instead of sending bytes or strings in one application over the network and reading them in another application at the other side of the world, the protocol is given as an XML file and the corresponding source is generated from it, and included into the program. Using scripting languages, this inclusion could even be done at runtime.

Recently I played around with XSLT so the network protocol description file can be turned into a HTML file which documents the protocol. Cool stuff. Using external documentation references, this would even work for internationalized documentation, something which is not yet easily doable with doxygen, for instance.

Another advantage would be to add a debug mode. Even when using an efficient binary protocol, the generators could (on both sides) decide to spit out plain text so debugging can easily be done. In the end it could even send out itself as a protocol!


Development news

Categories: — josef @ 23:30

There are several new features available in CVS already. The documentation has been updated, and a local index page is now available. Several German translations were added as well, including the API docs for libggz. The KDE core client KGGZ got some new features, but more importantly is being cleaned up internally, and the chess game Koenig does now handle local games against the AI.
Finally, a nasty crash was fixed in TelGGZ.
Join the development now!


Advertising on planetkde

Categories: — josef @ 22:44

It was found out by after thorough research that I don’t advertise my development bits enough. So here we go. Ad time! After catching up a bit in KNewStuff development, it was time to also brush up the server side of GHNS, which is commonly known as Hotstuff. For those who do not want to download the scripts and data files, there’s now a convenient repository browser which showcases all KDE applications already using KNewStuff.
In case you still don’t know what I’m talking about, check out the KDE 3.4 desktop wallpaper configuration or Quanta+ toolbar downloads.
Of course, there’s documentation for it as well.

Enough ads for today.


3D table tennis

Categories: — josef @ 21:29

TU Chemnitz has developed a 3D gaming environment, using OpenGL and a table tennis model. They’ve focused 5 (quite expensive) cameras on the player who wears a special data glove-like bat. The image is being projected onto the screen by two projectors with a stereo view configuration.
The system was just recently ported to Linux.
3D table tennis



Categories: — josef @ 15:47

Yay for cross compilation.

clt2005@bizarre:~$ i586-pc-linux-gnu-gcc -v
Using built-in specs.
Target: i586-pc-linux-gnu
Configured with: ../gcc/configure –target=i586-pc-linux-gnu –prefix=/home/clt2005/x86-usr –enable-languages=c,c++
Thread model: posix
gcc version 4.0.0 20050302 (prerelease)

This required about 15 changes in the source code, make files and configure scripts. I also tried installing GCC 4.1pre but this failed horribly. Now on to using the compiler…


GGZ Community updates

Categories: — josef @ 16:44

Some hacking on the PHP files and Python scripts in GGZ Community has led to several features worth checking out: a worldmap with locations of either registered players or website visitors (dubbed mundomap), including clustering of data, a player finder to find someone who matches you somehow, and a karma system to rate the others and prevent cheaters.
The screenshow below shows the nice new version of the Enlightenment desktop shell (DR17 from CVS) and the player finder menu in GGZ Community.


Launch of easycnm

Categories: — josef @ 17:00

The easycnm library and an accompaigning website has been launched today. Students who are in need of easy-to-understand numerical algorithms should check it out at http://www.inf.tu-dresden.de/~js177634/easycnm/.
I’ll certainly work on it some more during the next days.


Running QEmu

Categories: — josef @ 00:14

I never really toyed around with QEmu. Today I gave it a try… expecting it to deliver a running L4 system (which is compiled for x86) on my PowerPC notebook. It boots up without problems, and using full-screen mode gives a nice system emulation. However, its graphical capabilities are not better than those of Bochs - neither the standard VGA nor the Cirrus Logic adapter emulation seem to work for me.

L4 running in QEmu


Chess vs. Arimaa

Categories: — josef @ 21:52

It is generally known that writing a Chess AI, although difficult, is a solveable problem, whereas existing Go AIs still suffer from major flaws. Where does Arimaa fit in? It’s a chess-like game, but using different pieces and rules. And it was only invented recently.
From wikipedia:

In 2002 Syed published the rules to Arimaa and announced a $10,000 prize, available through 2020, for the first computer program (running on an inexpensive, off-the-shelf computer) able to defeat a top-ranked human player in a match six games or longer.

This should be enough incentive for anyone to give coding said AI a try. I’m interested myself too, but right now I’m too busy unfortunately.


It’s not lazyness

Categories: — josef @ 02:20

I’ve been really unproductive with regards to KDE in the last weeks. But it’s not that I don’t want to hack - the current situation is simply that this month is practically dedicated to university work.
One pressing item is updating the KNewStuff tutorial to reflect the latest additions to the library, namely KNewStuffSecure.
With them it’s possible to download data or scripts in a secure fashion, by executing:

KNewStuffSecure *nssec = new KNewStuffSecure("quanta/toolbar", this);

Yay for getting this in in time for KDE 3.4, and thanks to amantia :)

There we go

Categories: — josef @ 02:11

After having had to stop my Brazil photoblog,
the idea of continuing some sort of written outlet did not want to disappear, and thus I’m now trying out wordpress to brag about the categories desktop, games, society, local news and miscellaneous.

Powered by WordPress