The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] pre-more pager?
@ 2017-11-08 20:02 Noel Chiappa
  2017-11-08 20:11 ` Forrest, Jon
                   ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Noel Chiappa @ 2017-11-08 20:02 UTC (permalink / raw)


    > From: Jon Forrest

    > In the early days of Unix I was told that it wasn't practical to write a
    > pager because such a thing would have to run in raw mode in order to
    > process single letter commands, such as the space character for going on
    > to the next page. Since raw mode introduced a significant amount of
    > overhead on already overtaxed machines, it was considered an anti-social
    > thing to do.

Something sounds odd here.

One could have written a pager which used 'Return' for each new page, and run
it in cooked mode and not used any less cycles (in fact, more, IIRC the
cooked/raw differences in handling in the TTY driver).

But that's all second-order effects anyway. If one were using a serial line
hooked up to a DZ (and those were common - DH's were _much_ more expensive, so
poor places like my lab at MIT used DZ's), then _every character printed_
caused an interrupt. So the overhead from printing each screen-ful of text was
orders of magnitude greater than the overhead of the user's input to get the
next screen.

    > IIRC later versions of Unix added the ability to respond to a specific
    > list of single characters without going into raw mode. Of course, that
    > didn't help when full-screen editors like vi and the Rand editor came
    > out.

Overhead was definitely an issue with EMACS on Multics, where waking up a
process on each character of input was significant. I think Bernie's Multics
EMACS document discusses this. I'm pretty sure they used the Telnet RCTE
option to try and minimize the overhead.

       Noel


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

* [TUHS] pre-more pager?
  2017-11-08 20:02 [TUHS] pre-more pager? Noel Chiappa
@ 2017-11-08 20:11 ` Forrest, Jon
  2017-11-10  5:26   ` Random832
  2017-11-08 20:18 ` Clem Cole
  2017-11-08 22:47 ` Dave Horsfall
  2 siblings, 1 reply; 42+ messages in thread
From: Forrest, Jon @ 2017-11-08 20:11 UTC (permalink / raw)




On 11/8/2017 12:02 PM, Noel Chiappa wrote:
>      > From: Jon Forrest
> 
>      > In the early days of Unix I was told that it wasn't practical to write a
>      > pager because such a thing would have to run in raw mode in order to
>      > process single letter commands, such as the space character for going on
>      > to the next page. Since raw mode introduced a significant amount of
>      > overhead on already overtaxed machines, it was considered an anti-social
>      > thing to do.
> 
> Something sounds odd here.

I agree, now that I think about it. I do remember being told not to
write such a thing, due to the load it would cause. Maybe John Nagle,
who had the cube next to mine, might remember better.

> Overhead was definitely an issue with EMACS on Multics, where waking up a
> process on each character of input was significant. I think Bernie's Multics
> EMACS document discusses this. I'm pretty sure they used the Telnet RCTE
> option to try and minimize the overhead.

I remember ~40 students at UCSB trying to run 'vi' on a Vax 780 with 4MB of
RAM. Between the lack of memory and the overhead of raw mode, it wasn't
a pretty sight.

Jon



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

* [TUHS] pre-more pager?
  2017-11-08 20:02 [TUHS] pre-more pager? Noel Chiappa
  2017-11-08 20:11 ` Forrest, Jon
@ 2017-11-08 20:18 ` Clem Cole
  2017-11-08 20:28   ` Ron Natalie
  2017-11-08 22:47 ` Dave Horsfall
  2 siblings, 1 reply; 42+ messages in thread
From: Clem Cole @ 2017-11-08 20:18 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

On Wed, Nov 8, 2017 at 8:02 PM, Noel Chiappa <jnc at mercury.lcs.mit.edu>
wrote:

> If one were using a serial line
> hooked up to a DZ (and those were common - DH's were _much_ more
> expensive, so
> poor places like my lab at MIT used DZ's), then _every character printed_
> caused an interrupt.


​Right, although many (most) Unix sites used Able DHDM's which were cheaper
than DEC DZ's, took less space in the backplane, had full modem control
(inc RTS/CTS handshaking in HW) and were DMA.   But, my memory is that they
did not show up until '78 though.

The truth is DZ sucked from a performance standpoint. Besides not being
able to support RTS/CTS flow control, the 8 serial ports shared an input
buffer in the HW IIRC and the UART only had 2 chars of buffering.    An
8-port DZ with all lines running 19.2K baud could kill a 780.    People
that ran the "Berk-net" (which a pre-TCP networking system for UNIX that
ran on serial lines) needed spread out the Berk-Net load between different
DZ lines.  No so if you have Able gear.

So I'll take the 'common' note to be if you used a 'pure DEC' set up - you
used DZ-11s.  ​  But as you said most of us were looking at costs, so
'foreign' peripherals were also 'common' in the UNIX community.  DH11's
were preferred.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/8d223102/attachment.html>


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

* [TUHS] pre-more pager?
  2017-11-08 20:18 ` Clem Cole
@ 2017-11-08 20:28   ` Ron Natalie
  0 siblings, 0 replies; 42+ messages in thread
From: Ron Natalie @ 2017-11-08 20:28 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]

We actually still had some real DEC DH’s on our system.   These are what the DHDM emulates, but are implemented in its own backplane full of various flipchip cards.

 

At least the DZ doesn’t loop on the ready bit like the kernel printf (not to be used for idle chit-chat)..

 

From: TUHS [mailto:tuhs-bounces@minnie.tuhs.org] On Behalf Of Clem Cole
Sent: Wednesday, November 8, 2017 3:19 PM
To: Noel Chiappa
Cc: TUHS main list
Subject: Re: [TUHS] pre-more pager?

 

 

 

On Wed, Nov 8, 2017 at 8:02 PM, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:

If one were using a serial line
hooked up to a DZ (and those were common - DH's were _much_ more expensive, so
poor places like my lab at MIT used DZ's), then _every character printed_
caused an interrupt. 

 

​Right, although many (most) Unix sites used Able DHDM's which were cheaper than DEC DZ's, took less space in the backplane, had full modem control (inc RTS/CTS handshaking in HW) and were DMA.   But, my memory is that they did not show up until '78 though. 

 

The truth is DZ sucked from a performance standpoint. Besides not being able to support RTS/CTS flow control, the 8 serial ports shared an input buffer in the HW IIRC and the UART only had 2 chars of buffering.    An 8-port DZ with all lines running 19.2K baud could kill a 780.    People that ran the "Berk-net" (which a pre-TCP networking system for UNIX that ran on serial lines) needed spread out the Berk-Net load between different DZ lines.  No so if you have Able gear.

 

So I'll take the 'common' note to be if you used a 'pure DEC' set up - you used DZ-11s.  ​  But as you said most of us were looking at costs, so 'foreign' peripherals were also 'common' in the UNIX community.  DH11's were preferred.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/abe03dbf/attachment-0001.html>


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

* [TUHS] pre-more pager?
  2017-11-08 20:02 [TUHS] pre-more pager? Noel Chiappa
  2017-11-08 20:11 ` Forrest, Jon
  2017-11-08 20:18 ` Clem Cole
@ 2017-11-08 22:47 ` Dave Horsfall
  2 siblings, 0 replies; 42+ messages in thread
From: Dave Horsfall @ 2017-11-08 22:47 UTC (permalink / raw)


