[HN Gopher] An Overview of TUNIS: A UNIX Look-Alike Written in C...
___________________________________________________________________
An Overview of TUNIS: A UNIX Look-Alike Written in Concurrent
Euclid (1982)
Author : lproven
Score : 90 points
Date : 2022-09-12 14:04 UTC (8 hours ago)
(HTM) web link (archive.org)
(TXT) w3m dump (archive.org)
| Cyph0n wrote:
| As a Tunisian, I'm very curious how the name came to be!
| jan_g wrote:
| Toronto UNIversity System
|
| https://en.wikipedia.org/wiki/TUNIS
| Cyph0n wrote:
| Thanks for linking!
| bregma wrote:
| Spent many an hour writing OS code in CE (Concurrent Euclid)
| using the `ed` editor on an IBM 3270. Still have my copy of the
| scrabble book. Good times for sure.
| russfink wrote:
| This post is of historic significance. Paper is from 1970.
| Rochus wrote:
| The report is dated september 1981; the link points to the
| revised 1982 version; the author is Ric Holt
| (https://en.wikipedia.org/wiki/Ric_Holt).
|
| He was also involved in the implementation of the Euclid
| programming language used for Tunis. It's remarkable that
| Euclid was originally designed by Butler Lampson at Xerox PARC,
| where also Smalltalk, Mesa and Cedar were invented.
| rst wrote:
| Date given on the cover sheet is 1982. (Very early versions of
| Unix were already running in Bell Labs in 1970, but the kernel
| was still entirely written in assembler, it may not have had a
| hierarchical file system yet, and certainly didn't have
| fork().)
| pjmlp wrote:
| Meanwhile JOVIAL is from 1958, ESPOL/NEWP from 1961, PL/I
| from 1964....
| eternalban wrote:
| Holt's 'short introduction to concurrent euclid':
| https://dl.acm.org/doi/pdf/10.1145/947923.947931
| mikewarot wrote:
| I found this example[1]. At first blush, it looks like someone
| really hated semicolons. It's un-natural to me, with strong
| code smell.
|
| I do like that the end of a block repeats the name, to ensure
| matching.
|
| [1]
| https://www.cs.oswego.edu/~odendahl/coursework/csc443/notes/...
| andsoitis wrote:
| Python.
| musicale wrote:
| Javascript when I feel like writing it that way for fun
| 082349872349872 wrote:
| p73 for what I found to be the most unique feature of Euclid:
| its antipathy to aliasing.
| mikewarot wrote:
| I read it, and I don't really get it. X is used out of scope,
| which is why we try to eliminate global variables, and use
| appropriate names.
|
| It seems like a huge over-reaction.
| jerf wrote:
| There are many such things in historical PL design. I
| consider immutability in Erlang to be another example...
| what Erlang _needed_ was processes to not be able to send
| each other mutable references. Full immutability in data
| achieves that goal, but is an over reaction. It was
| sufficient when the type system simply doesn 't have
| references in it.
|
| Another example is the whole dynamic scripting language
| world considered as a reaction to the terrible static world
| of the 1990s. Yes, the 1990s were too static, no question,
| but that didn't mean we needed to turn all objects into
| hash tables, be able to dynamically re-write classes on
| both the class _and_ the instance level, and just generally
| make everything, everywhere so dynamic that the language
| spends the majority of its runtime basically checking to
| see that nothing has dynamically changed since last time it
| did something.
|
| The PL design world is learning and growing and I find it
| an interesting story over time. Unfortunately when proving
| out a theory takes a minimum of about 20 years from
| thousands of programmers it's a slow process.
|
| (Also, while my comments above are certainly in some sense
| criticisms of the languages, I actually don't intend them
| as criticisms of the _people_ involved. It is still an
| amazing achievement to move the state of the art ahead _at
| all_ in such a harsh environment; I 'm not angry that they
| didn't in one fell swoop fix all problems forever, even for
| decades not yet here.)
| cmrdporcupine wrote:
| re: dynamism/late-binding; it was seen as very exciting
| at the time. At least to me.
|
| Maybe under the influence of Self and Smalltalk, which
| were doing interesting things with object behaviour
| composition using delegation and slots and all sorts of
| late-bound magic.
|
| It definitely let people _experiment_. In JavaScript
| especially a thousand (inelegant) flowers bloomed and
| then some practices were codified into later revisions of
| the language and the door shut on that kind of
| experimentation.
|
| I'm a big fan of static type systems generally. But I do
| think dynamic scripting languages have their place. In
| particular as prototyping/scripting languages embedded in
| larger more robust runtimes. e.g. the _original_ goal of
| JavaScript (which has now become a full blown application
| development language).
|
| AutoCAD had/has its lisp dialect. Emacs its own (ok it's
| more than just embedded scripting in that case). Many
| FPGA and HW eng tools use Tcl. Various games have Lua etc
| etc. This is a useful pattern potentially.
| jerf wrote:
| "But I do think dynamic scripting languages have their
| place."
|
| My thought isn't actually static/dynamic, but rather the
| _amount_ of dynamicness. I suspect we could get 99%+ of
| the benefits of static languages at a fraction of the
| runtime cost if someone redid a dynamic language from
| scratch today to be dynamic only in selected ways. You
| pay a lot of runtime performance in Python to be able to
| do things like at any time edit a method three levels up
| the inheritance hierarchy, but you almost never actually
| _do_ that sort of thing.
|
| One idea I cite often is to have a declaration phase
| versus a runtime phase, because the vast, vast bulk of
| "dynamicness" is achieved at startup. A JIT could be
| really aggressive about a lot of optimizations if the
| language itself guaranteed that after a program (or a
| module, or a function, or whatever makes sense in the
| end) declares itself "done being dynamic" that there will
| be no more changes.
|
| In fact I think there's a niche for a high-performance
| "mostly" dynamic language with threading built in from
| the beginning in the next 5-10 years. Static languages
| are getting most of the attention right now, and there's
| reasons for that, but I think there's a niche here that
| is not being well explored.
|
| Personally I'm having a hard time using dynamically-typed
| languages right now because the amount of performance I'm
| throwing away almost makes me nauseous. That's a
| combination of the problem with being too dynamic, as I
| said, and multi-decade-old implementations not being able
| to be multithreaded very easily. I think a language that
| solved those two things could be very interesting.
| zozbot234 wrote:
| Modern static languages generally support opt-in
| "dynamic" facilities. For instance, C++ has its RTTI
| support, Haskell has 'Dynamic' and Rust has the 'Any'
| trait.
| 082349872349872 wrote:
| https://en.wikipedia.org/wiki/Restrict is an attempt to
| declare that the programmer has avoided aliasing.
| https://en.wikipedia.org/wiki/Separation_logic is a very
| fancy attempt to reason in the presence of possible
| aliasing.
|
| History says the Euclid approach was a huge over-reaction,
| but consider also the naive memcpy:
| while(count--) *dst++ = *src++;
|
| which works just fine ... as long as the destination and
| source buffers don't overlap (are not aliased).
|
| You might consider no-aliasing imperative to have been an
| attempt to stake out a halfway position between "pointers
| are the goto of data structures" wild west full imperative,
| and "no mutation, even when unaliased" strict functional,
| disciplines.
| ncmncm wrote:
| I find dead-end projects like this very interesting, in
| aggregate. So much original work went in, and then it died.
| Likewise Symbolics, Apollo Aegis, BeOS, OS/2, MacOS9, Lisa, Pink,
| Plan9.
|
| UNIX itself has turned out to be one, almost (BSDs and MacOSX
| excepted). SerenityOS might not!
| skissane wrote:
| > UNIX itself has turned out to be one, almost (BSDs and MacOSX
| excepted).
|
| Unix's success story was about the interfaces, the APIs, not
| the original implementation of them - even though BSDs (and
| through them macOS) are direct descendants of the original
| implementation, I doubt much Bell Labs code actually survives.
| But the Unix API will likely outlive us all.
| [deleted]
| mhd wrote:
| Pascal, Euclid, Ada - any other languages from the Algol family
| named after mathematicians? Probably stopped after Wirth himself
| deviated from the "pattern".
| Athas wrote:
| Also by Wirth:
| https://en.wikipedia.org/wiki/Euler_(programming_language)
| adrian_b wrote:
| Euler is an important programming language, because it was
| one of the first programming languages which had pointers (in
| 1965).
|
| Moreover, it was the first programming language where the
| implicit value of a pointer was the address contained by it
| and an explicit operator was used to access the pointed
| object (in the previous language with pointers, CPL, they
| behaved like the references of C++, i.e. their implicit value
| was the pointed object).
|
| Unlike in C, where due to a design error the "*" indirection
| operator is a prefix operator, in Euler the indirection
| operator (which was a middle dot) was rightly a postfix
| operator (this was later inherited by Pascal).
|
| Of course, Euler also had the "address of" operator ("@" in
| Euler, as a prefix operator), which is needed to assign
| values to pointers.
| ncmncm wrote:
| C and C++ could still be fixed. Unfortunately not with
| postfix ^. Unary -> might work.
| messe wrote:
| Even Algol could be considered indirectly named after a
| mathematician: Muhammad ibn Musa _al-Khwarizmi_ - latinised as
| _Algoritmi_ - _Algorithm_ - _Algorithmic Language_ - _Algol_.
| ianai wrote:
| Naming stuff after the discoverer/scientist/etc absolutely is
| a thing across every discipline I've ran into.
| 082349872349872 wrote:
| Except computer languages are not named after their
| designers[0] but as a tribute.
|
| Not in the Algol family: Haskell
|
| In the Algol (indeed Euclid) family: Turing
|
| As yet vaporware(?): Noether
|
| [0] generally, anyway: AWK is infamous; and I have some
| suspicions about CPL and MCPL ... once may be coincidence,
| but twice? Also, what about Popplestone's POP-n languages?
| ... and the "Wolfram Language" should be no surprise to
| anyone who's read the eponym's book.
| cestith wrote:
| Many languages are named after people, groups of people,
| animals, and companies including fictional or
| mythological characters. Some of them are indirect, being
| named after something else named after the
| person/beast/character.
|
| Alice, Babbage, Curry, Dylan, Eiffel, FAUST, Godel, Hume,
| Idris, Joule, Karel, Lua, Mercury, Nemmerle, Orwell,
| Python, Sather, Turing, WATFOR, Yorick, and Zeno to my
| understanding all named after people, groups of people,
| companies, gods, etc.
|
| Then there are others besides Wolfram Language named
| after one or more contributors, like awk.
|
| There are animals, plants, and gemstones - Zebra, Ant,
| Perl, the older Pearl, Ruby, Crystal, Elm, Oak, Maple (to
| represent Canadians, so kind of a two-fer), Emerald,
| Cobra, Mouse...
|
| I don't know that anything is peculiar to the Modula
| family here.
| sidpatil wrote:
| Heh. I always thought it was named after the star system [1].
| Never knew.
|
| [1] https://en.wikipedia.org/wiki/Algol
___________________________________________________________________
(page generated 2022-09-12 23:00 UTC)