Search Results: "joachim"

17 April 2007

Gunnar Wolf: Init-related ideas BoF submitted for Debcamp

Ok, so it just seems like a hot topic - I just submitted a BoF for Debcamp to talk about the init-related ideas we've been discussing. As Debconf's Pentabarf conference management system does not like disclosing talk details before the talks are accepted, I'll reproduce here my short blurb:
This BoF comes out from several ideas posted in Planet Debian by Erich Schubert, Sven M ller, Joachim Breitner, Mike Homey and myself (so far). It's not to be "chaired" by any of us particularly, but I expect an interesting brainstorming session.
There are several different init systems present in Debian - However, we are only supporting currently one of them, good ol' sysv-rc - We have close to a thousand packages providing init scripts suitable for it, and close to none for all of the other systems.
In current systems, full of hot-pluggable devices, changing network configurations and so on, however, I think this situation is quite prone to change - sysv-rc and its runlevels are better suited for stable server-like systems, and is hard to adapt for future needs.
We will talk about the potential difficulties Debian will face in order to better support more init schemes, and discuss some ideas to solve them.
This should be a brainstorming session, not much material will be prepared (maybe some sketches by each of us, but nothing formal). If you plan on attending, take a look at the messages linked to in the 'links' section.
Note that, following Nomeata's suggestion, I'm presenting this for Debcamp - If you are not attending Debcamp and are interested, we will try to set this up via some sort of videoconferencing (or at least the usual video feed + IRC feedback), and I do hope we can have something showable (at least a broken concept) after Debconf.
In not-so-closely-related topics, I just learnt there is a shadow of doubt regarding my presence in Edinburgh - I will do my best to dispell the threat. I just don't want to miss a Debconf!

Gunnar Wolf: Init followup

First of all, sorry for the delay. Leaving just as the discussion gets started is bad, yes... But I'm only now reading Erich's and Sven's follow-ups. Both (as well as some comments in my blog) ask why not integrating the startup links in each of the packages - Well, basically because I don't think that most maintainers will take care to do this, and we will end up having a situation very close to what we have today: If I'm not interested in supporting your favorite init system in my packages, I just won't bother to make the scripts.
Note: I'm going into braindump mode. Verbose blabber and some stupidity might follow ;-)
Think on the webapp scene - Most webapps ship with an Apache-like snippet so that http://yourserver/thisapp just works(tm). I love that, and it's one of the little details that make Debian shine - Things usually work with the least administrator burden possible. But it happens that there are other web servers around there - They just become somehow second class citizens (I happen to sponsor/comaintain Cherokee, for instance), as nobody cares to include the equivalent snippets for them. Apache is the standard, and is good enough.
The same goes for sysv-rc: It just rules the world. Who will work all the needed patches to support all the different init systems? As the maintainer for a simple package which requires to be started up, I probably won't care to even understand all the intimacies of every init system, at least until they all have a decent user base. But by having one package per (server,init-scheme) pair, any maintainer can come up with the needed initialization.
Of course, this degrades quickly. First of all, as a user: if mydaemon is not correctly starting up, I will probably file bugs at mydaemon, not at mydaemon-initscheme. If mydaemon changes its parameters, we will witness transition of mydaemon-*.
Further, remember this is Debian, and volunteer-work has its downsides. If the mydaemon maintainer is a primadonna (or just does not give a flying crap about the runit init scheme), he will just trash reports regarding a nonimportant init scheme. Bad. And, as Erich points out, we have ~1000 packages including /etc/init.d/something - It will mean 3000 or so packages for a decent (not complete!) coverage of the different schemes. And, of course, a very uncoordinated way of working. But back to my line of thought: If I'm promoting an init scheme, I cannot just push it down each maintainer's throat. I must include at least the most important init scripts somewhere. Maybe we could just group daemons by task, and then have -say- a webservers-runit package providing the init scripts for each webserver for runit? This could cut down from 3000 to some 100 packages, most probably team-maintained... But it still faces many scalability problems, and the bug-filled-somewhere-else problem seems unavoidable.
I think something interesting could come off Sven's idea of providing several independent scripts instead of today's complete init scripts - This would make it easier to adapt startup/shutdown and similar events to different world views, and if not specifically needed, most init scripts could even be autogenerated calling the right bits here and there. That would rock - except in the corner cases (I predict no less than 10% of the packages will become corner cases ;-) ) where it will crumble apart. But maybe if a package declares it should be autostarted and provides the separate bits, the sysv-rc, upstart or runit helper can come up with an autobuilt initscript (or equivalent) - And if it does not work, it can always be overriden by a maintainer- (or user-) supplied, explicitly built script. Humh...
The topic surely calls for a Debcamp session, as Joachim says in comments in two of our posts and Erich acknowledges. Erich, as the main instigator of this blog series, I hope you can at least join via Ekiga or such, as it can be quite interesting - But, yes, none of the people involved so far participates in any of the inits' maintenance... Anyway, please keep the ideas flowing. I want to sketch something up, as I feel this can be useful - and not only for initscripts, but for many of the areas where Debian provides several ways to do the same thing. And, once again, that's one of the best points of Debian for me.

