The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Line Numbers Before SysIII nl? BSD num?
@ 2022-07-23  2:57 segaloco via TUHS
  2022-07-23  5:56 ` [TUHS] " markus schnalke
  0 siblings, 1 reply; 37+ messages in thread
From: segaloco via TUHS @ 2022-07-23  2:57 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

I've been looking into the history of the nl command lately, which has gotten me curious as to what facilities folks have used at various points in UNIX history for line numbering.

The earliest version of nl I've found is in System III, and it does not derive from Research, PWB, or CB.  Neither does it come from BSD, although BSD has the num command which, according to the source commentary, aims to replicate the '#' behavior of ex.

Were there any other facilities for printing back arbitrary lines from a file with line numbers?

Also, would anyone happen to know if the above appearance of nl might have been from the USG line given none of the others feature it?  It neither seems to be in V8-V10.  nl has managed to find its way into the POSIX standard, so it definitely has some staying power wherever it came from.

- Matt G.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23  2:57 [TUHS] Line Numbers Before SysIII nl? BSD num? segaloco via TUHS
@ 2022-07-23  5:56 ` markus schnalke
  2022-07-23  7:55   ` segaloco via TUHS
  0 siblings, 1 reply; 37+ messages in thread
From: markus schnalke @ 2022-07-23  5:56 UTC (permalink / raw)
  To: tuhs

Hoi.

[2022-07-23 04:57] segaloco via TUHS <tuhs@tuhs.org>
>
> Were there any other facilities for printing back arbitrary lines
> from a file with line numbers?

As I'm currently thinking a lot about ed, this comes to mind:

	echo 23,42n | ed - file


meillo

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23  5:56 ` [TUHS] " markus schnalke
@ 2022-07-23  7:55   ` segaloco via TUHS
  2022-07-23 11:01     ` Dan Cross
  0 siblings, 1 reply; 37+ messages in thread
From: segaloco via TUHS @ 2022-07-23  7:55 UTC (permalink / raw)
  To: markus schnalke; +Cc: tuhs

> On Friday, July 22nd, 2022 at 10:56 PM, markus schnalke <meillo@marmaro.de> wrote:
>
> As I'm currently thinking a lot about ed, this comes to mind:
>
> echo 23,42n | ed - file

The n rule is actually what lead me to studying nl.  It's also supported in System III but not V7, although ed's n does show up in V8-V10.  The implementation looks similar although integrated slightly differently.  Probably from the same source though.

There's also an implementation in 4.4BSD-Lite, although plan old 4.4 with the AT&T encumbered ed doesn't implement n.

So a rough timeline I can see for line number filters based on source code, old docs, etc:

1977 - num and ex's '#' commands are introduced for 2BSD release
1980 - nl and ed's 'n' commands are introduced in System III
1980 - num's trail goes dark between 4 and 4.1c BSD
1982 - System V adopts ex, including '#'
1985 - Research has adopted ed with n by now as well as ex, never adopts nl
1992 - POSIX.2 is released, codifying nl, ed with n, and ex with #
1992 - nl appears in GNU fileutils
1994 - 4.4BSD-Lite ed includes n
1999 - NetBSD 1.4 adds nl
2002 - FreeBSD 4.5 adds nl
2005 - MacOSX 10.4 with text_cmds-47 adds nl
2013 - MINIX 3.2.1 adopts NetBSD nl
2014 - OpenBSD 5.5 adds nl

So all in all, num was an attempt that petered out, but # stayed in ex.  System III and 4.4BSD-Lite ed derivatives implement n, and nl was introduced in System III for the AT&T line and slowly cropped up elsewhere.  System V picked up ex in 1982, allowing nl, ed with n, and ex with # in the AT&T line.  GNU had one out of the gate when POSIX hit.  BSDs were late to the party with regards to both ed with n as well as nl, with nl only being adopted after the last Berkeley releases and subsequent fracturing.

So thus far it seems the earliest line numberer to see wide use was probably ex's #.  System III's nl became the ubiquitous tool for the job and was then slowly adopted elsewhere.  Ed rides a fine middle ground with the n command that saw wider adoption earlier.  I still have to wonder if there was something earlier though.

- Matt

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23  7:55   ` segaloco via TUHS
@ 2022-07-23 11:01     ` Dan Cross
  2022-07-23 11:20       ` John Cowan
  0 siblings, 1 reply; 37+ messages in thread
From: Dan Cross @ 2022-07-23 11:01 UTC (permalink / raw)
  To: segaloco; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

On Sat, Jul 23, 2022, 3:56 AM segaloco via TUHS <tuhs@tuhs.org> wrote:

> [snip]
> So all in all, num was an attempt that petered out, but # stayed in ex.
> System III and 4.4BSD-Lite ed derivatives implement n, and nl was
> introduced in System III for the AT&T line and slowly cropped up
> elsewhere.  System V picked up ex in 1982, allowing nl, ed with n, and ex
> with # in the AT&T line.  GNU had one out of the gate when POSIX hit.  BSDs
> were late to the party with regards to both ed with n as well as nl, with
> nl only being adopted after the last Berkeley releases and subsequent
> fracturing.
>

It may be worth noting that BSD had `cat -n` in 4BSD by October, 1980:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/man/man1/cat.1

That may explain the relatively late incorporation of `nl` in, at least,
the BSD lineage.

        - Dan C.

[-- Attachment #2: Type: text/html, Size: 1546 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 11:01     ` Dan Cross
@ 2022-07-23 11:20       ` John Cowan
  2022-07-23 12:00         ` Dan Cross
  0 siblings, 1 reply; 37+ messages in thread
From: John Cowan @ 2022-07-23 11:20 UTC (permalink / raw)
  To: Dan Cross; +Cc: segaloco, The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

On Sat, Jul 23, 2022 at 7:03 AM Dan Cross <crossd@gmail.com> wrote:


> It may be worth noting that BSD had `cat -n` in 4BSD by October, 1980:
> https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/man/man1/cat.1
>
> That may explain the relatively late incorporation of `nl` in, at least,
> the BSD lineage.
>

An obvious approach, which would leave no real traces in documentation,
would be:

$ awk '{print NR, $0}'

A more precise emulation would be more of a pain to type:

$ awk '{printf("%6d\t%s\n", NR, $0)}'

but perfectly usable in a script.

