[Toybox] awk -- fixes and cleanups

Rob Landley rob at landley.net
Wed Sep 4 01:23:21 PDT 2024


Oh no you don't. I dunno if this is gmail or dreamhost at fault but one of them
needs to get over itself.

On 9/4/24 00:43, Mail Delivery Subsystem wrote:
> 
>     Message not delivered
> 
> There was a problem delivering your message to *toybox at lists.landley.net*. See
> the technical details below, or try resending in a few minutes.
> 
> The response from the remote server was:
> 
> 554 5.7.1 Service unavailable; Client host [209.85.210.195] blocked using zen.dnsbl
> 
> Reporting-MTA: dns; googlemail.com
> Received-From-MTA: dns; rob at landley.net
> Arrival-Date: Tue, 03 Sep 2024 22:43:47 -0700 (PDT)
> X-Original-Message-ID: <834abe37-ffa7-25ee-485e-9257bad20cb1 at landley.net>
> 
> Final-Recipient: rfc822; toybox at lists.landley.net
> Action: failed
> Status: 5.7.1
> Remote-MTA: dns; lists.landley.net (69.163.136.54, the server for the domain.)
> Diagnostic-Code: smtp; 554 5.7.1 Service unavailable; Client host [209.85.210.195] blocked using zen.dnsbl
> Last-Attempt-Date: Tue, 03 Sep 2024 22:43:57 -0700 (PDT)
> 
> 
> Re: [Toybox] [PATCH] awk -- fixes and cleanups.eml
> 
> Subject:
> Re: [Toybox] [PATCH] awk -- fixes and cleanups
> From:
> Rob Landley <rob at landley.net>
> Date:
> 9/4/24, 00:58
> 
> To:
> Ray Gardner <raygard at gmail.com>, toybox <toybox at lists.landley.net>
> 
> 
> Sorry, been sick in my Tokyo hotel bed since before the typhoon ended. (Thought
> it was mildew stirred up by 100% humidity and water getting in through the
> j-core guys' office windows under gale force winds, but no: 12 hour flight in a
> variably pressurized tin can breathing recirculated air along with hundreds of
> other people, plus incubation period, and here we are with the usual.)
> 
> On 8/30/24 15:02, Ray Gardner wrote:
>> The attached patches, tested with "git am" against the current toybox github
>> repo, bring toybox awk and awk.test up to what is in my current repo
>> at https://github.com/raygard/wak <https://github.com/raygard/wak> .
> Patch 1: ok.
> 
> Patch 2: eh, not ideal, but you want an exit() with return code supplied asn
> argument and lib/ doesn't do that, so... eh.
> 
> Patch 3: You've made your input path pretty complicated to fix an issue that
> seems to boil down to "gracefully handle short reads". If getdelim() out of libc
> (posix-2008) somehow doesn't apply here (I am way too sick right now to try to
> brain through what the previous code you patched was doing) can you check each
> short read to see if you got whatever the delimiter is currently set to?
> 
> I mean, this is what all those arguments about stdin buffer size with Elliott
> have been about... so you added an is_tty flag. My toysh plumbing is pulling
> some of those shenanigans but that's because I have to prompt the user and write
> my own interactive editing and command history plumbing that gnu/dammit made a
> whole separate library for. (And even then I wanted to make that plumbing
> generic and shared between commands, until the new vi implementation walled
> itself off from ever participating in that. I might still write an editor that
> behaves like nano and joe and microemacs to go alongside the bespoke vi
> implementation that will never share any of that code, but that could also be my
> cold talking. It's kinda needed for watch too. And less...)
> 
> Eh, applied anyway because it's local to a pending/ command but can't say I'm
> happy about it.
> 
> Patch 4: How is the first change a good thing? (What's the benefit?) I mean
> "awk's version of $RANDOM isn't remotely, so let's weaken it further for
> compatibility...? In a way we can't obviously figure out how to test without, I
> dunno, container plumbing?
> 
> Patch 5: is this one testable? You had tests before, but not here.
> 
> Patch 6: sure.
> 
> Patch 7: again, test would be nice.
> 
> Applied the lot. Somewhat grumpily, but I _am_ sick...
> 
> Rob


More information about the Toybox mailing list