public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: antirez <antirez@invece.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: antirez <antirez@invece.org>, David Ford <david@blue-labs.org>,
	"Brenneke, Matthew Jeffrey (UMR-Student)" <mbrennek@umr.edu>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: Re: Yet another design for /proc. Or actually /kernel.
Date: Thu, 8 Nov 2001 02:51:13 +0100	[thread overview]
Message-ID: <20011108025113.F568@blu> (raw)
In-Reply-To: <6CAC36C3427CEB45A4A6DF0FBDABA56D59C91D@umr-mail03.cc.umr.edu> <20011108012051.C568@blu> <3BE9D7BD.7030308@blue-labs.org> <20011108021057.E568@blu> <3BE9DF48.20802@zytor.com>
In-Reply-To: <3BE9DF48.20802@zytor.com>; from hpa@zytor.com on Wed, Nov 07, 2001 at 05:26:32PM -0800

On Wed, Nov 07, 2001 at 05:26:32PM -0800, H. Peter Anvin wrote:
> > About the complexity. It only "looks" complex. But from the
> > machine point of view it's very simple to parse.
> > Note that the strong advantage of this isn't the quoting,
> > you can quote anyway in 1000 different ways. The advantage
> > is that data is structured and parsing does not rely on
> > spaces or newlines, but just on ().
> > With this syntax you can express data as complex and structured
> > as you want but the parsing is still simple.
> > 
> 
> 
> You just changed spaces and newlines to ( and ) -- it doesn't really solve
> anything unless you want three levels of nesting or more; in which case
> you have *WAY* too much data in a single proc item.
> 
> 	-hpa

There are anyway different ways to output the same data, and yes,
probably spaces/tabs/newlines are more human readable, but I think
the right solution isn't something that limits a-priori the
complexity of the output. This will make developers more prone
to invent their own formats for special stuff. the lisp-like way
allows you to automagically put a description of the format with
little efforts, simple parsing, unlimited complexity.
Maybe you want limited complexity, but the format isn't your limit
anyway.

About the two level of nesting, take a look at /proc/net/netstat.
it's not very clear, but in lisp-like it can be translated to:

((TcpExt)((SyncookiesSent)(0)))

and so on. For every kind of proc output you can find today, there
is a good way to convert it in that format, that is at the same
time used by all the entries. I think you will hardly get the same
with space/tabs/newlines without to indirectly use it like (), that
will probably result in something of more complex to generate/parse.

I can't see any strong reason to adopt a format that will for sure
fail at some time in the future.

BTW I see that the idea isn't well accepted, so I'll be quiet ;)

Regards,
Salvatore

  reply	other threads:[~2001-11-08  1:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-07 21:13 Yet another design for /proc. Or actually /kernel Brenneke, Matthew Jeffrey (UMR-Student)
2001-11-08  0:00 ` H. Peter Anvin
2001-11-08  0:20 ` antirez
2001-11-08  0:32   ` H. Peter Anvin
2001-11-08  0:54   ` David Ford
2001-11-08  1:10     ` antirez
2001-11-08  1:26       ` H. Peter Anvin
2001-11-08  1:51         ` antirez [this message]
2001-11-08  0:44 ` Stephen Satchell
2001-11-08  1:04   ` antirez
2001-11-08  0:55 ` Jonathan Lundell
2001-11-08  3:07 ` Stuart Young
     [not found] <w_knop@hotmail.com>
2001-11-07 19:41 ` William Knop
2001-11-08  0:27   ` John Levon
2001-11-08  8:56     ` Erik Hensema
2001-11-08 10:00   ` Remco Post
2001-11-09 16:44     ` Ricky Beam
2001-11-12 13:31       ` Horst von Brand
2001-11-12 14:31         ` Martin Dalecki
  -- strict thread matches above, loose matches on Subject: below --
2001-11-07 19:09 Erik Hensema
2001-11-07 19:27 ` Alan Cox
2001-11-07 19:42 ` Daniel R. Warner
2001-11-07 22:35   ` Allen Campbell
2001-11-07 20:58 ` H. Peter Anvin
2001-11-07 21:19   ` Justin A
2001-11-07 23:44 ` Rusty Russell
2001-11-08  0:35 ` Stephen Satchell

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=20011108025113.F568@blu \
    --to=antirez@invece.org \
    --cc=david@blue-labs.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbrennek@umr.edu \
    /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