From owner-freebsd-hackers@FreeBSD.ORG Wed May 21 07:17:50 2014 Return-Path: Delivered-To: freebsd-hackers@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 4D5569C8 for ; Wed, 21 May 2014 07:17:50 +0000 (UTC) Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com [IPv6:2a00:1450:4010:c04::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA524249A for ; Wed, 21 May 2014 07:17:49 +0000 (UTC) Received: by mail-lb0-f176.google.com with SMTP id p9so1217918lbv.7 for ; Wed, 21 May 2014 00:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=2ZTQvGy4/BR5mbqPuNVXWibC4qfwbZhtaRjeX3Tghyo=; b=EtoMk/Q2Wb36/lMmMiM3eUjAayVZ6APSZmwYkj6fsqZwkah3xASKsXZCcw3n3G+3Rs g4qRs9eL8mhPGCVMqdiNJ1iX8Ir+n6nmVMXvnh6WHYJ7bvLV16aLjK7IQ5XfI2AQWI9Z OcmCEu9oBBBkd44zik3SpJihhFZYhNXwfWhE7VVZ+A4vedQ6DhxSscCIVCm6JEcMk95L aLi/9Y5JzrFPgAsBNaKpwxFcYwiIa5qDfb2DNT2gpccsVkloNPotSbqYwoVnpUkjhI7l zRR1LA7+Tdva3TztJsldvN1YMReo79O9TMqF4v7BVgoOD7jMvW0QFd8HIiOhoQSr7E28 vfJA== X-Received: by 10.152.10.2 with SMTP id e2mr147499lab.76.1400656667490; Wed, 21 May 2014 00:17:47 -0700 (PDT) MIME-Version: 1.0 Sender: royce.williams@gmail.com Received: by 10.112.17.133 with HTTP; Wed, 21 May 2014 00:17:27 -0700 (PDT) In-Reply-To: References: <49E9736E-AD14-4647-8B15-30603D01360C@mail.bg> <91FE2526-F21C-42AB-BECB-058DBA975A9E@cederstrand.dk> <537C2993.1060206@mu.org> From: Royce Williams Date: Tue, 20 May 2014 23:17:27 -0800 X-Google-Sender-Auth: vcXBeb7-TLtNHzT-Oj59eLJ-cLg Message-ID: Subject: Re: [GSoC] Machine readable output from userland utilities To: FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 07:17:50 -0000 On Tue, May 20, 2014 at 10:17 PM, Erik Cederstrand wrote: > > > Den 21/05/2014 kl. 06.20 skrev Alfred Perlstein : > > > In all seriousness though, the real target is people writing higher level languages (than shell) on top of FreeBSD. Perhaps python or ruby spawning a utility and then that utility making the output easy to read. > > If that's the use case, than I'm fine with this. I often find I need to combine Python and shell output (working with dates in shell is horrible, for example), and formalized output would simplify some scripts considerably. +1. As part of this, may I suggest structured version and version-transition metadata for the exported data formats? All formalized output should publish current and supported API version numbers, and deprecation/removal target versions of some kind. Tools would need to be able to request a specific API version number. This will allow tools that consume structured output to transition to new formats in a stable fashion. Scripts can check for deprecated API and start sounding the alarm in advance. For example, if I'm consuming top output, I can ask for "2.0 output", whereupon top could tell me that 2.0 output will be deprecated as of 3.0, and no longer supported as of 4.0. Today, human-readable and machine-readable are happening at the same time. More than once, when I've suggested output improvements, I've gotten the "too many systems are scraping this output for us to change it" response. This will really lay the groundwork to help with that ... someday. Worth the effort. Royce