Re: jot: producing too much output?

2023-01-09 Thread Martin Neitzel
> | The name jot derives in part from iota, a function in APL. > > Maybe somebody(tm) should look that up. That's certainly the case. The other two tools of Kunze's tool bundle derive from APL, too: rs(1) and lam(1) ("reshape" and "laminate"). Martin

Re: jot: producing too much output?

2023-01-07 Thread Robert Elz
Date:Fri, 6 Jan 2023 22:07:48 - (UTC) From:mlel...@serpens.de (Michael van Elst) Message-ID: | The original code (see rev 1.1) seems to be more clear on how | the parameters should be evaluated. Yes, but that's even more counter-intuitive than our existing

Re: jot: producing too much output?

2023-01-06 Thread Mouse
>> [...jot...] > The original code (see rev 1.1) seems to be more clear on how the > parameters should be evaluated. Yes. Arguably the right thing to do here is to do the analog of what that version does and list all 16 possible combinations of START, REPS, ENDER, and STEP, with explicit code

Re: jot: producing too much output?

2023-01-06 Thread Michael van Elst
mo...@rodents-montreal.org (Mouse) writes: >>> I'd tend to assume it is the code. >Well, then, there never can be any such thing as a bug in jot. The original code (see rev 1.1) seems to be more clear on how the parameters should be evaluated.

Re: jot: producing too much output?

2023-01-06 Thread Mouse
>>> I'd do it myself except I don't know where to find an authoritative >>> spec for jot. >> I'd tend to assume it is the code. Well, then, there never can be any such thing as a bug in jot. I find that...dubious. > Remark from the peanut gallery, after (again) reading this in jot(1): > | The

Re: jot: producing too much output?

2023-01-06 Thread Robert Elz
Date:Fri, 6 Jan 2023 20:56:17 +0100 From:i...@netbsd.org Message-ID: | | The name jot derives in part from iota, a function in APL. | Maybe somebody(tm) should look that up. It has been a long time since I did any APL programming, but in that, the iota function

Re: jot: producing too much output?

2023-01-06 Thread is
On Thu, Jan 05, 2023 at 11:46:42PM +0700, Robert Elz wrote: > Date:Thu, 5 Jan 2023 11:16:22 -0500 (EST) > From:Mouse > | I'd do it myself except I don't know where to find an > | authoritative spec for jot. > > I'd tend to assume it is the code. Remark from the

Re: jot: producing too much output?

2023-01-05 Thread Robert Elz
Date:Thu, 5 Jan 2023 11:16:22 -0500 (EST) From:Mouse Message-ID: <202301051616.laa11...@stone.rodents-montreal.org> Answering your 2 recent messages backwards: | But I don't understand why the code isn't instead something more | like | | if (! (have &

Re: jot: producing too much output?

2023-01-05 Thread Mouse
> Actually, replace that last patch with this one. The previous one > wouldn't work if begin and end were the same value (intending to get > just one output value) - though why anyone would write the args that > way instead of just saying 1 reps begin at ... I cannot imagine. Perhaps because

Re: jot: producing too much output?

2023-01-05 Thread Robert Elz
Actually, replace that last patch with this one. The previous one wouldn't work if begin and end were the same value (intending to get just one output value) - though why anyone would write the args that way instead of just saying 1 reps begin at ... I cannot imagine. This patch doesn't have

Re: jot: producing too much output?

2023-01-05 Thread Mouse
> As an extra bonus, the appended patch causes jot to generate what > you're expecting. True. But I don't understand why the code isn't instead something more like if (! (have & REPS)) reps = 100; if (! (have & BEGIN)) begin = 1; if (! (have & ENDER)) ender = 100;

Re: jot: producing too much output?

2023-01-05 Thread Mouse
>> jot -s "" - 32 126 >> Based on reading the manpage, I would expect that to produce a >> single line 323334353637...124125126. It does on my 1.4T. On my >> 5.2, ftp.n.o's 9.0_STABLE, and a work 9.1 machine, the line actually >> ends ...125126127128129130131. > The man page actually says: >

Re: jot: producing too much output?

2023-01-05 Thread Robert Elz
As an extra bonus, the appended patch causes jot to generate what you're expecting. I'm not going to apply it however, without someone who knows what jot is really intended to do in this situation indicates that it is a reasonable thing to have happen (in which case it would also need a man page

Re: jot: producing too much output?

2023-01-05 Thread Robert Elz
Date:Thu, 5 Jan 2023 09:52:06 -0500 (EST) From:Mouse Message-ID: <202301051452.jaa23...@stone.rodents-montreal.org> | jot -s "" - 32 126 | | Based on reading the manpage, I would expect that to produce a single | line 323334353637...124125126. It does on my

jot: producing too much output?

2023-01-05 Thread Mouse
jot -s "" - 32 126 Based on reading the manpage, I would expect that to produce a single line 323334353637...124125126. It does on my 1.4T. On my 5.2, ftp.n.o's 9.0_STABLE, and a work 9.1 machine, the line actually ends ...125126127128129130131. Am I misunderstanding how the arguments work, or