Posts

Showing posts from August, 2009

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