The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] History of m6?
@ 2019-11-11 21:10 Arnold Robbins
  2019-11-11 22:18 ` Dennis Boone
                   ` (3 more replies)
  0 siblings, 4 replies; 33+ messages in thread
From: Arnold Robbins @ 2019-11-11 21:10 UTC (permalink / raw)
  To: tuhs

Hi.

Doug McIlroy is probably the best person to answer this.

Looking at the V3 and V4 manuals, there is a reference to the m6 macro
processor.  The man page thereof refers to

A. D. Hall, The M6 Macroprocessor, Bell Telephone Laboratories, 1969

1. Is this memo available, even in hardcopy that could be scanned?
2. What's the history of m6, was it written in assembler? C?
3. When and why was it replaced with m4 (written by DMR IIRC)?

More generally, what's the history of m6 prior to Unix?

IIRC, the macro processor in Software Tools was inspired by m4,
and in particular its immediate evaluation of its arguments during
definition.

I guess I'll also ask, how widespread was the use of macro processors
in high level languages?  They were big for assembler, and PL/1 had
a macro language, but I don't know of any other contemporary languages
that had them.  Were the general purpose macro processors used a lot?
E.g. with Fortran or Cobol or ...

I'm just curious. :-)

Thanks,

Arnold

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: [TUHS] History of m6?
@ 2019-11-12 15:15 Doug McIlroy
  2019-11-13  7:38 ` arnold
  0 siblings, 1 reply; 33+ messages in thread
From: Doug McIlroy @ 2019-11-12 15:15 UTC (permalink / raw)
  To: tuhs


M6 originated as a porting tool for the Fortran source code
for Stan Brown's Altran language for algebraic computation. M6
itself was originally written in highly portable Fortran.

Arnold asked, "How widespread was the use of macro processors
in high level languages?  They were big for assembler, and
PL/1 had a macro language, but I don't know of any other
contemporary languages that had them."

Understanding "contemporary" to mean pre-C, I agree. Cpp,
a particularly trivial macroprocessor, has been heavily used
ever since--even for other languages, e.g. Haskell.

The rumor that Bob Morris invented macros is off the
mark. Macros were in regular use by the time he joined Bell
Labs. He did conceive an interesting "form-letter generator",
called "form", and an accompanying editor "fed". A sort of
cross between macros and Vannevar Bush's hypothetical memex
repository, these were among the earliest Unix programs and
appeared in the manual from v1 through v6.

Off-topic warning: pre-Unix stories follow.

Contrary to an assertion on cat-v.org, I did not invent macros
either.  In 1959 Doug Eastwood and I, at the suggestion of
George Mealy, created the macro facility for SAP (SHARE assmbly
program) for the IBM 704. However, the idea was in the air at
the time. In particular, we knew that GE already had macros,
though we knew no details about their syntax or semantics.

There were various attempts in the 1960s to build languages by
macro extension. The approach turned out to entail considerable
social cost: communication barriers arise when everyone
can easily create his own dialect. A case in point: I once
had a bright young mathematician summer employee who wrote
wonderfully concise code by heaping up macro definitions. The
result was inscrutable.

Macros caught on in a big way in the ESS labs at Indian Hill.
With a macro-defined switching language, code builds were
slow. One manager there boasted that his lab made more
thoroughgoing use of computers than other departments and
cited enormous consumption of machine time as evidence.

Steve Johnson recalls corrrectly that there was a set of macros
that turned the assembler into a Lisp compiler. I wrote it
and used it for a theorem-proving project spurred by Martin
Davis. (The project was blown away when Robinson published
the resolution princple.) The compiler did some cute local
optimization, taking account of facts such as Bob Morris's
astute observation that the 704 instruction TNZ (transfer on
nonzero) sets the accumulator to zero.

Doug

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

end of thread, other threads:[~2019-11-17 22:47 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 21:10 [TUHS] History of m6? Arnold Robbins
2019-11-11 22:18 ` Dennis Boone
2019-11-12 16:01   ` Leah Neukirchen
2019-11-11 22:31 ` Theodore Y. Ts'o
2019-11-11 22:58   ` Dave Horsfall
2019-11-12  0:07     ` Nemo Nusquam
2019-11-12  0:39       ` Dave Horsfall
2019-11-12  0:30   ` Clem cole
2019-11-16 16:27     ` SPC
2019-11-17  5:30       ` Dave Horsfall
2019-11-17  5:50         ` Larry McVoy
2019-11-17 18:12           ` Bakul Shah
2019-11-17 18:23             ` Michael Kjörling
2019-11-17 18:56               ` Bakul Shah
2019-11-17 22:46             ` Barry Stanly
2019-11-12  0:42   ` Dennis Boone
2019-11-11 22:37 ` Michael Kjörling
2019-11-12  1:09 ` Steve Johnson
2019-11-12 15:07   ` Clem Cole
2019-11-13  9:16     ` Thomas Paulsen
2019-11-13 12:20       ` Lars Brinkhoff
2019-11-13 12:50         ` Mike Markowski
2019-11-13 13:02           ` Lars Brinkhoff
2019-11-13 16:56         ` Paul Winalski
2019-11-13 19:19           ` Lars Brinkhoff
2019-11-13 19:21             ` Jon Steinhart
2019-11-14  9:26         ` Thomas Paulsen
2019-11-14 10:53           ` Lars Brinkhoff
2019-11-13 21:26       ` Dave Horsfall
2019-11-13 22:53       ` Jaap Akkerhuis
2019-11-12 15:15 Doug McIlroy
2019-11-13  7:38 ` arnold
2019-11-13 10:55   ` David Arnold

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