From owner-svn-src-head@FreeBSD.ORG Mon Jun 15 03:48:47 2015 Return-Path: Delivered-To: svn-src-head@hub.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 4952F5DA for ; Mon, 15 Jun 2015 03:48:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2633F63A for ; Mon, 15 Jun 2015 03:48:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from jre-mbp.elischer.org (ppp121-45-248-228.lns20.per4.internode.on.net [121.45.248.228]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t5F3mYf2087036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 14 Jun 2015 20:48:37 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <557E4B0C.4080600@freebsd.org> Date: Mon, 15 Jun 2015 11:48:28 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Marcel Moolenaar CC: David Chisnall , Ian Lepore , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <557C661F.8080104@freebsd.org> <860017ED-D754-450C-865D-2D81A30C2212@xcllnt.net> In-Reply-To: <860017ED-D754-450C-865D-2D81A30C2212@xcllnt.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 03:48:47 -0000 On 6/14/15 2:40 AM, Marcel Moolenaar wrote: >> On Jun 13, 2015, at 1:19 PM, Julian Elischer wrote: >> >> On 6/13/15 11:38 PM, David Chisnall wrote: >>> On 13 Jun 2015, at 11:17, Ian Lepore wrote: >>>> If you would have told me a year ago that you had a simple scheme that >>>> could make 30 years of experience maintaining code for unix-like systems >>>> completely worthless I would have been skeptical, but it seems we're >>>> well on our way. >>> There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. >>> >>> If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. >>> >>> David >>> >> I made a suggestion for an alternate path in the previous thread. >> >> https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054855.html >> >> but I have a job and kids so I can't object if I'm not listened to.. >> (no time to actually follow my own advice and produce working code.) > Not wanting to change all programs and instead write grammars for all > programs seems like a worse solution. The scope is the same (same > number of programs), but since the grammars and programs are two > distinct entities, it’s actually fairly hard to make sure both are > changed at the same time when so needed. It’s also not at all a > given that screen scrubbing is always easy enough to do that it > isn’t causing some sort of problems in specific situations. If > one wants to output JSON, XML and HTML you find that screen > scrubbing doesn’t even give you all the information you need. It’s > very natural to come to the conclusion that it’s easier to get the > data from the source and skip the entire non-lossless translation > phase. But once you have the framework for handling grammars you can make grammars for OTHER utilities that are not part of FreeBSD, and will NEVER EVER EVER have libxo support. And as a bonus you leave the existing programs alone entirely. I believe that in the end if you want to follow the path of automatic harvesting of data, you'll need the grammar handler anyway because all the 3rd party apps still require handling. It's a tricky task but It would be a really fascinating project. Especially tools that would look at existing output and allow the user to interactively identify tokens and landmarks of interest and generate grammars. We did this 20 years ago with scanned images.. So I'm sure it be done with ascii text. Come to think of it, there must be some out there already.. > -- > Marcel Moolenaar > marcel@xcllnt.net >