On Wed, 8 Nov 2017, Noel Chiappa wrote:

> But that's all second-order effects anyway. If one were using a serial 
> line hooked up to a DZ (and those were common - DH's were _much_ more 
> expensive, so poor places like my lab at MIT used DZ's), then _every 
> character printed_ caused an interrupt. So the overhead from printing 
> each screen-ful of text was orders of magnitude greater than the 
> overhead of the user's input to get the next screen.

Looxury!  We had to make do with DJ-11s...

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


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

* [TUHS] pre-more pager?
  2017-11-08 20:11 ` Forrest, Jon
@ 2017-11-10  5:26   ` Random832
  2017-11-10  7:31     ` Otto Moerbeek
  0 siblings, 1 reply; 42+ messages in thread
From: Random832 @ 2017-11-10  5:26 UTC (permalink / raw)


On Wed, Nov 8, 2017, at 15:11, Forrest, Jon wrote:
> I remember ~40 students at UCSB trying to run 'vi' on a Vax 780 with
> 4MB of RAM. Between the lack of memory and the overhead of raw mode,
> it wasn't a pretty sight.

There's also likely a difference between typing large amounts of text in
raw mode (as vi entails, especially in insert mode) vs issuing single-
character commands.


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

* [TUHS] pre-more pager?
  2017-11-10  5:26   ` Random832
@ 2017-11-10  7:31     ` Otto Moerbeek
  0 siblings, 0 replies; 42+ messages in thread
From: Otto Moerbeek @ 2017-11-10  7:31 UTC (permalink / raw)


On Fri, Nov 10, 2017 at 12:26:30AM -0500, Random832 wrote:

> On Wed, Nov 8, 2017, at 15:11, Forrest, Jon wrote:
> > I remember ~40 students at UCSB trying to run 'vi' on a Vax 780 with
> > 4MB of RAM. Between the lack of memory and the overhead of raw mode,
> > it wasn't a pretty sight.
> 
> There's also likely a difference between typing large amounts of text in
> raw mode (as vi entails, especially in insert mode) vs issuing single-
> character commands.

I also had to do programming assugnment on an overloaded VAX.

Luckily you can switch to ex mode in vi. ex is much easier on the
macine since it doesn't work in raw mode. 

	-Otto


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

* [TUHS] pre-more pager?
  2017-11-10  0:15             ` Arthur Krewat
@ 2017-11-10  2:14               ` Ralph Corderoy
  0 siblings, 0 replies; 42+ messages in thread
From: Ralph Corderoy @ 2017-11-10  2:14 UTC (permalink / raw)


Arthur wrote:
> head -1 /etc/motd
> or
> sed 1q < /etc/motd

It's good conversation has moved onto sed given head was presumably
created by someone that saw tail existed and didn't know their sed well
enough, but the `1q' that keeps appearing can be just `q'.  :-)

IIRC Brian Cantrell complains in a video interview that head didn't
exist, even though tail did, and it took "them" to create it, presumably
the BSD or Sun lot?  (He's also one of the few interviewees that talk
fast enough for a video to be bearable compared to reading at one's own
pace.)

I use `sed 3q', etc., so often that I've ~/bin/3q for various sizes just
to save that typo of seq for sed;  handy for checking the output of a
pipeline so far when a screenful would push off useful history.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy


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

* [TUHS] pre-more pager?
  2017-11-09 20:53           ` Dave Horsfall
@ 2017-11-10  0:15             ` Arthur Krewat
  2017-11-10  2:14               ` Ralph Corderoy
  0 siblings, 1 reply; 42+ messages in thread
From: Arthur Krewat @ 2017-11-10  0:15 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]



On 11/9/2017 3:53 PM, Dave Horsfall wrote:
> If you're interviewing a new hire, see how long it takes 'em to work 
> out what this does:
>
>     :; </etc/motd> /dev/tty sed 1q ;: echo "Hello, world"
>
For me, there are other criteria for hiring than telling me what some 
obscure string of stuff will do.

It's more important that they can take the above or something similar 
and shorten/simplify it to:

head -1 /etc/motd
or
sed 1q < /etc/motd

Because I just ran the above on a few different platforms, and they all 
just give the first line of /etc/motd, which I expected.

I might be missing something :P - but having them solve a problem the 
shortest way possible is more in my interests.

art k.

PS: I've been in interviews where I was given something like that. A 
notable one was NYNEX Science and Technology. One of the sysadmins 
interviewing me asked about some obscure command or maybe an option, in 
SunOS. My answer was "well, I don't remember that, having already worked 
with SunOS for a few years, but see that row of manuals behind you? I 
bet I can find it in there quick enough". I did, within a minute or two. 
I got the consulting gig.

--

Again, no disrespect intended.



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

* [TUHS] pre-more pager?
  2017-11-09  4:38         ` Will Senn
  2017-11-09 13:18           ` Dan Cross
@ 2017-11-09 20:53           ` Dave Horsfall
  2017-11-10  0:15             ` Arthur Krewat
  1 sibling, 1 reply; 42+ messages in thread
From: Dave Horsfall @ 2017-11-09 20:53 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

On Wed, 8 Nov 2017, Will Senn wrote:

>>     < filename head -20
>> 
> too bad head doesn't exist on v7. I did have to look up the incantation 
> in Intro to the Shell by Bourne, that's fascinating stuff and it still 
> works on my mac - nuts!

If you're interviewing a new hire, see how long it takes 'em to work out 
what this does:

     :; </etc/motd> /dev/tty sed 1q ;: echo "Hello, world"

Tested on all shells at my disposal; might even work on V7.  Did I mention 
that I use Perl, and used to use APL\360?  The only reason I don't write 
obfuscated code is that I might be the one who has to maintain it later...

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


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

* [TUHS] pre-more pager?
  2017-11-09 17:19   ` Steve Nickolas
  2017-11-09 18:15     ` Don Hopkins
@ 2017-11-09 18:26     ` Arthur Krewat
  1 sibling, 0 replies; 42+ messages in thread
From: Arthur Krewat @ 2017-11-09 18:26 UTC (permalink / raw)




On 11/9/2017 12:19 PM, Steve Nickolas wrote:
> On Thu, 9 Nov 2017, Arthur Krewat wrote: It would be nice if that was 
> the case for more and stdin.
>>
>> more on Solaris 11.3 doesn't allow backup on stdin, nor on a recent 
>> version of Debian Linux I checked.
>>
>> I remember a while back that when man spawned more, it was stdin and 
>> you couldn't back up on that either. Very annoying.
>
> Isn't that the whole reason "less" exists?

# less
less: not found
# uname -a
SunOS vmsol7 5.7 Generic_106542-42 i86pc i386 i86pc
# find / -xdev -name less
#

It's not there in Solaris 7, and is there in Solaris 8. I wonder when 
less started shipping with other operating systems?



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

* [TUHS] pre-more pager?
  2017-11-09 17:19   ` Steve Nickolas
@ 2017-11-09 18:15     ` Don Hopkins
  2017-11-09 18:26     ` Arthur Krewat
  1 sibling, 0 replies; 42+ messages in thread
From: Don Hopkins @ 2017-11-09 18:15 UTC (permalink / raw)



