Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 17:40:58 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        freebsd-arch@freebsd.org, John-Mark Gurney <jmg@funkthat.com>,  marcel@freebsd.org, Poul-Henning Kamp <phk@phk.freebsd.dk>,  Konstantin Belousov <kostikbel@gmail.com>, Phil Shafer <phil@juniper.net>, Warner Losh <imp@bsdimp.com>
Subject:   Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Message-ID:  <53ED571A.9030503@mu.org>
In-Reply-To: <746AC443-B255-47DD-8C24-3E3A32A5CC05@bsdimp.com>
References:  <201408141516.s7EFGE4a096197@idle.juniper.net> <746AC443-B255-47DD-8C24-3E3A32A5CC05@bsdimp.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

On 8/14/14 8:23 AM, Warner Losh wrote:
> Sorry for top posting, this really isn=92t responsive to the minutia in=
 the rest of the thread.
>
> I=92m curious. Why isn=92t this conversation about =93foo =97supports-x=
ml=94 ? Why tag these commands with weird, non-standard things that need =
more exotic tools to dig the information out. Why not have a standardized=
 command line option that prints nothing and returns 0 for success, or wh=
ines and returns 1 for failure? That=92s way more standardized than addin=
g obscure notes that may or may not be allowed by the standard, but that =
we traditionally haven=92t done, which requires tools that aren=92t stand=
ardized and whose interface varies from one tool to the next. This is tru=
e of asking about DT_NEEDED (which forces a specific library for the impl=
ementation) as well as anything placed in the NOTES section. It also assu=
mes that you know the thing you are querying is an ELF executable, that y=
ou can find it, that there=92s not a shell script wrapper for that tool t=
hat redirects to binaries that do support this, etc, etc etc.
>
> Basically, what does this =91meta data=92 really buy you that can=92t b=
e bought some other, more standard, more direct way that doesn=92t enshri=
ne so many hard-coded implementation decisions into the mix?
In addition I am wondering what branding the binaries really offers "as-i=
s".

Example, let's say you have a means to query and find out that "netstat" =

supports libxo.

Well, netstat has many output variants:
netstat
netstat -r
netstat -a
netstat -nr
netstat -na
netstat -p tcp

So given that is appears that we want to build something so that "file=20
browsers" can automatically determine that a program can be run in=20
"libxo" mode and some form of output should be rendered, what exactly is =

the preferred format?

What happens when a particular program's default behavior is to filter=20
stdin, but yet supports libxo, how is that handled?

What happens when a particular program's default behavior is to run=20
indefinitely, and yet supports libxo, how is that handled?

It makes sense to limit the scope of the project to just doing the=20
formatted output at least until we see what we get when get a whole=20
bunch of tools running with it.

Speaking of getting a whole bunch of tools running with it, the GSOC=20
project happened to have near a dozen programs converted, how is the=20
libxo project coming along, do we have more programs converted? Without=20
the programs converted we don't have very much to show even with a great =

library.

What other apps use libxo in the tree now?

-Alfred





Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?53ED571A.9030503>