Lazarus

Miscellaneous => Other => Topic started by: symmetria on January 21, 2021, 04:28:57 pm

Title: Pascal and Cousins
Post by: symmetria on January 21, 2021, 04:28:57 pm
Hello to all!

Hopefully, this thread does not violate the spirit of the forum.

My question is simple: "Does anyone know if there is any Oberon (02 or 07 version) compiler targeting the Linux x86_64 platforms?"

Thank you in advance for your help.
Title: Re: Pascal and Cousins
Post by: MarkMLl on January 21, 2021, 04:41:43 pm
Not something that I can immediately answer, but @lproven sent me over this a few days ago

Quote
The Oberon list is getting livelier, I note. Recent discussions have gone, broadly...

So we have the code and the permission... who has repos?
OK... several of you. OK, who's in charge?
Nobody's in charge? So we can do what we want?
OK... I want to try to unify 2 dialects. I'm going to add back the features to this version that were removed.
[Small argument]
So, this will broaden the range of software we can use, and make more code usable. And we almost all agree that's good. Right, I'm doing it then.
[A day or 2 later]
Here's my POC code. Does it look OK?

The pace seems to be picking up just a tiny bit.

Meanwhile pasting chat logs into Google Translate reveals that the Russians are planning to fork it and translate the code, keywords, compilers etc all into Russian.

I don't blame them -- there's been bugger-all interest from the west in decades. It means a fork but it's a small codebase.

MarkMLl
Title: Re: Pascal and Cousins
Post by: PierceNg on January 21, 2021, 04:56:51 pm
Hello to all!

Hopefully, this thread does not violate the spirit of the forum.

My question is simple: "Does anyone know if there is any Oberon (02 or 07 version) compiler targeting the Linux x86_64 platforms?"

Thank you in advance for your help.

I know of the following. All on Github except for obnc.


Title: Re: Pascal and Cousins
Post by: Peter H on January 21, 2021, 04:57:51 pm
There is component Pascal, despite the name, it is Oberon.
http://cp-dev.sourceforge.net/ (http://cp-dev.sourceforge.net/)

Title: Re: Pascal and Cousins
Post by: MarkMLl on January 21, 2021, 05:22:43 pm
There is component Pascal, despite the name, it is Oberon.
http://cp-dev.sourceforge.net/ (http://cp-dev.sourceforge.net/)

https://en.wikipedia.org/wiki/Component_Pascal

MarkMLl
Title: Re: Pascal and Cousins
Post by: Leledumbo on January 25, 2021, 12:12:55 am
There is component Pascal, despite the name, it is Oberon.
http://cp-dev.sourceforge.net/ (http://cp-dev.sourceforge.net/)
It's Oberon-02 compatible, a superset to be exact (and not so much superset either, just a little bit, but hits the important spots right), but isn't Oberon-07 compatible.
Title: Re: Pascal and Cousins
Post by: symmetria on February 01, 2021, 11:20:23 pm
So, just to conclude, is there any Oberon (2 or 7) compiler for the *nix environment ?
Title: Re: Pascal and Cousins
Post by: vfclists on February 01, 2021, 11:43:39 pm
Does Oberon come with garbage collection?

I've been longing for a Pascal type language with garbage collection.

Manual memory management if one of my pet peeves with Object Pascal.
Title: Re: Pascal and Cousins
Post by: Peter H on February 02, 2021, 01:52:35 am
So far I know, OBERON was originallly written to run on an OS written in OBERON and has garbage collection.
It is however tightly coupled to this OS and needs a runtime system, if it runs on windows or other systems and does not produce stand alone programs or link to other languages. When executing it it is like using a virtual (Oberon) Machine, so far I remember it is decoupled from the host OS.

I might be wrong and dont know all flavors. I only tried Component Pascal (which is an OBERON flavor) on windows.
Installing it, I got a lot of anti-virus warnings, but I ignored it ;-) maybe this is owed to the runtime system.
Title: Re: Pascal and Cousins
Post by: PierceNg on February 02, 2021, 06:51:26 am
I've been longing for a Pascal type language with garbage collection.

Does .NET C# count?
Title: Re: Pascal and Cousins
Post by: JuhaManninen on February 02, 2021, 10:39:49 am
I've been longing for a Pascal type language with garbage collection.
Does .NET C# count?
Or Visual Basic .NET ?
I did a project using VB .NET some years ago, at the same time learning it. I liked it more than C#. It is underrated. The same is true with Object Pascal.
Visual Basic .NET differs a lot from the original Basic, just like Object Pascal differs from the original Pascal.

Personally I prefer Object Pascal because it does not have garbage collection.
Garbage collection is overrated. It is yet another way to make programs slower and hog more memory.
As Niklaus Wirth said, "programs become slower faster than computers become faster".
New techniques are invented all the time to make it happen.
Title: Re: Pascal and Cousins
Post by: MarkMLl on February 02, 2021, 11:40:04 am
Personally I prefer Object Pascal because it does not have garbage collection.
Garbage collection is overrated. It is yet another way to make programs slower and hog more memory.

