Posts

Showing posts from 2009

Major breakthrough in image processing

In fact, this breakthrough is based on Haskell . Find all the resources here: http://userpages.uni-koblenz.de/~laemmel/bildverarbeitung/ Or just go right away to this YouTube video to get a quick idea: http://www.youtube.com/watch?v=eKVxlHG6Jrw This lecture was prepared upon invitation by the local research team on active vision . They asked me to hold a lecture on "Bildverarbeitung in Haskell" (engl.: "Image processing in Haskell"). Here I should mention in passing that their invitation was about an Xmas party kind of workshop. Accordingly, my lecture is short and somewhat contrived, but see for yourself. More importantly, all the shown Haskell code is short, well-typed, and available for download, but totally useless. Technically, the shown, 4th encoding of "image processing" encodes "Bildverarbeitung" and potentially other words, letter by letter, in the type system. The overloaded functions for the letters of the alphabet can only be composed...

OOPM-Vorlesung auf der Treppe

Im folgenden fasse ich die Abläufe zusammen, welche ultimativ zu der "Treppenvorlesung" in der OOPM -Veranstaltung am 26.11.2009 geführt haben. Alle die dabei waren, hatten trotz des schlechten Sounds und der Besetzung doch auch ein bisschen Spass neben all der harten Materie? _______________________________________________________ 25.11.2009, 13:03, Post von ASta -Vorsitz in Newsgroup infko.general "Die VV [Vollversammlung, Anmerkung PF] aller Studierenden hat soeben beschlossen, dass der Audimax (D 028) besetzt wird." _______________________________________________________ 25.11.2009, 13:39, Reply von PF in eben dieser Newsgroup "Was ist die Semantik dieser Aktion insbesondere in Hinblick auf die Frage, ob damit grosse Vorlesungen im D 028 bis auf weiteres abzusetzen sind?" _______________________________________________________ 25.11.2009, 17:45, PF veröffentlicht eine Blogpost zum Thema http://professor-fish.blogspot.com/2009/11/vorlesung-kampft-um-ihr...

Vorlesung kämpft um ihre Austragung