13 April 2007

Joachim Breitner: Big Brother for your Window

I just read about this really cool hack: He installed the well known Unix-Tool xeyes in his window no, not Windows, window. The thing to look out of your room if the shades are not down. (Video available)The effect is that the innocent bywalkers on the street will feel, well, watched. Not like otherwise where they probably are watched and don t know about it. Might be a very cool gimmic for privacy related PR actions, or just to generally protest against state surveilliance...

26 March 2007

Joachim Breitner: Trains in the UK

In June I plan to attend the DebConf 7 in Edinburgh. I like train riding and after all it s good for the climat, so I ruled out flying.If you want to go to UK by train, you have to take the EuroStar through the tunnel. The Deutsche Bahn offers a nice package including a sleeper train for 86, so I got that part covered. But that only gets me to London, and I need to go to Edinburgh.So today, I orderd a one way ticket from London to Edinburgh for 28.50 from GNER, one of the private british rail companies, and payed by credit card. Right after I sucessfully booked the ticket, I noticed some problems with the shipping address: An Umlaut in the street name has turned into weird characters and it did not display the counry (Germany) that I m sure I selected. So I immediatelly sent this mail to GNER:
Hello, I just booked this ticket online. It seems there are problems with the German address, though. The correct address is: Joachim Breitner
Ehb hl 33
71083 Herrenberg
Germany (you can replace by ue if necessary) My Booking Reference: xxxxxxxx Thank you,
Joachim Breitner
And got this response:
Dear Joachim

Thank you for your recent e-mail regarding delivery address of tickets.

I can confirm that we do not deliver tickets overseas. However, since our system is automatic, as soon as you click on the 'Buy tickets' button, the tickets are printed and sent in post.

Please remember that once the booking is confirmed, the delivery address/method cannot be changed.

In this case, if we receive the tickets back from the General Post Office, they can be reissued to a UK address and if we do not receive the tickets back, you will have to buy new tickets as your tickets are non refundable.

Please reply to this e-mail with a UK address, where you would like the tickets to be delivered so that I can update it on the notes, and the tickets will be posted, once received back. If we do not receive the tickets back, you will have to buy new tickets.

If you have any further queries, please do not hesitate in contacting us.

Kind regards

Saurabh
Now I really wonder:Update: I gave them an address in the UK now, I hope it works out (thanks Ben). And the Deutsche Bahn is already privatized, just not publicy traded yet and is 50% owned by the state, I was confusing that.

Simon Richter: Wacky ideas #13: Conflicts-If-in-Same-Dependency-Tree

