> 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
> 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
I wrote a snippet from my K&R C studies to convert tabs and backspaces
to \t \b to display them, the code looks like this:
/* ex 1-8 */
main()
{
int c, sf;
while((c = getchar()) != EOF) {
if(c == '\t')
printf("\\t");
if(c == '\b')
printf("\\b");
else
putchar(c);
}
}
I'm not looking for code review, but the code is intended to replace the
tabs and backspaces with \t and \b respectively, but I haven't been able
to test it because I can't seem to make a backspace character appear in
input. In later unices, ^V followed by the backspace would work, but
that's not part of v7. Backspace itself is my erase character, so
anytime I just type it, it backspaces :).
Thanks,
Will
--
GPG Fingerprint: 68F4 B3BD 1730 555A 4462 7D45 3EAA 5B6D A982 BAAF
Arthur Krewat <krewat(a)kilonet.net> writes on Mon, 6 Nov 2017 19:34:34 -0500
>> char (at least these days) is signed. So really, it's 7-bit ASCII.
I decided last night to investigate that statement, and updated my
C/C++ features tool to test the sign and range of char and wchar_t.
I ran it in our test lab with physical and virtual machines
representing many different GNU/Hurd, GNU/Linux, *BSD, macOS, Minix,
Solaris, and other Unix family members, on ARM, MIPS, PowerPC, SPARC,
x86, and x86-64 CPU architectures. Here is a summary:
% cat *.log | grep '^ char type is' | sort | uniq -c
157 char type is signed
3 char type is unsigned
The sole outliers are
* Arch Linux ARM on armv7l
* IBM CentOS Linux release 7.4.1708 on PowerPC-8
* SGI IRIX 6.5 on MIPS R10000-SC
for which I found these log data:
Character range and sign...
CHAR_MIN = +0
CHAR_MAX = +255
SCHAR_MIN = -128
SCHAR_MAX = +127
UCHAR_MAX = +255
char type is unsigned
signed char type is signed
unsigned char type is unsigned
The last two lines are expected, but my program checked for an
incorrect result, and would have produced the string "WRONG!" in the
output; no system had that result.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe(a)math.utah.edu -
- 155 S 1400 E RM 233 beebe(a)acm.org beebe(a)computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Apologies in advance if this is found too far off list or offensive. But
some how I think many on this list might find it amusing. One of my
friends who stayed academic sent this me…. his comment was this surfaced
when students were asking for better music to code to:
https://www.youtube.com/watch?v=0rG74rG_ubs
Warning language is not PG but the it is ‘rapper cursing’ and might even be
allowed over the airwaves without ‘beeping’ by some stations. That said,
I suggest/recommend head phones so not to offend someone by the language.
Many thanks for all that background to the origins of void pointers.
Now for applying that to the early sockets API.
In the first (1981) and second (4.1a, April 1982) revision of that API, socket addresses were passed as a fixed 16-byte structure, essentially the same as the current struct sockaddr. By the time of the third revision (4.1c/4.2, 1983) of that API it had become a variable sized opaque object, passed around as a pointer and a size.
The 1983 4.2BSD system manual (http://www.cilinder.be/docs/bsd/4.2BSD_Unix_system_manual.pdf) describes it that way, e.g. defining connect() as:
connect(s, name, namelen);
int s; caddr_t name; int namelen;
Note the use of caddr_t in the user level signature. Yet, the actual source code for 4.1c/4.2 BSD only uses caddr_t in the kernel (as pointed out on this list), but continues to use struct sockaddr * in the user land interface. It would seem to me today that void * would have been a more logical choice and with void * having been around for about 3 years in 1983, it might have seemed logical back then as well -- after all, this use case is similar to the malloc() use case. It would have avoided the need for a longish type cast in socket api calls (without further loss of type safety, as that was already lost with the required cast from e.g. struct sockaddr_un* to struct sockaddr* anyway).
Related to this, from the "4.2bsd IPC Primer” (1983, https://www2.eecs.berkeley.edu/Pubs/TechRpts/1983/CSD-83-145.pdf , page 5), it would appear that the format of socket addresses was perhaps unfinished business:
- Apparently at some point in time simple strings were considered as unix domain addresses, i.e. not a sockaddr_un structure. Maybe it was limping on this thought that caused the prototype soackaddr structure not to have a size field — having had that would have simplified the signature of many socket API functions (interestingly, it would seem that such a size field was added in 4.3BSD some 6, 7 years later).
- The examples show no type casts. This may have been for didactical clarity, but perhaps it also suggests a signature with void* semantics.
I’d be happy for any background on this.
Also, about halfway down this page http://tech-insider.org/vms/research/1982/0111.html there is mention of CSRG technical report #4, "CSRG TR/4 (Proposals for the Enhancement of Unix on the Vax)”. I think this may be the initial discussion document from the summer of 1981 that evolved into the 4.2 system manual. Would anybody have a copy of that document?
Paul
Ok... so I got vi to work full screen in a telnet session to the DZ port in V8. BTW TERM=vt132 seems to be the best option given the existing termcap. Yay. Now I'm a happy camper with my v8 instance and I'm reading Rochkind's book and learning lots more about everything from unix error codes to system programming etc. V8 is much more familiar ground to me than earlier versions (mostly vi) at this point.
Anyway, my first question of the day is this - is vt132 the best that I can do terminalwise?
I'm not totally up to speed on terminals in ancient (or modern) unices, but I've been reading, and it seems that if I can match a termcap entry to my emulated terminal with a majority of available capabilities, that I would reach screen nirvana in my instance. Now, it also seems like my mac will emulate different terminals and defaults to something like xterm-256. I don't expect color to be supported, but I don't really know. This leads to a second question, if I take an xterm termcap entry and put it in my termcap file, will it work better than the vt entries?
Is my logic correct, or am I thinking incorrectly about this?
Sidenote: now that I'm in v8 and having used v6 and v7 - McIlroy's reader actually is much, much more interesting and handy! Thanks, Doug!
Sent from my iPhone
Sent from my iPhone
What should I set TERM to on V8 to get the best results on my Mac
Terminal. If I set it to vt52, vt100, or vt132, only 8 lines appear at
the bottom of the terminal window (of about 24 lines):
---
root::0:4:m0130,m322:/:
daemon:x:1:1:m0000,m000:/:
sys:sorry:2:1:m0130,m322:/usr/sys:no-login
bin:sorry:3:4:m0130,m322:/bin:
ken:sorry:6:1:m0130,m322:/usr/ken:
dmr:sorry:7:4:mh1092,m069:/usr/dmr:
nuucp::238:1:mh2019,m285,uucp:/usr/spool/uucppublic:/usr/lib/uucp/uucico
uucp::48:1:mh2019,m285,nowitz:/usr/lib/uucp:
"passwd" 20 lines, 770 characters
----
The 8 line window works about like I'd expect - the arrow keys move up
and down until the screen needs to scroll, then B's and A's show up. I'm
used to that on BSD. Using the j and k keys work better and when I
scroll down enough lines, the lines move up to fill the whole terminal
window and the file can be edited in the full window. Is there a better
TERM setting that will get 24 lines to show up on file open?
Thanks,
Will
--
GPG Fingerprint: 68F4 B3BD 1730 555A 4462 7D45 3EAA 5B6D A982 BAAF
As has been explained, void came from Algol 68 via Steve Bourne.
As no object could be declared void, void* was a useless
construct. A kind of variable that could point to any object
was required to state the type of useful functions like qsort.
To avoid proliferation of keywords, the useless void* was
pressed into service. I do not remember who suggested that.
Doug
> From: Clem Cole
> typing hard started to become more important in the kernel.
I can imagine! The V6 kernel had all sorts of, ah, 'unusual' typing - as I
learned to my cost when I did that hack version of 'splice()' (to allow a
process in a pipline to drop out, and join the two pipes together directly),
which I did in V6 (my familiar kernel haunt).
Since a lot of code does pointer math to generate wait 'channel' numbers,
e.g.:
sleep(ip+2, PPIPE);
when I naively (out of habit) tried to declare my pointers to be the correct
type, the math didn't work any more! ('ip', in this particular case, was
declared to be an 'int *'.)
No doubt part of this was inherited from older versions (of the system, and
C); the code was working, and there was no call to tweak it. The lack of
casts/coercion in the V6 C compiler may have been an issue, too - I had to do
some equally odd things to make my splice() code work!
Noel
This caught my attention. Did early C really have min and max? Were they used for anything? In those days I was a BCPL user, which IIRC, did not have such things.
-Larry
> Begin forwarded message:
>
> From: Leo Broukhis <leob(a)mailcom.com>
> Subject: [Simh] An abandoned piece of K&R C
> Date: 2017, November 3 at 1:14:42 AM EDT
> To: "simh(a)trailing-edge.com" <simh(a)trailing-edge.com>
>
> https://retrocomputing.stackexchange.com/q/4965/4025 <https://retrocomputing.stackexchange.com/q/4965/4025>
>
> In the UNIX V7 version of the C language, there were the /\ (min) and the \/ (max) operators. In the source of the scanner part of the compiler,
>
> case BSLASH:
> if (subseq('/', 0, 1))
> return(MAX);
> goto unkn;
>
> case DIVIDE:
> if (subseq('\\', 0, 1))
> return(MIN);
> ...
>
> However, attempting to use them reveals that the corresponding part in the code generator is missing. Trying to compile
>
> foo(a, b) { return a \/ b; }
>
> results in
>
> 1: No code table for op: \/
>
> The scanner piece survived in the copies of the compiler for various systems for several years. I tried to look for copies of the code generator table which would contain an implementation, but failed. Has anyone ever seen a working MIN/MAX operator in K&R C?
>
> Thanks,Leo
>
> _______________________________________________
> Simh mailing list
> Simh(a)trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
Am I the only one having trouble? I mirror the site, and I'm now seeing:
aneurin# tuhs
+ rsync -avz minnie.tuhs.org::UA_Root .
rsync: failed to connect to minnie.tuhs.org (45.79.103.53): Operation timed out (60)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
+ rsync -avz minnie.tuhs.org::UA_Applications Applications
rsync: failed to connect to minnie.tuhs.org (45.79.103.53): Operation timed out (60)
rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
Etc.
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
UNIX was half a billion (500000000) seconds old on Tue Nov 5 00:53:20
1985 GMT (measuring since the time(2) epoch) -- Andy Tannenbaum.
(Yeah, an American billion, not the old British one.)
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
Date: Tue, 10 Oct 89 13:37 CDT
From: Chris Garrigues <7thSon(a)slcs.slb.com>
Subject: A quote from Interop '89
To: unix-haters(a)ai.ai.mit.edu
Cc: 7thSon(a)slcs.slb.com
"We all know that the Internet is Unix. We proved that last
November."
- David Mills, October 2, 1989
> From: Arnold Skeeve
> I suspect that he was also still young and fired up about things. :-)
> ...
> (In other words, he too probably deserves to be cut some slack.)
Much as RTM was cut some slack?
The thing is there's a key difference. RTM didn't _intend_ to melt down the
network, whereas Gene presumbly - hopefully - thought about it for a while
before he made his call to inflict severe punishment.
Did RTM do something wrong? Absolutely. Did he deserve some punishment?
Definitely. But years in jail? Yes, it caused a lot of disruption - but to any
one person, not an overwhelming amount.
Luckily, the judge was wise enough, and brave enough, to put the sentencing
guidelines (and the DoJ recommendation, IIRC) to one side.
However, that too was not without a cost; it was one more stone added to what
is admittedlyalready a mountain of precedent that judges can ignore the
legislature's recommendations - and once one does it, another will feel more
free to do so. And so we pass from a government of laws to a government of
men.
But I don't give Gene the lion's share of the blame: that has to go to Rasch,
and his superiors at the DoJ, who were apparently (as best I can understand
their motives) willing to crush a young man under a bus to make a point. The
power to prosecute and punish is an awesome one, and should be wielded
carefully and with judgement, and it was their failure to do so that really
was the root cause.
Noel
I think "classlessness" is intened as an antonym to "classy".
Spafford with high dudgeon called early for punishment. He had tempered
it somewhat by the time he wrote his CACM article, published in June
1985. But still some animus shows through, in "even-handedly"
speculating about whether the worm was intended as a lark or as
something nefarious. He evidently had mellowed a lot by the
time of the last quotation below.
In the CACM article Spaff quoted someone else as suggesting that
Morris did it to impress Jodie Foster, and he called Allman's
back door in Sendmail a debugging feature that people could
optionally turn off. As far as I know it was not disclosed that
DEBUG allowed remote control of Sendmail. In fact Sendmail was
so opaque that Dave Presotto declined to install it and wrote
his own (upas) for Research.
I don't recall the cited "contest". And Dennis's reaction to
the CaCM article seems somwhat harsh. But the context is that
Spafford's overheated initial reaction did not win friends in
research.
>
> Can anyone remember or decipher what this was about???
>
> Date: 24 Mar 90 06:52:43 GMT
> From: dmr(a)alice.att.com
> Subject: Re: Contest announcement
> To: misc-security(a)uunet.uu.net
>
> My own contest is "Most appalling display of classlessness in dealing with
> a serious subject." The nominees are:
>
> 1) National Center for Computer Crime Data, Security Magazine, and
> Gene Spafford, for their "How High Shall We Hang Robert Morris?"
> contest.
>
> 2) Gene Spafford, for the most tasteless article ever to appear in CACM
> (special credits for the Jodie Foster joke).
>
> Dennis Ritchie
>
> Some context maybe?
>>
>> “He has not tried to make any money or work in this area,” Purdue
>> University computer science professor Eugene Spafford said of Morris
>> in an interview with The Washington Post. “His behavior has been
>> consistent in supporting his defense: that it was an accident and he
>> felt badly about it. I think it’s very much to his credit that that has
>> been his behavior ever since.”
Arnold:
> OK, that I can understand. It's ages since I played with
> readline, but I think you can preload the buffer it works on
> (bash does that, no?) so ed + readline could be made to work
> that way.
====
Or, if you have moved beyond the era of simulated glass
teletypes on graphics screens, you could do the editing
in the terminal (program).
It's a real shame the mux/9term way of doing things never
caught on. I suppose it is because so many people are
wedded to programs that require cursor addressing; I'm
glad I never succumbed to that.
I use ed (or its cousin qed a la Toronto) for simple stuff.
Mostly I'll use the traditional commands, but sometimes
I will, in mux/9term style, print a line with p, type
c, edit the line on the screen, pick it up and send it,
type . return.
And of course I can do that sort of thing with any program,
whether or not it is compiled with some magic library.
All this is something of a matter of taste, but I have
sometimes amazed (in a good way) my colleagues with it.
Norman Wilson
Toronto ON
Robert T Morris (the son who committed the famous worm) was an
intern at Bell Labs for a couple of summers while I was there.
He certainly wasn't an idiot; he was a smart guy.
Like many smart guys (and not-so-smart guys for that matter),
however, he was a sloppy coder, and tended not to test enough.
One of the jokes in the UNIX Room was that, had it been Bob
Morris (the father) who did it,
a. He wouldn't have done it, because he would have seen that
it wasn't worth the potential big mess; but
b. Had he done it, no one would ever have caught him, and
probably no one would even have noticed the worm as it crept
around.
Norman Wilson
Toronto ON
> From: Doug McIlroy
> A little known fact is that the judge leaned on the prosecutor to reduce
> the charge to a misdemeanor and accepted the felony only when the
> prosecuter secured specific backing from higher echelons at DOJ.
I had a tangential role in the legal aftermath, and am interested to hear
this.
I hadn't had much to do with the actual outbreak, so I was not particularly
watching the whole saga. However, on the evening news one day, I happened to
catch video of him coming out of the court-house after his conviction: from
the look on his face (he looked like his dog had died, and then someone had
kicked him in the stomach) it was pretty clear that incareration (which is
what the sentencing guidelines called for, for that offense) was totally
inappropriate.
So I decided to weigh in. I got advice from the Washington branch of
then-Hale&Dorr (my legal people at the time), who were well connected inside
the DoJ (they had people who'd been there, and also ex-H+D people were
serving, etc). IIRC, they agreed with me that this was over-charging, given
the specifics of the offender, etc. (I forget exactly what they told me of
what they made of the prosecutor and his actions, but it was highly not
positive.)
So we organized the IESG to submit a filing in the case on the sentencing, and
got everyone to sign on; apparently in the legal system when there is an
professional organization in a field, its opinions weigh heavily, and the
IESG, representing as it did the IETF, was the closest thing to it here. I
don't know how big an effect our filing had, but the judge did depart very
considerably from the sentencing guidelines (which called, IIRC, for several
years of jail-time) and gave him probation/community-service.
Not everyone was happy about our actions (particularly some who'd had to work
on the cleanup), but I think in retrospect it was the right call - yeah, he
effed up, but several years in jail was not the right punsishment, for him,
and for this particular case (no data damaged/deleted/stolen/etc). YMMV.
Noel
> the idiot hadn't tested it on an isolated network first
That would have "proved" that the worm worked safely, for
once every host was infected, all would go quiet.
Only half in jest, I have always held that Cornell was right
to expel Morris, but their reason should have been his lack
of appreciation of exponentials.
(Full disclosure: I was a character witnesss at his trial. A
little known fact is that the judge leaned on the prosecutor
to reduce the charge to a misdemeanor and accepted the felony
only when the prosecuter secured specific backing from
higher echelons at DOJ.)
Doug McIlroy
I too remember TECO. In my TOPS-10 days I was quite a whiz at it.
Then I encountered UNIX and ed, and never looked back. Cryptic
programmability is fun, but a simple but well-chosen set of
commands including the g/v pair made me more efficient in the end.
it could just be that ed is a better fit for the shape of my brain.
C struck me similarly.
Norman Wilson
Toronto ON
(Actually in the Bay Area for a few days for LISA, in case any
UNIXtorians want to meet up.)
> From: Dave Horsfall
> I'm glad that I'm not the only one who remembers TECO
Urp. I wish I _didn't_ remember TECO!
"TECO Madness: A moment of convenience, a lifetime of regret." - Dave Moon
(For those who didn't catch the reference, here:
https://www.gammalyte.com/tag/reefer-madness/
you go.)
Noel
On Mon, Oct 16, 2017 at 12:39 PM, Jon Steinhart <jon(a)fourwinds.com> wrote:
>
> I have a similar and maybe even more extreme position. When I was a
> manager
> I placed restrictions on the tools and customizations for members of my
> team.
> My goal was to make sure that any team member could go over to any other
> team
> member's desk and get stuff done.
And I think this loops back to what started some of this threat. The idea
of a programmer with 'good taste.'
Rob (and Brian) railed on BSD in cat -v considered harmful
<http://harmful.cat-v.org/cat-v/> and ‘*Program Design in the UNIX
Environment*’ (pdf version
<http://harmful.cat-v.org/cat-v/unix_prog_design.pdf>, ps version
<http://harmful.cat-v.org/cat-v/unix_prog_design.ps>) but the points in it
was then and are still now, fresh: What is it that you need to get the job
done - to me, that is Doug's "Universal Unix" concept.
When I answer questions on quora about learning Linux and other UNIX
derivative, I still point them at their book: *The Unix Programming
Environment
<http://www.amazon.com/gp/product/013937681X?ie=UTF8&tag=catv-20&linkCode=as…>*
I would say, if the can login into the system and complete the exercises in
UPE without having to make changes, you are pretty close to Doug's
"Universal UNIX" environment. And if you can use the tools, without having
to think about them and they pretty much are what you rely upon everyday,
you are getting close to my ideal of 'good taste.'
Clem
Of interest to the old farts here...
At 22:30 (but which timezone?) on this day in 1969 the first packet got as
far as "LO" ("LOGIN"?) then crashed. More details, anyone?
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."