-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

Comment by ๐Ÿš€ eddos


Re: "Why did Wirth's languages never see widespread adoption..."

In: s/pascal


Yes, I think rust is suffering quite a bit from all the corporate influence it's getting. It's being pushed everywhere (even into Linux!) despite all its problems.


Arguably the reason why C was so successful was because it had AT&T backing it.


Yes, a language need not be commercially successful for it to be a good language.


Yeah, C's header system is a bit of a pain. Pascal's units are so much nicer to work with in comparison.


Your reply has sparked my interest in Modula and oberon, so to end off what are the modula and oberon compilers you use? I haven't really found any "good" ones yet. For Modula I've found a gcc backend for Modula-2, but it's sub-par to say the least.


๐Ÿš€ eddos [OP]

Apr 26 ยท 4 weeks ago


17 Later Comments โ†“


๐Ÿ™ norayr [mod] ยท Apr 26 at 10:18:

i think when wirth talks about pascal, he refers to his version, which doesn't have modules.


and i think if you want more consistent pascal like solution, that would be modula-3. btw, it's not created by wirth, but still very talented team.


and you won't have much code or library for it, as you have for pascal.


๐Ÿ€ gritty ยท Apr 26 at 11:29:

comments here from a hobbyist.


I found Pascal, here, in this subspace. I'd heard of it but never considered it. I stuck to Python because the little time I have to code I didn't want to waste learning something new.


But, I gave it a shot while I had time on a business trip and I really like it, quite especially for my little projects here in gemini. I stayed away from lazarus for a while and just used Vim but eventually tried it out and I like it.


The good and bad, for me, about Pascal is that there aren't 1 million websites that have solved every problem for me. With python I just do a search for my problem and get an answer - with free pascal I'm digging through the official documentation because I can't find a forum that has solved what I need.


I find this to be a good thing since I learn more of the language, however, the freepascal wiki, while extensive, could be better, but I'll take it.


So, for me, I use it because it's fun and it suits my use cases here in gemini.


๐Ÿ™ norayr [mod] ยท Apr 26 at 20:52:

i never liked this '\n' and printf because we pay for it with preprocessors (c requires cpp preprocessor), defines, macros, and complex compilers.


i like so much the oberon way:


Out.String(str); Out.Ln;

and yes, i/o is not in the language like in pascal.


on the other hand, pascal strings are very convenient to work with.


๐Ÿ™ norayr [mod] ยท Apr 26 at 21:07:

first of all, i want to ask you all to excuse me, i was under pressure recent days, and was only able to enter bbs at night, exhausted, and i didn't have much time and strength to write and form responses in a way i like.


let's say i dislike my 'no', if i had more strength, i would express the same some other way.


๐Ÿ™ norayr [mod] ยท Apr 26 at 21:12:

>Your reply has sparked my interest in Modula and oberon, so to end off what are the modula and oberon compilers you use? I haven't really found any "good" ones yet. For Modula I've found a gcc backend for Modula-2, but it's sub-par to say the least.


i sincerely don't know what to suggest for m2.


for m3 i know - cm3.

โ€” cm3 github

โ€” modula-3 language definition.


๐Ÿ™ norayr [mod] ยท Apr 26 at 21:18:

for oberon, i am biased. i have my project i work on since long ago.


โ€” vishap oberon compiler.


we also have a working, though rudimentary package manager. it is able to build some projects:


โ€” vipack package manager


in order to build

โ€” my irc_bot

with it one needs to type:

vipack -p irc_bot -P /tmp/irc_test

it will download dependencies and build irc_bot in /tmp/irc_test.


โ€” this is sort of our ports tree.


rudimentary, poor, but it is what it is.


๐Ÿ™ norayr [mod] ยท Apr 26 at 21:23:

some people try to write in oberon:


โ€” hash map in oberon.


โ€” simple snake game written with raylib in oberon.


as you have noticed voc compiles to see, it is a fork of ofront, which was inherited from op2, classical compiler from eth system.


it means it produces very readable, but c code. libc is a dependency, c compiler too. but the generated c code is safe, and there is a good runtime.


it is portable this way. if it was part of gcc, recompiling gcc takes lots of time, recompiling our compiler - 5 seconds, if compiler only.


we can use gcc, clang, tcc, msvc underneath. i used cc65 with it


๐Ÿ™ norayr [mod] ยท Apr 26 at 21:26:

in 2007-8 i have been written a x86 asm backend for the newest (back then) wirth's oberon-07 compiler. then binutils' linker was used to link the resulting executable. i wanted to develop it further and turn it to what vishap became, but there were licensing issues.


it was inspired of fpc, generated very small statically linked binaries, 0.7 kb was the minimal size. only dependent on two kernel calls: mmap and exit.