Durch eine Vollversammlung der Studenten wurde heute auf dem Campus beschlossen, dass unser, über alles geliebte AUDIMAX (grosser Hörsaal D 028) besetzt wird. Dies zu tun, ist das demokratische Recht der Studenten und deren Argumentation ist anderswo verfügbar. Ich werde mich hier dazu nicht weiter äussern. Allerdings überlege ich gerade, ob und wie diese Aktion meine donnerstägliche OOPM- Vorlesung in eben diesem Raum (follow @oopm, siehe Link hier http://userpages.uni-koblenz.de/~laemmel/oopm0910/ ) beeinträchtigt. Da weder AStA noch die Uni-Leitung, noch irgend jemand anders mit Autorität, so weit ich weiss, bisher klare Empfehlungen gibt, was anstehende Veranstaltungen im D 028 angeht, versuche ich mal etwas OOPM-spezifisches -- in der Hoffnung dass ich nicht unwissentlich meine Beamten- und demokratischen Pflichten verletze: Gelingen und Kooperation durch die Besatzungsmacht vorausgesetzt, findet die morgige OOPM-Veranstaltung im D 028 in unkonventionellerer Form statt. Ich höre...

Countdown with Prolog

I was just going through G. Hutton's Haskell code for the (simplified) countdown problem which I plan to mention in a class on functional programming. The aforementioned code is discussed in the wonderful book " Programming in Haskell ". The development of the brute-force model looks verbose and detouring however. (This is probably because the problem serves some pedagogical purposes.) Here is a simple Prolog-based solution. It is much faster than the brute-force Haskell-based solution, also because some optimizations are naturally achieved by a straightforward solution. I am sure others have tried this because it is so strikingly obvious. Suppose you want to compute a given number X, by applying the arithmetic operations addition, subtraction, multiplication, and division to numbers picked from a given sequence of positive natural numbers, while using any candidate at most once, and all intermediate results must be positive natural numbers again. For instance: 7...

PPDP 2009 over and Prological SYB code goes live

Just tried to send an email to what I thought would be the cafe mailing list of the Association of Logic Programming (ALP). My message bounced. Sigh! Anyway, here is the message and below you also see the content of the README file for the tiny code distribution for scrap[p]ing boilerplate prologically. From: Ralf Laemmel rlaemmel@gmail.com To: Alp-cafe-request@babel.ls.fi.upm.es Date: Thu, 10 Sep 2009 22:57:11 +0100 Subject: post-PPDP 2009 greeting Not sure whether this mailing list is actually working (because I haven't seen any traffic since June when it all started) but I thought it couldn't hurt to send a short post-PPDP 2009 greeting. António Porto, Francisco J. López-Fraguas, Pedro Quaresma, Ana Paula Tomás, and their collaborators have put together a great conference event. The program was really packed; perhaps even a bit stressful :-) I would have loved to interact a bit more during additional breaks and panels. For what it's worth, I have uploaded the SYB source...

Decreasing salaries with addition

There are some parts of my PPDP 2009 invited talk that didn't make it into the short paper for that talk. In particular, I played a bit with the feature interaction of traversal (SYB) and using predicates in different modes. The use of multi-mode predicates is one of the exciting aspects of logic programming. (It is somewhat disputed how crucial or useful it is, but it is impressive/expressive anyhow.) For instance, beginners are always surprised to see that one can use append/3 to both .... well ... append but also take apart lists. So I considered the question how to use such multi-modeness, if at all, perhaps even usefully, in the context of traversal programming. Here, we would expect traversal predicates to serve the normal forward direction (traverse first argument, compute second argument) and the unusual backward direction . Let's consider the following, recession-inspired scenario for the sake of the argument: We certainly know how to increase salaries (say by 1 $) ...

Locked into a juicy apple

A bit more than 2 years ago I got bored by my usual XP+cygwin box (and I had given up on Linux anyway), and thought I would try a mac. Meanwhile I have tried macs a lot, spent a fortune on software. Sigh, I am having quite some hardware issues, but fortunately everything so far was covered by warranty or apple care. Anyway, my house is the perfect Mac Family place: several MacBook[pro]s, a time capsule, an iPhone, several editions of all the basic software (iWork, iLive, Mac OS -- Snow Leopard pre-ordered), and a good deal of pay and freeware (e.g., several kinds of screen/video capture/recording). Here is the problem: I have gotten addicted to apples. So let me self-diagnose whether I can get rid of that addiction: I write texts with web apps or with LaTeX. Other Oss can do this too. I use .key for slides. Some bits would get lost in translation to .ppt[x]. iTunes seems to be platform-independent, no? iPhoto. Who needs that? I am using Picasa above it anyway. iWeb. Why did I ever st...

SWI-Prolog's Java Interface JPL

I would like to mix Java and Prolog code on a number of occasions. Together with a student of mine (Joachim Pehl), we just convinced ourselves that the JPL library of SWI-Prolog is really cool. Basically JPL allows you to call Prolog from Java and Java from Prolog. But the question is, of course, how easy is it and can you easily go back and forth . For instance, can we call Prolog from Java and call back Java from Prolog and share Java state throughout? Sure it works! PROLOG PORTION FOLLOWS % This library is all we need to call Java from Prolog :- ensure_loaded(library(jpl)). main :- % Create an object jpl_new(class([],['Test']), [], X), % Printing objects is like printing object ids write(X),nl, % Access a field of the object; happens to be static jpl_get(X, state, Y), % Prints whatever the state's value is write(Y),nl. JAVA PORTION FOLLOWS // This jar is all we need to call Prolog from Java import jpl.*; public class Test { public static int state = 0; ...

The same guy as "Grammarware, Haskellware, XMLware"

What's wrong with the old blog? I have been using http://blogs.msdn.com/ralflammel/ for some blogging until now. I created that blog when I was still a MS employee and it may be inappropriate to keep using this blog forever. Not that I have any plans to say anything controversial about MS in the future, but some of my personal opinions may be inappropriate on a blogger's domain that is mostly used by MS employees with often more MS-related content. Actually I really like some MS technologies, and I think I can speak about them much more easily when not being hosted on msdn. Why "Professor Fish"? I was looking for a content-free title and so I recalled that one of the more offensive students in one of my courses called me a "fish" in a newsgroup. I actually like that name because I like the sea and I like to swim and I like sea food. Anyway, the name is still better than "grammarware, haskellware, xmlware" (the name of my msdn blog) because I also ...