> On 9 Nov 2017, at 18:19, Steve Nickolas <usotsuki at buric.co> wrote:
> 
> On Thu, 9 Nov 2017, Arthur Krewat wrote:
> 
>> On 11/9/2017 11:19 AM, Norman Wilson wrote:
>>> It buffered text internally to allow backing up a few
>>> pages, so it was possible to back up even when input
>>> didn't come from a file (something I'm not sure the
>>> more of the time could do).
>> It would be nice if that was the case for more and stdin.
>> 
>> more on Solaris 11.3 doesn't allow backup on stdin, nor on a recent version of Debian Linux I checked.
>> 
>> I remember a while back that when man spawned more, it was stdin and you couldn't back up on that either. Very annoying.
> 
> Isn't that the whole reason "less" exists?
> 
> -uso.

Less is more because worse is better.

-Don



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

* [TUHS] pre-more pager?
  2017-11-09 16:48 ` Arthur Krewat
@ 2017-11-09 17:19   ` Steve Nickolas
  2017-11-09 18:15     ` Don Hopkins
  2017-11-09 18:26     ` Arthur Krewat
  0 siblings, 2 replies; 42+ messages in thread
From: Steve Nickolas @ 2017-11-09 17:19 UTC (permalink / raw)


On Thu, 9 Nov 2017, Arthur Krewat wrote:

> On 11/9/2017 11:19 AM, Norman Wilson wrote:
>> It buffered text internally to allow backing up a few
>> pages, so it was possible to back up even when input
>> didn't come from a file (something I'm not sure the
>> more of the time could do).
>> 
> It would be nice if that was the case for more and stdin.
>
> more on Solaris 11.3 doesn't allow backup on stdin, nor on a recent version 
> of Debian Linux I checked.
>
> I remember a while back that when man spawned more, it was stdin and you 
> couldn't back up on that either. Very annoying.

Isn't that the whole reason "less" exists?

-uso.


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

* [TUHS] pre-more pager?
  2017-11-09 16:19 Norman Wilson
@ 2017-11-09 16:48 ` Arthur Krewat
  2017-11-09 17:19   ` Steve Nickolas
  0 siblings, 1 reply; 42+ messages in thread
From: Arthur Krewat @ 2017-11-09 16:48 UTC (permalink / raw)


On 11/9/2017 11:19 AM, Norman Wilson wrote:
> It buffered text internally to allow backing up a few
> pages, so it was possible to back up even when input
> didn't come from a file (something I'm not sure the
> more of the time could do).
>
It would be nice if that was the case for more and stdin.

more on Solaris 11.3 doesn't allow backup on stdin, nor on a recent 
version of Debian Linux I checked.

I remember a while back that when man spawned more, it was stdin and you 
couldn't back up on that either. Very annoying.






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

* [TUHS] pre-more pager?
@ 2017-11-09 16:19 Norman Wilson
  2017-11-09 16:48 ` Arthur Krewat
  0 siblings, 1 reply; 42+ messages in thread
From: Norman Wilson @ 2017-11-09 16:19 UTC (permalink / raw)


Random832:

  ... and "p" (which is very minimalistic, despite using a few
  V8-specific library features, but V8 isn't in the web-accessible source
  archive) from Version 8 research unix.

====

p actually originated outside Bell Labs.  I think it was
written in the late 1970s at the University of Toronto.

I first saw it at Caltech, on the UNIX systems in the
High Energy Physics group that I ran for four years.
The first few of those systems were set up by Rob Pike,
who was at Caltech working on his masters degree (in
astrophysics, I think); p was there because Rob brought
it.

For those who don't know it, p has quite an elegant
design.  Its default page size is 22 lines, which
nicely fit the world of its time: allowed a couple
of lines of context between pages on a 24-line CRT;
evenly divided the 66-line pages (still!) output
by nroff and pr.  It uttered no prompt and required
neither raw nor cbreak nor even no-echo mode: it
printed the final line of each page sans newline;
to continue, you typed return, which was echoed,
completing that line before the next was printed.
It buffered text internally to allow backing up a few
pages, so it was possible to back up even when input
didn't come from a file (something I'm not sure the
more of the time could do).

Internally the buffering was done with a standalone
library that could have been used in other programs,
though I don't know whether it ever was.

p also led me to an enlightening programming story.
One day I was looking over the code, trying to understand
just how the buffering worked; part of it made no sense
to me.  To figure it out, I decided to write my own
simple, straightforward version with the same interface;
test and debug it carefully; then lay printouts of the
two implementations side-by-side, and walk through some
test cases.  This revealed that the clever code I couldn't
make out in the original was actually buggy: it scrambled
data (I forget the details) when read returned less than
a full buffer.

p (my version) is one of the several programs I bring along
to every new UNIX-derivative environment.  I use it daily.
I have also recently noticed a new bug: on OpenBSD, it
sometimes scrambles the last few lines of a file.  I have
figured out that that has something to do with whether
fclose (my version uses stdio) is called explicitly or
by exit(3), but I don't know yet whether it's the library's
fault or my own.

Even the simplest programs have things to teach us.

Norman Wilson
Toronto ON


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

* [TUHS] pre-more pager?
  2017-11-09 13:18           ` Dan Cross
@ 2017-11-09 14:29             ` Will Senn
  0 siblings, 0 replies; 42+ messages in thread
From: Will Senn @ 2017-11-09 14:29 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

It's amazing how often I think - I need to spend more time on sed. I am 
also just now beginning to understand that it's a stream ed-itor and 
therefore intimately related to ed, which isn't a half editor.

Will

On 11/9/17 7:18 AM, Dan Cross wrote:
> Head is easy to emulate: sed 10q
>
> On Nov 9, 2017 12:18 AM, "Will Senn" <will.senn at gmail.com 
> <mailto:will.senn at gmail.com>> wrote:
>
>     On 11/8/17 5:21 PM, Dave Horsfall wrote:
>
>         On Wed, 8 Nov 2017, Arthur Krewat wrote:
>
>             head -20 < filename
>
>
>         Or if you really want to confuse the newbies:
>
>             < filename head -20
>
>     too bad head doesn't exist on v7. I did have to look up the
>     incantation in Intro to the Shell by Bourne, that's fascinating
>     stuff and it still works on my mac - nuts!
>
>     -- 
>     GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF
>

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171109/89693fba/attachment-0001.html>


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

* [TUHS] pre-more pager?
@ 2017-11-09 13:33 Doug McIlroy
  0 siblings, 0 replies; 42+ messages in thread
From: Doug McIlroy @ 2017-11-09 13:33 UTC (permalink / raw)


>> head -20 < filename

> 
> too bad head doesn't exist on v7.

sed -20q:   same effect, same amount of typing.



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

* [TUHS] pre-more pager?
  2017-11-09  4:38         ` Will Senn
@ 2017-11-09 13:18           ` Dan Cross
  2017-11-09 14:29             ` Will Senn
  2017-11-09 20:53           ` Dave Horsfall
  1 sibling, 1 reply; 42+ messages in thread
From: Dan Cross @ 2017-11-09 13:18 UTC (permalink / raw)


Head is easy to emulate: sed 10q

On Nov 9, 2017 12:18 AM, "Will Senn" <will.senn at gmail.com> wrote:

> On 11/8/17 5:21 PM, Dave Horsfall wrote:
>
>> On Wed, 8 Nov 2017, Arthur Krewat wrote:
>>
>> head -20 < filename
>>>
>>
>> Or if you really want to confuse the newbies:
>>
>>     < filename head -20
>>
>> too bad head doesn't exist on v7. I did have to look up the incantation
> in Intro to the Shell by Bourne, that's fascinating stuff and it still
> works on my mac - nuts!
>
> --
> GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171109/062a74d6/attachment.html>


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

* [TUHS] pre-more pager?
  2017-11-08 23:21       ` Dave Horsfall
