public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: George Shapovalov <george@gentoo.org>
To: gentoo-portage-dev@gentoo.org
Subject: Re: [gentoo-portage-dev] portage-ng concurse entry Was: Updated Portage project page
Date: Fri, 5 Dec 2003 13:33:04 -0800	[thread overview]
Message-ID: <200312051333.04801.george@gentoo.org> (raw)
In-Reply-To: <200312051326.47191.pauldv@gentoo.org>

I'll answer this one as this seems a bit more substantial and I would really 
like to keep the discussion on this list. 

On Friday 05 December 2003 04:26, Paul de Vrieze wrote:
> Prolog != AI
> AI != undeterministic
Quite often these are synonimous (or were, when I was looking into this. But I 
must admit this was quite some time ago), but strictly speaking you are 
right. I'll update that section of the page.

> prolog is very good at graph traversal tasks (which is what AI in many
> cases involves and why in AI prolog is used a lot) as the mode of operation
> is basically a depth-first backtracking search algorithm (about 10 lines of
> pseudocode). For that reason I think it is a good candidate for the new and
> improved dependency algorithm.
Shouldn't it be breadth-first? With depth first you might need to do 
adjustments to the formed list occasionally, if multiple nodes go to the same 
dependency in a different number of steps. I think I was able to produce the 
example of such situation, but I would appreciate any good pointers to a 
theory :).

As fot the lines of code, that's anecdotal. 
(adding from the other email:)
>  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

The *traversal* code (btw I use BFS traversal there, not DFS) is completely 
localized in bc-graphs-directed-bfs_traverse.adb and is about the same 10 
lines :) and is completely generic. 
The rest of 990 lines deal with such mundane tasks as reading the (possibly 
misformed) ebuilds and dealing with user (inluding minimalistic help). 
Essentially just doing what you describe here:

> While prolog is very good for such tasks I don't think it is suited to
> implement the core of portage. This is not because I think prolog is a
> problem, it is because I think that such languages are not suited for
> procedural dispatch, divide, etc. tasks. That is something that C is good


> Then about caching
Well, I stated in the writeup that this is a simplistic design only relevant 
for the prototype. However I'll try to explain my reasoning for the future 
discussions.
(To drobbins: yes, I am afraid we are pulling the "discussion before 
requirements" thing again here. But this it the core and unavoidable part of 
the design, so it will definitely be there. Also I am trying to localize the 
discussion to this list only).

Thus note, all the comments below concern this hypothetical design I used in 
language demonstration, but that will probably be rethought for the real 
design.

> While you have a point with your prediction on number of packages, most of
> those packages involve leaf packages. That means that the number of
> dependencies per leaf package will probably not increase. However the
> amount of packages totally not regarded will grow. For this portage should
> do some kind of on-demand loading of packages. I see no need whatsoever to
> have a normal emerge task load in the whole tree and create a graph of
> that.
I somewhat agree with that. However my observation is that these packages most 
often are libraries or other helpers that user is usualy not interested in 
directly. And the long operations are the ones where you have to do searches 
or operations involving world. So I have been thinking along the lines of 
making the longest operations fast and bounded, getting the O(1) 
responsivity. 
But in reality I do not think this shpould be "the ultimate solution" or even 
that there should be one. See the next one.

> I would like portage to remain lean and mean. I do run gentoo on a 16MB
> 60mhz pentium, and I like it. While the cache should also be a module that
> replaces a direct-tree-read module (possibly wrapping it), I think that
> caching should be possible on a configurable level. Not just dumbly load in
> all ebuilds.
Touche :). 
That's why I spent so many words discussing memory layout.
However the real solution IMHO should allow multiple dependency trackers 
(cores) to be plugged as desired (choice of both at compilation and run-time 
(i.e. choosing at compilation to be able to choose at run time :))). And for 
that we would need a high level of efficient abstraction. And this is what 
got me started thinking about Ada :).


And finally:
> 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.
Could you please elaborate? I am afraid we are thinking about slightly 
different things here.

I stay by my thought that any important to the system tool should be dumb. If 
there is any uncertainty it should stop and ask, unless it was designed for a 
very specific situation, where it can be trusted to make the choice. Package 
maintaince is not such area - IMHO every user that has identical 
configuration should get identical results (to the extent possible. So here 
we are talking requirements Daniel ;)). Otherwise we are facing a disasterous 
consequencies wil many people complaining and us being unable to reproduce 
anything reliably.

George



--
gentoo-portage-dev@gentoo.org mailing list


  reply	other threads:[~2003-12-05 21:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-05  9:58 [gentoo-portage-dev] portage-ng concurse entry Was: Updated Portage project page George Shapovalov
2003-12-05 12:26 ` Paul de Vrieze
2003-12-05 21:33   ` George Shapovalov [this message]
2003-12-06 14:26     ` Paul de Vrieze
2003-12-06 19:35       ` Daniel Robbins
2003-12-06 19:41         ` Jon Portnoy
2003-12-07  0:13           ` [gentoo-portage-dev] ebuild strengths/weaknesses Daniel Robbins
2003-12-07  1:44           ` [gentoo-portage-dev] portage-ng concurse entry Was: Updated Portage project page Jason Stubbs
2003-12-07  2:39             ` George Shapovalov
2003-12-07  3:12               ` Jason Stubbs
2003-12-07  4:50               ` Ray Russell Reese III
2003-12-07  7:27                 ` Daniel Robbins
2003-12-07  7:40               ` Daniel Robbins
2003-12-07  9:11                 ` Kapil Thangavelu
2003-12-07 11:11                   ` Paul de Vrieze
2003-12-08 16:03                 ` [gentoo-portage-dev] portage-ng concurse entry Was: Updated Portage project page, ebuild conversion Sandy McArthur
2003-12-07 11:05         ` [gentoo-portage-dev] portage-ng concurse entry Was: Updated Portage project page Paul de Vrieze
2003-12-07 19:59         ` Philippe Lafoucrière
2003-12-07 20:10           ` Philippe Lafoucrière
2003-12-07 20:12           ` Jeff Smelser
2003-12-07 21:01             ` [gentoo-portage-dev] gpg signing of Manifests Douglas Russell
2003-12-07 21:53               ` Douglas Russell
2003-12-06 23:00       ` [gentoo-portage-dev] portage-ng concurse entry Was: Updated Portage project page George Shapovalov
2003-12-07 11:18         ` Paul de Vrieze
2003-12-05 16:54 ` [gentoo-portage-dev] portage-ng design competition -- not yet Daniel Robbins
2003-12-05 20:35   ` George Shapovalov
2003-12-05 21:59   ` [gentoo-portage-dev] portage-ng wish list Sandy McArthur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200312051333.04801.george@gentoo.org \
    --to=george@gentoo.org \
    --cc=gentoo-portage-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox