On Tue, 16 Feb 2021 at 00:19, Glenn Knickerbocker <n...@bestweb.net> wrote:

> What's your favorite thing to stick into a "sipping" pipeline so you
> know it will always consume at least one record and not worry about
> looping?  I have a nagging feeling I'm overlooking something obvious
> that's cheaper and safer than using VAR and trusting I know an unused name:
>
>   'callpipe *: | var gskjunk |' etc.
>
> CHOP|TAKE|HOLE seems like the "right" way but complicates the topology:
>

When I'm really only taking a single sip, I see nothing wrong with 'peekto'
and 'readto' in the loop, especially when you need it to detect EOF anyway.
But when there's more to sip, like discarding blank and comment records
before getting the next real payload record, the 'callpipe' approach is
attractive.

I recently fell in love with 'callpipe *: | pick to after 1 == // | stem
req. | l: lookup  ... '

Rob

Reply via email to