From owner-freebsd-current@FreeBSD.ORG Mon Mar 2 04:43:23 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF58E363; Mon, 2 Mar 2015 04:43:23 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id A88DD8E0; Mon, 2 Mar 2015 04:43:23 +0000 (UTC) Received: from AlfredMacbookAir.local (hudsonhotel209.h.subnet.rcn.com [207.237.151.136]) by elvis.mu.org (Postfix) with ESMTPSA id 3242C341F8B2; Sun, 1 Mar 2015 20:43:21 -0800 (PST) Message-ID: <54F3EB48.1030807@mu.org> Date: Sun, 01 Mar 2015 23:47:04 -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: Rui Paulo , David Chisnall Subject: Re: Massive libxo-zation that breaks everything References: <54F31510.7050607@hot.ee> <54F34B6E.2040809@astrodoggroup.com> <54F35F29.4000603@astrodoggroup.com> <75C49F53-C675-4712-A446-370025EED037@me.com> In-Reply-To: <75C49F53-C675-4712-A446-370025EED037@me.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Harrison Grundy , freebsd-current@freebsd.org 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:43:23 -0000 On 3/1/15 4:29 PM, Rui Paulo wrote: > On Mar 1, 2015, at 11:11, David Chisnall wrote: >> How would it be in a port? It involves modifying core utilities (some of which, like ifconfig, rely on kernel APIs that change between releases) to emit structured output. Maintaining two copies of each utility, one in the base system with plain-text output only and another in ports with XML/JSON output would be very painful. > It would work fine if we had *libraries* for ifconfig/netstat/route/etc. Obviously that's not the case and no one has stepped up to implement them. I've also seen FreeBSD committers expressing their distaste for libraries for "trivial" command line utilities, which implies they are unaware of another world beyond the CLI. :-) +1. Next step is making those utils into libraries. Should be easy, just make all globals into TLS and don't munge stdin/stdout in dumb ways and we're there. Glad you are a big thinker Rui. :) -Alfred