@ 2017-11-09  4:38         ` Will Senn
  2017-11-09 13:18           ` Dan Cross
  2017-11-09 20:53           ` Dave Horsfall
  0 siblings, 2 replies; 42+ messages in thread
From: Will Senn @ 2017-11-09  4:38 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

On 11/8/17 5:21 PM, Dave Horsfall wrote:
> On Wed, 8 Nov 2017, Arthur Krewat wrote:
>
>> head -20 < filename
>
> Or if you really want to confuse the newbies:
>
>     < filename head -20
>
too bad head doesn't exist on v7. I did have to look up the incantation 
in Intro to the Shell by Bourne, that's fascinating stuff and it still 
works on my mac - nuts!

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF



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

* [TUHS] pre-more pager?
  2017-11-09  2:01   ` Steve Johnson
@ 2017-11-09  2:16     ` Lyndon Nerenberg
  0 siblings, 0 replies; 42+ messages in thread
From: Lyndon Nerenberg @ 2017-11-09  2:16 UTC (permalink / raw)



> On Nov 8, 2017, at 6:01 PM, Steve Johnson <scj at yaccman.com> wrote:
> 
>  I was even more unhappy to discover that, while I was at lunch, our cat had found the box of used paper and used it as a litter box.  After the shock wore off, I picked up my highlighter anyway and marked the soggy lines I needed to retype...

Reminds me of a few lines in one of my favourite _Arrogant Worms_ songs (okay, they all are):

       .
       .
       .
   William Shakespeare's in my cat
   He rarely ever talks
   He makes his loudest statements
   Standing in the litter box
       .
       .
       .

Perhaps s/he was doing code review :-)

https://arrogantworms1.bandcamp.com/track/william-shakespeares-in-my-cat



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

* [TUHS] pre-more pager?
  2017-11-08 19:22 ` Random832
  2017-11-08 21:18   ` Will Senn
@ 2017-11-09  2:01   ` Steve Johnson
  2017-11-09  2:16     ` Lyndon Nerenberg
  1 sibling, 1 reply; 42+ messages in thread
From: Steve Johnson @ 2017-11-09  2:01 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]

"Well, in the beginning, there was paper. You didn't need to "page"
 because you had actual pages you could hold in your hand (if not the
 manual typeset as an actual book, then the printed output from the
 teletype)." 

Paper indeed...    I had a model 37 teletype at home, and would
bring home boxes of paper and carefully arrange the box so that the
blank paper feeding the terminal did not get tangled up with the
"used" paper spewing out of the teletype.  A second box for the used
paper was handy.

In the early Unix days, the file system had two kinds of tiles --
small files and "large" files.   As a file grew, there was a moment
when the inodes were rewritten to go from small to large.  And if the
system crashed during this process, a lot of stuff could get messed up
or deleted.  It usually took a few minutes for the system to get back
online, so I kept a highlighter by the terminal, and when the system
crashed I would reel back the used paper and highlight those lines
that I needed to reenter.  When the system came back, I copied the
lines that had been lost and pressed on.

One day, I had spent a couple of hours in an intense debugging session
when my wife called me to lunch.  I didn't save my stuff, and was
very unhappy to return an hour later and discover the system had
crashed.   I was even more unhappy to discover that, while I was at
lunch, our cat had found the box of used paper and used it as a litter
box.  After the shock wore off, I picked up my highlighter anyway and
marked the soggy lines I needed to retype...

It was never more true that debugging was a smelly job...

Steve 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/a6f9d466/attachment.html>


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

* [TUHS] pre-more pager?
  2017-11-08 22:47     ` Arthur Krewat
@ 2017-11-08 23:21       ` Dave Horsfall
  2017-11-09  4:38         ` Will Senn
  0 siblings, 1 reply; 42+ messages in thread
From: Dave Horsfall @ 2017-11-08 23:21 UTC (permalink / raw)


On Wed, 8 Nov 2017, Arthur Krewat wrote:

> head -20 < filename

Or if you really want to confuse the newbies:

     < filename head -20

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


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

* [TUHS] pre-more pager?
@ 2017-11-08 22:58 Doug McIlroy
  0 siblings, 0 replies; 42+ messages in thread
From: Doug McIlroy @ 2017-11-08 22:58 UTC (permalink / raw)


> In the meantime, how did folks page through text like man sh

Chuckle. "Text like man sh" wasn't very long back then.
.,.20p was quite an effective pager. It could go backward,
and it didn't wipe out the screen (which can destroy the
record of the problem that caused you to consult a reference).
I still do it from time to time.

Doug


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

* [TUHS] pre-more pager?
  2017-11-08 22:43   ` Dave Horsfall
@ 2017-11-08 22:47     ` Arthur Krewat
  2017-11-08 23:21       ` Dave Horsfall
  0 siblings, 1 reply; 42+ messages in thread
From: Arthur Krewat @ 2017-11-08 22:47 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]


On 11/8/2017 5:43 PM, Dave Horsfall wrote:
>
>> cat filename | head -20 # get the first page.
>> cat filename | head -40 | tail -20 # get the second page.
>
> Arrgghh!!  Unnecessary use of a cat pipe!
>

cat added for clarity. Ok, not. I'm just dumb.

head -20 < filename
head -40 < filename | tail -20

Better? ;)



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

* [TUHS] pre-more pager?
  2017-11-08 19:06 ` Arthur Krewat
  2017-11-08 19:31   ` Jeremy C. Reed
@ 2017-11-08 22:43   ` Dave Horsfall
  2017-11-08 22:47     ` Arthur Krewat
  1 sibling, 1 reply; 42+ messages in thread
From: Dave Horsfall @ 2017-11-08 22:43 UTC (permalink / raw)


On Wed, 8 Nov 2017, Arthur Krewat wrote:

> ^S (stop) and ^Q (continue) at 1200 baud or less worked OK, especially 
> on paper terminals ;) -- (Clem just beat me to it)

I had to implement XON/XOFF in our Edition 6.

> head and tail would work too (although I'm not sure they existed at that 
> time, I'm no expert):

When did "pg" come about?

> cat filename | head -20 # get the first page.
> cat filename | head -40 | tail -20 # get the second page.

Arrgghh!!  Unnecessary use of a cat pipe!

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


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

* [TUHS] pre-more pager?
  2017-11-08 22:02 Paul Ruizendaal
@ 2017-11-08 22:20 ` Will Senn
  0 siblings, 0 replies; 42+ messages in thread
From: Will Senn @ 2017-11-08 22:20 UTC (permalink / raw)


On 11/8/17 4:02 PM, Paul Ruizendaal wrote:
>> Regarding the links and old bsd's. The binary cr3 on 1bsd works in v7.
>> Also, the book I'm reading has a c program that does paging. But, I'm
>> always off down the rabbit hole... I tried to compile the cr3.c source
>> and I get this error:
>>
>> # cc cr3.c
>> Undefined:
>> _fout
>> _flush
>> _getc
>> _end
>>
>> My understanding is that cc includes libc by default, so these must not
>> be in libc. But getc is standard lib, so what am I missing?
> That source is for V6 not V7. V6 did not have the stdio lib yet, but a precursor to that.
> The binary you are using has the older io routines statically linked in.
>
> Paul
>
Great answer - very clear. I was curious why the binary worked. I was 
able to get the 2BSD version (thanks Clem) to compile and run on V7.

Will


-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF



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

* [TUHS] pre-more pager?
  2017-11-08 22:00     ` Clem Cole
@ 2017-11-08 22:18       ` Will Senn
  0 siblings, 0 replies; 42+ messages in thread
From: Will Senn @ 2017-11-08 22:18 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2998 bytes --]

Woohoo! I actually got it working :). Thanks for the assist. The 2bsd 
version includes a retrofit.h file for it to work on v6. I removed the 
include and it compiled and linked just fine.

Will

On 11/8/17 4:00 PM, Clem Cole wrote:
> fout and flush -- Looks like the V6 version of cr3 - which is using 
> the portable C library which was done before the standard C library.
> I bet if you grab the one from 2BSD that should have been updated to V7
>
> On Wed, Nov 8, 2017 at 9:18 PM, Will Senn <will.senn at gmail.com 
> <mailto:will.senn at gmail.com>> wrote:
>
>     On 11/8/17 1:22 PM, Random832 wrote:
>
>         Some of these are for V7 or V6 contemporary PDP-11 Unixes, and
>         most of
>         them are far simpler than more so you should have little
>         difficulty
>         getting them working anyway.
>
>         Links:
>         http://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/cr3.c
>         <http://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/cr3.c>
>         http://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/cr3.c
>         <http://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/cr3.c>
>         http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/ucb/more.c
>         <http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/ucb/more.c>
>         http://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/cmd/pg.c
>         <http://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/cmd/pg.c>
>         http://minnie.tuhs.org/cgi-bin/utree.pl?file=AUSAM/source/S/pg.c
>         <http://minnie.tuhs.org/cgi-bin/utree.pl?file=AUSAM/source/S/pg.c>
>         (apparently unrelated to the 32V version)
>         http://minnie.tuhs.org/cgi-bin/utree.pl?file=SRI-NOSC/s2/pg.c
>         <http://minnie.tuhs.org/cgi-bin/utree.pl?file=SRI-NOSC/s2/pg.c>
>         http://minnie.tuhs.org/cgi-bin/utree.pl?file=OpenSolaris_b135/cmd/pg/pg.c
>         <http://minnie.tuhs.org/cgi-bin/utree.pl?file=OpenSolaris_b135/cmd/pg/pg.c>
>
>         https://danhalbert.org/more.html
>         <https://danhalbert.org/more.html> - mentions cr3
>
>
>     It makes sense that it used to be paper based and slow on screen.
>
>     Regarding the links and old bsd's. The binary cr3 on 1bsd works in
>     v7. Also, the book I'm reading has a c program that does paging.
>     But, I'm always off down the rabbit hole... I tried to compile the
>     cr3.c source and I get this error:
>
>     # cc cr3.c
>     Undefined:
>     _fout
>     _flush
>     _getc
>     _end
>
>     My understanding is that cc includes libc by default, so these
>     must not be in libc. But getc is standard lib, so what am I missing?
>
>     Thanks,
>
>     Will
>
>     -- 
>     GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF
>
>

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/a2d2c2dc/attachment.html>


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

* [TUHS] pre-more pager?
@ 2017-11-08 22:02 Paul Ruizendaal
  2017-11-08 22:20 ` Will Senn
  0 siblings, 1 reply; 42+ messages in thread
From: Paul Ruizendaal @ 2017-11-08 22:02 UTC (permalink / raw)


> 
> Regarding the links and old bsd's. The binary cr3 on 1bsd works in v7. 
> Also, the book I'm reading has a c program that does paging. But, I'm 
> always off down the rabbit hole... I tried to compile the cr3.c source 
> and I get this error:
> 
> # cc cr3.c
> Undefined:
> _fout
> _flush
> _getc
> _end
> 
> My understanding is that cc includes libc by default, so these must not 
> be in libc. But getc is standard lib, so what am I missing?

That source is for V6 not V7. V6 did not have the stdio lib yet, but a precursor to that.
The binary you are using has the older io routines statically linked in.

Paul



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

* [TUHS] pre-more pager?
  2017-11-08 21:18   ` Will Senn
  2017-11-08 21:59     ` Ron Natalie
@ 2017-11-08 22:00     ` Clem Cole
  2017-11-08 22:18       ` Will Senn
  1 sibling, 1 reply; 42+ messages in thread
From: Clem Cole @ 2017-11-08 22:00 UTC (permalink / raw)


fout and flush -- Looks like the V6 version of cr3 - which is using the
portable C library which was done before the standard C library.
I bet if you grab the one from 2BSD that should have been updated to V7

On Wed, Nov 8, 2017 at 9:18 PM, Will Senn <will.senn at gmail.com> wrote:

> On 11/8/17 1:22 PM, Random832 wrote:
>
>> Some of these are for V7 or V6 contemporary PDP-11 Unixes, and most of
>> them are far simpler than more so you should have little difficulty
>> getting them working anyway.
>>
>> Links:
>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/cr3.c
>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/cr3.c
>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/ucb/more.c
>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/cmd/pg.c
>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=AUSAM/source/S/pg.c
>> (apparently unrelated to the 32V version)
>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=SRI-NOSC/s2/pg.c
>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=OpenSolaris_b135/cmd/pg/pg.c
>>
>> https://danhalbert.org/more.html - mentions cr3
>>
>
> It makes sense that it used to be paper based and slow on screen.
>
> Regarding the links and old bsd's. The binary cr3 on 1bsd works in v7.
> Also, the book I'm reading has a c program that does paging. But, I'm
> always off down the rabbit hole... I tried to compile the cr3.c source and
> I get this error:
>
> # cc cr3.c
> Undefined:
> _fout
> _flush
> _getc
> _end
>
> My understanding is that cc includes libc by default, so these must not be
> in libc. But getc is standard lib, so what am I missing?
>
> Thanks,
>
> Will
>
> --
> GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/c76d0157/attachment.html>


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

* [TUHS] pre-more pager?
  2017-11-08 21:18   ` Will Senn
@ 2017-11-08 21:59     ` Ron Natalie
  2017-11-08 22:00     ` Clem Cole
  1 sibling, 0 replies; 42+ messages in thread
From: Ron Natalie @ 2017-11-08 21:59 UTC (permalink / raw)



> # cc cr3.c
> Undefined:
> _fout

OH yes.   "The fout notion is kludgy" was the comment in the docs.    It what allowed you to redirect the printf/putchar to something other than fd 1 on early C runtimes.



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

