[Toybox] Kernighan's awk repo

Andy Chu andychup at gmail.com
Thu Jul 21 15:01:17 PDT 2016


> I have it slightly lower priority because I have hundreds of hours of
> work to do on the test suite that I already know how to do and which I'm
> highly confident will increase its coverage and quality, and which I
> believe need to be done _anyway_.

You can think of the sanitizers as an enhancement to your test suite.
Whenever you add coverage to your test suite, you get additional
assertions "for free", which you don't have to actually write
yourself.

> Everybody has a tool they consider indispensable, which other people
> manage to avoid ever encountering and yet somehow survive. You did not
> approach this new addition as "here's a cool thing that might help", you
> approached it as "clearly you will do what I say because you'd be insane
> not to".

Did I mention it during the last 4 months?  I think I did once between
March and now.  I pretty much gave up on it.  But I was reminded of it
because I did the same thing to awk and it also found some problems,
and you asked about awk.

Even if you never use it, you should think of it as a thing that will
help other developers on the project.  Personally I find it annoying
to work on projects with low quality tests, because I have to spend a
lot of time manually poking at things that could be automated.

> This does not get your thing put high on my todo list. Yes, you found a
> bug. There's no shortage of those. Every time I sit down to expand a

I figured it wasn't your highest priority, and that's fine.  I'll
leave it to others to advocate for those things -- I don't have any
work blocking on that now.

What's annoying to me is that you spent more time writing about things
than trying them.  You've spilled so many words about it, whereas just
trying it would have answered all the questions.  I wrote up a lot of
detailed instructions.

And it is also annoying to have trivial bugs linger in the tree for
months, and to have bugs introduced on top of my patches.  IMO expr
was done long ago -- I know you want to rewrite it because you don't
understand the algorithm and want to combine it with $(()).  I haven't
been pressing the issue for the last few months, but it seems obvious
that you could just ship it and combine it with $(()) later (note that
awk also has an expression evaluator, and awk and shell also have
boolean expressions, so this thing never ends).

I won't really be surprised if in a year expr is still in the same
state it's in now -- shipping out of pending on Android with bugs,
even though I already fixed them.


> I downloaded it, looked at the README to see it was still unchanged, ran
> ./run.sh and it produced now output, "ran ./run.sh help" and got the
> bash help output, and put it in ~/toybox/pending so that when I get
> around to implementing awk I can get back to it.

The instructions are on the front page!!!   Scroll down here:

https://github.com/andychu/bwk

And in README.md (I didn't clobber the original README on purpose).


> (The problem is I don't wanna add asan_sed and asan_test_sed and so on
> ad ifinitum. This is a shift key, not its own button. And really, I

My patches already solved that problem.  That's why there is a test.sh script.

Like I said in the original messages, I wrote the patches once in make
and again in shell, and they were much better in shell.  (That is, the
test support is in shell, and the build support is in make, rather
than everything in make with .PHONY targets.)

Specifically, the originals had asan_test_sed, etc. targets with
generated .mk code, and then I changed it to be an argument to a shell
script.

I guess you want to retread all the same steps so you understand
everything in the repo.  I get that viewpoint, but I'm sure you also
understand that it's a big bottleneck.

Andy



More information about the Toybox mailing list