From owner-freebsd-current@FreeBSD.ORG Mon Mar 2 04:48:10 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7CE149F for ; Mon, 2 Mar 2015 04:48:10 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id C1F0E909 for ; Mon, 2 Mar 2015 04:48:10 +0000 (UTC) Received: from AlfredMacbookAir.local (hudsonhotel209.h.subnet.rcn.com [207.237.151.136]) by elvis.mu.org (Postfix) with ESMTPSA id A0EA8341F90E; Sun, 1 Mar 2015 20:48:09 -0800 (PST) Message-ID: <54F3EC68.3020405@mu.org> Date: Sun, 01 Mar 2015 23:51:52 -0500 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Harrison Grundy , freebsd-current@freebsd.org Subject: Re: Massive libxo-zation that breaks everything References: <54F31510.7050607@hot.ee> <54F34B6E.2040809@astrodoggroup.com> <54F35F29.4000603@astrodoggroup.com> <54F38B52.6090209@astrodoggroup.com> In-Reply-To: <54F38B52.6090209@astrodoggroup.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 04:48:10 -0000 On 3/1/15 4:57 PM, Harrison Grundy wrote: > I like the idea behind this... where I'm running into difficulty is why > these bits of functionality need to be combined. What someone does with > ifconfig on the command line, versus what someone wants to know about > their network interfaces in an XML dump may be very distinct bits of > information. (For instance, an XML dump of network information may want > to incorporate data from netstat, route, and ifconfig, while ifconfig is > really only designed to deal with the interfaces themselves.) Part of this is putting the burden of machine readable output into the utilities themselves. Meaning that people have complained against libxo because "well you can get the same information by combining data points X, Y and Z from sysctl" whereas ifconfig just does that for you. So if we split the code then those interfaces would wither and die from neglect because honestly very few core freebsd devs care about XML and JSON. So in order to prevent bitotting and make this a "feature" of FreeBSD, we decided to put it into the base utils so that we would be sure to carry the burden and keep it working. > I know it involves some notable reworking, but would there be any > interest in seeing what "libifying" a handful of binaries and splitting > the libxo and CLI functionality looks like? It seems like this may give > FreeBSD the best of both worlds, so the XML output isn't logically > limited by how the CLI needs to work, and the CLI won't have to deal > with the complexity XML output can require. > > I'd be happy to get this set up for a few binaries so people can see how > it might work and what it could look like if there's any interest in > going that route. Please do. That would be great. Please make sure they are thread safe. :) -Alfred