* [TUHS] pre-more pager?
  2017-11-08 19:22 ` Random832
@ 2017-11-08 21:18   ` Will Senn
  2017-11-08 21:59     ` Ron Natalie
  2017-11-08 22:00     ` Clem Cole
  2017-11-09  2:01   ` Steve Johnson
  1 sibling, 2 replies; 42+ messages in thread
From: Will Senn @ 2017-11-08 21:18 UTC (permalink / raw)


On 11/8/17 1:22 PM, Random832 wrote:
> Some of these are for V7 or V6 contemporary PDP-11 Unixes, and most of
> them are far simpler than more so you should have little difficulty
> getting them working anyway.
>
> Links:
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/cr3.c
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/cr3.c
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/ucb/more.c
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/cmd/pg.c
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=AUSAM/source/S/pg.c
> (apparently unrelated to the 32V version)
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=SRI-NOSC/s2/pg.c
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=OpenSolaris_b135/cmd/pg/pg.c
>
> https://danhalbert.org/more.html - mentions cr3

It makes sense that it used to be paper based and slow on screen.

Regarding the links and old bsd's. The binary cr3 on 1bsd works in v7. 
Also, the book I'm reading has a c program that does paging. But, I'm 
always off down the rabbit hole... I tried to compile the cr3.c source 
and I get this error:

# cc cr3.c
Undefined:
_fout
_flush
_getc
_end

My understanding is that cc includes libc by default, so these must not 
be in libc. But getc is standard lib, so what am I missing?

Thanks,

Will

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF



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

* [TUHS] pre-more pager?
  2017-11-08 19:29 ` Forrest, Jon
  2017-11-08 19:43   ` Ron Natalie
@ 2017-11-08 21:03   ` Mark Green
  1 sibling, 0 replies; 42+ messages in thread
From: Mark Green @ 2017-11-08 21:03 UTC (permalink / raw)


If I recall correctly there was a program called p on v6 unix that served as a pager. I think it was part of the standard distribution and not a local Toronto mod. 

Sent from my iPhone

