Neither QL nor FORTH

Tell us about your other hobbies & none QL related items here :)
User avatar
polka
Over Heated PSU
Posts: 144
Joined: Mon Mar 07, 2011 11:43 am

Neither QL nor FORTH

Postby polka » Tue Jul 21, 2020 3:28 pm

Hi all !
This is not about FORTH nor about QL. As I got back from my Alp confinement, I could play again with my other (old ) computers here, especially two of them still under Windows XP.

There, I used other development tools since the early 90's, which I found as interesting as FORTH. Niklaus Wirth gave birth successively to ALGOL 60, PASCAL, MODULA, and after that to a serie of "frameworks" : OBERON, OBERON-2, OBERON-3 and finally "Component Pascal".

I played a lot with Oberon and Oberon-2 and here I show how I ported my FORTH perspective algorithms to an "auto-stereography" program under Oberon-2 ; auto-stereographic images let see 3D shapes emerging from random dots or periodic pavements.

Herewith, an auto-stereoscopic bitmap of my 3D avion,
Avion.zip
AVION auto-stereogram
(92.04 KiB) Downloaded 21 times

and a doc explaining the modular strucure of the program.
Stereogram2.zip
modules of STEREOGRAM
(373.14 KiB) Downloaded 11 times

For those eventually interested, Oberon is a rather specific framework*, that you will have to install first to be able to download and use source files (and it has also a very specific "print" resource delivering only "postscript" files : Adobe before PDF ! ).

* because it's kind of a full screen emulation of the CERES workstation, hardware developped at ETHZ especially for it.
Oberon2.zip
CERES emulation
(15.73 KiB) Downloaded 13 times

POLKa_


May the FORTH be with you !
POLKa
stevepoole
Gold Card
Posts: 309
Joined: Mon Nov 24, 2014 2:03 pm

Re: Neither QL nor FORTH

Postby stevepoole » Wed Jul 22, 2020 5:45 am

Hi Polka,

What is 'Component Pascal', and how does it differ from Pascal ?

Steve.


User avatar
polka
Over Heated PSU
Posts: 144
Joined: Mon Mar 07, 2011 11:43 am

Re: Neither QL nor FORTH

Postby polka » Wed Jul 22, 2020 8:22 am

Component Pascal is the last langage of the lineage of Niklaus Wirth (starting with ALGOL).

Start looking here : http://blackboxframework.org/index.php?cID=home,en-us

Component Pascal is a general-purpose language in the tradition of Pascal, Modula-2, and Oberon. Its most important features are block structure, modularity, separate compilation, static typing with strong type checking (also across module boundaries), type extension with methods, dynamic loading of modules, and garbage collection.
Type extension makes Component Pascal an object-oriented language. An object is a variable of an abstract data type consisting of private data (its state) and procedures that operate on this data. Abstract data types are declared as extensible records. Component Pascal covers most terms of object-oriented languages by the established vocabulary of imperative languages in order to minimize the number of notions for similar concepts.

It is the langage of a framework called "Black Box" very similar in its spirit to JAVA.

Component Pascal is to Pascal what Java is to C and C++: a modern and safe next-generation language that combines the flexibility of dynamic languages with the robustness of static languages. Like Java, it builds on decades of experience, and makes reuse of existing skills easy. Like Java, it supports component software much better than its predecessors. Compared to Java, it is easier to learn and allows to produce more efficient code.

The most obvious difference is the "look and feel" of the two languages. Component Pascal is syntactically clearly in the Pascal family, while Java is in the C family. But this is a relatively superficial difference.

Concerning the more important "design for safety", Java and Component Pascal are closely related, while C and even original Pascal (e.g., untagged variant records) are comparatively unsafe. Among other things, safety also implies automatic garbage collection. Garbage collection is necessary to avoid memory leaks and, more importantly, dangling pointers. Both Java and Component Pascal support the dynamic loading of code and metaprogramming (reflection). As a result, both languages can use virtually the same run-time system. This is proven by the real-time operating system JBed (http://www.jbed.com/) and a Component Pascal compiler that produces standard Java byte code class files. Note that C or C++ could not be translated into Java byte code, due to their inherent lack of safety. In this fundamental respect, Component Pascal and Java are closer than Java is to C++!

I could not say better !

POLKa


May the FORTH be with you !
POLKa
User avatar
polka
Over Heated PSU
Posts: 144
Joined: Mon Mar 07, 2011 11:43 am

Re: Neither QL nor FORTH

Postby polka » Wed Jul 22, 2020 2:05 pm

Here a little program to show what a Component Pascal source looks like :

Racine.zip
source and graphic interface of Racine
(144.63 KiB) Downloaded 15 times

This program demonstrate the square root operation (algorithm) formerly taught at school ; the zip file contains the Component Pascal source and a picture of the graphic interface, that a Black Box tool let compose and associate to some procedures (those exported : marqued with a * and without parameters -> commands in the Oberon parlance).
POLKa


May the FORTH be with you !
POLKa
User avatar
NormanDunbar
Forum Moderator
Posts: 1089
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Neither QL nor FORTH

Postby NormanDunbar » Wed Jul 22, 2020 2:43 pm

I had a quick look at Component Pascal. It seems to be like Borland Delphi? I'm assuming the name, Component, is because you can build forms by dropping components onto it a la Visual Basic/Delphi etc. I used to like Borland Delphi but now I'm permanently on Linux, I don;t do much Pascal programming. I could install Lazarus and Free Pascal, I suppose. I tend to use Qt or occasionally, wxWidgets these days.

CP looks to be Windows 32 bit only as well, according to BlackBox Framework's web site.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals - https://www.amazon.co.uk/Arduino-Softwa ... 1484257898, https://www.apress.com/gb/book/9781484257890
User avatar
polka
Over Heated PSU
Posts: 144
Joined: Mon Mar 07, 2011 11:43 am

Re: Neither QL nor FORTH

Postby polka » Thu Jul 30, 2020 2:35 pm

Actually, the Oberon kind of Pascal was the langage used for developping the runtime/framework environment (and applications) for CERES, a graphic workstation that was designed (in 1985!) at ETHZ by a team led by Niklaus Wirth for educationnal purposes. Shortly after that, this framework was ported on PCs under DOS2/Windows 3.1. In this form, it is a kind of full screen emulation of a CERES workstation, a bit like Qemulator is an emulation of the QL. But the langage itself cannot be said 32 bit, it has basic types some of which can be 64 bits (depending of the target machines of the emulation - because there were also several other targets).

And Component Pascal, which is actually a slight evolution of Oberon was also ported on a big lot of other hardware : to be noted, a real time framework called Jbed, that could use Component Pascal and Java to produce Java Byte Code for any platform hosting a JVM ; and the applications would be "real time" not in the sense of "preemption & priority manipulations" but in the sense of "earliest deadline first" - much more convenient when a lot of "objects" are fighting for computing resources.

POLKa


May the FORTH be with you !
POLKa

Who is online

Users browsing this forum: No registered users and 1 guest