Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

ASHes to ASHes, DOS to DOS.


devel / comp.compilers / What programming languages are simply abstractions on top of another programming language?

SubjectAuthor
* What programming languages are simply abstractions on top of another programmingRoger L Costello
+* Re: What programming languages are simply abstractions on top of another programgah4
|`- What programming languages are simply abstractions on top of another programmingChristopher F Clark
+- Re: What programming languages are simply abstractions on top of another programGeorge Neuner
`- Re: What programming languages are simply abstractions on top of another programKaz Kylheku

1
What programming languages are simply abstractions on top of another programming language?

<22-06-047@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=459&group=comp.compilers#459

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: costello@mitre.org (Roger L Costello)
Newsgroups: comp.compilers
Subject: What programming languages are simply abstractions on top of another programming language?
Date: Sat, 18 Jun 2022 19:42:55 +0000
Organization: Compilers Central
Lines: 13
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-047@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="24846"; mail-complaints-to="abuse@iecc.com"
Keywords: design, macros, comment
Posted-Date: 20 Jun 2022 18:06:43 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
Accept-Language: en-US
Content-Language: en-US
 by: Roger L Costello - Sat, 18 Jun 2022 19:42 UTC

Hi Folks,

I am reading "Software Tools" by Kernighan and Plauger. One of the things that
I've learned is that Ratfor is a simple abstraction on top of Fortran. For
example, Ratfor provides a while loop. The while loop can be mechanically
converted to Fortran if-then and goto statements. Really cool!

That got me to wondering, "What other programming languages are simply
abstractions on top of an existing programming language?"

/Roger
[The infamous m4 macrogenerator is used to build what are in effect new
languages like the sendmail configuration and GNU Autoconf. -John]

Re: What programming languages are simply abstractions on top of another programming language?

<22-06-053@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=462&group=comp.compilers#462

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah4@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: What programming languages are simply abstractions on top of another programming language?
Date: Mon, 20 Jun 2022 15:36:22 -0700 (PDT)
Organization: Compilers Central
Lines: 54
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-053@comp.compilers>
References: <22-06-047@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="84360"; mail-complaints-to="abuse@iecc.com"
Keywords: design, history
Posted-Date: 21 Jun 2022 12:22:41 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <22-06-047@comp.compilers>
 by: gah4 - Mon, 20 Jun 2022 22:36 UTC

On Monday, June 20, 2022 at 3:06:46 PM UTC-7, Roger L Costello wrote:

(snip)
> That got me to wondering, "What other programming languages are simply
> abstractions on top of an existing programming language?"

About the same time as Ratfor, there was MORTRAN, more
specifically MORTRAN2.

https://www.slac.stanford.edu/vault/collvault/greylit/cgtm/CGTM165.pdf