> On Nov 8, 2017, at 2:29 PM, Forrest, Jon <nobozo at gmail.com> wrote:
> 
> 
> 
>> On 11/8/2017 10:54 AM, Will Senn wrote:
>> Hi,
> 
>> In the meantime, how did folks page through text like man sh and such
>> before more? I know how to view sections of text using sed and ed's ok for
>> paging file text (painful, but workable). I just can't seem to locate the
>> idiomatic way of keeping everything from constantly scrolling out of view!
>> Obviously, this isn't a problem on my mac as terminal works fine, but I
>> like to try to stay in character as a 1970 time traveling unix user :).
> 
> In the early days of Unix I was told that it wasn't practical to write
> a pager because such a thing would have to run in raw mode in order
> to process single letter commands, such as the space character for
> going on to the next page. Since raw mode introduced a significant amount
> of overhead on already overtaxed machines, it was considered an anti-social
> thing to do.
> 
> In 1977 and 1978 I worked at Ford Aerospace in the group that produced
> KSOS, which was a "secure" version of Unix (I didn't actually work on
> KSOS myself since I didn't have, nor want, a security clearance). Anyway,
> that group used some incredibly expensive HP terminals that contained
> enough local memory to contain most text files, the way we overcame the
> lack of a pager was to cat the file, and then page around in the local
> memory.
> 
> IIRC later versions of Unix added the ability to respond to a specific
> list of single characters without going into raw mode. Of course, that
> didn't help when full-screen editors like vi and the Rand editor came out.
> 
> Cordially,
> Jon Forrest
> 
> 
> 



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

* [TUHS] pre-more pager?
@ 2017-11-08 20:28 Noel Chiappa
  0 siblings, 0 replies; 42+ messages in thread
From: Noel Chiappa @ 2017-11-08 20:28 UTC (permalink / raw)


    > From: Clem Cole

    > many (most) Unix sites used Able DHDM's which were cheaper than DEC DZ's

Oh, our DZ's weren't DEC, but some off-brand (I forget what). We were too poor
to afford DEC gear! :-) (Our machines, first a /40, and later a /45, were
hand-me-down's.)

	Noel


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

* [TUHS] pre-more pager?
  2017-11-08 19:29 ` Forrest, Jon
@ 2017-11-08 19:43   ` Ron Natalie
  2017-11-08 21:03   ` Mark Green
  1 sibling, 0 replies; 42+ messages in thread
From: Ron Natalie @ 2017-11-08 19:43 UTC (permalink / raw)


I'm not sure why raw mode would be particularly loading on a system unless it is receiving a lot of data.    In the situation described, it's doing nothing other than waiting on the user.    The load should be the same as if it is waiting in cooked mode.

Ah, those old HP terminals.    I had one that had many pages of memory and would even spool off the older stuff on to one of its two data tape drives.
The other ones we had too little memory.   They couldn't even buffer 24 x 80 characters, so if you had long lines, the thing would start scrolling even before it hit the bottom of the screen.

We had some terminals (I think VT100's had this option) that would automatically send a ^S to the host when the screen filled and then you could release it.

I still remember the day I was working at RU.   One of the young female operators says "hey, someone is catting /usr/dict/words to my terminal."   I told her to hit ^S immediately to freeze the sending process and then ran a PS to find the culprit.

This reminds me of the dichotomy of "write" versions.    The early ones did just rely on being able to open the remote user's terminal.    We found this rather antisocial, so at JHU we always left the terminals protected against world write.     We used the x bit as the "want to receive writes" flag and made write setuid (this also allowed us to avoid fun and games like people redirecting the input to things that weren't typewriters).




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

* [TUHS] pre-more pager?
  2017-11-08 19:06 ` Arthur Krewat
@ 2017-11-08 19:31   ` Jeremy C. Reed
  2017-11-08 22:43   ` Dave Horsfall
  1 sibling, 0 replies; 42+ messages in thread
From: Jeremy C. Reed @ 2017-11-08 19:31 UTC (permalink / raw)


The first and second BSD has cr3 "This filter simulates chuck haleys 
cr3, stopping output after each page (22 lines) to wait for a carriage 
return, sending 22 more lines, or a EOF, sending 10 more lines."

From my Berkeley book in progress:

In the Berkeley terminal rooms, the dumb terminals beeped
incessantly so most of the bell speakers had been disconnected.
Their \emph{cr3} pager tool rang the terminal bell and waited for a 
carriage
return after every 24 lines.
The terminals also rang the bell when the cursor advanced near the
right margin on output or keyboard input (like a typewriter
bell).\cite{halbert-jchac1-4}

% TODO: mention cr3 stty mode?
% archives/1970s/2bsd/src/cr3.c says 22 lines and no mention of sound
% what about that?

So Dan Halbert\index{Halbert, Dan}.
who arrived in 1978 as a first-year graduate student,
wrote a pager called \emph{more} that printed ``--More--''
instead of ringing the bell and accepted the space
instead of carriage return to continue. Plus it could take multiple
filenames and print a line of colons around the filenames.
This was inspired by his use of the ITS timesharing systems as an
undergraduate at MIT that put a ``--MORE--'' prompt at the bottom
of the screen when displaying files.\cite{halbert-jchac1-4}

His friends and fellow graduate students, Geoff
Peck\index{Peck, Geoff} and Eric Shienbrood\index{Shienbrood, Eric},
greatly expanded it, adding various
options -- and \emph{more} was added into the next 
distribution.\cite{halbert1}


Date: 17 Jun 2010
@MISC{halbert1,
  author = {Dan Halbert},
  howpublished = "Personal correspondence",
  year = 2010,
  month = jun
}

@ARTICLE{halbert-jchac1-4,
 author = "Dan Halbert",
 title = "{THE "MORE" COMMAND IN UNIX}",
 journal = "Journal of the Computer History Association of California",
 year = 1994,
 month = "April-June",
 volume = "1",
 number = "4" }



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

* [TUHS] pre-more pager?
  2017-11-08 18:54 Will Senn
                   ` (3 preceding siblings ...)
  2017-11-08 19:22 ` Random832
@ 2017-11-08 19:29 ` Forrest, Jon
  2017-11-08 19:43   ` Ron Natalie
  2017-11-08 21:03   ` Mark Green
  4 siblings, 2 replies; 42+ messages in thread
From: Forrest, Jon @ 2017-11-08 19:29 UTC (permalink / raw)




On 11/8/2017 10:54 AM, Will Senn wrote:
> Hi,

> In the meantime, how did folks page through text like man sh and such
> before more? I know how to view sections of text using sed and ed's ok for
> paging file text (painful, but workable). I just can't seem to locate the
> idiomatic way of keeping everything from constantly scrolling out of view!
> Obviously, this isn't a problem on my mac as terminal works fine, but I
> like to try to stay in character as a 1970 time traveling unix user :).

In the early days of Unix I was told that it wasn't practical to write
a pager because such a thing would have to run in raw mode in order
to process single letter commands, such as the space character for
going on to the next page. Since raw mode introduced a significant amount
of overhead on already overtaxed machines, it was considered an anti-social
thing to do.

In 1977 and 1978 I worked at Ford Aerospace in the group that produced
KSOS, which was a "secure" version of Unix (I didn't actually work on
KSOS myself since I didn't have, nor want, a security clearance). Anyway,
that group used some incredibly expensive HP terminals that contained
enough local memory to contain most text files, the way we overcame the
lack of a pager was to cat the file, and then page around in the local
memory.

IIRC later versions of Unix added the ability to respond to a specific
list of single characters without going into raw mode. Of course, that
didn't help when full-screen editors like vi and the Rand editor came out.

Cordially,
Jon Forrest





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

* [TUHS] pre-more pager?
@ 2017-11-08 19:23 Noel Chiappa
  0 siblings, 0 replies; 42+ messages in thread
From: Noel Chiappa @ 2017-11-08 19:23 UTC (permalink / raw)


    > From: Will Senn

    > how did folks page through text like man sh and such before more?

We wrote our own versions of more. Here is one from the roughly-PWB1 systems
at MIT:

  http://ana-3.lcs.mit.edu/~jnc/tech/unix/s2/p.c

but on looking at it, I'm not 100% sure it's the one I used there (which is
documented in the MIT UPM).

Here's one I wrote for myself for use on V6:

  http://mercury.lcs.mit.edu/~jnc/tech/V6Unix.html#UCmds

before I retrieved all the MIT sources (above), if you want somthing to
actually use on V6/V7.

       Noel


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

* [TUHS] pre-more pager?
  2017-11-08 18:54 Will Senn
                   ` (2 preceding siblings ...)
  2017-11-08 19:12 ` Bakul Shah
@ 2017-11-08 19:22 ` Random832
  2017-11-08 21:18   ` Will Senn
  2017-11-09  2:01   ` Steve Johnson
  2017-11-08 19:29 ` Forrest, Jon
  4 siblings, 2 replies; 42+ messages in thread
From: Random832 @ 2017-11-08 19:22 UTC (permalink / raw)


On Wed, Nov 8, 2017, at 13:54, Will Senn wrote:
> In the meantime, how did folks page through text like man sh and such
> before more? I know how to view sections of text using sed and ed's ok
> for paging file text (painful, but workable). I just can't seem to locate
> the idiomatic way of keeping everything from constantly scrolling out of
> view! Obviously, this isn't a problem on my mac as terminal works fine,
> but I like to try to stay in character as a 1970 time traveling unix user
> :).

Well, in the beginning, there was paper. You didn't need to "page"
because you had actual pages you could hold in your hand (if not the
manual typeset as an actual book, then the printed output from the
teletype). The utility of a 'pager' as such came from the proliferation
of CRT terminals. To that extent, using the scroll bar in your terminal
to imagine you're going through a roll (well, it was actually fanfold
AIUI) of paper may actually be more "in character" than installing a
pager.

The earliest (mainline BSD, anyway, SRI-NOSC "pg" is dated earlier)
pager in the archives is "cr3" in 1BSD - it alludes to the existence of
an earlier kernel hack with the same effect (enabled, according to
legend, by setting the CR delay in the tty line discipline to mode 3
i.e. "stty cr3").

There are also four different programs in the archive called "pg", all
for the same purpose, that appear otherwise unrelated to each other. The
OpenSolaris one comes from some version of System V, which is the one
that the one available on modern-day Linux is a clone of - the others
are of far earlier vintage. Other programs include "more" (naturally)
from  3BSD, and "p" (which is very minimalistic, despite using a few
V8-specific library features, but V8 isn't in the web-accessible source
archive) from Version 8 research unix.

Some of these are for V7 or V6 contemporary PDP-11 Unixes, and most of
them are far simpler than more so you should have little difficulty
getting them working anyway.

Links:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/cr3.c
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/cr3.c
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/ucb/more.c
http://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/cmd/pg.c
http://minnie.tuhs.org/cgi-bin/utree.pl?file=AUSAM/source/S/pg.c
(apparently unrelated to the 32V version)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=SRI-NOSC/s2/pg.c
http://minnie.tuhs.org/cgi-bin/utree.pl?file=OpenSolaris_b135/cmd/pg/pg.c

https://danhalbert.org/more.html - mentions cr3


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

* [TUHS] pre-more pager?
  2017-11-08 18:54 Will Senn
  2017-11-08 18:59 ` Clem Cole
  2017-11-08 19:06 ` Arthur Krewat
@ 2017-11-08 19:12 ` Bakul Shah
  2017-11-08 19:22 ` Random832
  2017-11-08 19:29 ` Forrest, Jon
  4 siblings, 0 replies; 42+ messages in thread
From: Bakul Shah @ 2017-11-08 19:12 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]



> On Nov 8, 2017, at 10:54 AM, Will Senn <will.senn at gmail.com> wrote:
> 
> Hi,
> 
> In looking around the system v7 environment, I don't see a more command anywhere. I downloaded, converted, and attached 1bsd, 2bsd, and finally 3bsd and it was there that I found source for more... 3bsd looks like it's for VAX, not PDP-11, and it doesn't want to compile (looking for some externs that I gather are part of the distro's clib).
> 
> I may jump ship on V7 and head over to 2.9BSD, which, as I understand it, is a V7 with fixes and these kind of additional tools...
> 
> In the meantime, how did folks page through text like man sh and such before more? I know how to view sections of text using sed and ed's ok for paging file text (painful, but workable). I just can't seem to locate the idiomatic way of keeping everything from constantly scrolling out of view! Obviously, this isn't a problem on my mac as terminal works fine, but I like to try to stay in character as a 1970 time traveling unix user :).
> 
> Thanks,
> 
> Will
> 
> Sent from my iPhone

