You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2002/03/12 22:19:07 UTC

comma vs space (was: Re: supporting http proxy via a config file)

On Tue, Mar 12, 2002 at 01:49:08PM -0600, Karl Fogel wrote:
> Greg Stein <gs...@lyra.org> writes:
>...
> Hmmm, yeah, this is a specific instance of the general question: do we
> want separate files under .subversion/ for different kinds of
> configurations, or do we want a single .subversion/config with lots of
> sections?  (Either way, every config file supports sections, of
> course.)
> 
> It seems like a bikeshed to me, I confess, but maybe there's a
> convincing argument for why one way is better.  Anyone care?

See my recent note titled "single or multiple configs?"

> > For the [default] case above, it is also important to have a way to disable
> > the default proxy. For example:
> > 
> > no_proxy = *.collab.net, *.webdav.org
> > 
> > (yes, the pattern ought to be comma-separated globs...)
> 
> Why comma-separated, not space-separated?

I think there will be other cases where you have "lists" of data. So the
question comes up: which will be more common in values? commas or spaces? If
you say commas are common, so use spaces, then I'd like to see the data that
has a comma without a following space :-)

The net result is that you have a standard "list format" for option values.
That is: comma-separated values.

Note that we should create: svn_string_split() which takes an svn_string_t,
a separator, and a flag on whether to strip leading/trailing whitespace.
That function could be used to split paths, split log messages, split
svn:ignore properties, and split comma-separated lists.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: comma vs space (was: Re: supporting http proxy via a config file)

Posted by Sean Russell <se...@germane-software.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 12 March 2002 15:59, Greg Stein wrote:
> Our model for the config files is more like SSH or GNOME, where you have a
> subdir and per-semantic config files. The httpd model doesn't quite apply,
> IMO.

Ok, fair enough.

> XML and PYX are not human-readable or human-editable. Therefore, they are

Say what?  I read and write XML and PYX by hand all the time, and last time I 
checked, I was human.  Vast numbers of non-professionals people, have been 
coding HTML (while not XML, similar enough) by hand for years.  While for 
trivial configurations a simple "var = val" structure is sufficient, anybody 
who has tried to look through the various KDE config files, which use exactly 
that "var = val1, val2, val3" language, should have developed a healthy sense 
of respect for decently structured data.

That said, as long as the SVN configs aren't expected to get very complex, it 
isn't a problem.  Configuration reader/writers, if decently encapsulated, 
should be easy to swap out if things go in an unexpected direction.

> results of "what format?" still apply. I'd be happy to dig up references to
> the discussion thread, if people really wanted to discuss/argue the merits
> of the formats :-)

Naw, not really.  I've said my piece.

- --- SER
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8jqllURPYGmmGtGcRAoDiAKDVLiB1tn8eB0SyhVxCX3lju4NAFgCg4bIV
S5vMGEywNkUmcAOA0k6nyZo=
=VPi9
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: comma vs space (was: Re: supporting http proxy via a config file)

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Mar 12, 2002 at 03:32:28PM -0800, Sean Russell wrote:
>...
> On Tuesday 12 March 2002 14:19, you wrote:
> > > It seems like a bikeshed to me, I confess, but maybe there's a
> > > convincing argument for why one way is better.  Anyone care?
> >
> > See my recent note titled "single or multiple configs?"
> 
> I'll admit that I haven't seen this posting, but I am reminded of Apache's 
> history.  It seems to me that, in the early days, there was a single big 
> config file.  Then there was a profusion of separate config files, which were 
> all eventually merged back in to the main config file -- I assumed because it 
> was more confusing to have multiple config files.

There were three standard files. The notion of the three was actually coded
into Apache. The problem was that there was no real, obvious semantic for
what went into what file. It was a huge mess to find what you were looking
for, because it could be in any of the three files. It wasn't *obvious*.

[ not to mention, that you *could* put anything into any file. internally,
  apache just glommed 'em together, so the separation wasn't even enforced,
  leading to even more abuse/confusion ]

> Eventually, a complex Apache configuration will tend to be broken out into 
> multiple 'include'd files, but initially, everything starts out in one file.  
> I don't know enough about the Subversion architecture to say whether this is 
> a model that should be followed, but it seems to me to be a similar situation 
> in which all of the work of deciding which way is better has already been 
> done.

