> We all took the code back and promised to get patches out ASAP and not tell any one about it.
Fascinating. Chnages were installed frequently in the Unix lab, mostly
at night without fanfare. But an actual zero-day should have been big
enough news for me to have heard about. I'm pretty sure I didn't; Dennis
evidently kept his counsel.
Doug
> From: "Ron Natalie"
> Ordered writes go back to the original BSD fast file system, no? I seem
> to recall that when we switched from our V6/V7 disks, the filesystem got
> a lot more stable in crashes.
I had a vague memory of reading about that, so I looked in the canonical FFS
paper (McKusick et al, "A Fast File System for UNIX" [1984)]) but found no
mention of it.
I did find a paper about 'fsck' (McKusick, Kowalski, "Fsck: The UNIX File
System Check Program") which talks (in Section 2.5. "Updates to the file
system") about how "problem[s] with asynchronous inode updates can be avoided
by doing all inode deallocations synchronously", but it's not clear if they're
talking about something that was actually done, or just saying
(hypothetically) that that's how one would fix it.
Is is possible that the changes to the file system (e.g. the way free blocks
were kept) made it more crash-proof?
Noel
> The problem with that is that * doesn't really bind to the type name.
> It binds to the variable.
>
> char* cp1, cp2; // cp1 is pointer to char, cp2 is just a char.
>
> I always found it confusing that the * is used to indicate an pointer
> here, where as when you want to change an lvalue to a pointer, you use
> &.
The way to read it is that you are declaring *cp1 as a char.
-- Richard
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
> From: Warner Losh
> There's a dcheck.c in the TUHS v7 sources. How's that related?
That was one of the earlier tools - not sure how far back it goes, but it's in
V6, but not V5. It consistency checks the directory tree. Another tool, 'icheck',
consistency checks file blocks and the free list.
Noel
I've made available on GitHub a series of tables showing the evolution
of Unix facilities (as documented in the man pages) over the system's
lifetime [1] and two diagrams where I attempted to draw the
corresponding architecture [2]. I've also documented the process in a
short blog post [3]. I'd welcome any suggestions for corrections and
improvements you may have, particularly for the architecture diagrams.
[1] https://dspinellis.github.io/unix-history-man/
[2] https://dspinellis.github.io/unix-architecture/
[3] https://www.spinellis.gr/blog/20170510/
Cheers,
Diomidis
On 6 May 2017 at 11:23, ron minnich <rminnich(a)gmail.com> wrote (in part):
[...]
> Lest you think things are better now, Linux uses self modifying code to
> optimize certain critical operations, and at one talk I heard the speaker
> say that he'd like to put more self modifying code into Linux, "because it's
> fun". Oh boy.
Fun, indeed! Even self-modifying chips are being touted -- Yikes!
N.
> tr -cs A-Za-z '\n' |
> tr A-Z a-z |
> sort |
> uniq -c |
> sort -rn |
> sed ${1}q
>
> This is real genius.
Not genius. Experience. In the Bentley/Knuth/McIlroy paper I said,
"[Old] Unix hands know instinctively how to solve this one in a jiffy."
While that is certainly true, the script was informed by my having
written "spell", which itself was an elaboration of a model
pioneered by Steve Johnson. By 1986, when BKM was published,
the lore was baked in: word-processing scripts in a similar
vein were stock in trade.
A very early exercise of this sort was Dennis Ritchie's
enumeration of anagrams in the unabridged Merriam-Webster.
Since the word list barely fit on the tiny disk of the time,
the job entailed unimaginable marshalling of resources. I
was mightily impressed then, and still am.
Doug
On Thu, May 4, 2017 at 7:14 PM, Larry McVoy <lm(a)mcvoy.com> wrote:
> some of those Berkeley flags (not specifically for cat, but almost
> certainly including those for cat) were really quite useful.
Amen!!! I think that this is key point. What is in good taste or good
style? Doug's distain for the results of:
less --help | wc
is found in bad design, a poor user interface, little fore thought, *etc.*
Most of what is there has been added over Eric Scheinbrood's
original more(1)
I do not believe are used that often, but some of them are of course, and
you can not tell who uses what!! So how do you decide what get rid of?
How do you learn what people really need -- IMO: much of that is
* experience *and this thing we call 'good taste.' As opposed to what I
think happened with less(1) and many others similar programs (programmers
peeing on the code because they code and the source was available -- I can
add this feature to it and I think it is cool. As opposed to asking,
what do really get and not having a 'master builder' arbitrating or vetting
things).
The problem we have is that we don't yet have a way of defining good taste.
One might suggest that it takes years of civilization and also that
tastes do change over time. Pike's minimalistic view (which I think is
taken to the extreme in the joke about automobile dashboard on Brian
Kernighan's car) sets the bar to one end and probably one of the reason why
UNIX had a bad reputation, certainly by non-computer scientists, when it
first appeared as being difficult. Another extreme is systems that put in
you a box and never let you do anything but what we told you do; which I
find just as frighten and frustration builds there when I use them.
Clearly systems that are so noisy that can not find what really want, or
need is another dimension of the same bad design. So what to do? [more in
a minute...]
Larry is right. Many of the 'features' added to UNIX (and Linux) over time
have been and *are useful*. Small and simple as it was (and I really
admire Ken, Dennis and the Team for its creation), but in 2017 I really
don't want to run the Sixth Edition for my day to day work anymore - which
I happily did in 1977. But the problem is, as we got 'unlimited address
space' of 32 and 64 bits, and more room for more 'useful' things, we also
got a great deal of rubbish and waste. I am interpreting Doug's point
about less --help | wc is that is that are so many thorns and weeds, it
hard to see to see the flowers in the garden.
I'd like to observe that is that most college courses in CS I have seen
talk about how to construct a programs, algorithms, structures - i.e. the
mechanics of some operation. But this discussion is about the human
element. What we feel is good or bad and how it related to how to use
the program.
I think about my friends that have degrees in literature, art and
architecture. In all cases, they spend a lot of time examining past
examples, of good and bad - and thinking and discussing what makes them so.
I'm actually happy to see it was Professor McIlroy that is one of the
folks taking a stand on current craziness. I think this is only going to
get better if a new crop of students that have been trained in 'good
taste.' So, I wonder do any of the schools like Darthmouth and the like
teach courses that study 'style' and taste in CS. Yes, it is a young
field but we have been around long enough that we do a body of work good
and bad to consider.
I think there is a book or two and a few lectures in there somewhere.
Thoughts?
Clem
> From: Michael Kjörling <michael(a)kjorling.se>
> To: tuhs(a)minnie.tuhs.org
> Subject: Re: [TUHS] Discuss of style and design of computer programs
> from a user stand point
> Message-ID: <20170506091857.GE12539(a)yeono.kjorling.se>
> Content-Type: text/plain; charset=utf-8
>
> I would actually take that one step further: When you are writing
> code, you are _first and foremost_ communicating with whatever human
> will need to read or modify the code later. That human might be you, a
> colleague, or the violent psychopath who knows both where you live and
> where your little kids go to school (might as well be you). You should
> strive to write the code accordingly, _even if_ the odds of the threat
> ever materializing are slim at most. Style matters a lot, there.
>
Interesting, I was going to say about the same thing about the violent psychopath
who has to maintain your code after you leave. When I lectured at UCSD or was
giving talks on style for ViaSat I always said the same thing:
Whatever you write, the fellow who is going to wind up maintaining it is a known
axe killer, now released from prison, completely reformed. He learned computer
programming on MS/DOS 3.1 and a slightly broken version of Pascal. He will be
given your home phone number and address so if he has any questions about the
code you wrote he can get in contact with you.
This always got a few chuckles. I then pointed out that whenever anyone gets code
that someone else wrote, the recipient always thinks that they can ‘clean up’ what
is there because the original author clearly doesn’t understand what proper code
looks like.
Over time, I’ve learned that everyone has a style when writing code, just like handwriting
and given enough time, I can spot who the author of a block of code is just from the
indenting, placement of ( and ) around a statement and other small traits.
What makes good code is the ability to convey the meaning of the algorithm
from the original author to all those who come after. Sometimes even the most
unusual code can be quite clear, while the most cleanly formatted and commented
code can be opaque to all.
David
> tr -cs A-Za-z '\n' |
> tr A-Z a-z |
> sort |
> uniq -c |
> sort -rn |
> sed ${1}q
>
> This is real genius.
Not genius. Experience. In the Bentley/Knuth/McIlroy paper I said,
"[Old] Unix hands know instinctively how to solve this one in a jiffy."
While that is certainly true, the script was informed by my having
written "spell", which itself was an elaboration of a model
pioneered by Steve Johnson. By 1986, when BKM was published,
the lore was baked in: word-processing scripts in a similar
vein were stock in trade.
A very early exercise of this sort was Dennis Ritchie's
enumeration of anagrams in the unabridged Merriam-Webster.
Since the word list barely fit on the tiny disk of the time,
the job entailed unimaginable marshalling of resources. I
was mightily impressed then, and still am.
Doug