On 05 Dec 2003, at 10:58, George Shapovalov wrote:
To reiterate them shortly, Prolog is a really esoteric language and I am not
sure we will be able to find enough people to feel comfortable about having
the very core of portage-ng implemented in it. Also there might be issues of
portability and efficiency..
My biggest concern when reading your small paper is that you chose a deterministic approach to this problem, while in fact the problem is non-determinisitic. Also, your code (which is about 1000 lines long) does -only- a simple dfs and topological ordering, while I can do the same in about 10 lines in prolog and have backtracking for free. I don't see any reasoning about versions, virtuals, constraints, slots, updates, upgrades, downgrades, ... While you claim your code is more portable and efficient, I don't see any substantiated evidence that prolog isn't; neither do I see any evidence that your implementation is correct, while it can be shown that the 'specifications' one declares in prolog are interpreted correctly by prolog, which is -one- of the reasons I preferred prolog.
There are more advantages to using prolog. But let me point you at some downsides first. Prolog is logic programming, and people tend to avoid logic (and choose other languages like Ada for instance). However, because of its relation to logic, Prolog is often used in reasoning systems, which is in fact what portage is.
I don't want to start a flame war about programming languages. That would be totally useless because the nice thing about programming languages is that they are all somewhat equivalent but some more expressive than the other for a given problem.
I have produced some basic prototyping code to
illustrate what could be expected. The prototype is quite crude, as I did
this during relatively rare breaks from writing an article (completely
unrelated to CS :)), but it should serve the purpose. Did I say the code
shoul be readable? So, even though I do not expect many people to be familiar
with that language I would still suggest trying to look at the code. You are
in for a one nice surprise ;).
Ada is a really nice language, but I don't see any direct relevance for the problem at hand.
(I am not revealing the name of language in this posting deliberately, because
I want people to read through arguments first).
The code is available here: http://dev.gentoo.org/~george/proto_portage-0.7.5.tar.bz2 but you will probably want to read the text before that.
In any case, if you want to jump in, just a short install instruction:
run "emerge gnat booch_components "
then untar the package and run make
Although reading INSTALL that comes with the package might be usefull too ;)
(it has some details in case you experience problems).
George
For my thesis and apprenticeship at the Theoretical Computer science laboratory at the free university of Brussels (tinf.vub.ac.be), I have been looking into these issues. The techique we have developed for reasoning about large software configurations such as a meta-distribution will be presented on a Gentoo meeting in the future, and can be implemented in any language you prefer. I will have a fully functional prototype in prolog, because that language offers some benefits, but the idea itself can be implemented in any other language such as Ada or friends.
Pieter
-- [EMAIL PROTECTED] mailing list
