bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: purpose for xmlfs improvment -GSoC application -


From: olafBuddenhagen
Subject: Re: purpose for xmlfs improvment -GSoC application -
Date: Fri, 25 Apr 2008 19:23:49 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hi,

On Thu, Apr 24, 2008 at 07:46:12PM +0200, Carl Fredrik Hammar wrote:
> <olafBuddenhagen@gmx.net> writes:
> > On Tue, Apr 22, 2008 at 02:34:26PM +0200, Carl Fredrik Hammar wrote:

> >> One way of tackling this would be to have a specifiable spacing
> >> between the numbers, e.g.  `10 author', `20 title', `30 isbn'.  The
> >> space will run out, but a command for re-spacing the existing nodes
> >> would be fix this.
> >
> > I don't like the fixed spacing bit, but the idea is interesting, and
> > made me think of something sligtly different: How about fractions?
> > 2.1, 2.2, 2.1.1...
> 
> Wow, that even gets properly sorted by ls.

Only as long as you stick with single digits... 2.13 will mess it up :-)

Admittedly, this is a quite serious disadvantage...

> At least with ASCII's collation, but it doesn't seem to work under
> unicode, which is unfortunate.

Shouldn't depend on the charset really, only on the collation rules of
the selected locale. (LC_COLLATE)

> Also, I can't help to think it will get annoying after three levels or
> so.

Why?

> Wouldn't it be easier to just up the spacing to, say 1000?

No. Any arbitrary spacing will always be wrong. I already hated the line
numbers in BASIC: Most of the time the zeros are just redundant; while
at other times, you don't have enough. (Just like a fixed PATH_MAX, only
worse...) And you have to think all the time what numbers best to use to
reduce the risk of running into trouble.

This is unacceptable.

> > These would be robust as long as the translator stays active. It
> > would still change when restarting the translator though, which is
> > problematic IMHO.
> 
> I don't see how the filenames can be persistent, without storing them
> in a auxiliary file or worse, in a comment.  I think we have to accept
> that they will change.  The question is when, before by renaming to
> make room for an insertion, between restarts, or both.

Well, manual renaming is out of the question IMHO.

But you are right of course: We can't achieve full persistence here.
Either we can make the filenames persist for the duration of the session
-- e.g. using the subnubers approach -- but loosing them when the
translator exits. Or ranaming happens automatically immediately after
any insert/delete. The question is which is the lesser evil...

The latter option can be inconvenient in certain situations, and
somewhat confusing to both humans and certain kind of programs... On the
other hand, it has the advantage that we always get a 1:1 representation
of the underlying XML file, without any temporary state that gets lost
on exit. This is an extremely important property IMHO.

-antrik-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]