Our model for the config files is more like SSH or GNOME, where you have a
subdir and per-semantic config files. The httpd model doesn't quite apply,
IMO.

>...
> Again, I'm probably way off base, but are you familiar with PYX?  PYX is a 
> highly simplified version of XML.  It maintains document structure, but is
>..
> I'm sure this has all been discussed before, and XML was thrown out for a very 
> good reason; if so, redirect this email to /dev/null.

XML and PYX are not human-readable or human-editable. Therefore, they are
non-starters. Yes, we've had that discussion long ago, and I think all the
results of "what format?" still apply. I'd be happy to dig up references to
the discussion thread, if people really wanted to discuss/argue the merits
of the formats :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: comma vs space (was: Re: supporting http proxy via a config file)

Posted by Sean Russell <se...@germane-software.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 12 March 2002 14:19, you wrote:
> > It seems like a bikeshed to me, I confess, but maybe there's a
> > convincing argument for why one way is better.  Anyone care?
>
> See my recent note titled "single or multiple configs?"

I'll admit that I haven't seen this posting, but I am reminded of Apache's 
history.  It seems to me that, in the early days, there was a single big 
config file.  Then there was a profusion of separate config files, which were 
all eventually merged back in to the main config file -- I assumed because it 
was more confusing to have multiple config files.

Eventually, a complex Apache configuration will tend to be broken out into 
multiple 'include'd files, but initially, everything starts out in one file.  
I don't know enough about the Subversion architecture to say whether this is 
a model that should be followed, but it seems to me to be a similar situation 
in which all of the work of deciding which way is better has already been 
done.

> > > no_proxy = *.collab.net, *.webdav.org
> > >
> > > (yes, the pattern ought to be comma-separated globs...)
> >
> > Why comma-separated, not space-separated?
>
> I think there will be other cases where you have "lists" of data. So the
> question comes up: which will be more common in values? commas or spaces?
> If you say commas are common, so use spaces, then I'd like to see the data
> that has a comma without a following space :-)

Again, I'm probably way off base, but are you familiar with PYX?  PYX is a 
highly simplified version of XML.  It maintains document structure, but is 
easily parsed with standard *nix command-line tools.  I've found it to be 
ideally suited for configuration files, and use it because PYX parsers are 
nearly trivial to write and are extremely small... perfect for small 
applications where XML is too heavy.  For that matter, since Subversion 
contains an XML parser, is there a reason to not use an XML based config 
file, making it similar to Apache's?

I'm sure this has all been discussed before, and XML was thrown out for a very 
good reason; if so, redirect this email to /dev/null.

- --- SER
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8jpAUURPYGmmGtGcRAsWYAJ9BTn3D7AAuclsnLONED00FKgXJ5gCfYrRS
YpVMiKLjL+GSBIUre1fwY6I=
=uUXS
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: comma vs space (was: Re: supporting http proxy via a config file)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tue, Mar 12, 2002 at 06:27:05PM -0600, Karl Fogel wrote:
 
> > Note that we should create: svn_string_split() which takes an svn_string_t,
> > a separator, and a flag on whether to strip leading/trailing whitespace.
> > That function could be used to split paths, split log messages, split
> > svn:ignore properties, and split comma-separated lists.
> 
> No, I think we should write it by hand, using inline assembly
> language, everywhere we're going to use it.

Assembly language is for weaklings who can't hack raw machine code.

;-)

-garrett 

-- 
garrett rooney                     Unix was not designed to stop you from 
rooneg@electricjellyfish.net       doing stupid things, because that would  
http://electricjellyfish.net/      stop you from doing clever things.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: comma vs space (was: Re: supporting http proxy via a config file)

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Stein <gs...@lyra.org> writes:
> I think there will be other cases where you have "lists" of data. So the
> question comes up: which will be more common in values? commas or spaces? If
> you say commas are common, so use spaces, then I'd like to see the data that
> has a comma without a following space :-)
> 
> The net result is that you have a standard "list format" for option values.
> That is: comma-separated values.

Cool, makes sense.  Thanks for the succinct explanation.

> Note that we should create: svn_string_split() which takes an svn_string_t,
> a separator, and a flag on whether to strip leading/trailing whitespace.
> That function could be used to split paths, split log messages, split
> svn:ignore properties, and split comma-separated lists.

No, I think we should write it by hand, using inline assembly
language, everywhere we're going to use it.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org