but anyway, it's not in the shape to use as voc. voc is what is practically useful.


๐Ÿ™ norayr [mod] ยท Apr 26 at 21:29:

for some time i was fan of oo2c. it is still available for downloads on sourceforge, it also translates to c, but to asm like unreadable c. it has generics though. it has very nice adt library.


no oberon compiler has lots of libraries and code available like pascal.


so in order to write that irc bot, first i made a wrapper for unix sockets, then implemented some part of irc protocol, then only the bot logic.


for vipack i had to implement base64, http protocol's part (only GET, but for both cases, when content-length is known or not), then i made a wrapper for mbedtls, then i inherited from my http class, and changed methods read, write, connect, disconnect to use tls versions.


๐Ÿ‘ฝ TKurtBond ยท Apr 26 at 22:06:

I've enjoyed using the vishap oberon compile on occasion. Thanks for making it available! I found out about the package manager by reading this thread, and I'm quite interested!


๐Ÿ‘ฝ TKurtBond ยท Apr 26 at 22:10:

I really found Writh's Oberon very inspirational, both the programming language and the operating system. The book "Project Oberon: Design of an Operating System and Compiler" is very impressive. I also particularly liked Oberon-2. The fact that Wirth made his later developoments in Oberon the language and the operating system and the book available on the Internet is also very inspiring. I wish they were a little more accessable, though.


๐Ÿ‘ฝ TKurtBond ยท Apr 26 at 22:11:

I also like Modula-3, and wish it was more accessible as well.


๐Ÿš€ eddos [OP] ยท Apr 28 at 07:17:

> The good and bad, for me, about Pascal is that there aren't 1 million websites that have solved every problem for me. With python I just do a search f or my problem and get an answer


I think that's a quality of python itself, due to how popular it is. I've found that most other languages don't have this either, so it might not be a thing with pascal.


> i never liked this '\n' and printf because we pay for it with preprocessor

s (c requires cpp preprocessor), defines, macros, and complex compilers.


I never thought of it this way. But I don't know if a simple \n needs a pre-processor, though.


๐Ÿš€ eddos [OP] ยท Apr 28 at 07:19:

> for m3 i know - cm3.


Thanks, I'll check it out.


> for oberon, i am biased. i have my project i work on since long ago.


Honestly, this is really impressive. VOC looks very mature. The package manager is very cool too.


> it means it produces very readable, but c code. libc is a dependency, c compiler too. but the generated c code is safe, and there is a good runtime.


Really? How do you ensure the safety of the C code? And how is the mapping from oberon to C?


> so in order to write that irc bot, first i made a wrapper for unix sockets, then implemented some part of irc protocol, then only the bot logic.


๐Ÿš€ eddos [OP] ยท Apr 28 at 07:20:

That doesn't sound so bad. I know you usually wouldn't need to do the first two steps but after you're done, you could use the protocol implementation for other projects. They're always there.


๐Ÿ™ norayr [mod] ยท Apr 29 at 02:32:

on safety of c code: it is a generated c code. likewise writing in assembly is not safe but assembly generated from oberon or ada is safe. (:


another addition is this example: oberon arrays always have size. even if you expect in the function


VAR str: ARRAY OF CHAR

when you get str, you know the size. we pass the size as an additional argument, it is visible in c code, but hidden in oberon.


oberon compiler which produces machine code would send an oberon string which is actually a struct with one field for size. well voc also keeps arrays as structs with one field for length.


๐Ÿ™ norayr [mod] ยท Apr 29 at 02:40:

TKurtBond, on package manager, my dream is to be able to


have lots of 'ports' that can download even this or that forgotten software from this or that university website, patch it, build it and make it available. it is possible, i need to work on it, but of course everybody is invited.


vipack is designed to work under oberon os. for example its internal interfaces don't know about directories. there is a linux backend which opens the file and returns the descriptor, but nothing in main modules that knows about directories. it tells a function to retrieve lets say this json from the storage, and the storage is abstracted. so i hope i will be able to integrate it with oberon os.


Original Post


๐ŸŒ’ s/pascal

Why did Wirth's languages never see widespread adoption besides Pascal? Even Pascal is not used much nowadays outside of Delphi and Lazarus. I tried Pascal myself and I found it to be a nice language structurally, but I also found it to be missing basic features that relate to writing the language itself (example: not being able to insert newlines into strings like you would do in C via '\n'). I also don't like how much "modern" Pascal is centered around just 2 compilers: FreePascal and...

๐Ÿ’ฌ eddos ยท 43 comments ยท Apr 25 ยท 4 weeks ago

-- Response ended

-- Page fetched on Mon May 20 18:38:19 2024