If I'm remembering correctly, miniunix didn't have pipes. The shell faked
it by taking the output of the first program into a file and then using it
as the input for the second.
Didn't really multitask anyhow, so it was pretty much fine.
-----Original Message-----
From: TUHS [mailto:tuhs-bounces@minnie.tuhs.org] On Behalf Of Ian Zimmerman
Sent: Monday, February 26, 2018 11:58 AM
To: tuhs(a)minnie.tuhs.org
Subject: Re: [TUHS] EOF on pipes?
On 2018-02-26 23:03, Rudi Blom wrote:
> From a piece of code I have in some SCO UNIX 3.2V4.2 source. SCO
> doesn't have pipes, but you can simulate them.
Is this a SCO speciality, or are there other UNIXes like that?
Does it not even have pipe() in its libc?
Many years ago (when the dinosaurs were using V6), I had a crazy idea[*]
that a write(fd, 0, NULL) would somehow signal EOF to the reader i.e. a
subsequent read would wait for further data instead of ENOTOBACCO.
Did any *nix ever implement that? I have no idea how it would be done.
Have an ENOGORILLA.
To answer the real question: stream pipes, which became the only
sort of pipe in the Research stream (sic) sometime between the
8/e and 9/e manuals.
The implementation was trivial, because from the beginning the
metadata within a stream admitted delimiters: markers that meant
`when this object reaches read(2) at the head end, return from
read with whatever has already been delivered.' Empty messages
(two consecutive delimiters) were explicitly allowed.
If a stream was marked as using delimeters (and pipes always
were), a delimeter was inserted after every write(2). So
write(2) generated an empty message, and read(2) returned it.
Norman Wilson
Toronto ON
We lost Claude Shannon on this day in 2001. He was a mathematician,
electrical engineer, and cryptographer; he is regarded as the "father" of
information theory, and he pioneered digital circuit design. Amongst
other things he built a barbed-wire telegraph, the "Ultimate Machine" (it
reached up and switched itself off), a Roman numeral computer ("THROBAC"),
the Minivac 601 (a digital trainer), a Rubik's Cube solver, a mechanical
mouse that learned how to solve mazes, and outlined a chess program
(pre-Belle). He formulated the security mantra "The enemy knows the
system", and did top-secret work in WW-2 on crypto and fire-control
systems.
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
Re: RIP Claude Shannon
> Never heard of Claude Shannon. So a good opportunity to do some
> searching reading to 'catch up'.
Shannon did some amazing work. My field is Information science and without Shannon, it would be a dull field indeed. His masters thesis laid out an elegant use of digital logic for switching systems that we take for granted today, his mathematical theory of communication, while dense, is foundational - ever heard of a bit?, and he actually loved juggling so much he created a juggling machine - what’s not to love? :) All that said, he was also in the right place at the right time and was surrounded by genius.
Will
> But a note on Dijkstra's algorithm: Moore and Dijsktra both published
> in 1959.
I was off by one on the year, but the sign of the error is debatable.
Moore's paper was presented in a conference held in early April, 1957,
proceedings from which were not issued until 1959. I learned about it
from Moore when I first I met him, in 1958. Then, he described the
algorithm in vivid, instantly understandable terms: imagine a flood
spreading at uniform speed through the network and record the
distance to nodes in order of wetting.
> But it is documented Dijkstra's algorithm has been invented and used
> by him in 1956.
Taking into account the lead time for conference submissions, one
can confidently say that Moore devised the algorithm before 1957.
I do not know, though, when it first ran on a Bell Labs computer.
That said, Moore's paper, which presented the algorithm essentially
by example, was not nearly as clear as the capsule summary he gave
me. It seems amateurish by comparison with Dijkstra's elegant treatment.
Dijkstra's name has been attached to the method with good reason.
Doug
>> pipe, ch(e)root.... Any more unix connections to smoking?
I have a slide that's a quadralingual pun (French, English, Art, shell)
in which Magritte's painting of a pipe with the words "Ceci n'est pas
une pipe" has been altered to read "Ceci n'est pas une |". The
altered phrase was borrowed from Jay Misra et al, who used it as
an example of a message in a paper on communicating processes.
Many years ago (when the dinosaurs were using V6), I had a crazy idea[*]
that a write(fd, 0, NULL) would somehow signal EOF to the reader i.e. a
subsequent read would wait for further data instead of ENOTOBACCO.
Did any *nix ever implement that? I have no idea how it would be done.
[*]
I was full of crazy ideas then, such as extending stty() to an arbitrary
device and was told by the anti-CSU mob that it was a stupid idea...
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
So many memories. The "ultimate machine" (which was brought out and
demonstrated from time to time while I was at the Labs) was built in
collaboration with Ed Moore (he of Moore-model automata, who published
"Dijkstra's algorithm" for shortest paths a year before Dijkstra) and
(I believe) Dave Hagelbarger. Moore endowed the machine with a longevity
property seldom remarked on: majority logic so that any electrical
component can be removed without harming its observable behavior.
Shannon moved to MIT from Bell Labs some weeks before I moved the
other way, so I only met him much later when he visited the Unix room
(an excuse, albeit weak, for this distant detour from TUHS). By that
time Shannon was descending into Alzheimer's fog, but his wife who
accompanied him was a memorably curious and perceptive visitor. I have
wondered what role she may have played as a sounding board or more in
Shannon's research.
As a child, I used to ski on the 50-foot hill that was the lawn of the
mansion that Shannon would buy when he moved to Massachusetts. We kids
would ski down and climb back up. Not Shannon. He installed a chairlift.
One house separated mine from the ski hill. It belonged to John Trump,
another MIT prof who engineered the Van de Graaff generator into a
commercial product for generating million-volt x-rays and, yes, was uncle
of the Donald. John, as kind as he was bright, fortunately did not live
to see the apotheosis of his wayward nephew.
Doug
> We lost Claude Shannon on this day in 2001. He was a mathematician,
> electrical engineer, and cryptographer; he is regarded as the "father" of
> information theory, and he pioneered digital circuit design. Amongst
> other things he built a barbed-wire telegraph, the "Ultimate Machine" (it
> reached up and switched itself off), a Roman numeral computer ("THROBAC"),
> the Minivac 601 (a digital trainer), a Rubik's Cube solver, a mechanical
> mouse that learned how to solve mazes, and outlined a chess program
> (pre-Belle). He formulated the security mantra "The enemy knows the
> system", and did top-secret work in WW-2 on crypto and fire-control
> systems.
Never heard of Claude Shannon. So a good opportunity to do some
searching reading to 'catch up'.
Interesting person and this quota tends to make him my type of guy
"I just wondered how things were put together.
– C.E. Shannon"
http://themathpath.com/documents/ee376a_win0809_aboutClaudeShannon_willywu.…
Now wondering if I should register for this THORIAC project or just
read some more and do it. Not in the mood for learning Python I'd
probably do some fumbling in C.
https://www.engage-csedu.org/find-resources/shannons-throbac
Keeps me busy and amuzed,
uncle rubl
Just curious; am I the only who, back in the early days of V6, used pipes
as temporary files? I mean that after calling pipe(), instead of then
forking and playing "file-descriptor footsie" you just read and wrote
within the same process.
I seem to recall that it worked, as long as you avoided the 8-block limit
(or whatever it was then); I have no idea why I tried it, other than to
see if it worked i.e. avoid the creat() (without the "e") etc.
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."