6 ms·
I got the GNU Modula-2 compiler working on OpenBSD
- Panino 6y agoSame person who also just got a dlang compiler working on OpenBSD. Nice work! https://news.ycombinator.com/item?id=26520996 https://news.ycombinator.com/item?id=26520996
- busterarm 6y agoBrian also runs/coordinates meetups and speaks frequently. Quite a friendly, talented gentleman.
- coder4life 6y agoI remember really liking Modula-2 when I had to learn it quickly in 1985 for a cheap ($50? 100?) programming project. I was 16 Kudos for bringing it and other languages to OpenBSD Brain!
- throwawayboise 6y agoOne of the variety languages I used in my CS undergrad in the late 1980s. From what I remember this included at least PL/1, 6809 assembly, C, Pascal, Fortran, Modula-2, and Scheme.
- cafard 6y ago$50 sounds right. My recollection from ca. 1991 was that a guy in Texas sold Modula-2 for about that. It would run on an XT.
- wirrbel 6y agoI really would like to see a Modula-2/Oberon/Component Pascal frontend for LLVM.
- pjmlp 6y agoDepends how long you would be willing to wait for builds I guess.
- sien 6y agoFree Pascal has some support. https://wiki.freepascal.org/LLVM https://wiki.freepascal.org/LLVM There are other some other attempts around too.
- wirrbel 6y agoYeah, but its not a Wirthian dialect.
- pjmlp 6y agoActually it kind of is. Many seem to be unaware that Object Pascal started at Apple offices, not Borland. Not only that, it was developed by Apple in collaboration with Niklaus Wirth. https://en.wikipedia.org/wiki/Object_Pascal https://en.wikipedia.org/wiki/Object_Pascal
- wirrbel 6y agoIts not at all bad (I learned programming using FreePascal, true story). But its unit system is from UCSD pascal (via TurboPascal, etc). I'd say Wirth has a certain 'signature style' and I don't think that ObjectPascal's additions really match that. Also, IIRC, Modula-2 and Oberon feature GC, etc. and personally while I liked Pascal back then, for most stuff I do, not having a GC is pretty-much a regression.
- pjmlp 6y agoModula-2 doesn't have a GC, it is just like Pascal in that regard. Modula-2+, which was developed by the same group that did Mesa/Cedar, does have GC. However Modula-2+ was short lived and eventually grew into Modula-3, also by the same group of researchers. As for Oberon, while it was a very nice system for 1992, it doesn't make sense in 2021, specially given its limitations for low level programming. There are a couple of ETHZ papers that talk about its GC limitations. From the Oberon linage, Active Oberon is the best one, which adopts the same concepts as Modula-3 for low level control of the GC, with safe pointers under GC control and unsafe ones used for C like tricks like DMA transfers. This kind of language features were already present in Mesa/Cedar, but Wirth didn't want to complicate his Oberon design. So in Oberon you are left with explicit calls to dispose resources or hope that the callbacks registered to the finallizer actually happen to run some day. By the way, there were some Modula-2 extensions that did add support for GC, but I am not aware of any major compiler, specially given Modula-3's existence. https://adtmag.com/articles/2001/11/01/extensions-to-the-modula2-language.aspx https://adtmag.com/articles/2001/11/01/extensions-to-the-mod...
- pjmlp 6y agoGreat news, congratulations on the effort.
- srean 6y agoAn aspect of Modula-2 that I find so interesting is its support for coroutines. Is there any modern and permissibly licensed (GPL, BSD, MIT, Mozilla ...) implementation that has an efficient implementation (low context switch time). I am not looking for anything that rides on pthreads api or library, or anything that maps to OS threads.
- naltun 6y agoFWIW, Mozilla Public License is a weak copy left license that has many benefits of permissive licenses. But it is copyleft.
- pjmlp 6y agoIf you mean bare metal Modula-2, I am afraid it is all gone by now, given its surviving compilers. However what about Ada tasks?
- srean 6y agoThat's rather sad to hear. I presume some of it lives in Go and Nim. Don't know Ada, its tasks, even less.
- pjmlp 6y agoYou can do a round over here, https://freepages.modula2.org/compi.html https://freepages.modula2.org/compi.html As for Ada tasks, https://learn.adacore.com/courses/intro-to-ada/chapters/tasking.html https://learn.adacore.com/courses/intro-to-ada/chapters/task...
- MaxBarraclough 6y agoAs someone who doesn't know Ada very well: Ada 'tasks' look like ordinary threads but with integrated message pumps. Is that about right?
- Jtsummers 6y ago
- denton-scratch 6y agoQ: "Niklaus, how are we to pronounce your surname?" A: "You can call me by name, in which case it is 'Veert'; or you can call me by value, in which case it is 'Worth'." [The sound I intended was 'veert' not 'veerth']
- the_only_law 6y agoOne can tell immediately by this comment that Nicklaus Wirth is a Quiche Eater.
- cafard 6y agoI would have guessed roestli.
- the_only_law 6y agoIt’s a quote from: https://www.ee.ryerson.ca/~elf/hack/realmen.html https://www.ee.ryerson.ca/~elf/hack/realmen.html
- cafard 6y agoI remember the heyday of "real men don't x" from about forty years ago, and of course the term "quiche eater". It bored me then, too.
- neilv 6y agoMy first college-level software engineering courses were in Modula-2, and I think Modula-2 gave me an early kick in the pants towards some good practices. This was shortly before Java introduced large numbers of CS departments to OOP, but some CS departments had been teaching abstract data types (ADTs), modularity, etc. I didn't like the syntactic verbosity of Modula-2, nor the very limited system access in the setup we had, but the emphasis on separating interface and implementation was great. We had school assignments to do weeks/months-long team software development exercises, in which you could only show the other team members your API docs and give them your interface files (not implementation), and the team's application was supposed to come together and work at the end. The project I remember was to build a spreadsheet program in Modula-2, as a team, not being able to look at or change other student's code. Whether you were new to programming, or you'd taught yourself and were programming individually since childhood, this was almost certainly a new discipline to you. I was soon using C professionally, as an intern, and adapted some of that bit of module discipline from Modula-2 to C. While an intern, I recall telling one of the senior engineers/managers that I thought learning Modula-2 improved my abilities as a C programmer, and that everyone would benefit from learning Modula-2. I recall her smiling and lowering her voice while she said quickly, "Don'ttellanyonethat." :) These were some of the better software developers in the industry, working on high-end CPU in-circuit emulation, with integration with workstation network CASE, and I was just an overly-enthusiastic/energetic teen/mascot. And I didn't yet understand how much more they knew about this area, and about other things I had no concept of. But Modula-2 discipline was still a good boost for an aspiring software engineer at the time.