My two cents, ...
> From: Clem Cole <clemc(a)ccc.com>
> Date: Thu, 23 Aug 2018 20:30:19 -0400
> To: ron(a)ronnatalie.com
> Subject: Re: [TUHS] C++ / Kernel
>
> Yep. Im pretty sure I remember void being in typesetter C also. IIRC the
> differences between that version of Dennis???s compiler and what was included
> in 7th Edition was mostly in the libraries ie stdio was first released as
> part of the typesetter compiler but it was still a work in progress.
K&R 1 did not have void or structure assignment. Those came later,
although I'm not sure when. They may have been mentioned in an
appendix; my copy isn't handy to check.
At what point did each struct become its own namespace? I think
around the time of K&R1.
> From: Clem cole <clemc(a)ccc.com>
> Date: Thu, 23 Aug 2018 22:52:24 -0400
> To: Noel Chiappa <jnc(a)mercury.lcs.mit.edu>
> Subject: Re: [TUHS] C++ / Kernel
>
> ...
>
> The big changes to the language were between 6th Edition and Typesetter
> which were done in concert if not to support Brian???s work on the troff
> rewrite. Plus the first draft of book was being written around then also.
The troff rewrite was later, circa '81 or so. Definitely NOT in the
V6/V7 timeframe.
Arnold
> From: Jaap Akkerhuis
> I've been told that when troff was rewritten from assembler to C
Was TROFF ever in assembler?
I'm pretty sure NROFF was, as of V6; the source is not in the V6 distro, and
the binary is stripped, but looking at the object code, it doesn't look like C
compiler output.
As of the PWB system that MIT had (or maybe it was TS - how can one tell the
difference, does anyone know?), NROFF and TROFF were generated from the same C
source (which I have, if anyone wants to look at it).
> the compiler needed some rework and thus typesetter C was born.
I heard he needed features (e.g. longs and unsigned), but... looking at the
N/TROFF source, there are _no_ 'unsigned's, and only a handful of 'long'
variables! There also don't seem to be any bit fields, typedefs, etc.
There is _one_ initialized structure (array of structures, to be precise).
(Although there are a lot of places were an int is initialized with a
double-character constant!)
About the only features in "C Changes" that it uses are i) register types on
arguments, and the 'static' storage class.
So now I'm wondering about that meme...
Noel
On Fri, Aug 24, 2018 at 10:02 AM Dan Cross <crossd(a)gmail.com> wrote:
> It's my subjective impression, based largely on what I read here on TUHS,
> that there was quite a lot of activity and cross-pollination in and out of
> Bell Labs at the time, so I'm not surprised that the details here are fuzzy.
>
Amen -
The Ritchie compiler
in particular, as well as
the Research Kernel
and BSD
releases
are examples a continuous development and express
specific
points in time.
The *people and thus knowledge were fluid* (*a.k.a.* 'open source ;-) and
features within the system followed the people.
The reasons, order and local politics for many things are sometimes
forgotten. Different actions feed back and forth and things get cloudy in
the history. For instance, while people give BSD credit for the Unix
networking because it was widely released with BSD 4.2 and 4.3 as the
vehicle, it was actually BBN did the original IP and TCP stack that Eric
Cooper added to 4.1 and Joy would eventually create sockets in 4.1A. All
of MIT with ChaosNet, UofI and Rand's work on the ArpaNet NCP predates that
work and was used by BBN -- as did the 3Com UNET code for V7, much less
things like Rashid's Accent work, Mike Malcom and Cheridon's Thoth and
later V Kernel.
This
is why I try to use other information that we can precisely date, as well
as constants like trying code on old V7 releases like Dan just did. To me
'other information' is like when some of us matriculated at which schools
or moved jobs, *i.e.* when Ted show up at CMU for his original OYOC year,
Noel's time in Tech Sq, me at CMU or UCB,
the summer the V6 patch tape
'accidentally' found its way to the Arpanet
community can be dated by
Ken's trip to California/visit to see Chesson who was finishing up at UofI
;
or big outside actions like the need to support
to big unmovable
(and thus otherwise datable) items such as
the APS5 or addition of the Vax VM support at UCB
, dvk and my going on strike to force CMU to get a commercial Unix license
summer of '78, when UCB got its own C70 IMP instead of the VDHI to LBL for
Ing70; *etc*
.
Dates of different USENIX conferences, which were were a lot of ideas
(and code) moved back and forth.
Clem
> From: Ron Natalie
> The BSD kernel looks as if it requires such a later compiler (it uses
> bit fields which the earlier compilers didn't support).
Umm, minor nit: bit fields were added to/as of 'Typesetter C', which I gather
was intermediate between V6 and V7.
Noel
> Perhaps Steve Johnson can chime in on this? I suspect he'd know the history
> here well.
The origins of void were discussed 4-7 nov 2017 on this list.
> From: Clem Cole
> Im pretty sure I remember void being in typesetter C also.
Hmm. In the two original 'help' files I have about the changes to C (the term
'typesetter C' doesn't appear, but it's pretty clear that's what the subject
is), available through here:
http://gunkies.org/wiki/Typesetter_C
the term 'void' does not appear (although most other stuff - e.g. unions, bit
fields, typedef, yadda yadda - does).
Noel
Hello everyone
Hello everyone, I have a question, I looked at the source code of early Unix, found that a lot of.c files did
not contain header files, so compiler compiler will not error?
Caipenghui
> Has anyone experimented with building Unix using C++, to take
advantage of strong typing? My guess is no--it would be a Herculean
task likely to introduce more bugs than it would fix.
How Unix didn't get written in C++:
When Bjarne Stroustrup joined Bell Labs, he hoped to write an
operating system, but he wanted to do it in an object oriented
language, so he took a small detour to make an object-oriented
sibling of C. That turned out to be a maelstrom from which he
never escaped.
Doug
Hello everyone
I had a problem compiling a piece of c code from the book. The result of running the book is 5050, but the compiler is 100. I don't know which is right, please help me to see which is wrong. Thank you very much!
#include <stdio.h>
int main(void)
{
int i, sum = 0;
i = 1;
while ( i <= 100) {
sum = sum + 1;
i++;
}
printf("%d\n", sum)
return 0;
}
| |
cc
|
|
邮箱:caipenghui_c(a)163.com
|
签名由 网易邮箱大师 定制