[Toybox] Kernighan's awk repo
Rob Landley
rob at landley.net
Mon Aug 9 02:49:00 PDT 2021
On 8/8/21 9:03 PM, roytam at gmail.com wrote:
> Hello,
>
> Andy Chu <andychup at gmail.com> wrote:
>>
>> On Mon, Jul 18, 2016 at 12:17 PM, Rob Landley <rob at landley.net> wrote:
>> > Let's see... https://www.cs.princeton.edu/~bwk/btl.mirror/awktest.a is
>> > an ar archive, ar x awktest.a gives a directory full of files,
>> > README.TESTS says REGRESS controls the testing process, running that does...
>> >
>> > $ sh ./REGRESS
>> > Linux driftwood 4.2.0-38-generic #45~14.04.1-Ubuntu SMP Thu Jun 9
>> > 09:27:51 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>> > echo compiled
>> > oldawk=awk, awk=../a.out
>> > ./REGRESS: 11: ./REGRESS: Compare.t: not found
>> > 167 tests
>> >
>> > ./REGRESS: 14: ./REGRESS: Compare.p: not found
>> > 58 tests
>> >
>> > ./REGRESS: 17: ./REGRESS: Compare.T: not found
>> > 252 tests
>> >
>> > ./REGRESS: 20: ./REGRESS: Compare.tt: not found
>> > 21 tests
>> >
>> > Right, maybe I'll dig into this later but it's not obvious to me how to
>> > get it to work.
>>
>> OK, I published the work I did here: https://github.com/andychu/bwk
>
> Maybe this is old news but I think it is still good to say here.
> One True awk has its own repo now.
> https://github.com/onetrueawk/awk
>
> And it seems that Android P included it as well.
I know. Under yet another bespoke public domain adjacent "drag around this blob
of text verbatim" license:
https://github.com/onetrueawk/awk/blob/master/LICENSE
Which means I can't incorporate it as-is into a public domain equivalently
licensed toybox without changing the project's license.
> Does toybox's roadmap have any change about it since then?
If I'm going to get a system to rebuild itself under itself from source in 4
packages, which is then capable of bootstrapping to arbitrarily complexity
natively under the result by building more packages that have existing build
systems, then awk has to be in one of those packages.
Awk is in posix:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html
And the last version of busybox I released (1.2.1, circa 2007) had a ~2800 line
awk implementation, so it shouldn't be too hard to get something feasible in
toybox (probably under 1000 lines? Dunno.)
The main issue is I don't use awk much, so need to learn it to write one. (But
the posix spec is probably mostly good enough? Then testing all the LFS package
builds, and waiting for complaints...)
Rob
More information about the Toybox
mailing list