From owner-freebsd-arch@FreeBSD.ORG Fri Aug 15 00:39:30 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0F9BCDF; Fri, 15 Aug 2014 00:39:30 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id CC1D127A6; Fri, 15 Aug 2014 00:39:30 +0000 (UTC) Received: from u10-2-16-021.office.norse-data.com (unknown [50.204.88.51]) by elvis.mu.org (Postfix) with ESMTPSA id 72845346DE36; Thu, 14 Aug 2014 17:39:22 -0700 (PDT) Message-ID: <53ED571A.9030503@mu.org> Date: Thu, 14 Aug 2014 17:40:58 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: freebsd-arch@freebsd.org, John-Mark Gurney , marcel@freebsd.org, Poul-Henning Kamp , Konstantin Belousov , Phil Shafer , Warner Losh Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML References: <201408141516.s7EFGE4a096197@idle.juniper.net> <746AC443-B255-47DD-8C24-3E3A32A5CC05@bsdimp.com> In-Reply-To: <746AC443-B255-47DD-8C24-3E3A32A5CC05@bsdimp.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 00:39:31 -0000 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