[-- Attachment #2: Type: text/html, Size: 2349 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 11:20       ` John Cowan
@ 2022-07-23 12:00         ` Dan Cross
  2022-07-23 12:49           ` Norman Wilson
  2022-07-24 19:02           ` Tomasz Rola
  0 siblings, 2 replies; 37+ messages in thread
From: Dan Cross @ 2022-07-23 12:00 UTC (permalink / raw)
  To: John Cowan; +Cc: segaloco, The Eunuchs Hysterical Society

On Sat, Jul 23, 2022 at 7:20 AM John Cowan <cowan@ccil.org> wrote:
> On Sat, Jul 23, 2022 at 7:03 AM Dan Cross <crossd@gmail.com> wrote:
>> It may be worth noting that BSD had `cat -n` in 4BSD by October, 1980: https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/man/man1/cat.1
>>
>> That may explain the relatively late incorporation of `nl` in, at least, the BSD lineage.
>
> An obvious approach, which would leave no real traces in documentation, would be:
>
> $ awk '{print NR, $0}'
>
> A more precise emulation would be more of a pain to type:
>
> $ awk '{printf("%6d\t%s\n", NR, $0)}'
>
> but perfectly usable in a script.

Yes, but awk wasn't widely available until 7th edition. I imagine work
on it began before `num` in 2BSD, but few outside of Bell Labs would
have seen it prior to 1978 or so.

I wonder if the use-case was just sufficiently rare that no one felt like
building a special tool and it was just done on an ad-hoc basis, if
necessary.

        - Dan C.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 12:00         ` Dan Cross
@ 2022-07-23 12:49           ` Norman Wilson
  2022-07-23 13:20             ` Rob Pike
  2022-07-23 17:35             ` Clem Cole
  2022-07-24 19:02           ` Tomasz Rola
  1 sibling, 2 replies; 37+ messages in thread
From: Norman Wilson @ 2022-07-23 12:49 UTC (permalink / raw)
  To: tuhs; +Cc: The Eunuchs Hysterical Society

I had a vague memory that pr could be made
to number lines, but a quick check of the 7/e
manual says no.

I expect Dan's right, and none of the 127 folks
felt much need to number lines on printouts
so nobody wrote the obvious simple tool.

Ironic, since the Unix PDP-11 used by the patent
licensing office (and I think shared with the
research group, and that was how their first
PDP-11 was justified and funded) happened
because the patent folks needed line-numbered
output and roff was easily modified to do that.

Maybe Doug or Ken or Steve has first-hand
memories.

Norman Wilson
Toronto ON
(on a train shuffling toward Buffalo)

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 12:49           ` Norman Wilson
@ 2022-07-23 13:20             ` Rob Pike
  2022-07-23 13:36               ` Ralph Corderoy
                                 ` (2 more replies)
  2022-07-23 17:35             ` Clem Cole
  1 sibling, 3 replies; 37+ messages in thread
From: Rob Pike @ 2022-07-23 13:20 UTC (permalink / raw)
  To: Norman Wilson; +Cc: The Eunuchs Hysterical Society

Very odd. I thought so too, but the 8th Edition manual says pr -n
prints in n columns, while the 9th and 10th say it numbers the lines.

No memory, if I ever knew, of what triggered that change.

-rob

On Sat, Jul 23, 2022 at 10:50 PM Norman Wilson <norman@oclsc.org> wrote:
>
> I had a vague memory that pr could be made
> to number lines, but a quick check of the 7/e
> manual says no.
>
> I expect Dan's right, and none of the 127 folks
> felt much need to number lines on printouts
> so nobody wrote the obvious simple tool.
>
> Ironic, since the Unix PDP-11 used by the patent
> licensing office (and I think shared with the
> research group, and that was how their first
> PDP-11 was justified and funded) happened
> because the patent folks needed line-numbered
> output and roff was easily modified to do that.
>
> Maybe Doug or Ken or Steve has first-hand
> memories.
>
> Norman Wilson
> Toronto ON
> (on a train shuffling toward Buffalo)

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 13:20             ` Rob Pike
@ 2022-07-23 13:36               ` Ralph Corderoy
  2022-07-23 14:33               ` John Cowan
  2022-07-24 19:45               ` Warner Losh
  2 siblings, 0 replies; 37+ messages in thread
From: Ralph Corderoy @ 2022-07-23 13:36 UTC (permalink / raw)
  To: tuhs

Hi Rob,

> Very odd. I thought so too, but the 8th Edition manual says pr -n
> prints in n columns, while the 9th and 10th say it numbers the lines.

8th Edition's pr.c has -n and -x which both turn on line numbers.
The optional argument gives the width used for the line number.
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/pr.c

    case 'n':
    case 'x': /* retained for historical reasons */
            ++Lnumb;
            if ((Numw = intopt(argv, &Nsepc)) <= 0)
                    Numw = NUMW;

    if (Lnumb && C != EOF && (colno == 0 || Multi == 'a')) {
            if (Page >= Fpage) {
                    putspace();
                    printf("%*ld", Numw, Buffer ?
                            Colpts[colno].c_lno++ : Lnumb);
                    Outpos += Numw;
                    put(Nsepc);
            }
            ++Lnumb;
    }

I think -n and -x are undocumented in the matching man page.
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V8/usr/man/man1/pr.1

The -n you're referring to is an italic ‘n’, e.g. -3 for three columns.

    .TP
    .BI \- n
    Produce
    .IR n -column
    output.

-- 
Cheers, Ralph.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 13:20             ` Rob Pike
  2022-07-23 13:36               ` Ralph Corderoy
@ 2022-07-23 14:33               ` John Cowan
  2022-07-24 19:45               ` Warner Losh
  2 siblings, 0 replies; 37+ messages in thread
From: John Cowan @ 2022-07-23 14:33 UTC (permalink / raw)
  To: Rob Pike; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On Sat, Jul 23, 2022 at 9:21 AM Rob Pike <robpike@gmail.com> wrote:

Very odd. I thought so too, but the 8th Edition manual says pr -n
> prints in n columns,


I'm almost certain that -n here means that -2 is 2 columns, -3 columns,
etc., and that there is no actual -n switch.  In Posix as well as more
modern man pages this is spelled -COLUMNS: see man.cat-v.org.

> while the 9th and 10th say it numbers the lines.
>

I think this may have come from BSD; it is now part of Posix.

[-- Attachment #2: Type: text/html, Size: 1429 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 12:49           ` Norman Wilson
  2022-07-23 13:20             ` Rob Pike
@ 2022-07-23 17:35             ` Clem Cole
  2022-07-23 18:40               ` Phil Budne
  1 sibling, 1 reply; 37+ messages in thread
From: Clem Cole @ 2022-07-23 17:35 UTC (permalink / raw)
  To: Norman Wilson; +Cc: tuhs

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

Norman - I think your memory is fine.

pr -n (lower case) was an addition early on with pr +1 or pr +2 *etc* also
parsed.  I'm going to guess that addition was either a local hack done by a
lot of people or maybe on the Harvard Tape and distributed from there.  It
certainly worked that way in the CMU v6 and later v7.  But I also remember
that I had to reprogram my fingers to pr -N (capital N) when I hit other
versions ??maybe AT&T Sys III??.  I also remember that at CMU, tjk did not
like it  /  was not needed because he contended we already had num(1)
already on the EE systems (but not CS BTW).  Ifwe had had shell aliases in
those days, I might have agreed with him.  But given that it was not part
of v5, v6 or v7, that we only had a num(1) on the EE and Mellon systems and
not generally rippled to the other CMU UNIX systems around campus, I going
to take a WAG that Ted brought num(1) with him from UoMich (- which would
make sense - because the BSD history says Joy wrote it).   So maybe
??probably?? the origin story for num(1) is that it came to UCB from Umich
when Bill and Ted were undergrads there.

FWIW: pr -n  is what macOS does today.
ᐧ

On Sat, Jul 23, 2022 at 8:50 AM Norman Wilson <norman@oclsc.org> wrote:

> I had a vague memory that pr could be made
> to number lines, but a quick check of the 7/e
> manual says no.
>
> I expect Dan's right, and none of the 127 folks
> felt much need to number lines on printouts
> so nobody wrote the obvious simple tool.
>
> Ironic, since the Unix PDP-11 used by the patent
> licensing office (and I think shared with the
> research group, and that was how their first
> PDP-11 was justified and funded) happened
> because the patent folks needed line-numbered
> output and roff was easily modified to do that.
>
> Maybe Doug or Ken or Steve has first-hand
> memories.
>
> Norman Wilson
> Toronto ON
> (on a train shuffling toward Buffalo)
>

[-- Attachment #2: Type: text/html, Size: 3975 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 17:35             ` Clem Cole
@ 2022-07-23 18:40               ` Phil Budne
  2022-07-23 18:51                 ` Nelson H. F. Beebe
  0 siblings, 1 reply; 37+ messages in thread
From: Phil Budne @ 2022-07-23 18:40 UTC (permalink / raw)
  To: tuhs

If the object is to print all lines with a number,
I've always used "grep -n ."



^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 18:40               ` Phil Budne
@ 2022-07-23 18:51                 ` Nelson H. F. Beebe
  2022-07-23 19:07                   ` Douglas McIlroy
  0 siblings, 1 reply; 37+ messages in thread
From: Nelson H. F. Beebe @ 2022-07-23 18:51 UTC (permalink / raw)
  To: Phil Budne; +Cc: tuhs

Phil Budne <phil@ultimate.com> suggests "grep -n ." to print numbered
lines.

That mostly works, but loses blank lines, although they are properly
counted.  I typically use

	awk '{print FNR ":" $0}'

instead, which reports all lines, regardless of contents.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                                                          -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 18:51                 ` Nelson H. F. Beebe
@ 2022-07-23 19:07                   ` Douglas McIlroy
  0 siblings, 0 replies; 37+ messages in thread
From: Douglas McIlroy @ 2022-07-23 19:07 UTC (permalink / raw)
  To: Nelson H. F. Beebe; +Cc: tuhs

Did you use "grep -n '.' "?
grep -n '^' matches blank lines, too.

Doug

On Sat, Jul 23, 2022 at 2:51 PM Nelson H. F. Beebe <beebe@math.utah.edu> wrote:
>
> Phil Budne <phil@ultimate.com> suggests "grep -n ." to print numbered
> lines.
>
> That mostly works, but loses blank lines, although they are properly
> counted.  I typically use
>
>         awk '{print FNR ":" $0}'
>
> instead, which reports all lines, regardless of contents.
>
> -------------------------------------------------------------------------------
> - Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
> - University of Utah                                                          -
> - Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
> - 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
> - Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
> -------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 12:00         ` Dan Cross
  2022-07-23 12:49           ` Norman Wilson
@ 2022-07-24 19:02           ` Tomasz Rola
  2022-07-28  0:30             ` Tomasz Rola
  1 sibling, 1 reply; 37+ messages in thread
From: Tomasz Rola @ 2022-07-24 19:02 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Sat, Jul 23, 2022 at 08:00:10AM -0400, Dan Cross wrote:
> On Sat, Jul 23, 2022 at 7:20 AM John Cowan <cowan@ccil.org> wrote:
[...]
> > An obvious approach, which would leave no real traces in documentation, would be:
> >
> > $ awk '{print NR, $0}'
> >
> > A more precise emulation would be more of a pain to type:
> >
> > $ awk '{printf("%6d\t%s\n", NR, $0)}'
> >
> > but perfectly usable in a script.
> 
> Yes, but awk wasn't widely available until 7th edition. I imagine work
> on it began before `num` in 2BSD, but few outside of Bell Labs would
> have seen it prior to 1978 or so.
> 
> I wonder if the use-case was just sufficiently rare that no one felt like
> building a special tool and it was just done on an ad-hoc basis, if
> necessary.

My sed-fu is only rudimentary but after  banging my head against
monitor a bit, I came up with this:

$  wc -l c.lisp 
90 c.lisp

$  cat c.lisp | sed -e '{=;}' | sed -e 'N;s/\n/ /'

Seems to print what is needed. Now, just embed it in sh script. A
program in C could be longer, and required a compiler.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola@bigfoot.com             **

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-23 13:20             ` Rob Pike
  2022-07-23 13:36               ` Ralph Corderoy
  2022-07-23 14:33               ` John Cowan
@ 2022-07-24 19:45               ` Warner Losh
  2022-07-24 20:33                 ` segaloco via TUHS
  2 siblings, 1 reply; 37+ messages in thread
From: Warner Losh @ 2022-07-24 19:45 UTC (permalink / raw)
  To: Rob Pike; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]

