Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135619
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth, comp.lang.postscript |
| Subject | Re: Postscript in 4tH |
| Date | 2026-09-09 06:42 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2026Sep9.084205@mips.complang.tuwien.ac.at> (permalink) |
| References | <117hl2n$1ne4b$1@dont-email.me> <871pb7l36f.fsf@nightsong.com> <nnd$47db062e$781955bb@280ad1e4adf8c230> <875x0gib1k.fsf@debian> <117prfv$gq7e$3@dont-email.me> |
Cross-posted to 2 groups.
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
>Lisp needs macros, because it also has
>"special forms" for syntactic constructs that implement things like
>control constructs, declarations etc. PostScript doesn’t have "special
>forms", since all these concepts are implemented as built-in
>functions. Which is also why it doesn’t need macros.
You cannot get around this kind of stuff. Postscript has a subparser
for executable arrays ({ ... }) that behaves completely differently
from the regular parser that is also used to build literal arrays ([
... ]). Forth has interpret state and compile state. The regular
Postscript parser can be considered to be similar to interpret state
(operators are executed), while the parser for executable arrays is
similar to compile state (operators become part of the array).
In Lisp, if you have a function like +, it's operands are evaluated
and then passed to the function (comparable to interpret state),
whereas a special form like defun (or whatever it's name is in your
dialect of Lisp), the components are not evaluated by the REPL, but
passed uninterpreted to the special form.
>Also, Forth never heard of homoiconicity ...
The traditional indirect-threaded-code implememtations can be
considered homoiconic, and I wrote a word in the 1980s that made use
of this property to show a call graph of Forth words. Also,
decompilers made use of this property.
When Forth implementations became more advanced and switched to native
code, some (commercial) implementations abandoned that feature (paying
custormers pay to have the Forth vendor work on the innards, or at
least that's what the vendor's think; presentations by Nick Nelson,
one of the paying customers, make me think differently), while others
still have similar stuff as an intermediate representation that is
used for inlining and sometimes decompilation; one commercial
implementation probably also has an intermediate representation for
inlining, but I have not seen it using it for decompilation.
These days, one could consider the sequence of translations (in the
sense of the recognizer proposal
<https://forth-standard.org/proposals/recognizer-committee-proposal-2025-09-11?hideDiff#reply-1686>)
of a Forth program to be the homoiconic representation, except for one
problem: translations may parse, and the translation returned from
REC-STRING often does parse.
However, after the translation, we do not have a central point for
collecting the data; one might consider the sequence of calls made by
the translations to EXECUTE COMPILE, LITERAL SLITERAL etc. (combined
with their arguments) to be a homoiconic representation, but the
question is where the "etc." above stops.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Postscript in 4tH Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-05 19:55 +0200
Re: Postscript in 4tH Paul Rubin <no.email@nospam.invalid> - 2026-09-05 15:54 -0700
Re: Postscript in 4tH albert@spenarnc.xs4all.nl - 2026-09-06 11:08 +0200
Re: Postscript in 4tH Paul Rubin <no.email@nospam.invalid> - 2026-09-07 09:24 -0700
Re: Postscript in 4tH albert@spenarnc.xs4all.nl - 2026-09-07 23:47 +0200
Re: Postscript in 4tH Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-08 02:09 -0300
Re: Postscript in 4tH Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-08 20:34 +0000
Re: Postscript in 4tH Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-08 22:38 -0300
Re: Postscript in 4tH Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-09 03:05 +0000
XML in Pythong (was: Re: Postscript in 4tH) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-09 15:00 +0800
Re: Postscript in 4tH Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-10 01:06 -0300
Re: Postscript in 4tH Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-10 07:38 +0000
Re: Postscript in 4tH Peter Flass <Peter@Iron-Spring.com> - 2026-09-10 07:39 -0700
Re: Postscript in 4tH antispam@fricas.org (Waldek Hebisch) - 2026-09-15 16:04 +0000
Re: Postscript in 4tH Paul Rubin <no.email@nospam.invalid> - 2026-09-15 09:24 -0700
Re: Postscript in 4tH Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-09 15:15 +0800
Re: Postscript in 4tH Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-10 01:11 -0300
Re: Postscript in 4tH anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-09-09 07:35 +0000
Re: Postscript in 4tH Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-09 08:10 +0000
Re: Postscript in 4tH Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-10 17:58 +0200
Re: Postscript in 4tH Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-10 01:44 -0300
Re: Postscript in 4tH Paul Rubin <no.email@nospam.invalid> - 2026-09-09 03:01 -0700
Re: Postscript in 4tH albert@spenarnc.xs4all.nl - 2026-09-09 14:05 +0200
Re: Postscript in 4tH anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-09-09 06:42 +0000
Re: Postscript in 4tH Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-09 08:28 +0000
Re: Postscript in 4tH anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-09-09 10:03 +0000
Re: Postscript in 4tH Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-09 22:17 +0000
Re: Postscript in 4tH albert@spenarnc.xs4all.nl - 2026-09-09 14:42 +0200
Re: Postscript in 4tH antispam@fricas.org (Waldek Hebisch) - 2026-09-09 19:17 +0000
Re: Postscript in 4tH albert@spenarnc.xs4all.nl - 2026-09-10 12:22 +0200
Re: Postscript in 4tH Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-09 21:54 +0000
Re: Postscript in 4tH Paul Rubin <no.email@nospam.invalid> - 2026-09-09 22:14 -0700
Re: Postscript in 4tH albert@spenarnc.xs4all.nl - 2026-09-10 12:30 +0200
Re: Postscript in 4tH albert@spenarnc.xs4all.nl - 2026-09-09 14:36 +0200
Re: Postscript in 4tH Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-06 14:27 +0200
Re: Postscript in 4tH Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-08 17:18 +0200
csiph-web