From ff0865870036fa767a041169cfd90243c52ec03b Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 31 Aug 2020 21:00:29 -0400 Subject: Headers make the block-scanning requirement more nuanced --- docs/problems.html | 4 ++-- problems.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/problems.html b/docs/problems.html index 9469d9dd..2d9d1981 100644 --- a/docs/problems.html +++ b/docs/problems.html @@ -80,8 +80,8 @@

This is an issue with any lexically-scoped language; it's unlikely BQN can solve it. On the other hand, I'm surprised I've never seen any discussion of such a universal issue.

Rank/Depth negative zero

A positive operand to Rank indicates the cell rank, so positive zero means to act on 0-cells. A negative operand indicates the frame length, so negative zero should act on the entire array. But it can't because it's equal to positive zero. Similar issue with Depth. Positive/negative is not really the right way to encode the frame/cell distinction, but it's convenient. Fortunately ∞ can be used in place of negative zero, but there can still be problems if the rank is computed.

-

Must read the body to find explicit definition's type

-

You have to scan for headers or double-struck names (and so does a compiler). A little inelegant, and difficult to describe in BNF.

+

Must read the body to find headerless block's type

+

You have to scan for headers or double-struck names (and so does a compiler). A little inelegant, and difficult to describe in BNF. This can usually be fixed by adding a block header, except in the case of immediate modifiers: even an immediate modifier with a header can be made into a deferred modifier by adding a special name like 𝕨.

Each block body has its own label

In a block with multiple bodies, the label (the self-name part of the header) refers to the entire block. However, there's no way to give only one label to the entire block. If you want to consistently use the same internal name, then you may have to write it many times. It's also a weird mismatch, conceptually.

Monadic argument corresponds to left for / and

diff --git a/problems.md b/problems.md index 34f7de67..6abe62ee 100644 --- a/problems.md +++ b/problems.md @@ -96,8 +96,8 @@ This is an issue with any lexically-scoped language; it's unlikely BQN can solve ### Rank/Depth negative zero A positive operand to Rank indicates the cell rank, so positive zero means to act on 0-cells. A negative operand indicates the frame length, so negative zero should act on the entire array. But it can't because it's equal to positive zero. Similar issue with Depth. Positive/negative is not really the right way to encode the frame/cell distinction, but it's convenient. Fortunately ∞ can be used in place of negative zero, but there can still be problems if the rank is computed. -### Must read the body to find explicit definition's type -You have to scan for headers or double-struck names (and so does a compiler). A little inelegant, and difficult to describe in BNF. +### Must read the body to find headerless block's type +You have to scan for headers or double-struck names (and so does a compiler). A little inelegant, and difficult to describe in BNF. This can usually be fixed by adding a block header, except in the case of immediate modifiers: even an immediate modifier with a header can be made into a deferred modifier by adding a special name like `𝕨`. ### Each block body has its own label In a block with multiple bodies, the label (the self-name part of the header) refers to the entire block. However, there's no way to give only one label to the entire block. If you want to consistently use the same internal name, then you may have to write it many times. It's also a weird mismatch, conceptually. -- cgit v1.2.3