Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 2014 23:17:27 -0800
From:      Royce Williams <royce@tycho.org>
To:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: [GSoC] Machine readable output from userland utilities
Message-ID:  <CA%2BE3k91obr3AVGEme5sVU2NQy0scmeT6beN6E9WUz5a6gUnMbQ@mail.gmail.com>
In-Reply-To: <E9594D41-64FE-4957-98FD-4E52BCCB2598@cederstrand.dk>
References:  <49E9736E-AD14-4647-8B15-30603D01360C@mail.bg> <91FE2526-F21C-42AB-BECB-058DBA975A9E@cederstrand.dk> <537C2993.1060206@mu.org> <E9594D41-64FE-4957-98FD-4E52BCCB2598@cederstrand.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 20, 2014 at 10:17 PM, Erik Cederstrand
<erik+lists@cederstrand.dk> wrote:
>
>
> Den 21/05/2014 kl. 06.20 skrev Alfred Perlstein <bright@mu.org>:
>
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BE3k91obr3AVGEme5sVU2NQy0scmeT6beN6E9WUz5a6gUnMbQ>