Older blog entries for cerquide (starting at number 56)

I have finished version 1.0 of Real Components, a small plugin for Ruby on Rails. It can be download from here

The idea is to ease the automation of the development of sites where you can come to a page from several other pages and the usual behaviour is that you go back to the page from where you came.

It is my first Rails dev.

4 Dec 2005 (updated 4 Dec 2005 at 10:37 UTC) »
fxn, maybe you can take a look at this paper to see how usually the operations in relational algebra are defined. The best reference for that is Date's book (appears cited in that paper).

Lately I have been playing with several things:

  • Objective C and GNUStep framework. Funny and worth a try. Do you want to know where from did Java obtained the good ideas in their design and how much was lost when they decided to go with static typing? Learn Objective C.
  • Looking for a collections library in C. Found SGLIB, Glib, Kazlib and gdsl as viable alternatives. I think I prefer SGLIB.
  • What is a UNIX system? Found out about Opengroup's Single Unix Specification. Worth consulting.
  • Amazing Language D, next in my list of programming languages to be tested

Quite a long time since my last post.

I have connected to trabber. It is worth a try. Thanks to Óscar for developing it and sending an e-mail.

For unconfesable reasons, the last three days I have been trying to make a program that connects to a website in such a way that the owner is unable to distinguish it from a human. Maybe it seems obvious, but unless you have a very good knowledge of Internet Explorer or Mozilla internals + a good javascript interpreter this is very hard to do by coding (even using Perl's WWW::Mechanize). However, it is reasonably easy to do by using Internet Explorer as a component. This can be easily done using Python+win32com. So, I have learnt a bit of python and successfully developed the script. Furthermore, there is a nice tool named PAMIE that eases things even more. Well, the last three days I have been playing a bit with all these things, I must admit.

We (Francesc Sebastià and I) have developed a small program that allows a Windows user with the spanish keyboard to write polytonical greek. It is a nice tool that we hope we will be able to offer for free and open source (by now the Electra group is financing the development).

Multidimensional separation of concerns

Browsing around I found the following paper: "Multidimensional Separation of Concerns and The Hyperspace Approach". And I have discovered the Hyper/J2 language and the Eclipse CME project.

They have formalized part of the ideas that I exposed in the previous entry.

Also in "A Generalization of the Hyperspace Approach using Meta-Models", one can find these ideas with a good mix of UML.

Nice reading.

Since I am going again through my UML course, I am reading again and thinking again about use cases, layers, UML, classes, objects and GUIs stuff.

My main objective is to find a way that I can show in simple examples how to model a small problem using UML and then go and implement this design into a program respecting a clear separation of concerns and keeping a reasonable object oriented model. The problem is always the GUI.

I have been looking at some XUL frameworks, but they are not object oriented at all.

However, I have found two interesting frameworks to check:

Both of them construct a GUI from a domain model.

Obtaining a design with separation of concerns puts the GUI code "close to" the GUI code and the model code "close to" the model code. Patterns such as MVC do that. However, those patterns (even PAC) end up with a lot of data flowing through the objects, contrarily to what would be expected in a nice OO design (I mostly do agree with most of Holub opinions as expressed in his Javaworld articles). A nice OO design will ask for putting code "close to" the data it needs to execute.

I think that the main problem as of today is with current programming languages and the idea of "close to". Current programming languages rely for their design in the concept of file. It should be possible to express a program or system as a set of files. If two things appear in the same file, it means they are somehow "mixed" or "close to" each other. Think of the ".h"-".c" stuff in C, or the "1 class"-"1 file" java stuff.

Usually, in any reasonable programming language, the environment for a piece of code is determined by the set of "files-packages-modules" that are "included-imported". This is a kind of 1-dimensional dependency relationship that allows us to structure our code into a "package dependecy tree". However, there is no possibility that the same class is present into several packages. There is no possibility (in the sense of the programming language making it simple) for a package to export several different APIs for its usage by different kinds of users. There is no direct structuring of the packages (in Java, classes import classes, but no dependency between packages can be expressed).

I think that, in order to organize code in a way that I will be proud to show my students I will need a programming tool (not language, the concept of language is too tied to the expression of programs as a set of words instead of as a set of diagrams for example) which allows me to express these ideas. A tool that allows me to describe the system architecture and the go on and fill in the details. I have to think of a way of structuring the following fundamental concepts into a software system:

  • Layers
  • Classes
  • Packages (or modules)
  • Interfaces
  • Objects
so that every piece of code is located and has dependencies exactly on what it needs.

I think that the only reasonable result is that code resides in a database where it can be accessed from several perspectives and is edited by a tool instead of residing in a set of files and being edited by a (however advanced) file editor.

The WAI group site I have been working on is in beta stage. Can be accesed at its definitive location WAI

Finally I hacked a bit into the basilic php and python and constructed a small system that goes easily from a bibtex file to a publications site (including the automatic download of pdf files if the url field is defined in the bibtex entry). That was fun.

I have been testing some PHP frameworks for CMS. I have selected xoops to build my research group website. It is a nice piece of work with many different modules. I am also going to use the basilic publications manager.

In order to put the website in place I have been learning xoops and hacking LAMP for the last two days. PHP is an order of magnitude faster development than Java (and I have been hacking Java for some years).

18 Oct 2004 (updated 18 Oct 2004 at 17:26 UTC) »

Happily (and sometimes unhappily) hacking Ocaml. Today I had a problem with the Ocaml binding for gsl that took me about 6 hours to fix. Now it is done!

I keep up with the idea of rewriting Durin in Ocaml. My (inefficiently coded) Perl code is about 40 times slower. Running a set of experiments was about 1 day and a half in a cluster of 20 computers. The Ocaml version is about two ours on my desktop computer. Anyhow, I still have some problems to write Ocaml code that looks clean and easily readable.

After meeting Marcus Hutter in Padova, I got interested in his theory of universal artificial intelligence. I have ordered the book and in order to prepare for it I am reading An Introduction to Kolmogorov Complexity and Its Applications.

Writing from Padova. I am in Discovery Science 2004.

I am running two student projects that use PNL. I have to prepare a quick introduction to Probabilistic Graphical Models for undergrads.

After talking to esteve I have decided to propose a project in Learning in Games, concretely centered in repeated games. The main idea is to develop software that supports in making research in learning in repeated games. That means that the software should be able to:

  • allow the easy definition of a repeated game (including Bayesian games, if possible)
  • allow the easy definition of one (or a set of) players of a repeated game. This includes a library of well known players such as fictitious players.
  • allow the easy definition of an experiment (sampling games from a probability distribution over games).
  • run experiments and show graphs that are illustrative of whether there is convergence, computes averages of performance for different sets of players, etc.
The second step would be to think about creating new players, programming them and making experiments to evaluate their efficiency.

Interesting resources for the topic are:

6 Aug 2004 (updated 6 Aug 2004 at 19:31 UTC) »

I am learning Ocaml by trial and error. I have decided to drop Durin development in Perl and I have migrated most of it to Ocaml refactoring some pieces for consistency. That way ODurin has been born.

Hacking Ocaml provided me mixed feelings. From Ruby, I have noticed a lack of commodity, that turns out in more time developing for the same task. IMHO Ruby is the best programming language I have tried yet. A pitty the interpreter/compiler is not more efficient. Apart from that, I like Ocaml. I feel like there are two kind of languages: C, C++ or Java make it difficult to refactor and freeze your design. Perl is somewhere inbetween. Ocaml and Ruby allow you to quickly modify your design. This means that a single developer can maintain a much bigger project with dynamic specs in Ocaml than in C. Since in research programming specs change a lot. I have decided to stick with Ocaml for a while.

And Ocaml is efficient!!! It really is!!

I have integrated Ocaml with the NTL package using Swig. I spent a whole day until I found out that C++ references are not that simple to work with in the Ocaml-C++ Swig interface and I dropped them all to use pointers.

47 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!