The MORTRAN2 processor is written in ANSI standard Fortran 66,
with the exception of the need to assign and compare character data.
(Yes, Fortran 66 doesn't guarantee that ability.)

The processor works along with a set of macros that implement structured
programming similar to ratfor.

Not so long after MORTRAN2, and from the same group, is STEP which I
recently posted about. The STEP processor can fully parse its input, mostly
so that error messages are generated correctly.

http://www.bitsavers.org/pdf/stanford/slac/The_STEP_Processor.pdf

As well as I know, STEP is also ANSI standard Fortran 66 with the same
requirement.

As more structured programming was added to Fortran, there was less
need to try to improve it with such processors.

The original C++ was a processor, cfront, that would generate C code, that
was then compiled by a C compiler. I believe not so much later, though,
an actual C++ compiler was available. I don't know if cfront is still around.

The TeX text processor has many built-in operations, but much of plain TeX
is implemented in a standard set of macros. Then LaTeX was implemented
with a different, and larger, set of macros. I believe it satisfies you question.

Then there is WEB, the literate programming system D. Knuth used to write
TeX, which mixes the code (in Pascal) and documentation (in TeX) in
one file. One then processes it with Tangle (to get the code), or Weave
(to get documented and supposed to be more readable source code).

I suspect that there were many programs written for a single use, and
not generally released.

And then there are parser generators, a favorite topic of this group,
which read input that describes the grammar to parse, and generates
C or Java, or some other language, code to actually do it.

I will leave out assemblers, including macro assemblers, and programs
to preprocess assembly code, though they might also satisfy the question.

Re: What programming languages are simply abstractions on top of another programming language?

<22-06-059@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=466&group=comp.compilers#466

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gneuner2@comcast.net (George Neuner)
Newsgroups: comp.compilers
Subject: Re: What programming languages are simply abstractions on top of another programming language?
Date: Tue, 21 Jun 2022 15:10:42 -0400
Organization: A noiseless patient Spider
Lines: 17
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-059@comp.compilers>
References: <22-06-047@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="37334"; mail-complaints-to="abuse@iecc.com"
Keywords: macros, Lisp
Posted-Date: 21 Jun 2022 15:50:03 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: George Neuner - Tue, 21 Jun 2022 19:10 UTC

On Sat, 18 Jun 2022 19:42:55 +0000, Roger L Costello
<costello@mitre.org> wrote:

>... "What other programming languages are simply
>abstractions on top of an existing programming language?"

In addition to gah4's excellent list, I would include Lisp in which a
significant fraction is implemented as macros which build on a simpler
version of Lisp. And of course, Lisp's metalanguage is Lisp.

Some amount of Scheme also is macros building on simpler Scheme,
however Scheme's metalanguage is not Scheme but a hybrid that includes
Scheme. How much is implemented using macros depends on the particular
implementation.

YMMV,
George

What programming languages are simply abstractions on top of another programming language?

<22-06-061@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=467&group=comp.compilers#467

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: christopher.f.clark@compiler-resources.com (Christopher F Clark)
Newsgroups: comp.compilers
Subject: What programming languages are simply abstractions on top of another programming language?
Date: Tue, 21 Jun 2022 23:34:45 +0300
Organization: Compilers Central
Lines: 22
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-061@comp.compilers>
References: <22-06-047@comp.compilers> <22-06-053@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="88559"; mail-complaints-to="abuse@iecc.com"
Keywords: design, macros
Posted-Date: 21 Jun 2022 19:23:00 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Christopher F Clark - Tue, 21 Jun 2022 20:34 UTC

There are more than a few languages which compile to the JVM (Java Virtual
Machine).

Lombok for Java, presuming you consider it a language fits that example.

My impression is that Kotlin is an evolution of that.
Scala is another possible example.
I'm sure there are more.

The lisp/scheme people do that quite often with "hygenic macros" and the
"Racket" (or "Dr Racket") parser generator is built using that idea.

--
******************************************************************************

Chris Clark email:
christopher.f.clark@compiler-resources.com
Compiler Resources, Inc. Web Site: http://world.std.com/~compres
23 Bailey Rd voice: (508) 435-5016
Berlin, MA 01503 USA twitter: @intel_chris
------------------------------------------------------------------------------

Re: What programming languages are simply abstractions on top of another programming language?

<22-06-067@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=472&group=comp.compilers#472

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: 480-992-1380@kylheku.com (Kaz Kylheku)
Newsgroups: comp.compilers
Subject: Re: What programming languages are simply abstractions on top of another programming language?
Date: Wed, 22 Jun 2022 01:31:41 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 48
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-067@comp.compilers>
References: <22-06-047@comp.compilers>
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="24906"; mail-complaints-to="abuse@iecc.com"
Keywords: macros
Posted-Date: 21 Jun 2022 21:48:57 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Kaz Kylheku - Wed, 22 Jun 2022 01:31 UTC

On 2022-06-18, Roger L Costello <costello@mitre.org> wrote:
> Hi Folks,
>
> I am reading "Software Tools" by Kernighan and Plauger. One of the things that
> I've learned is that Ratfor is a simple abstraction on top of Fortran. For
> example, Ratfor provides a while loop. The while loop can be mechanically
> converted to Fortran if-then and goto statements. Really cool!
>
> That got me to wondering, "What other programming languages are simply
> abstractions on top of an existing programming language?"

In the Ratfor spirit, in April 2022, I introduced a new one: cppawk.

https://www.kylheku.com/cgit/cppawk/about/

Using the GNU C preprocessor, with C99 semantics, I managed to build,
for instance, a loop macro that supports multiple clauses that
combine for parallel or nested (cross product) iteration.

Not only are there some userful predefined clauses, but they
are user-definable.

Even the Common Lisp LOOP macro deosn't have user-definable clauses.
I made it possible in five #define statements.

"LOL"

:)

There is a "Mock Lisp" data abstraction layer as well: cons cells
are represented and such. Lists can be passed around and mapped
over (if you have GNU Awk, which has indirect functions).

cppawk provides a case statement which "compiles" either to
a GNU Awk switch (nonstandard extension) or else portable
constructs that work in other Awks.

> /Roger
> [The infamous m4 macrogenerator is used to build what are in effect new
> languages like the sendmail configuration and GNU Autoconf. -John]

GNU m4 underlies the Bison implementation: it's what glues together
the parser skeleton templates with the grammar tables and whatnot
to produce the output.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor