Re: Massive libxo-zation that breaks everything

From: Chris H <bsd-lists_at_bsdforge.com>
Date: Mon, 02 Mar 2015 07:09:39 -0800
On Mon, 2 Mar 2015 09:23:55 +0000 David Chisnall <theraven_at_FreeBSD.org> wrote

> On 1 Mar 2015, at 21:29, Rui Paulo <rpaulo_at_me.com> wrote:
> > 
> > On Mar 1, 2015, at 11:11, David Chisnall <theraven_at_FreeBSD.org> 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.  :-) 
>
> I am completely in favour of libraries for the underlying functionality of
> these commands and would love to see all of the system management commands
> become thin wrappers around a library, though it's a lot of engineering work.
>  In particular, these libraries will need to have stable APIs that we can
> support across multiple major releases, and getting those right is difficult.
>  We really don't want to be stuck in 10 years maintaining a hastily designed
> API for a library. 
>
> I see one use of the libxo output as helping to design those APIs.  People
> are going to wrap various tools in libraries for their favourite scripting
> languages and this will give us a corpus for experimenting. 
>
> It's also worth noting that often invoking a tool and consuming its output is
> the easiest way to get a stable API and ABI where performance is not a
> primary concern (i.e. most management interfaces). 
>
> As to a world beyond the CLI, I saw a nice demo a few years ago of a terminal
> emulator that used WebKit and came with a hacked-up set of parsers for common
> tools.  I'd love to have something simpler (no need for a full WebKit -
> simple outline and table views would be enough and could be done with curses
> for ssh) for FreeBSD where I could type ls in the CLI and get a table view
> that I could then sort and filter by selecting column headings.  Those of us
> that have used Lisp and Smalltalk environments know that a CLI doesn't have
> to be a teletype emulator. 
Apologies in advance, if I'm way off base, or simply reiterating here;
But what about something like kernshell(1)?
Every database has it's own "shell", the system has it's own contributed
shells. Couldn't a shell be adapted with a language/dialect to make use
of already existing parsers/languages/3rd party utilities?
Then it would simply be one item to maintain, and the language could
be modified/adapted, as needed.

Again, apologies, if I haven't thought this through enough. But in
an effort to simplify everything, for all concerned. This seemed
like a possible direction. So thought I'd mention it.

--Chris
>
> David
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Mon Mar 02 2015 - 14:08:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:56 UTC