[Toybox] [PATCH] grep: add --line-buffered and fix regular buffering.
enh
enh at google.com
Thu Apr 11 10:18:22 PDT 2019
Ping for direction here? I'm happy to implement whichever way you want to
go.
I think we had:
1. Don't implicitly flush in all the x* routines, add any missing explicit
flushes (of which I expect there will be very few).
2. Don't use the x* routines as much.
On Tue, Feb 26, 2019, 09:57 enh <enh at google.com> wrote:
> On Tue, Feb 26, 2019 at 1:08 AM Rob Landley <rob at landley.net> wrote:
> >
> > On 2/25/19 2:21 PM, enh wrote:
> > > (that kind of thing especially can be done as a TODO: at the top of
> the file.
> > > there's even some precedent.)
> >
> > I didn't list the TODO entries that are already checked in, or the
> failing tests
> > in the test suite I added to remind me to fix the issue, or blog
> entries, or the
> > roadmap, or things written down on physical paper, or the toybox section
> of the
> > notes.txt file in the "simple text editor" app on my phone...
> >
> > When I say "todo list" it's sort of holistic. "Collate todo lists" is a
> > perpetual todo item and that just refers to the fact I have multiple
> files in
> > multiple directories named "todo.txt" or similar...
> >
> > And "todo heap" is analogous to compost heap, yes. It has archaeological
> layers.
> > It sprouts new things all the time. Boots and a shovel are recommended.
> >
> > > As I said, this mess tends to be a symptom of "not enough time to
> clear backlog"
> > > so even little things accumulate. Heck, I've got a dozen or so
> half-composed
> > > email reply windows open just like this one...
> > >
> > > i know, you list these every time this comes up :-)
> >
> > Hopefully not the same ones? I like to think I'm making _some_
> progress...
>
> well, the `top -H` bug is new :-) (i have looked at that a couple of
> times, but don't have a fix yet. on the bright side, i'm a lot more
> confident about everything else we show in top right now --- seems to
> match traditional top on my desktop at least.)
>
> > > but even if you can't solve the whole problem, anything you can do to
> reduce
> > > your https://en.wikipedia.org/wiki/Bus_factor helps...
> >
> > You mean like these?
> >
> > http://landley.net/toybox/code.html
> > http://landley.net/toybox/design.html
> > http://landley.net/toybox/cleanup.html
> > https://github.com/landley/toybox/commit/e2191095c3c6
> >
> > (I've been told Google's management considers Android's command line
> "good
> > enough", and were uninterested in funding me to spend time working
> through my
> > todo list. Not even to focus on the test suite or on documentation. So
> they
> > can't be _that_ worried...)
>
> _they_ don't care, but you and i do :-)
>
> i think there's also the cookie-licking aspect of this... we both
> know, for example, that dd needs a lot of work but it doesn't get it
> because of the potential for collision. i assume the TAGGED_ARRAY
> change is a step in the right direction, but didn't want to do
> anything i didn't have to do in the same patch. (i'm assuming, for
> example, that you'd rather have TT.ibs rather than TT.in.bs, but
> because your in-progress state is invisible...)
>
> this is one thing i like about gerrit: it's a good place to post
> in-progress [but not ready to commit] work. that and leaving TODOs in
> the code rather than out of band seems more conducive to having other
> folks pitch in. (github also has a "help wanted" label for bugs that
> the owners aren't actually working on.)
>
> > Just the toybox _license_ can eat weeks, between SPDX approval,
> _defending_ the
> > SPDX approval from OSI, arguing about it on github, a whole second round
> getting
> > OSI to agree with SPDX, then this month it's back to Github and trying
> _not_ to
> > reopen OSI or SPDX cans of worms...
> >
> >
> https://github.com/github/choosealicense.com/issues/464#issuecomment-438718643
> > https://github.com/github/choosealicense.com/pull/643
> > https://github.com/spdx/license-list-XML/pull/768
> >
> > I don't have the heart to face wikipedia[citation needed]. I convinced
> OSI to
> > stop misnaming the license (buried the hatched with Bruce Perens, even
> got Kirk
> > McKusick to publicly endorse the name), and wikipedia[citation needed]
> is STILL
> > deadnaming the license at
> >
> https://en.wikipedia.org/wiki/BSD_licenses#0-clause_license_(%22Zero_Clause_BSD%22
> > . Sigh. At least the part of
> > https://en.wikipedia.org/wiki/Public-domain-equivalent_license where
> they were
> > doing the same has been turned into a very awkward "OSI says X. SPDX
> also says X
> > and said it first so I dunno why OSI is even mentioned unless you look
> at the
> > history of this wiki page..."
> >
> > And gmail/dreamhost's unsubscribed everybody again. (Wrestles with web
> gui,
> > clicks through individual letter pages to uncheck the B checkboxes but
> not the U
> > checkboxes and click "submit" to reload each page before clicking on the
> next
> > letter...) And dreamhost wants its renewal check. And I haven't checked
> my own
> > gmail spam filter web page to see what it's false positived on in
> weeks... yup,
> > dozens from qemu-devel and buildroot and musl and linux-kernel... It is
> now
> > sending dreamhost "bounce action notification" messages to spam. That's
> almost
> > meta. Aha, I didn't see
> >
> http://lists.landley.net/pipermail/toybox-landley.net/2019-February/010129.html
> > (and missed it in the web archive), sorry about that...)
>
> yeah, i didn't see that patch either.
>
> > *shrug* The usual. (And my blog's up on https://landley.net/notes.html
> through
> > the end of August! Maybe I'll go edit and post more of that... Editing
> another
> > week's worth of entries took an hour and 3 minutes. Adding links and
> finishing a
> > sentence that stopped abruptly turned into adding several more
> paragraphs on the
> > topic, with even more links, as usual. But at least they're up now...)
>
> anyway, getting back to grep --line-buffered... what's the next step?
> merge this and do the x* flush-removal later? upload another patch
> that's like this but removes the x* flushes rather than switches away
> from x*? something else?
>
> (also, if you're not happy with the dd patch you'll need to tell me
> what you don't like :-) )
>
> note that we're also entering peak TPS season again, so i'll be even
> more evenings-and-weekends than usual.
>
> > Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190411/d4a19f01/attachment-0001.html>
More information about the Toybox
mailing list