Well, obviously this one needs a shorter name. The problem I'm trying to solve here is that SONAMEs, or rather the way they are used today, only handle the issue of a single, fully contained library changing ABI as one of its header files changes. However, libraries do not exist in a vacuum; as a bare minimum, they use definitions for types and alignment requirements built into the compiler, and if any of these changes, so does the library ABI. Hence, the idea of using a single number to denote the ABI is not really sufficient. The correct solution would be to embed all ABI information into the soname (libapt-pkg, for example, uses "libapt-pkg-libc6.3-6.so.3.11" on amd64, which is better but still not perfect). Obviously, this would require massive changes to the build scripts in all libraries and educating all library authors, so it is not going to happen (soon). So, what other options are there? As the kernel ABI (the syscall interface) is supposed to be really stable, we probably do not have to worry about that. So, we only have a problem if there are libraries with different assumptions about each others' ABI in the same userspace program. This can happen in two ways: The compiler changed (as in the case with the recent C++ transitions), or a library that is an indirect dependency of something that also has another dependency (direct or indirect) changes ABI. I've talked (briefly) about the former in an earlier post already. To illustrate the latter, a small example: There is a library, libuseful.so.0 that provides a number of functions, among these: struct complex_number

  float real;
  float imaginary;

 
void complex_multiply(
  struct complex_number *result,
  struct complex_number const *lhs,
  struct complex_number const *rhs);
Now another library, libresourceful.so.0, comes along and implements complex_divide on top of complex_multiply. Since the definition for complex numbers from libuseful makes a lot of sense, the include file for libresourceful reads #include "libuseful.h"
 
void complex_divide(
  struct complex_number *result,
  struct complex_number const *lhs,
  struct complex_number const *rhs);
Now one of the more serious people in Debian decides to write pointless 1.0, which takes two complex numbers and calculates (a*b)/a, using both complex_multiply and complex_divide, and links against libresourceful.so.0 and libuseful.so.0. Some time passes, and shortly before Debian freezes, libuseful's author decides that she needs more precision, so she changes the floats to doubles, bumps the SONAME and releases the new version. Shortly thereafter, someone notices that libresourceful is now using an outdated version of libuseful, and recompiles libresourceful. Since the header of libresourceful did not change, noone thinks of changing the SONAME, after all, changing it would render us incompatible with other distributions. Now, pointless 1.0 depends on libuseful.so.0 and libresourceful.so.0, which in turn uses libuseful.so.1. It still believes complex numbers are made from floats, however libresourceful now disagrees. The (a*b) expression is calculated correctly, using floats, however the result is then passed to the complex_divide function which expects a pair of doubles. Not good. Obviously, there is a number of things people have done wrong in this example. First of all, if you inherit type definitions or anything else from another library, your ABI becomes bound to theirs. As you cannot know statically what version your library will be linked against, you need a script that computes your ABI version at build time. If you do not want that, you need to repeat the type definitions in your header and (deep-)copy the data from one of your structures into one provided by the library you are using (I can already hear the screams of the performance fetishists). The assumption that, just because a dependency changed, there is not necessarily a need to bump the soname is not fundamentally incorrect; if no interfaces are being propagated, it is certainly correct, and most libraries do not really do this (for example, a HTTP library uses the resolver, but never passes the hostent structures upwards). Detecting this is difficult to do, although Sun has a few tools to help here. So where does that leave us? In my opinion, the most sensible thing a distribution can do is to make sure such a constellation never gets installed to an user's system. If there is any doubt, we need to err on the side of caution (aka use a bigger hammer). This is a "wacky ideas" post, so I also need to propose a totally untested thing that might work (or not), but at least has passed the stage of me sleeping a night over it. Ideally, dpkg would enforce that. In order to do that, it needs appropriate metadata that tells it that a certain constellation is probably wrong. The thing we want to avoid is an application using multiple versions of the same library at the same time, where "use" is denoted by a dependency relationship. So what we need is a way for a library package to declare that it is wrong to (indirectly) depend on this package and a package out of a certain group at the same time. I can see two ways of doing that, each with its own advantages and disadvantages: The "explicit" way is to add a new dependency relationship (that is where the subject "Conflicts-If-in-Same-Dependency-Tree" comes from), where you would conflict in this way with a virtual package that is named after your library without the SONAME version, and at the same time provide that virtual package (which is a technique that should not be unfamiliar to Debian people). The hypothetical libuseful above would then state Package: libuseful0
Provides: libuseful
Conflicts-If-in-Same-Dependency-Tree: libuseful
So installing pointless_1.0 would pull in libuseful0 and libuseful1, dpkg would see the conflict and refuse. For upgrades, it would refuse the libresourceful0 upgrade, as that would create an inconsistent situation. The only way out of there is to recompile pointless. The advantage is that the modifications to dpkg would be manageable (at least compared with the other option, which I will introduce shortly), the obvious disadvantage is the massive number of virtual packages introduced. The "implicit" way of doing that is moving the SONAME into its own field in the control file, and teaching dpkg that two packages with the same name and different SONAME fields can be installed at the same time, although not depended on by the same package. This is a really nasty change to dpkg and also requires a syntax for dependencies that includes the desired SONAME version, but it gives us a lot of other advantages. The one immediately visible is that it does not bloat the Packages file too much, and does not introduce lots of virtual packages, although the net effect inside apt and dpkg is probably going to be the same. A really cool side effect though would be that the soname is no longer part of the Package: field, and thus it becomes possible to insert it using substvars. This, of course, is a cool thing when library authors come to their senses and include ABI information for dependent libraries into their SONAMEs. Since this has gotten lengthy, thanks for reading this far. Of course, questions and comments are requested, and if you are interested in pursuing this, please get in touch, either via email or if you can wait that long, at the "Wacky Ideas" BoF at DebConf. The last thing for me to do here is to welcome Joachim to the "post your ideas" "meme".