Terminals were slow enough that you could hit ^s to stop scrolling
and ^q to continue. At Fortune Systems, when Dave Yost speeded
up serial io to run 9600 baud terminals at full blast, scrolling was
too fast. So then he added “page mode” to the tty line discipline,
where output stopped after N lines until you hit a key. This was nice
as you didn't have to rerun a command that spewed more than a
screenful but could interfere with type ahead.




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

* [TUHS] pre-more pager?
  2017-11-08 18:54 Will Senn
  2017-11-08 18:59 ` Clem Cole
@ 2017-11-08 19:06 ` Arthur Krewat
  2017-11-08 19:31   ` Jeremy C. Reed
  2017-11-08 22:43   ` Dave Horsfall
  2017-11-08 19:12 ` Bakul Shah
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 42+ messages in thread
From: Arthur Krewat @ 2017-11-08 19:06 UTC (permalink / raw)


^S (stop) and ^Q (continue) at 1200 baud or less worked OK, especially 
on paper terminals ;) -- (Clem just beat me to it)

head and tail would work too (although I'm not sure they existed at that 
time, I'm no expert):

cat filename | head -20 # get the first page.
cat filename | head -40 | tail -20 # get the second page.
<ad infinitum>

etc.


On 11/8/2017 1:54 PM, Will Senn wrote:
> Hi,
>
> In looking around the system v7 environment, I don't see a more command anywhere. I downloaded, converted, and attached 1bsd, 2bsd, and finally 3bsd and it was there that I found source for more... 3bsd looks like it's for VAX, not PDP-11, and it doesn't want to compile (looking for some externs that I gather are part of the distro's clib).
>
> I may jump ship on V7 and head over to 2.9BSD, which, as I understand it, is a V7 with fixes and these kind of additional tools...
>
> In the meantime, how did folks page through text like man sh and such before more? I know how to view sections of text using sed and ed's ok for paging file text (painful, but workable). I just can't seem to locate the idiomatic way of keeping everything from constantly scrolling out of view! Obviously, this isn't a problem on my mac as terminal works fine, but I like to try to stay in character as a 1970 time traveling unix user :).
>
> Thanks,
>
> Will
>
> Sent from my iPhone
>



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

* [TUHS] pre-more pager?
  2017-11-08 18:54 Will Senn
@ 2017-11-08 18:59 ` Clem Cole
  2017-11-08 19:06 ` Arthur Krewat
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 42+ messages in thread
From: Clem Cole @ 2017-11-08 18:59 UTC (permalink / raw)


more(1ucb) was written by Eric Shienbrood, who modeled from the
functionality from the ITS terminal function he was used to at MIT when he
became a grad student around the same time as I did.

As for before more(1ucb), we used ^S/^Q and remember many of us were on
30/120 cps dialup terminals.   So it was not a problem until direct lines @
9600 baud became available (plus having enough power in the processor to
drive them).

Clem

On Wed, Nov 8, 2017 at 6:54 PM, Will Senn <will.senn at gmail.com> wrote:

> Hi,
>
> In looking around the system v7 environment, I don't see a more command
> anywhere. I downloaded, converted, and attached 1bsd, 2bsd, and finally
> 3bsd and it was there that I found source for more... 3bsd looks like it's
> for VAX, not PDP-11, and it doesn't want to compile (looking for some
> externs that I gather are part of the distro's clib).
>
> I may jump ship on V7 and head over to 2.9BSD, which, as I understand it,
> is a V7 with fixes and these kind of additional tools...
>
> In the meantime, how did folks page through text like man sh and such
> before more? I know how to view sections of text using sed and ed's ok for
> paging file text (painful, but workable). I just can't seem to locate the
> idiomatic way of keeping everything from constantly scrolling out of view!
> Obviously, this isn't a problem on my mac as terminal works fine, but I
> like to try to stay in character as a 1970 time traveling unix user :).
>
> Thanks,
>
> Will
>
> Sent from my iPhone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/aed44a35/attachment.html>


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

* [TUHS] pre-more pager?
@ 2017-11-08 18:54 Will Senn
  2017-11-08 18:59 ` Clem Cole
                   ` (4 more replies)
  0 siblings, 5 replies; 42+ messages in thread
From: Will Senn @ 2017-11-08 18:54 UTC (permalink / raw)


Hi,

In looking around the system v7 environment, I don't see a more command anywhere. I downloaded, converted, and attached 1bsd, 2bsd, and finally 3bsd and it was there that I found source for more... 3bsd looks like it's for VAX, not PDP-11, and it doesn't want to compile (looking for some externs that I gather are part of the distro's clib).

I may jump ship on V7 and head over to 2.9BSD, which, as I understand it, is a V7 with fixes and these kind of additional tools...

In the meantime, how did folks page through text like man sh and such before more? I know how to view sections of text using sed and ed's ok for paging file text (painful, but workable). I just can't seem to locate the idiomatic way of keeping everything from constantly scrolling out of view! Obviously, this isn't a problem on my mac as terminal works fine, but I like to try to stay in character as a 1970 time traveling unix user :).

Thanks,

Will

Sent from my iPhone


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

end of thread, other threads:[~2017-11-10  7:31 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 20:02 [TUHS] pre-more pager? Noel Chiappa
2017-11-08 20:11 ` Forrest, Jon
2017-11-10  5:26   ` Random832
2017-11-10  7:31     ` Otto Moerbeek
2017-11-08 20:18 ` Clem Cole
2017-11-08 20:28   ` Ron Natalie
2017-11-08 22:47 ` Dave Horsfall
  -- strict thread matches above, loose matches on Subject: below --
2017-11-09 16:19 Norman Wilson
2017-11-09 16:48 ` Arthur Krewat
2017-11-09 17:19   ` Steve Nickolas
2017-11-09 18:15     ` Don Hopkins
2017-11-09 18:26     ` Arthur Krewat
2017-11-09 13:33 Doug McIlroy
2017-11-08 22:58 Doug McIlroy
2017-11-08 22:02 Paul Ruizendaal
2017-11-08 22:20 ` Will Senn
2017-11-08 20:28 Noel Chiappa
2017-11-08 19:23 Noel Chiappa
2017-11-08 18:54 Will Senn
2017-11-08 18:59 ` Clem Cole
2017-11-08 19:06 ` Arthur Krewat
2017-11-08 19:31   ` Jeremy C. Reed
2017-11-08 22:43   ` Dave Horsfall
2017-11-08 22:47     ` Arthur Krewat
2017-11-08 23:21       ` Dave Horsfall
2017-11-09  4:38         ` Will Senn
2017-11-09 13:18           ` Dan Cross
2017-11-09 14:29             ` Will Senn
2017-11-09 20:53           ` Dave Horsfall
2017-11-10  0:15             ` Arthur Krewat
2017-11-10  2:14               ` Ralph Corderoy
2017-11-08 19:12 ` Bakul Shah
2017-11-08 19:22 ` Random832
2017-11-08 21:18   ` Will Senn
2017-11-08 21:59     ` Ron Natalie
2017-11-08 22:00     ` Clem Cole
2017-11-08 22:18       ` Will Senn
2017-11-09  2:01   ` Steve Johnson
2017-11-09  2:16     ` Lyndon Nerenberg
2017-11-08 19:29 ` Forrest, Jon
2017-11-08 19:43   ` Ron Natalie
2017-11-08 21:03   ` Mark Green

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).