[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: packaging system
From: |
Stefan van der Walt |
Subject: |
Re: packaging system |
Date: |
Wed, 22 Jun 2005 19:32:51 +0200 |
User-agent: |
Mutt/1.5.6i |
On Wed, Jun 22, 2005 at 02:15:24PM +0200, David Bateman wrote:
> Stefan van der Walt wrote:
>
> >I like your idea. Wouldn't it be easier to implement it as some sort
> >of tree structure, instead of a flat one? Unfortunately, we don't
> >have python's dictionaries, but maybe we can do something similar in
> >Octave like
> >
> >function [value, idx] = search(dict, key)
> > value = [];
> > for idx = 1:rows(dict)
> > if strcmp(dict(idx,1), key)
> > value = dict{idx,2};
> > return;
> > endif
> > endfor
> > idx = 0;
> >endfunction
> >
> >function d = dict(d, key, new_value)
> > if (nargin == 0)
> > d = cell(0,2);
> > return
> > endif
> >
> > [value, idx] = search(d, key);
> > if (idx == 0)
> > idx = rows(d)+1;
> > endif
> >
> > d(idx, 1) = key;
> > d(idx, 2) = new_value;
> >
> >endfunction
> >
> >
> >
> Which dict is which? You use dict as a function and a variable.... Do we
You can just rename `Dict: The Function' to set_dict or whatever.
Hey, it parses :)
> need the complexity of a tree structure for dependency check. I thought
> the interest of that was to reduce the amount of work required in
I think Bill is right -- we don't need to reinvent the wheel twice.
Finding an efficient transportable C++ implementation might not be so
easy though -- I'll take a look. As you say, anything that gets the
job done is good for now.
Cheers
Stéfan
- Re: packaging system, (continued)
- Re: packaging system, Paul Kienzle, 2005/06/20
- Re: packaging system, Søren Hauberg, 2005/06/20
- Re: packaging system, Søren Hauberg, 2005/06/21
- Re: packaging system, David Bateman, 2005/06/22
- Re: packaging system, Stefan van der Walt, 2005/06/22
- Re: packaging system, David Bateman, 2005/06/22
- Re: packaging system, Stefan van der Walt, 2005/06/22
- Re: packaging system, David Bateman, 2005/06/22
- Re: packaging system, Bill Denney, 2005/06/22
- Re: packaging system, Stefan van der Walt, 2005/06/22
- Re: packaging system,
Stefan van der Walt <=
- Re: packaging system, Søren Hauberg, 2005/06/22
- Re: packaging system, David Bateman, 2005/06/22
- Re: packaging system, Søren Hauberg, 2005/06/26
- Re: packaging system, David Bateman, 2005/06/27
- Re: packaging system, Søren Hauberg, 2005/06/27
- Re: packaging system, John W. Eaton, 2005/06/17
- Re: packaging system, Søren Hauberg, 2005/06/17
RE: packaging system, Søren Hauberg, 2005/06/15