Joachim Breitner: Debian Ideas: Instance-Capable Init Scripts

Debian as a Linux distrubtion is all about integration and ease of management, which includes init-scripts. I d like to propose a feature that might be helpful to quite a few system administrators while being non-disruptive to all others.For a lot of daemons there are use-cases that require more than one instance of the daemon to be running. With instance I mean a separate process with it s own configuration files, but on the same system, which rules out virtualisation or changeroots. Examples are copies of the main server running on a different port, to test new settings, different servers on different IPs, a HTTP-Server-Split into a slick static-and-proxying server and a heavy backend server, a mail server split with a virus scanner in between etc.So as an administrator I currently not only have to write the configuration for the additional instances, but also write my own init scripts and modify them, never being sure if I did it good or whether it will cause problems on package upgrade or similar things. I d rather see the functionality built-in to the package s init script directly.There is a package in Debian that already provides this: The OpenVPN package maintained by Alberto Gonzalez Iniesta allows the user to define new instances of OpenVPN simply by adding a new file to /etc/openvpn/. The file /etc/default/openvpn defines which of these instances are to be started when I or the system start runs /etc/init.d/openvpn start. /etc/init.d/openvpn stop stops all running instances and /etc/init.d/openvpn restart also restarts just the currently running servers. I can easily control a specific instance by adding it s name (which is the configuration file s basename) after the command to the init script.I think these semantics are clear, sensible and non-disruptive and should be available with every Debian package where the administrator might want to run several instances at once: web server, mail server, ftp servers, name servers etc.In those cases where the daemon is not configured by a single file alone, one directory with the configuration for one instance is needed. Otherwise, I don t see why this should be a problem. For backwards compatibility, the normal configuration file locaction could be an implicit instance called default and all additional instances go to their own directory (e.g /etc/ntpd.conf is instance default , and /etc/ntpd/public.conf is instance public ).Comments welcome.

25 March 2007

Joachim Breitner: My Debian Project Leader Vote

The Debian project is having it s annual vote for the the post of the Project Leader, a mostly representative and medidative post. Here is my ballot:
[ 6 ] Choice 1: Wouter Verhelst
[ 7 ] Choice 2: Aigars Mahinovs
[ 5 ] Choice 3: Gustavo Franco
[ 1 ] Choice 4: Sam Hocevar
[ 3 ] Choice 5: Steve McIntyre
[ 2 ] Choice 6: Rapha l Hertzog
[ 4 ] Choice 7: Anthony Towns
[ 6 ] Choice 8: Simon Richter
[ 6 ] Choice 9: None Of The Above
I voted for Sam first because he has some fresh ideas and takes it not too serious after all, working on Debian should be fun. Next is Rapha l Herzog. He got the big plus of some good people on the prospective DPL board and I know he is doing some good stuff with regard to collaborative maintenance, e.g. in pkg-perl. I d then rank the current DPL and his Second in Charge equally. They didn t do anything particular bad (besides maybe the dunc-tank-experiment, but I m not blaming that failure entirely only on them), and continuity is normally a good thing. Well, just for fun, I ll give the advantage to Steve. Gustavo has a lot of ideas, and I m not sure how realistic they are. I ll still prefer him to nothing, so he is ranked next. I don t know enough about Simon and Wouter to really vote for or against them. Aigars plans though, despite knowing him personally, are not the right for a DPL post, so sorry, that puts him below NOTA.

7 March 2007

Joachim Breitner: A different Maybe maybe

This is a post about the implementation of data types in the programming language Haskell. If you haven t heard about that, you can proabably safely skip it. For a while I have been thinking: Isn t there a way to get rid of the intermediate Maybe construct in a common expression like fromMaybe default . lookup. It seems that a way to do that would be to pass more information to the Maybe-generating function: What to do with a Just-Value, and what to return in case of Nothing. This leads to a new definion of the Maybe data type as a function. Later I discovered that this seems to work for any algebraic data type. This is probably nothing new, but I was offline at the time of writing, so I didn t check. This means that this might also be total rubbish. Enjoy.Update: Several responses in the haskell-cafe -list told me that I just re-invented Curch-Encoding. Nice :-)

3 March 2007

Joachim Breitner: Document Archival Tool?

Yesterday I stumbled over an interesting article and I thought hey, it would be nice to save it for some time later . Then I thouht just saving is not enough, because I want to know where I found it . But manually writing the URL somewhere as well feels ugly. Therefore I am looking for some kind of document archival tool. Here is how it might work, givinen a command line interface and the invented name nodoc :
$ nodoc get http://labs.google.com/papers/disk_failures.pdf
$ nodoc list
disk_failures.pdf
old_files_on_disks.pdf
$ nodoc info disk
ambiguous file name disk
$ nodoc info failures
disk_failures.pdf
URL: http://labs.google.com/papers/disk_failures.pdf
Date: Sat, 03 Mar 2007 17:46:03 +0100
LastUpdate: Sat, 03 Mar 2007 17:46:03 +0100
Title: Failure Trends in a Large Disk Drive Population
$ nodoc tags failu + google disk statistics
$ nodoc list
disk_failures.pdf google,disk,statistics
old_files_on_disks.pdf
$ nodoc update
disk_failures.pdf: File up to date
old_files_on_disks.pdf: New version available.... done downloading.
$ nodoc search happyness
happyness not found (full text search in 2 documents)
I think you get the idea. Note that I expect it to read the meta-data from PDF files (which the mentionend article does not contain, but it s just an example). Does anyone know of a simple linux program, text-based or graphical, that does that? I am considering to write it myself, but I don t want to re-invent the wheel.

21 February 2007

Joachim Breitner: News from the XaraLX front

What happened so far: Pretty much one year ago, Xara released a Linux port of there XaraX vector graphics suite under the GPL, and everyone was happy, as it is a pretty good piece of software. A small portition of the program, the drawing library CDraw, was still distributed as a non-free binary blob with the prospect of freeing it later. to prepare for that, I created a debian package in non-free. About half a year ago, development as slowed down as the company s team was tight into other tasks and outside contributions were still few.Last thursday someone asked on the mailing list for news on the freeing of the CDraw library, starting an unseen surge of new posts on the list, from Xara employees, free-time developers and outstanders. Besides some unnecessarily rude messages, it was an interesting discussion on how a small non-free part of a program seems to scare of a lot of developers from working at the otherwise free program at all. It also became clear that Xara, recently being bough by MAGIX, will not release the CDraw library any time soon, being afraid that others might use the code to compete their commercial Windows version of XaraX.The solution, it seems, will be an internal fork that uses Cairo to render if the CDraw binary is not available. This will, at least for a while, cripple XaraLX, it will most likely be slower than the supposedly very fast CDraw, but it will be fully free software. At least the Xara guys don t oppose the plan, so there is hope that it will succeed. And who knows, maybe they will release CDraw when they see that a real free software does attrackt outside contributions.

5 February 2007

Joachim Breitner: Linux flexibility

One of the things about the GNU/Linux system that I wouldn t want to miss anymore is the general flexibility: I had to send my main machine, a ThinkPad, for warranty repair (again...). But I wanted to continue to use my programs with all my settings and all my data. So I took my old desktop machine, upgraded the Debian to unstable (which is what my laptop was running), using dpkg --get-selections and dpkg --set-selections I made sure that it had all programs installed that were on my laptop and then I mounted the laptop s harddrive, which I put in a USB case, on /home. Et voil , I can continue to work just as before. I wonder if this would have been as easy with, say, Microsoft Windows.

22 January 2007

Joachim Breitner: SOSHGIC Reports

It s over, since yesterday I am back in what Bush calls the old Europe, and I feel like I never really left. But in fact, I did, and was in working as a volunteer at the SOS Hermann Gmeiner International College in Tema, Ghana. Things did not really work out there, so I wrote a work report for the principal, describing what exactly has happened (or not happened) from the first contact until the end of my work there and analyzing what went wrong. This text might also be interesting for anyone who plans on doing similar volunteer work.During my time there I have set up a Linux setup that is, in my opinion, quite neat: Integration into Active Directory, automatic installation, Nagios network monitoring, caching and filtering web proxy et cetera. For my possible successor, but also for anyone who is creating a similar setup, I documented the steps to create such a setup in the techical documentation. Both reports can be found in the content section of my website.

16 January 2007

Joachim Breitner: Free Software Volunteer wanted

I have returned from my travels (see yesterday s post, in Germany only, sorry) and will continue to work at the Kofi Annan Center this week before I return to Germany on the weekend. I must have made a relatively good impression here, as now the director, Dorothy Gordon, is looking for another interested geek that would be interested to come to Ghana for 6 to 12 month and help with the development of Free Software here. Not much is fixed yet, so you can propose your own project ideas, if you have one. Also, the issue of funding is open, as the centre s resources are limited. If any corporate sponsors would be willing to help, please stand up If you are interested, please send me an e-mail and I will give you the director s contact to discuss the idea.

11 December 2006

Joachim Breitner: DeCaf taking on form

A few month ago, I blogged a way to spread Free Software effectively, especially in developing countries: By deploying Free Software in internet caf s, where most people learn their way around computers. Most of them (and there are a lot, much more than in Europe) have a buisness plan that relies on software for free, but currently they achieve that through pirating Windows and software like Cybercafe Pro. Back than, I wrote this more or less theoretically, but it happend that I ended up having some time to actually start working on it.While Free Software, especially Debian, provides a very good base to build internet caf s from, one key component is more or less missing: Software to hand out these codes ( timecodes ) to the customer, to let them log in and surf for the time they bought. Very recently, Zybacafe was released, but I did not really like it, nor felt like maintaining a Pascal/Lazarus based Debian package. So I went ahead and implemented my own ideas.The Idea is to keep it very simple, very modularized and integrate deeply with normal unix ideas. So what we have now is a PostgreSQL database (one table so far), and all communication just goes via this table, so we don t have to design or implement complicated protocols. A python gtk application for the front desk generates the timecodes that are then, on paper, passed to the customer. The workstations greet the user with standard GDM, but our pam modules authenticates the timecode instead of a username/password pair. While using the system, a small floating window informs the user about the remaining time. If he does not log out voluntarily, a system daemon will kill all his processes eventually.The long term mission is to form that into a Custom Debian Distribution that will install the server hassle-less, and besides being pre-configured for the internet caf s needs, also immediately serves as an automated installation server for the workstations (think FAI), all useing stock Debian packages, as far as possible. Another pam module could, upon login, mount the homedirectory as a copy-on-write overlay of a template user s home directory, and through away the changes afterwards. The goal is to offer easier installation, less maintenance, better robustness and more flexibility than the current common non-free systems.But, of course, this project needs help. First of all: Users! If you have any use for time-limited logins (Internet caf , school surf terminaly, parents with otherwise not to bed going kids), you can be an earliy adaptor. Developers are very welcome as well, and due to the modular structure, cooperation should be quite smooth.The development happens on alioth, where we have the subversion repositry, as well as on the Debian wiki page. Alpha packages for these components can be found on the alioth group s webspace. We do not have a mailing list yet, but feel free to e-mail me. We will set up a mailing list once there is a need for it. Thank s to the KACE for supporting this.

6 December 2006

Joachim Breitner: No more Obroni Computer Club

Yesterday I was planning and prepared to hold the last session of the Obroni Computer Club that I ran at the SOS Hermann Gmeiner College. Very disappointingly, nobody showed up. Well, not entirely true: The computer lab was crammed full, as ususal around that time, but nobody was there for the club.It might have been because there were no club sessions the last two weeks because of exams, and the students forgot that I told them that there will be another session after that in a mail back then. It might have been because the IG2 class (10th grade), which presumedly make up the largest part of the club, had a meeting at that time. Or it might just be that I did not mange to awaken the student s interest and nobody cared.I have put all material for the club, together with various other documents from my SOSHGIC time, on the Ghana contents section of my now (mostly) bi-lingual and very slightly redesigned homepage.

4 December 2006

Joachim Breitner: FourFours in Haskell

An interesting programming puzzle appeard in the Blogosphere: To describe every integer from 1 to 100 as a calculation involving only and exactly four fours, and standard operations. There are solutions in C# (code) and in python (code), so I tried to do mine in Haskell.This seems to be meant for Haskell. The Type system makes the program really great to read. Functional programming allows me to conveniently create all possible associations of four operands with three binary operations. (I found five. Why are the other two sources using four?) And, in this program particular, the use of the list monad to quickly generate a list of all possible combination is really a programming-time-saver.The program is not too slow either (IBM Thinkpad T41p with Intel M 1700MHz):
$ time ./fourfours >/dev/null
real 0m0.917s
user 0m0.852s
sys 0m0.040s
And it could probably be sped up by using some kind of hashing or similar stuffs. Note that the program has only 73 mostly quite short lines, while the python code has 119 and the C# code has 138 of relatively long lines (comments and empty lines not counted). I think this is impressive (unless you have worked with haskell a bit, then you are used to these kind of results). Comments welcome!

Joachim Breitner: A Developer s GUI for Infon

One of my projects here at the KACE in Accra, Ghana, is to make the live programming game Infon a useful tool to teach programming. Until now, programmers had to upload their code to the server over a telnet or netcat connection. To lower the initial threshold for new users, I wrote an editor for infon bugs, using python and gtk. The features are:You can find a screenshot on the webpage for infon-devel.I also created Debian packages for the infon server, the infon viewer and my GUI, which you can find on my people.d.o page. The server and viewer packages are currently waiting for inclusion in Debian s experimental branch in the NEW queue and infon-devel will follow that path after some positive feedback (or lack of negative, we ll see).Further plans include a comprehensive documentation of the bug s API and maybe some hints for teachers how to use the program in classes. Comments with regard to the GUI, the debian packaging or the game in general are highly appreciated. You are also invited so swing by #infon on freenode.

1 December 2006

Joachim Breitner: Personal Podcast Charts

I don t have a TV here in Ghana (and I don t miss it at all), but some audio-visual content consumption from time to time is nice. Therefore, I started to subscribe to various Podcasts, using the comfortable Democracy Player. Here are my regulars , also see my list of German podcasts.BrickfilmsSome like lego. Some like stop motion animation. I like both. Therefore, I am a big fan of lego movies, and the brickfilms blogcast delivers the best ones directly to me. Unfortunately, does not get posted to very often.Olde EnglishMy sense of humer is not every one else s. Therefore, I guess not everyone will enjoy the sketches of the Olde English comedy group. I could try to list some of my favorites episodes, like One picture every day , but discover that for yourself.BSODInteresting, highly technical hour-long podcast covering interesting topics such as how the telefone system works (and what funny things you can do with it), bulding a infra-red remote control gun that will control your (or anyone s) TV from quite a distance and similar topics. It could cover a bit more software topics, and less Windows based things and personally, I think the Bastard Sons of Dial-Up put slightly too much emphasize on bad language and underground-activists-like appearance. But that might be genuine, and the content is of good quality, so it is worth watching.The Tech JunkiesOnly three episodes so far, but these two guy are doing great and funny things with electronics (such as testing what happens when you plug a speaker into the power outlet). They also have covered lock picking, and I especially enjoyed seeing a bump key in action, as so far I only read about that technique.Player 1 vs. Player 2A two-guy talk show about computer games. Slightly oriented towards old and console games, but still interesting for most gamers, I d say. They have not released a new episode for almost a year now, I hope that they will start sending again some day.

Joachim Breitner: Personal Videocast Charts

I don t have a TV here in Ghana (and I don t miss it at all), but some audio-visual content consumption from time to time is nice. Therefore, I started to subscribe to various Videocasts, using the comfortable Democracy Player. Here are my regulars , also see my list of German podcasts.BrickfilmsSome like lego. Some like stop motion animation. I like both. Therefore, I am a big fan of lego movies, and the brickfilms bodcast delivers the best ones directly to me. Unfortunately, does not get posted to very often.Olde EnglishMy sense of humer is not every one else s. Therefore, I guess not everyone will enjoy the sketches of the Olde English comedy group. I could try to list some of my favorites episodes, like One picture every day , but discover that for yourself.BSODInteresting, highly technical hour-long videocast covering interesting topics such as how the telefone system works (and what funny things you can do with it), bulding a infra-red remote control gun that will control your (or anyone s) TV from quite a distance and similar topics. It could cover a bit more software topics, and less Windows based things and personally, I think the Bastard Sons of Dial-Up put slightly too much emphasize on bad language and underground-activists-like appearance. But that might be genuine, and the content is of good quality, so it is worth watching.The Tech JunkiesOnly three episodes so far, but these two guy are doing great and funny things with electronics (such as testing what happens when you plug a speaker into the power outlet). They also have covered lock picking, and I especially enjoyed seeing a bump key in action, as so far I only read about that technique.Player 1 vs. Player 2A two-guy talk show about computer games. Slightly oriented towards old and console games, but still interesting for most gamers, I d say. They have not released a new episode for almost a year now, I hope that they will start sending again some day.

25 November 2006

Joachim Breitner: USBless in Africa

(For those who just turned in: I m currently in Ghana, doing some Free Software advocating. Read the rest of the blog for more)I just came home from a nice day trip to Ada (see my next German post on that), wanting to load my pictures on my laptop. My laptop was already running, as I m mirroring the debian archive to my external hard drive, as I need that for my work at the Kofi Annan Center in Accra. So I plugged in my camera to the second USB port and copied the files onto my laptop. Fine so far.I happen to have a second hard drive with, among other things, has a copy of my picture website. I then generate and update the thumbnails and web pages there, before I upload the changes with rsync. But when I plugged in the cable (I don t think I plugged the hard drive in already), my laptop, an IBM ThinkPad 41p, suddenly goes off. It took a few seconds and the removal of the battery to turn it back on again.Now it seem that my USB is broken. The system logs says it detects the internal hub all right, but shows no reaction to any devices (hard drive, camera, mouse) that I plug in. The disks get power and spin up, the optical mouse stays dark. Same thing if I use the port replicator. The internal Bluetooth device powers on (according to the LED) but is not detected as well by the sytem. So looks like my laptop now has no USB support any more.This is a bummer. I m in the middle of the so called forgotten continent, and I need my laptop with out it as a tool, I could not do my work at KACE, and I could just fly home so sending it in is not an option. On the other hand, I also somewhat need the USB port: I can t publish my pictures without it, I can t do backups and I can t have the debian mirror that I need for my DeCaf project that I want to work on at KACE. I only have two hopes: That it will work after the next reboot or that I can find a reasonably priced PCMCIA-USB2-Adaptor in Accra. Wish me luck.

Next.

Previous.