By 1984 (so some years after the formative stage in the era between 4.2BSD
and 4.3BSD), there
were a number of different programs on the net (USENET's source groups) to
pretty print things
on laser or line printers: grind, tgrind, vgrind, ete. These all had a
dozen different ways to gaudy up
the output (err, present the listing in a more aesthetically pleasing way):
Line numbers, line numbers
every 5 or 10 lines, line spacing tweaks, keywords as bold or italics,
frames around the output,
"two up" printing, various special behavior for functions (grey bands for
start of functions, function
definitions in bold, etc), as well as specialized options for assembler /
object renderings, etc. Most
were targeted at laser printers, but some were a better version of pr/lpr
for line printer output. Some
targeted postscript directly, while others used TeX, troff, etc in a
pipeline to gain some device
independence. Oh what a long way from pr -n these were. But at the time it
really helped me to
understand the power of the unix philosophy because these 'all in'
approaches were great until
you wanted to get a few steps beyond the beaten path and then it became
impossible (given the
great number of combinatorics for these options, many of the programs
produced odd results for
some combinations of options).

For day to day stuff, I hated these and used simpler options. But for
producing nice looking listings
for appendixes for papers / reports / assignments I'd written for school
they weren't half bad if
you avoided the worst of the gaudiness options. :)

Warner


On Sat, Jul 23, 2022 at 7:21 AM Rob Pike <robpike@gmail.com> wrote:

> Very odd. I thought so too, but the 8th Edition manual says pr -n
> prints in n columns, while the 9th and 10th say it numbers the lines.
>
> No memory, if I ever knew, of what triggered that change.
>
> -rob
>
> On Sat, Jul 23, 2022 at 10:50 PM Norman Wilson <norman@oclsc.org> wrote:
> >
> > I had a vague memory that pr could be made
> > to number lines, but a quick check of the 7/e
> > manual says no.
> >
> > I expect Dan's right, and none of the 127 folks
> > felt much need to number lines on printouts
> > so nobody wrote the obvious simple tool.
> >
> > Ironic, since the Unix PDP-11 used by the patent
> > licensing office (and I think shared with the
> > research group, and that was how their first
> > PDP-11 was justified and funded) happened
> > because the patent folks needed line-numbered
> > output and roff was easily modified to do that.
> >
> > Maybe Doug or Ken or Steve has first-hand
> > memories.
> >
> > Norman Wilson
> > Toronto ON
> > (on a train shuffling toward Buffalo)
>

[-- Attachment #2: Type: text/html, Size: 3399 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-24 19:45               ` Warner Losh
@ 2022-07-24 20:33                 ` segaloco via TUHS
  2022-07-24 21:04                   ` Warner Losh
  0 siblings, 1 reply; 37+ messages in thread
From: segaloco via TUHS @ 2022-07-24 20:33 UTC (permalink / raw)
  To: Warner Losh; +Cc: The Eunuchs Hysterical Society

All this discussion is making me incredibly glad I posed the question, as it does indeed seem that before num and nl, line numbering was more of a "to each their own" rather than there being a canonical best practice.

By the way, what inspired the whole quandary in the first place was doing some editing on a V6 UNIX system and realizing I hadn't the foggiest idea of how to get the system to spit back line numbers to remind myself what addresses to supply to various ed commands.  I suppose at the time using a context search was such an effective means of getting ed's cursor where you wanted it that having a means to number lines wasn't crucial to effectively working in ed, so long as one was good with their regex and searching.

I'm realizing I might need to reach out to the maintainer of the nl manpage in FreeBSD (and perhaps other OSs and distros) as the history section of the page posits that nl was first introduced in SVR2, when in reality the earliest public offering was System III, although the trail goes cold at that point, I can only assume it came from USG.

- Matt G.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-24 20:33                 ` segaloco via TUHS
@ 2022-07-24 21:04                   ` Warner Losh
  0 siblings, 0 replies; 37+ messages in thread
From: Warner Losh @ 2022-07-24 21:04 UTC (permalink / raw)
  To: segaloco; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

On Sun, Jul 24, 2022 at 2:33 PM segaloco <segaloco@protonmail.com> wrote:

> All this discussion is making me incredibly glad I posed the question, as
> it does indeed seem that before num and nl, line numbering was more of a
> "to each their own" rather than there being a canonical best practice.
>
> By the way, what inspired the whole quandary in the first place was doing
> some editing on a V6 UNIX system and realizing I hadn't the foggiest idea
> of how to get the system to spit back line numbers to remind myself what
> addresses to supply to various ed commands.  I suppose at the time using a
> context search was such an effective means of getting ed's cursor where you
> wanted it that having a means to number lines wasn't crucial to effectively
> working in ed, so long as one was good with their regex and searching.
>
> I'm realizing I might need to reach out to the maintainer of the nl
> manpage in FreeBSD (and perhaps other OSs and distros) as the history
> section of the page posits that nl was first introduced in SVR2, when in
> reality the earliest public offering was System III, although the trail
> goes cold at that point, I can only assume it came from USG.
>

I can update it. Done.
https://cgit.freebsd.org/src/commit/?id=8a02ea1dbc139862456f488464072719341658d7

Warner

[-- Attachment #2: Type: text/html, Size: 1775 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-24 19:02           ` Tomasz Rola
@ 2022-07-28  0:30             ` Tomasz Rola
  2022-07-28  1:03               ` Phil Budne
  0 siblings, 1 reply; 37+ messages in thread
From: Tomasz Rola @ 2022-07-28  0:30 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Sun, Jul 24, 2022 at 09:02:53PM +0200, Tomasz Rola wrote:
> On Sat, Jul 23, 2022 at 08:00:10AM -0400, Dan Cross wrote:
> > On Sat, Jul 23, 2022 at 7:20 AM John Cowan <cowan@ccil.org> wrote:
> [...]
> > > An obvious approach, which would leave no real traces in documentation, would be:
> > >
> > > $ awk '{print NR, $0}'
[...]
> > > $ awk '{printf("%6d\t%s\n", NR, $0)}'
[...]
> > Yes, but awk wasn't widely available until 7th edition. I imagine work
> > on it began before `num` in 2BSD, but few outside of Bell Labs would
> > have seen it prior to 1978 or so.
[...]
> $  cat c.lisp | sed -e '{=;}' | sed -e 'N;s/\n/ /'

Ok, so maybe this is no longer very interesting subject, but I
recalled there was once a language named SNOBOL.

Wikipedia says, sed was written around 1974 [1] and about SNOBOL it
says, the language was being taught [2] in the late 1960s and early 1970s
in universities, so I guess it was quite popular. I wonder if it was
ported to Unix early enough to help before sed became available?
Anyway, I have got Phil Budne's implementation [3] and after usual
drill (configure, make, make install, stow) I could do this:

$  snobol4 -b -L ./numlines02.sno < numlines02.sno 
1       lnum = 0
2 loop  lnum = lnum + 1
3       output = lnum " " input :s(loop)
4 end

The first version did not work so well:

$  snobol4 -b -L ./numlines01.sno < numlines01.sno | head -8
1           lnum = 0
2 LOOP      line = INPUT
3 * Here: detect EOF (how?) and jump to : END
4           lnum  = lnum + 1
5           OUTPUT = lnum " " line : S(LOOP)
6 END
7 END
8 END

As I already have understood, even after reaching end of input, the
INPUT statement keeps returning last line read, counter keeps
increasing and last line is being written out for infinity. I have not
read any serious docs on SNOBOL yet, so I have no idea how to make the
'01' version work, but this is of rather small importance to the list.

However, since [2] claims SNOBOL was written in Bell Labs, just like
AWK and sed, so perhaps they could be using SNOBOL?

[1] https://en.wikipedia.org/wiki/Sed
[2] https://en.wikipedia.org/wiki/SNOBOL
[3] http://www.regressive.org/snobol4/

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola@bigfoot.com             **

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: Line Numbers Before SysIII nl? BSD num?
  2022-07-28  0:30             ` Tomasz Rola
@ 2022-07-28  1:03               ` Phil Budne
  2022-07-28  4:13                 ` [TUHS] SNOBOL and RATSNO William H. Mitchell
  2022-07-29  0:22                 ` [TUHS] SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?] Stuff Received
  0 siblings, 2 replies; 37+ messages in thread
From: Phil Budne @ 2022-07-28  1:03 UTC (permalink / raw)
  To: tuhs

> Anyway, I have got Phil Budne's implementation

C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
There was a SNOBOL3 implementation in Unix 6th Edition days called "sno".

As far as I know Macro SNOBOL4 (that my CSNOBOL4 is a port of) never
was ported to the PDP-11 (just not enough address space), but there
was a proposal (at least) for a SNOBOL4 implementation for the '11
called ELFBOL.

Macro SPITBOL (a faster implementation of SNOBOL4) was available on
the Research Unix VAXen (Andrew Koenig did a C-like preprocessor
called SNOCONE -- SNOBOL with some sugar).

Phil

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] SNOBOL and RATSNO
  2022-07-28  1:03               ` Phil Budne
@ 2022-07-28  4:13                 ` William H. Mitchell
  2022-07-29  4:28                   ` [TUHS] " Dave Horsfall
  2022-07-29  5:07                   ` Tomasz Rola
  2022-07-29  0:22                 ` [TUHS] SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?] Stuff Received
  1 sibling, 2 replies; 37+ messages in thread
From: William H. Mitchell @ 2022-07-28  4:13 UTC (permalink / raw)
  To: tuhs

If memory serves, Ralph Griswold once told me that the four versions of SNOBOL, culminating with SNOBOL4, took, respectively, a day, a week, a month, and year to implement.

Related to SNOBOL, something I’ve wondered about for years is whether I may have been the only regular user of RATSNO, which Dave Hanson created as a test of RATFOR’s retargetability.  I stumbled across RATSNO on the Icon V2 tape, and used it for quite a bit of my undergraduate programming at NC State in 1980-81.

Phil Budne: Thanks for your CSNOBOL4 implementation!  I’ve used it to show students SNOBOL4 in a comparative languages class at the U of Arizona.  (I was thinking your name sounded familiar!)

> On Jul 27, 2022, at 7:03 PM, Phil Budne <phil@ultimate.com> wrote:
> 
>> Anyway, I have got Phil Budne's implementation
> 
> C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
> There was a SNOBOL3 implementation in Unix 6th Edition days called "sno".
> 
> As far as I know Macro SNOBOL4 (that my CSNOBOL4 is a port of) never
> was ported to the PDP-11 (just not enough address space), but there
> was a proposal (at least) for a SNOBOL4 implementation for the '11
> called ELFBOL.
> 
> Macro SPITBOL (a faster implementation of SNOBOL4) was available on
> the Research Unix VAXen (Andrew Koenig did a C-like preprocessor
> called SNOCONE -- SNOBOL with some sugar).
> 
> Phil


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?]
  2022-07-28  1:03               ` Phil Budne
  2022-07-28  4:13                 ` [TUHS] SNOBOL and RATSNO William H. Mitchell
@ 2022-07-29  0:22                 ` Stuff Received
  2022-07-29  5:01                   ` [TUHS] " Charles H. Sauer
  2022-07-29 15:37                   ` Dave Plonka
  1 sibling, 2 replies; 37+ messages in thread
From: Stuff Received @ 2022-07-29  0:22 UTC (permalink / raw)
  To: tuhs

On 2022-07-27 21:03, Phil Budne wrote:
>> Anyway, I have got Phil Budne's implementation
> C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
> There was a SNOBOL3 implementation in Unix 6th Edition days called "sno".
>
> As far as I know Macro SNOBOL4 (that my CSNOBOL4 is a port of) never
> was ported to the PDP-11 (just not enough address space), but there
> was a proposal (at least) for a SNOBOL4 implementation for the '11
> called ELFBOL.
>
> Macro SPITBOL (a faster implementation of SNOBOL4) was available on
> the Research Unix VAXen (Andrew Koenig did a C-like preprocessor
> called SNOCONE -- SNOBOL with some sugar).
>
> Phil

I recall seeing ICEBOL card packs at the U. of Toronto Computing Centre 
decades ago but I know nothing more.

N.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-07-28  4:13                 ` [TUHS] SNOBOL and RATSNO William H. Mitchell
@ 2022-07-29  4:28                   ` Dave Horsfall
  2022-07-29  5:07                   ` Tomasz Rola
  1 sibling, 0 replies; 37+ messages in thread
From: Dave Horsfall @ 2022-07-29  4:28 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society; +Cc: Computer Old Farts Followers

I did get SPITBOL to work past its expiry date on OS/360 :-)  It was 
dubbed as the "Superzap of the year" by one of my CompSci lecturers (Dr. 
G.McMahon, UNSW).

The first couple of time-bombs were easy to find, but not so the rest 
(long story).

Probably belongs over on COFF now...

-- Dave

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?]
  2022-07-29  0:22                 ` [TUHS] SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?] Stuff Received
@ 2022-07-29  5:01                   ` Charles H. Sauer
  2022-07-29 14:07                     ` John Cowan
  2022-07-29 15:37                   ` Dave Plonka
  1 sibling, 1 reply; 37+ messages in thread
From: Charles H. Sauer @ 2022-07-29  5:01 UTC (permalink / raw)
  To: tuhs

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

A few experiences as SNOBOL/Icon enthusiast, not expert, ending with limited tie back to Unix:
o Introduced to SNOBOL4 in introductory programming languages course summer 1971 U.T. Austin
o ca 1976 used SNOBOL4 on VM/370 to build Fortran to PL/I translator "The elapsed time between beginning work on the translator and getting a running PL/I version of APLOMB was approximately two weeks, and this achievement was a great relief to those who anticipated a much, much larger effort." https://technologists.com/sauer/The_Evolution_of_the_Research_Queueing_Package.pdf <https://technologists.com/sauer/The_Evolution_of_the_Research_Queueing_Package.pdf>
o ca 1985 (with minimal effort) modified/built Icon to run on PC/IX, began emailing with Ralph Griswold
o Discovered IBM colleague Viktors Berstis and his SNOBOL advocacy/expertise (http://berstis.com/ <http://berstis.com/>)
o ca 1986 "With help from an ISC colleague, I created a PL.8 to C translator using Icon, that was used to facilitate some of the rewriting. [of the RT/PC VRM]" https://notes.technologists.com/notes/2017/03/08/lets-start-at-the-very-beginning-801-romp-rtpc-aix-versions/ <https://notes.technologists.com/notes/2017/03/08/lets-start-at-the-very-beginning-801-romp-rtpc-aix-versions/>

Charlie
--
voice: +1.512.784.7526       e-mail: sauer@technologists.com <mailto:sauer@technologists.com>           
fax: +1.512.346.5240         web: https://technologists.com/sauer/ <http://technologists.com/sauer/>
Facebook/Google/Skype/Twitter: CharlesHSauer


[-- Attachment #2: Type: text/html, Size: 4500 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-07-28  4:13                 ` [TUHS] SNOBOL and RATSNO William H. Mitchell
  2022-07-29  4:28                   ` [TUHS] " Dave Horsfall
@ 2022-07-29  5:07                   ` Tomasz Rola
  2022-08-09  5:12                     ` Jonathan Gevaryahu
  1 sibling, 1 reply; 37+ messages in thread
From: Tomasz Rola @ 2022-07-29  5:07 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Wed, Jul 27, 2022 at 10:13:04PM -0600, William H. Mitchell wrote:
> 
[...]
> Phil Budne: Thanks for your CSNOBOL4 implementation!  I’ve used it to show students SNOBOL4 in a comparative languages class at the U of Arizona.  (I was thinking your name sounded familiar!)
> 
> > On Jul 27, 2022, at 7:03 PM, Phil Budne <phil@ultimate.com> wrote:
> > 
> >> Anyway, I have got Phil Budne's implementation
> > 
> > C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
> > There was a SNOBOL3 implementation in Unix 6th Edition days called "sno".
[...]

Yes, I have had a look and it seems to be very nicely written
project. Oh, and there is plenty of Snobol4 code to look at, too...

Thank you.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola@bigfoot.com             **

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?]
  2022-07-29  5:01                   ` [TUHS] " Charles H. Sauer
@ 2022-07-29 14:07                     ` John Cowan
  0 siblings, 0 replies; 37+ messages in thread
From: John Cowan @ 2022-07-29 14:07 UTC (permalink / raw)
  Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

On Fri, Jul 29, 2022 at 1:02 AM Charles H. Sauer <sauer@technologists.com>
wrote:

> A few experiences as SNOBOL/Icon enthusiast, not expert, ending with
> limited tie back to Unix:
> o Introduced to SNOBOL4 in introductory programming languages course
> summer 1971 U.T. Austin
> o ca 1976 used SNOBOL4 on VM/370 to build Fortran to PL/I translator "The
> elapsed time between beginning work on the translator and getting a running
> PL/I version of APLOMB was approximately two weeks, and this achievement
> was a great relief to those who anticipated a much, much larger effort."
> https://technologists.com/sauer/The_Evolution_of_the_Research_Queueing_Package.pdf
> o ca 1985 (with minimal effort) modified/built Icon to run on PC/IX, began
> emailing with Ralph Griswold
> o Discovered IBM colleague Viktors Berstis and his SNOBOL
> advocacy/expertise (http://berstis.com/)
> o ca 1986 "With help from an ISC colleague, I created a PL.8 to C
> translator using Icon, that was used to facilitate some of the rewriting.
> [of the RT/PC VRM]"
> https://notes.technologists.com/notes/2017/03/08/lets-start-at-the-very-beginning-801-romp-rtpc-aix-versions/
>
> Let us not forget Icon <https://www2.cs.arizona.edu/icon/>, Ralph
Griswold's own successor to Snobol.  Well-structured, portable to Posix and
Windows, "Prolog from another point of view" (the Icon implementation is
very much like the WAM).

[-- Attachment #2: Type: text/html, Size: 3490 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?]
  2022-07-29  0:22                 ` [TUHS] SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?] Stuff Received
  2022-07-29  5:01                   ` [TUHS] " Charles H. Sauer
@ 2022-07-29 15:37                   ` Dave Plonka
  1 sibling, 0 replies; 37+ messages in thread
From: Dave Plonka @ 2022-07-29 15:37 UTC (permalink / raw)
  To: tuhs

SNOBOL influenced Dick Haight's bs(1) programming language which
includes some SNOBOL features, a replacement, written in C, for Ken
Thompson's bas(1) BASIC implementation, written in assembly language.

bs (programming language)
https://en.wikipedia.org/wiki/Bs_(programming_language)

BS: a mysterious Unix programming language!
https://www.youtube.com/watch?v=ELICIa3L22o

Although I know of no applications written in bs(1), it remains to
this day in licensed System V Unix variants such as HP-UX and AIX.

Peace,
Dave

On Thu, Jul 28, 2022 at 7:22 PM Stuff Received <stuff@riddermarkfarm.ca> wrote:
>
> On 2022-07-27 21:03, Phil Budne wrote:
> >> Anyway, I have got Phil Budne's implementation
> > C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
> > There was a SNOBOL3 implementation in Unix 6th Edition days called "sno".
> >
> > As far as I know Macro SNOBOL4 (that my CSNOBOL4 is a port of) never
> > was ported to the PDP-11 (just not enough address space), but there
> > was a proposal (at least) for a SNOBOL4 implementation for the '11
> > called ELFBOL.
> >
> > Macro SPITBOL (a faster implementation of SNOBOL4) was available on
> > the Research Unix VAXen (Andrew Koenig did a C-like preprocessor
> > called SNOCONE -- SNOBOL with some sugar).
> >
> > Phil
>
> I recall seeing ICEBOL card packs at the U. of Toronto Computing Centre
> decades ago but I know nothing more.
>
> N.



-- 

dave@plonka.us  http://www.cs.wisc.edu/~plonka/

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-07-29  5:07                   ` Tomasz Rola
@ 2022-08-09  5:12                     ` Jonathan Gevaryahu
  2022-08-09  6:11                       ` Rob Pike
  0 siblings, 1 reply; 37+ messages in thread
From: Jonathan Gevaryahu @ 2022-08-09  5:12 UTC (permalink / raw)
  To: tuhs

On 7/29/2022 1:07 AM, Tomasz Rola wrote:
> On Wed, Jul 27, 2022 at 10:13:04PM -0600, William H. Mitchell wrote:
> [...]
>> Phil Budne: Thanks for your CSNOBOL4 implementation!  I’ve used it to show students SNOBOL4 in a comparative languages class at the U of Arizona.  (I was thinking your name sounded familiar!)
>>
>>> On Jul 27, 2022, at 7:03 PM, Phil Budne <phil@ultimate.com> wrote:
>>>
>>>> Anyway, I have got Phil Budne's implementation
>>> C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
>>> There was a SNOBOL3 implementation in Unix 6th Edition days called "sno".
> [...]
>
> Yes, I have had a look and it seems to be very nicely written
> project. Oh, and there is plenty of Snobol4 code to look at, too...
>
> Thank you.
>
Speaking of SNOBOL4, I typed up the SNOBOL code from the NRL Report 7948 
(1975) titled "Automatic Translation of English Text to Phonetics by 
Means of Letter-to-Sound Rules" by Honey Sue Elovitz, Rodney W. Johnson, 
Astrid McHugh and John E. Shore, and made some minor modifications to 
make it work properly with the windows/catspaw version of snobol/spitbol.

It might not be necessary to make those changes at all, with Phil's 
version, I'll need to try that!

I have both the patched and unpatched versions at 
https://github.com/Lord-Nightmare/NRL_TextToPhonemes and it does behave 
correctly/matches the paper (at least the patched version does).

I recently (within the past month) discovered another later port of the 
NRL ruleset from 1978 as part of Peter B. Maggs' ANGLOPHONE package for 
S-100 systems, intended for use with the Computalker CT-1 speech 
synthesis S-100 card. Apparently Rodney W. Johnson had continued 
developing the rules even after the 1975/1976 publications of the NRL 
report and the IEEE ITASSP version of said report, and I haven't updated 
the bibliography on the github readme yet.


Jonathan G.

-- 
Jonathan Gevaryahu AKA Lord Nightmare
jgevaryahu@gmail.com
jgevaryahu@hotmail.com


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09  5:12                     ` Jonathan Gevaryahu
@ 2022-08-09  6:11                       ` Rob Pike
  2022-08-09 13:34                         ` Clem Cole
                                           ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Rob Pike @ 2022-08-09  6:11 UTC (permalink / raw)
  To: Jonathan Gevaryahu; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 2818 bytes --]

We're probably well off topic now but...