I'm inclined to agree. However reference counting on certain types of variable is a different matter, and its use for strings etc. has generally been proven to be fairly successful.

MarkMLl
Title: Re: Pascal and Cousins
Post by: symmetria on February 02, 2021, 12:15:03 pm
I've been longing for a Pascal type language with garbage collection.

Does .NET C# count?

Many  thanks for your answer.
Title: Re: Pascal and Cousins
Post by: vfclists on February 02, 2021, 04:44:32 pm
I've been longing for a Pascal type language with garbage collection.

Does .NET C# count?

No I prefer to stick to Object Pascal
Title: Re: Pascal and Cousins
Post by: vfclists on February 02, 2021, 06:01:12 pm
Personally I prefer Object Pascal because it does not have garbage collection.
Garbage collection is overrated. It is yet another way to make programs slower and hog more memory.

I'm inclined to agree. However reference counting on certain types of variable is a different matter, and its use for strings etc. has generally been proven to be fairly successful.

MarkMLl

How do you gain the benefits of reference counting on most other types in general, including your own?

Are there any base classes from which any other derived types gain the benefits of reference counting?
Title: Re: Pascal and Cousins
Post by: marcov on February 02, 2021, 06:10:49 pm
do you gain the benefits of reference counting on most other types in general, including your own?

Are there any base classes from which any other derived types gain the benefits of reference counting?

Ref counting is only better than GC for limited use.
Title: Re: Pascal and Cousins
Post by: PascalDragon on February 03, 2021, 09:26:47 am
Are there any base classes from which any other derived types gain the benefits of reference counting?

You need to work with reference counted interfaces (aka {$Interfaces COM} which is the default) and implement its _AddRef and _Release methods correctly. Alternatively (and preferably) you can descend from TInterfacedObject (which does exactly that), but you still need to work only with interface variables as working with the class instance will not trigger the reference counting.
Title: Re: Pascal and Cousins
Post by: JuhaManninen on February 05, 2021, 11:18:02 am
vfclists, manual memory management is easy in vast majority of cases. An object is owned by another object. The owner allocates and frees the memory.
Thinking the ownership structure through may even improve your code's design.

Garbage collection does not solve all memory related problems. Java has CG but there are thick books written about Java memory management. Why so, if GC takes care of it all?
Also GC does not fix uninitialized variables.
IMO garbage collection is overrated. If you however prefer it, fine, there are plenty of choices. All new fancy languages seem to have it.
Object Pascal is a nice compromise without GC, thus less overhead, but reference counted strings which then behave almost like native types (integer and such). Good.
Title: Re: Pascal and Cousins
Post by: MarkMLl on February 14, 2021, 12:49:02 pm
I went Googling yesterday evening to try to find out whether anybody had built a general-purpose OO language on top of ALGOL (other than Simula, obviously) and came across "A comparison of PASCAL and ALGOL 68" by Tanenbaum.

https://research.vu.nl/en/publications/a-comparison-of-pascal-and-algol-68

It's rather a gem, and I'm surprised it's not got wider circulation. However it appears to "read quite a lot into" J&W's definition of the language, for example it asserts that pointers can refer to items on the heap but not to items on the stack.

Perhaps the most interesting thing is that, reading between the lines, it demonstrates that much that we are used to in today's mainstream languages originated /either/ in ALGOL-68 /or/ in Pascal: the concept differed in the two languages, and posterity has selected from one or the other.

MarkMLl

Title: Re: Pascal and Cousins
Post by: lucamar on February 14, 2021, 01:33:34 pm
[...] came across "A comparison of PASCAL and ALGOL 68" by Tanenbaum.

https://research.vu.nl/en/publications/a-comparison-of-pascal-and-algol-68

It's rather a gem, and I'm surprised it's not got wider circulation.

One has always to be careful and remember that this kind of papers refer to the original J&W Pascal but yes, it's quite a gem. Thanks, Mark, I've enjoyed it a lot :)
Title: Re: Pascal and Cousins
Post by: MarkMLl on March 07, 2021, 03:37:48 pm
Here's another interesting paper I've just come across

"The design and implementation of modula for the Burroughs B1700 computer" https://openresearch-repository.anu.edu.au/handle/1885/138340

That's one of very few references I've seen to Modula as distinct from Modula-2, and it highlights a number of interesting points e.g. preemptive processes rather than coroutines and a module structure much like that proposed by Brinch Hansen.

It's also one of few things that looks at the B1700 at a low level. That was an odd system with bit-addressable memory and 1-24 bit operands https://www.vintagecomputer.net/burroughs/B1700/Burroughs_B1700_Front-panel.jpg The hole in that photo should have a cassette (not cartridge) drive in it which was used as an instruction source during boot.

MarkMLl
TinyPortal © 2005-2018