8 ms·
Simula – The forgotten programming language
- sigg3 3y agoThis gave me a chuckle: > [case insensitivity... so] both beGIN and BEGIN are interpreted the same way. This was also characteristic of the time, as programmers programmed their computers by shouting.
- ggm 3y agoFor anyone young enough not to have used an ASR-33 or similar, the UNIX login: process would assume you were on uppercase only and "work" if you logged in as your username/password in uppercase. Guess it was an extra round or two of password hashing against the salt. It remained in the "getty" process for some time, well into the {Free,Net,Open}BSD era. CP/M and the like were pretty forgiving of commands being shouted too. some languages (IMP, maybe others) used %reserved-word% formatting so you could do things pretty much how you wanted and then the system would know what was instructions.
- tyingq 3y ago>It remained in the "getty" process for some time, well into the {Free,Net,Open}BSD era. Still there in agetty: https://github.com/util-linux/util-linux/blob/master/term-utils/agetty.c#L2320 https://github.com/util-linux/util-linux/blob/master/term-ut... And, I imagine in other getty implementations.
- whartung 3y agoWell CP/M was a mixed bag. It was case sensitive and the command line upshifted everything. However programs like MS-BASIC would allow you to create files with lower case names that were then unmanageable from the command line.
- coldtea 3y agoAnd sadly the same (case insesitivity, not shouting) is the case in Nim today, iirc
- michaelsbradley 3y agoNim is partially case-insensitive: https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality https://nim-lang.org/docs/manual.html#lexical-analysis-ident... Sadly, not every developer understands why that’s a good or bad design, i.e. the global pool of developer talent is partially stupid.
- michaelcampbell 3y agoI don't, and I'm ok with that; means I can learn more. I have played with nim for a bit though, and this rule I just don't care for.
- michaelsbradley 3y agoSure, that's fair. I didn't care for it during much of the first year I started working with Nim. Once I began wrapping C libs and working with Nim libs whose conventions differ from my preferences, the rationale (explained in the manual) for Nim's partial case-insensitivity "clicked" for me and I eventually embraced it. But I can see it remaining a sore point for some folks. My reply above was tongue-in-cheek, maybe a bit too edgy. The person I was replying to characterized the language feature as "sad", and that's just silly. Even if it's an aspect of the language one doesn't appreciate, it's no more "sad" than e.g. Clojure involving a lot of parentheses or Haskell promoting monads. Likewise, no one is stupid or partially so for not liking or understanding Nim's partial case-insensitivity.
- noobermin 3y agoCase insensitivity is only seen as "rustic" because C is case insensitive. Somehow, case insensitivity is seen as a modern thing but at the same time everyone recommends not choosing identifiers which are close to each other apart from case in style guidelines.
- layer8 3y agoCase insensitively is nowadays tied to how (static and dynamic) linking works. You’d either (a) have to use a case-insensitive and thus nonstandard linker, or (b) have to uniformly normalize identifiers before linking, making the normalized identifiers less readable, or (c) have to normalize identifiers based on the casing used for an object’s main definition, which means that changing only the case of that definition still breaks compatibility, so not quite case-insensitive after all, or (d) have at least FFI identifiers be case-sensitive (and use a custom linking runtime for intra-language identifiers).
- noobermin 3y ago>nowadays tied to how (static and dynamic) linking works and this is the case because of C, which was my point. The fact that OS'es are written in C and thus have a C libraries and APIs is why you must respect C's rules for identifier names. Also, yes compilers for other languages essentially name-mangle anyway, that's how (modern) fortran which is case sensitive and C++ which isn't (but tacks on a bunch of things to function identifiers) work. But the point about naming conventions or recommendations still stands, like a lot of things it is a fact of history favoring C, not that there is anything inherently better about it.
- layer8 3y ago> and this is the case because of C I believe it was already the case prior to C with assembly, and really because originally only one case (uppercase) was available. C just didn't change anything about the case-sensitivity of linking.
- deleted 3y ago[deleted]
- mongol 3y agoSimula was the language my university teached object-oriented programming. This was around 1995 or so. Java had just entered public consciousness but it was too early to be considered. C++ was probably not considered pure enough to get the concepts across. It was probably a good choice, for the time and for the course objectives. But I never used it since.
- colordrops 3y agoI was studying around the same time and it was all Scheme, Prolog, and C/C++, along with some obscure academic languages.
- flurdy 3y agoI am glad my first year at Uni (1994) they focused on SML a lot. Got a good base for the rest of our programming journey. Even now that I live in mostly Scala-land nearly 30 years later. And yes also a lot of other languages over the course's years. I still remember being forced to do bits of VHDL. We were taught the history of Simula (and Algol) but had to use C++ as our main object orientated language. They refused to teach my year Java so we had to learn that on our own.
- Rochus 3y agoAt which university was that?
- optimalsolver 3y ago>teached Should be "taught". Just FYI.
- judofyr 3y agoHah, as someone who has studied at University of Oslo, many of the lecturers make sure that Simula isn’t forgotten, by constantly reminding us that it was the first language with classes etc. Therefore, a few years back I decided to learn it a bit (I borrowed a really old book from the library) and solved one of the Advent of Code puzzles in Simula: https://github.com/judofyr/aoc2018/blob/master/day3prog.sim https://github.com/judofyr/aoc2018/blob/master/day3prog.sim I was actually very surprised at how “modern” it felt. However, neither this code nor the article touches on the real cool parts of Simula: Simulations based on coroutines.
- vidarh 3y agoWhen I was at UiO ('93), they did more than that: The introductory CS course required us to use Simula. We had to do several projects in it. Of course at the time there were people on staff who had written books about it.
- trashtester 3y agoDo you remember how Kirkerud (the lecturer and textbook author) opened the semester stating with absolute certainty that AGI would never, ever be reached in our lifetime, or even the next several centuries?
- vidarh 3y agoI don't, but I mostly ignored the lectures as I'd been programming for most of my life already at that point, so I read the textbooks and showed up to the groups (the TA for my group was a member of Crusaders[1], which was fun). I think I attended a grand total of two lectures. I do remember we found a really embarrassing algorithm choice in the Stack class, though (push and pop at the time were O(n), as it used a singly linked list that they iterated through recursively to find the top of the stack... we found that out on a group project where we kept running out stack space because of the recursion...) [1] https://demozoo.org/groups/12/ https://demozoo.org/groups/12/
- Orexis-Vexatii 3y ago
- chubot 3y agoA bit of a tangent, but it's interesting how many languages come from Nordic countries: - Simula - Norway - C++ - Stroustrup is Danish - TypeScript / C# - Hjelsberg is Danish - PHP - Lerdorf is Danish - the v8 team including Lars Bak is Danish, and has developed several languages - Erlang - from Ericsson in Sweden, though Joe Armstrong was British Well now that I write it out, it seems like it's even more Danes than Nordic countries! (Someone wrote pretty much the same comment here in 2016 - https://news.ycombinator.com/item?id=10833073 https://news.ycombinator.com/item?id=10833073) Hm also from the same thread, L, M, and P from the LAMP stack all originated in Scandinavia! Didn't realize that https://news.ycombinator.com/item?id=10835311 https://news.ycombinator.com/item?id=10835311
- mnky9800n 3y agoMaybe spending long time in the dark every winter is good for thinking about programming languages.
- fuzztester 3y agoIIRC, Linus may have said that somewhere about Linux.
- jjgreen 3y agoThat and it being too expensive to go out and get drunk ...
- zelphirkalt 3y agoIf we go by nationalities and this list, then that is 3 misses and maybe 1 hit in terms of language design for the Danish. Maybe I should check the creators of the next language I learn and avoid langs created by Danish?
- gratunk 3y agoCOMAL, a then mildly popular alternative to Basic, is/was from denmark, too.
- 3y ago
- robarr 3y agoBoth Algol and Simula were ported to the 68000’s Atari ST. I remember having a box of diskettes with implementations of forth, modula , lisp, prolog, smalltalk. I miss the those times when using a computer meant ‘programming on a computer’, and programming on a computer meant trying to find your foot on any of a dozen languages popping left and right.
- palad1n 3y agoThere was Lisp on an Atari ST?
- fuzztester 3y agoThere was even a Lisp on DOS.
- deleted 3y ago[deleted]
- coldtea 3y agoThere's even one for 8-bit Ataris: Interlisp[28] – developed at BBN Technologies for PDP-10 systems running the TENEX operating system, later adopted as a "West coast" Lisp for the Xerox Lisp machines as InterLisp-D. A small version called "InterLISP 65" was published for the 6502-based Atari 8-bit family computer line. For quite some time, Maclisp and InterLisp were strong competitors.
- bluGill 3y agoLogo was a very popular language at the time, and is clearly Lisp at heart.
- tjalfi 3y agoMost 8 and 16-bit microcomputers at the time had a Lisp.
- rjsw 3y ago
- deleted 3y ago[deleted]
- fuzztester 3y agoA thread or blog post on more such forgotten programming languages would be interesting, and more so if it included historical anecdotes.
- discreteevent 3y agoThe insight they had with Simula was similar to that of lisp. Code/behaviour as a first class thing: "In Simula I, Dahl made two changes to the Algol 60 block: small changes, but changes with far-reaching consequences. First, “a block instance is permitted to outlive its calling statement, and to remain in existence for as long as the program needs to refer to it” [11]. Second, references to those block instances are treated as data, which gives the program a way to refer to them as independent objects. As a consequence of these changes, a more general storage allocation mechanism than the stack is needed: a garbage collector is required to reclaim those areas of storage occupied by objects that can no longer be referenced by the running program." https://www.sciencedirect.com/science/article/pii/S0890540113000795 https://www.sciencedirect.com/science/article/pii/S089054011...
- masswerk 3y agoIt's interesting that this somewhat implies the notion of a heap and garbage collection, but that this was not considered for strings.
- layer8 3y agoStrings were really more thought of as arrays/buffers at the time. You could create a String class to serve the purpose of a “modern” string, I believe. However, Simula didn’t yet have operator overloading to make it look like a built-in type.
- leke 3y agoThe Erlang language was named after a Danish mathematician who "did the math" for the whole Erlang network thing I don't really understand.
- mhd 3y agoSimula still is less forgotten than its successor BETA.
- fjfaase 3y agoMy first experience with an object-oriented language was with Simula in 1982, where it was used for one (if I remember correctly) course at the University of Twente.
- noobermin 3y agoIs simula a forgotten language? While it is less used now I thought it was generally acknowledged as a precursor to all OOP today, although Smalltalk is generally more regarded as a pure OOP language defenders still cite.
- Rochus 3y ago> ...progenitor of the most popular, and reviled program paradigm, Object Oriented Programming. Designed by Ole-Johan Dahl, and Kristen Nygaard in 1962... In 1962 the first version of Simula appeared which was quite different from Simula 67, not yet object-oriented, and dedicated to simulation. Simula 67 was the first general purpose object-oriented programming language. > Then, in 1991 another language would enter the playing field, Java, and the rest is history. Java actually used the object model of Simula 67; James Gosling gave a talk about it at the 50th anniversary in Oslo. Here is the link: https://www.youtube.com/watch?v=ccRtIdlTqlU https://www.youtube.com/watch?v=ccRtIdlTqlU
- ThinkBeat 3y agoThere is a lot more to Simula. I was a student at University of Oslo at the time it was still mandatory in intro classes. A fellow student was the son of one of the people who wrote a compiler for Simula. He knew about all sorts of little documented features. Some gave precise control when a "simulation was executed". Thinking back, it makes me think of RTOS like features. Now Simula was never the fastest language, and these did not offer guarantees that any real time system would but they were cool. It was fun when you used language features that the teachers had never seen before.
- ThinkBeat 3y ago> ... By 1983 his “C with classes” programming language would be renamed to C++. Then, in 1991 another language would enter the playing field, Java, and the rest is history Simula -> C++ -> Java. Leaves out rather a lot of important object oriented programming languages.
- rurban 3y agoUnfortunately he is thoroughly confused about OutImage. > "OutImage is called to build the final Simula “Image”. From my digging it appears that OutImage is usually necessary at the end of a block, or a compiler error will be generated. I initially forgot OutImage though so, I imagine that maybe Portable Simula is just implicitly adding this if it’s missing, or it was changed in a later standard. Regardless I’ll leave it in from now." In reality the "image" is just the current outline buffer, and OutImage prints the line feed. Very similar to Pascal later. From the textbook: > "OutImage causes the line which is currently being created - the current image - to be written to the printer or terminal and a new line to be started."