Many years ago I ran into Bob Dewar on a visit to Cambridge University and
we got to talking. He said that the original implementation of SPITBOL, for
the System/360, was in assembler (of course), and written by him and
Belcher (?). The story he told was that they wrote it all down first, put
it on punch cards, and sent it to the IBM machine. The next day they got
back a listing with a bunch of errors. They iterated. By the fourth
round—fifth day—they had a working SPITBOL.

I still marvel at the productivity and precision of his generation of
programmers.

-rob


On Tue, Aug 9, 2022 at 3:13 PM Jonathan Gevaryahu <jgevaryahu@hotmail.com>
wrote:

> On 7/29/2022 1:07 AM, Tomasz Rola wrote:
> > On Wed, Jul 27, 2022 at 10:13:04PM -0600, William H. Mitchell wrote:
> > [...]
> >> Phil Budne: Thanks for your CSNOBOL4 implementation!  I’ve used it to
> show students SNOBOL4 in a comparative languages class at the U of
> Arizona.  (I was thinking your name sounded familiar!)
> >>
> >>> On Jul 27, 2022, at 7:03 PM, Phil Budne <phil@ultimate.com> wrote:
> >>>
> >>>> Anyway, I have got Phil Budne's implementation
> >>> C'est moi!  SNOBOL came out of Bell Labs in Holmdel NJ.
> >>> There was a SNOBOL3 implementation in Unix 6th Edition days called
> "sno".
> > [...]
> >
> > Yes, I have had a look and it seems to be very nicely written
> > project. Oh, and there is plenty of Snobol4 code to look at, too...
> >
> > Thank you.
> >
> Speaking of SNOBOL4, I typed up the SNOBOL code from the NRL Report 7948
> (1975) titled "Automatic Translation of English Text to Phonetics by
> Means of Letter-to-Sound Rules" by Honey Sue Elovitz, Rodney W. Johnson,
> Astrid McHugh and John E. Shore, and made some minor modifications to
> make it work properly with the windows/catspaw version of snobol/spitbol.
>
> It might not be necessary to make those changes at all, with Phil's
> version, I'll need to try that!
>
> I have both the patched and unpatched versions at
> https://github.com/Lord-Nightmare/NRL_TextToPhonemes and it does behave
> correctly/matches the paper (at least the patched version does).
>
> I recently (within the past month) discovered another later port of the
> NRL ruleset from 1978 as part of Peter B. Maggs' ANGLOPHONE package for
> S-100 systems, intended for use with the Computalker CT-1 speech
> synthesis S-100 card. Apparently Rodney W. Johnson had continued
> developing the rules even after the 1975/1976 publications of the NRL
> report and the IEEE ITASSP version of said report, and I haven't updated
> the bibliography on the github readme yet.
>
>
> Jonathan G.
>
> --
> Jonathan Gevaryahu AKA Lord Nightmare
> jgevaryahu@gmail.com
> jgevaryahu@hotmail.com
>
>

[-- Attachment #2: Type: text/html, Size: 4168 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09  6:11                       ` Rob Pike
@ 2022-08-09 13:34                         ` Clem Cole
  2022-08-09 15:15                           ` Andrew Hume
  2022-08-09 15:39                           ` Richard Salz
  2022-08-09 13:56                         ` Larry McVoy
  2022-08-09 16:45                         ` William H. Mitchell
  2 siblings, 2 replies; 37+ messages in thread
From: Clem Cole @ 2022-08-09 13:34 UTC (permalink / raw)
  To: Rob Pike; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

On Tue, Aug 9, 2022 at 2:12 AM Rob Pike <robpike@gmail.com> wrote:

>
> I still marvel at the productivity and precision of his generation of
> programmers.
>
Amen.

When I was first learning the ins and outs of the implementation of the
York/APL System for the 360, I was regaled with similar stories and hoped
that I could measure up to their standards.
ᐧ

[-- Attachment #2: Type: text/html, Size: 1434 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09  6:11                       ` Rob Pike
  2022-08-09 13:34                         ` Clem Cole
@ 2022-08-09 13:56                         ` Larry McVoy
  2022-08-09 16:45                         ` William H. Mitchell
  2 siblings, 0 replies; 37+ messages in thread
From: Larry McVoy @ 2022-08-09 13:56 UTC (permalink / raw)
  To: Rob Pike; +Cc: The Eunuchs Hysterical Society

On Tue, Aug 09, 2022 at 04:11:38PM +1000, Rob Pike wrote:
> We're probably well off topic now but...
> 
> Many years ago I ran into Bob Dewar on a visit to Cambridge University and
> we got to talking. He said that the original implementation of SPITBOL, for
> the System/360, was in assembler (of course), and written by him and
> Belcher (?). The story he told was that they wrote it all down first, put
> it on punch cards, and sent it to the IBM machine. The next day they got
> back a listing with a bunch of errors. They iterated. By the fourth
> round???fifth day???they had a working SPITBOL.
> 
> I still marvel at the productivity and precision of his generation of
> programmers.

I had the same reaction to pic(1).  You could look at the code and "see"
what it was doing.  I've always believed that pic was so well designed
because it took a day to get the print out (back then), so you had to
have a language where you could see what it was doing.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09 13:34                         ` Clem Cole
@ 2022-08-09 15:15                           ` Andrew Hume
  2022-08-09 18:26                             ` Clem Cole
                                               ` (2 more replies)
  2022-08-09 15:39                           ` Richard Salz
  1 sibling, 3 replies; 37+ messages in thread
From: Andrew Hume @ 2022-08-09 15:15 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

rob, clem:

	has there been a shift in ability? or is this more likely a sampling bias
(because there were so many fewer programmers then)?


> On Aug 9, 2022, at 6:34 AM, Clem Cole <clemc@ccc.com> wrote:
> 
> 
> 
> On Tue, Aug 9, 2022 at 2:12 AM Rob Pike <robpike@gmail.com <mailto:robpike@gmail.com>> wrote:
> 
> I still marvel at the productivity and precision of his generation of programmers.
> Amen.


[-- Attachment #2: Type: text/html, Size: 1616 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09 13:34                         ` Clem Cole
  2022-08-09 15:15                           ` Andrew Hume
@ 2022-08-09 15:39                           ` Richard Salz
  1 sibling, 0 replies; 37+ messages in thread
From: Richard Salz @ 2022-08-09 15:39 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

On Tue, Aug 9, 2022 at 9:36 AM Clem Cole <clemc@ccc.com> wrote:

>
> On Tue, Aug 9, 2022 at 2:12 AM Rob Pike <robpike@gmail.com> wrote:
>
>>
>> I still marvel at the productivity and precision of his generation of
>> programmers.
>>
> Amen.
>
> When I was first learning the ins and outs of the implementation of the
> York/APL System for the 360, I was regaled with similar stories and hoped
> that I could measure up to their standards.
>

If you don't know about Mel who wrote a cheating blackjack game for a drum
memory machine, read https://www.cs.utah.edu/~elb/folklore/mel.html  And
the postscript.

> ᐧ
>

[-- Attachment #2: Type: text/html, Size: 2181 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09  6:11                       ` Rob Pike
  2022-08-09 13:34                         ` Clem Cole
  2022-08-09 13:56                         ` Larry McVoy
@ 2022-08-09 16:45                         ` William H. Mitchell
  2 siblings, 0 replies; 37+ messages in thread
From: William H. Mitchell @ 2022-08-09 16:45 UTC (permalink / raw)
  To: tuhs

A cool thing you buy in those days was the full source code for SPITBOL, on microfiche.  I bought a copy and a number of my friends did, too.  It was really beautiful code.

> On Aug 8, 2022, at 11:11 PM, Rob Pike <robpike@gmail.com> wrote:
> 
> We're probably well off topic now but...
> 
> Many years ago I ran into Bob Dewar on a visit to Cambridge University and we got to talking. He said that the original implementation of SPITBOL, for the System/360, was in assembler (of course), and written by him and Belcher (?). The story he told was that they wrote it all down first, put it on punch cards, and sent it to the IBM machine. The next day they got back a listing with a bunch of errors. They iterated. By the fourth round—fifth day—they had a working SPITBOL.
> 
> I still marvel at the productivity and precision of his generation of programmers.
> 
> -rob


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09 15:15                           ` Andrew Hume
@ 2022-08-09 18:26                             ` Clem Cole
  2022-08-09 18:52                             ` Tom Teixeira
  2022-08-09 21:25                             ` Rob Pike
  2 siblings, 0 replies; 37+ messages in thread
From: Clem Cole @ 2022-08-09 18:26 UTC (permalink / raw)
  To: Andrew Hume; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

On Tue, Aug 9, 2022 at 11:15 AM Andrew Hume <andrew@humeweb.com> wrote:

> rob, clem:
>
> has there been a shift in ability? or is this more likely a sampling bias
> (because there were so many fewer programmers then)?
>
Certainly part of it.  But I think was more likely the type of person than
the number.   In those days because the tools and use of them required
extreme precision, only the precise found their way.

What's the Pixar Incredible's line:   *If everyone is super, no one will
be.*
ᐧ
ᐧ

[-- Attachment #2: Type: text/html, Size: 2044 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09 15:15                           ` Andrew Hume
  2022-08-09 18:26                             ` Clem Cole
@ 2022-08-09 18:52                             ` Tom Teixeira
  2022-08-09 21:25                             ` Rob Pike
  2 siblings, 0 replies; 37+ messages in thread
From: Tom Teixeira @ 2022-08-09 18:52 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

I'll confess: I was never very good at bench checking batch programs, 
but only had at most a handful of assignments in college: generally 
cycles were cheap on time-sharing systems and I quickly adapted to 
interactive debugging.

Over time (with embedded systems in networking gear and other 
applications), that wasn't possible and the new skill I admired was 
being able to add effective logging to diagnose problems. And since most 
of those systems were some combination of 
real-time/multiprocessor/multithreaded, it was generally not possible to 
deterministically repeat the sequence.

On 8/9/22 11:15 AM, Andrew Hume wrote:
> rob, clem:
>
> has there been a shift in ability? or is this more likely a sampling bias
> (because there were so many fewer programmers then)?
>
>
>> On Aug 9, 2022, at 6:34 AM, Clem Cole <clemc@ccc.com> wrote:
>>
>>
>>
>> On Tue, Aug 9, 2022 at 2:12 AM Rob Pike <robpike@gmail.com> wrote:
>>
>>
>>     I still marvel at the productivity and precision of his
>>     generation of programmers.
>>
>> Amen.
>

[-- Attachment #2: Type: text/html, Size: 3578 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [TUHS] Re: SNOBOL and RATSNO
  2022-08-09 15:15                           ` Andrew Hume
  2022-08-09 18:26                             ` Clem Cole
  2022-08-09 18:52                             ` Tom Teixeira
@ 2022-08-09 21:25                             ` Rob Pike
  2 siblings, 0 replies; 37+ messages in thread
From: Rob Pike @ 2022-08-09 21:25 UTC (permalink / raw)
  To: Andrew Hume; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

I think both factors were relevant, as well as the preciousness and pace of
it all, as discussed by others here.

-rob


On Wed, Aug 10, 2022 at 1:15 AM Andrew Hume <andrew@humeweb.com> wrote:

> rob, clem:
>
> has there been a shift in ability? or is this more likely a sampling bias
> (because there were so many fewer programmers then)?
>
>
> On Aug 9, 2022, at 6:34 AM, Clem Cole <clemc@ccc.com> wrote:
>
>
>
> On Tue, Aug 9, 2022 at 2:12 AM Rob Pike <robpike@gmail.com> wrote:
>
>>
>> I still marvel at the productivity and precision of his generation of
>> programmers.
>>
> Amen.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1995 bytes --]

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2022-08-09 21:27 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-23  2:57 [TUHS] Line Numbers Before SysIII nl? BSD num? segaloco via TUHS
2022-07-23  5:56 ` [TUHS] " markus schnalke
2022-07-23  7:55   ` segaloco via TUHS
2022-07-23 11:01     ` Dan Cross
2022-07-23 11:20       ` John Cowan
2022-07-23 12:00         ` Dan Cross
2022-07-23 12:49           ` Norman Wilson
2022-07-23 13:20             ` Rob Pike
2022-07-23 13:36               ` Ralph Corderoy
2022-07-23 14:33               ` John Cowan
2022-07-24 19:45               ` Warner Losh
2022-07-24 20:33                 ` segaloco via TUHS
2022-07-24 21:04                   ` Warner Losh
2022-07-23 17:35             ` Clem Cole
2022-07-23 18:40               ` Phil Budne
2022-07-23 18:51                 ` Nelson H. F. Beebe
2022-07-23 19:07                   ` Douglas McIlroy
2022-07-24 19:02           ` Tomasz Rola
2022-07-28  0:30             ` Tomasz Rola
2022-07-28  1:03               ` Phil Budne
2022-07-28  4:13                 ` [TUHS] SNOBOL and RATSNO William H. Mitchell
2022-07-29  4:28                   ` [TUHS] " Dave Horsfall
2022-07-29  5:07                   ` Tomasz Rola
2022-08-09  5:12                     ` Jonathan Gevaryahu
2022-08-09  6:11                       ` Rob Pike
2022-08-09 13:34                         ` Clem Cole
2022-08-09 15:15                           ` Andrew Hume
2022-08-09 18:26                             ` Clem Cole
2022-08-09 18:52                             ` Tom Teixeira
2022-08-09 21:25                             ` Rob Pike
2022-08-09 15:39                           ` Richard Salz
2022-08-09 13:56                         ` Larry McVoy
2022-08-09 16:45                         ` William H. Mitchell
2022-07-29  0:22                 ` [TUHS] SNOBOL and progeny [Was: Re: Re: Line Numbers Before SysIII nl? BSD num?] Stuff Received
2022-07-29  5:01                   ` [TUHS] " Charles H. Sauer
2022-07-29 14:07                     ` John Cowan
2022-07-29 15:37                   ` Dave Plonka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).