The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Line Terminators in Text Files [
@ 2017-09-03 20:06 Clem Cole
  2017-09-03 21:42 ` Warner Losh
  2017-09-04 17:29 ` Paul Winalski
  0 siblings, 2 replies; 6+ messages in thread
From: Clem Cole @ 2017-09-03 20:06 UTC (permalink / raw)


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

On Sun, Sep 3, 2017 at 11:08 AM, Warner Losh <imp at bsdimp.com> wrote:

>
>
> On Sat, Sep 2, 2017 at 8:54 PM, Dave Horsfall <dave at horsfall.org> wrote:
>
>> On Sat, 2 Sep 2017, Nemo wrote:
>>
>> Hhhmmm... This begs the historical question:  When did LF replace CR/LF
>>> in UNIX?
>>>
>>
>> Unix has always used NL as the terminator :-)
>
>
> <CR><LF> was the line terminator in DEC operating systems that grew up
> around the same time as Unix. CP/M and MS-DOS inherited that from them
> since those systems were developed, in part, using cross compilers running
> on DEC gear with DEC OSes. Unix came from the Multics world where LF was
> used as the line terminator... Thankfully, neither CP/M nor MS-DOS picked
> up DEC's RMS...
>
> Warner
>
​The fun story on that Warner is after years of dogged defense of RMS, when
C was written for VMS, Cutler had to add Stream I/O.   The moment is was
released, much (?most?) of customer base (including a lot of internal folks
like the compiler runtime and DB folks) switched to using it.   It was so
much easier.​  I never heard Dave back down, but it I used to smile when I
saw the statistics.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170903/4b58270f/attachment.html>


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

