From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1AED21F4B4; Wed, 6 Jan 2021 10:27:43 +0000 (UTC) Date: Wed, 6 Jan 2021 10:27:43 +0000 From: Eric Wong To: Kyle Meyer Cc: meta@public-inbox.org Subject: Re: JSON field names in terminal/pager output Message-ID: <20210106102742.GA32320@dcvr> References: <20210105095646.GA26897@dcvr> <878s97ylws.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <878s97ylws.fsf@kyleam.com> List-Id: Kyle Meyer wrote: > Eric Wong writes: > > > Are "f", "s", "t", "c" acceptable field names to show in JSON > > output? (instead of from/subject/to/cc) > > In my view they are, and, as you mention next, I like that they align > with the search prefixes. > > > Anyways, the current JSON output looks something like the > > following, comments inline > > > > [{ > [...] > > Nice. Btw, I remember there's several JSON streaming formats. I think "JSONL" aka "NDJSON" aka "LDJSON" is the best for interopability with tools like jq(1) and will be the default format when stdout is to a pipe or regular file. "Concatenated JSON" may be nice for pretty-printing -delimited JSON is gross, but there's an RFC behind it... cf. https://en.wikipedia.org/wiki/JSON_streaming > > > "references": [ > > "<20210105090437.22801-1-e@80x24.org>", > > "<20210105090437.22801-5-e@80x24.org>" > > ], > > > > # we don't actually support searching on rereference, yet; > > # not sure if it's needed since we already do thread # expansion > > Is "thread # expansion" the "num -> tid -> nums" mapping done by Over's > expand_thread()? And, from the CLI, that will be triggered by > `thread|t', right? Yup. It works well for single sources (and even a single extindex), but not when combinining multiple inboxes/extindices since THREADID ({tid}) is per-inbox/extindex. So extra dedupe work needs to be done... So searching across externals needs to be parallelized. I'm thinking SOCK_SEQPACKET Unix sockets is ideal for local externals and hope it's usable in the modern *BSDs. And SIGPIPE on pager exit needs to get delivered in a timely fashion, too... (yes, little things like that really bug me :x)