From: "John R Levine" <johnl@taugh.com>
To: "Bakul Shah" <bakul@iitbombay.org>
Cc: tuhs@tuhs.org
Subject: [TUHS] Re: uphill both ways, was Re: What would early alternatives to C have been?
Date: 11 Mar 2025 16:11:52 -0400 [thread overview]
Message-ID: <5b269f9a-7241-f149-8910-ab576d147854@taugh.com> (raw)
In-Reply-To: <00F9A32D-C233-4458-B2D4-E0994C5EAC9F@iitbombay.org>
On Tue, 11 Mar 2025, Bakul Shah wrote:
>> I think my compiler was the only one that worked, and it was pretty clever,
>> turning the APL array expressions into structures with array boundaries and
>> example expressions, with no array temporaries. It only generated the loops to
>> evaluate the expressions when storing into another array.
>>
>> Someone got a PhD in 1978 for a similar compiling technique but in 1971 I was a
>> 17 year old twerp so what did I know?
>>
>> R's,
>> John
>
> Pretty impressive for a 17yo!
>
> Isn’t APL syntax rather context sensitive[1]? Neither yacc nor
> a RD parser would’ve helped! Unless the subset was limited to a
> context free subset.
APL at the time had a very simple syntax, once you got past all the
special characters. I wrote my compiler on a PDP-10 with ASCII terminals
so I just used keywords like IOTA.
> Tim Budd in his 1978 work made quite a few changes to APL to
> ease compilation and used yacc. [I have the book somewhere....]
There's a copy at the Internet Archive. He and I were at Yale at the same
time and we knew each other a little, but neither of us was aware that
we'd come up with such similar techniques.
> Given an expression ‘x y z’, its parse depends on the types of
> x, y & z. Example: y(x,z) if y is a dyadic verb, x & z are values,
> x(y(z)) if x & y are monadic verbs, z a value etc.
You do need to know whether a symbol is a variable or some kind of
function, but that's not hard.
Regards,
John Levine, johnl@taugh.com, Taughannock Networks, Trumansburg NY
Please consider the environment before reading this e-mail. https://jl.ly
next prev parent reply other threads:[~2025-03-11 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 19:24 Bakul Shah via TUHS
2025-03-11 20:11 ` John R Levine [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-10 2:03 [TUHS] " Douglas McIlroy
2025-03-10 2:28 ` Charles H. Sauer
2025-03-11 2:26 ` [TUHS] Re: uphill both ways, was " John Levine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b269f9a-7241-f149-8910-ab576d147854@taugh.com \
--to=johnl@taugh.com \
--cc=bakul@iitbombay.org \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).