* [TUHS] Line Terminators in Text Files [
  2017-09-03 20:06 [TUHS] Line Terminators in Text Files [ Clem Cole
@ 2017-09-03 21:42 ` Warner Losh
  2017-09-04 17:29 ` Paul Winalski
  1 sibling, 0 replies; 6+ messages in thread
From: Warner Losh @ 2017-09-03 21:42 UTC (permalink / raw)


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

On Sun, Sep 3, 2017 at 2:06 PM, Clem Cole <clemc at ccc.com> wrote:

>
>
> On Sun, Sep 3, 2017 at 11:08 AM, Warner Losh <imp at bsdimp.com> wrote:
>
>>
>>
>> On Sat, Sep 2, 2017 at 8:54 PM, Dave Horsfall <dave at horsfall.org> wrote:
>>
>>> On Sat, 2 Sep 2017, Nemo wrote:
>>>
>>> Hhhmmm... This begs the historical question:  When did LF replace CR/LF
>>>> in UNIX?
>>>>
>>>
>>> Unix has always used NL as the terminator :-)
>>
>>
>> <CR><LF> was the line terminator in DEC operating systems that grew up
>> around the same time as Unix. CP/M and MS-DOS inherited that from them
>> since those systems were developed, in part, using cross compilers running
>> on DEC gear with DEC OSes. Unix came from the Multics world where LF was
>> used as the line terminator... Thankfully, neither CP/M nor MS-DOS picked
>> up DEC's RMS...
>>
>> Warner
>>
> ​The fun story on that Warner is after years of dogged defense of RMS,
> when C was written for VMS, Cutler had to add Stream I/O.   The moment is
> was released, much (?most?) of customer base (including a lot of internal
> folks like the compiler runtime and DB folks) switched to using it.   It
> was so much easier.​  I never heard Dave back down, but it I used to smile
> when I saw the statistics.
>

We got the first release of VAX-C for VMS at school. It didn't have the
Stream I/O mode and all kinds of software was totally broken. There were
stern warnings in the release notes about this as well, IIRC. However, in
the next release it required an upgrade to the next rev of VMS since the C
runtime now depended on the Stream I/O features and all those programs that
were broken mostly worked w/o change. Took another few releases before
things liked exit() worked in a Unix-y way rather than as a thin wrapper
for SYS$EXIT() and such...

Warner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170903/0d0f5de0/attachment-0001.html>


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

* [TUHS] Line Terminators in Text Files [
  2017-09-03 20:06 [TUHS] Line Terminators in Text Files [ Clem Cole
  2017-09-03 21:42 ` Warner Losh
@ 2017-09-04 17:29 ` Paul Winalski
  2017-09-04 18:34   ` Clem Cole
  2017-10-01 17:24   ` Tom Ivar Helbekkmo
  1 sibling, 2 replies; 6+ messages in thread
From: Paul Winalski @ 2017-09-04 17:29 UTC (permalink / raw)


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

On 9/3/17, Clem Cole <clemc at ccc.com> wrote:
> On Sun, Sep 3, 2017 at 11:08 AM, Warner Losh <imp at bsdimp.com> wrote:
>>
> ​The fun story on that Warner is after years of dogged defense of RMS, when
> C was written for VMS, Cutler had to add Stream I/O.   The moment is was
> released, much (?most?) of customer base (including a lot of internal folks
> like the compiler runtime and DB folks) switched to using it.   It was so
> much easier.​  I never heard Dave back down, but it I used to smile when I
> saw the statistics.
>
Dave Cutler had left the VMS OS group by this time and was
implementing the VAX Code Generator (VCG) as the back end for DEC's
PL/I and C compilers.  He had to do some fancy footwork with buffering
in the C runtime to implement stream I/O on top of the record-oriented
RMS.  There were plenty of odd edge conditions that couldn't be made
to work properly or efficiently.

The first true stream I/O interface in VAX/VMS was in a device driver
for UNIX-style pipes that I wrote for the DEC Shell product, which was
a Bourne shell implementation for VAX/VMS.  VMS pipes could operate in
either record mode (each QIO write represents a record; each QIO read
returns one record's worth of data) or stream mode (each QIO write is
buffered up as a record until a "write end-of-record" QIO is seen; QIO
reads return the number of bytes requested, or up to the end of a
record, whichever occurs first).

RMS finally got a true stream mode interface circa VAX/VMS version 5,
three releases after the DEC C compiler was first released.

I was once a firm believer in the virtues of a record-oriented I/O
interface such as RMS, but after using UNIX and Linux for several
years I became a convert to stream I/O as the base primitive.  One can
always implement record I/O on top of stream I/O if you want it, but
it's difficult to do it the other way round.

-Paul W.


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

* [TUHS] Line Terminators in Text Files [
  2017-09-04 17:29 ` Paul Winalski
@ 2017-09-04 18:34   ` Clem Cole
  2017-09-04 20:28     ` ron minnich
  2017-10-01 17:24   ` Tom Ivar Helbekkmo
  1 sibling, 1 reply; 6+ messages in thread
From: Clem Cole @ 2017-09-04 18:34 UTC (permalink / raw)


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

On Mon, Sep 4, 2017 at 1:29 PM, Paul Winalski <paul.winalski at gmail.com>
wrote:

> I was once a firm believer in the virtues of a record-oriented I/O
> interface such as RMS, but after using UNIX and Linux for several
> years I became a convert to stream I/O as the base primitive.  One can
> always implement record I/O on top of stream I/O if you want it, but
> it's difficult to do it the other way round.

​Amen - this was my point with Dave​.

One thing, I'll grant him though from the VAX-11/C experiment which I was
wrong at the time.  In those days, I hated that he had ignored Dennis'
'register' keyword.  As a programmer and thinking in terms of C being a
better assembler, I liked being able to control the compiler.   But in my
years of eating lunch you and the other folks in the compiler group I
admit, I admit you have won me over.   You guys can do a better job than I
can, particularly with random architectures.    If code is to be portable,
then let the compiler to the register assignment.

Dave was right about about that one, but maybe we shouldn't tell me him one
of the old UNIX guys I said that.

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


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

* [TUHS] Line Terminators in Text Files [
  2017-09-04 18:34   ` Clem Cole
@ 2017-09-04 20:28     ` ron minnich
  0 siblings, 0 replies; 6+ messages in thread
From: ron minnich @ 2017-09-04 20:28 UTC (permalink / raw)


with one exception, Clem. Forsyth's port of Ken's C compiler let you
allocate r14 and r15 for your own purposes. Hence in Plan 9 they were used
for 'current process' and 'current core'. As I understand it gcc allows
this too.

Every once in a while it's nice to have that level of control. We gave it
up when we got plan 9 running with gcc and clang and it was painful ...

ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170904/2bce00b7/attachment-0001.html>


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

* Line Terminators in Text Files [
  2017-09-04 17:29 ` Paul Winalski
  2017-09-04 18:34   ` Clem Cole
@ 2017-10-01 17:24   ` Tom Ivar Helbekkmo
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Ivar Helbekkmo @ 2017-10-01 17:24 UTC (permalink / raw)


Paul Winalski <paul.winalski at gmail.com> writes:

> RMS finally got a true stream mode interface circa VAX/VMS version 5,
> three releases after the DEC C compiler was first released.

I ported C-TeX to VAX/VMS 5, using the straight stream mode for I/O, and
was annoyed by how slow it was.  I ended up writing my own glue to have
it write binary RMS files in 512 byte blocks instead, and the speed
increase was very gratifying.  We're talking several times faster.

I remember how this made our VAX 780 able to process TeX files at just
about the same speed as my 12MhZ 286 PC, when I was alone on the system
at night.  Then I discovered it did it just as fast during the day, with
about a hundred other users on the machine.  :)

-tih
-- 
Most people who graduate with CS degrees don't understand the significance
of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay


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

end of thread, other threads:[~2017-10-01 17:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-03 20:06 [TUHS] Line Terminators in Text Files [ Clem Cole
2017-09-03 21:42 ` Warner Losh
2017-09-04 17:29 ` Paul Winalski
2017-09-04 18:34   ` Clem Cole
2017-09-04 20:28     ` ron minnich
2017-10-01 17:24   ` Tom Ivar Helbekkmo

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