From 776bdd6ec954a123b22df1f4de06bdd6c3edd18c Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 5 Feb 2022 18:00:29 -0500 Subject: Doing TAO comparisons gets easier with Enlist --- docs/commentary/problems.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/commentary') diff --git a/docs/commentary/problems.html b/docs/commentary/problems.html index 4199ddaa..f444638a 100644 --- a/docs/commentary/problems.html +++ b/docs/commentary/problems.html @@ -28,8 +28,6 @@

This includes index-of-last, and searching starting at a particular index, when the desired result indices are to the array to be seached before it is modified. Given indices i into an array ๐•จ (for example โŒฝโ†•โ‰ ๐•จ or a+โ†•b), this section can be searched with (iโˆพโ‰ ๐•จ)โŠหœ(iโŠ๐•จ)โА๐•ฉ. But this is clunky and difficult for the implementation to optimize.

Subtraction, division, and span are backwards

The left argument feels much more like the primary one in these cases (indeed, this matches the typical left-to-right ordering of binary operators in mathematics). The commonly-paired โŒŠโˆ˜รท and | have opposite orders for this reason. Not really fixable; too much precedent.

-

Can't access array ordering directly

-

Only โ‹โ’ use array ordering rather than just array equality or numeric ordering. Getting at the actual ordering to just compare two arrays is more difficult than it should be (but not that difficult: โฅŠโŠธโ‹โŒพ< is TAO โ‰ค).

Nothing (ยท) interacts strangely with Before and After

Since ๐•จFโŠธG๐•ฉ is (F๐•จ)G๐•ฉ and ๐•จFโŸœG๐•ฉ is ๐•จF G๐•ฉ in the dyadic case, we might expect these to devolve to G๐•ฉ and F G๐•ฉ when ๐•จ is not present. Not so: instead ๐•ฉ is substituted for the missing ๐•จ. And Before and After are also the main places where a programmer might try to use ๐•จ as an operand, which doesn't work either (the right way is the train ๐•จFโŠข). It's also a little strange that v Fหœยท is ยท, while ยทF v is F v.

No access to fast high-precision sum

@@ -51,6 +49,8 @@

APL has it and BQN doesn't; after some experience it seems this causes few problems, and the extra effort required for the algorithms that do need it is negligible (anyway, it's better to be aware when your code relies on imprecise equality). APL and J also tolerate inexact indices and lengths, which is also something that could be supported.

Index Of privileges the first match

It could be more sound to look at all matches, but using just the first one is too convenient. J has an index-of-last function; in BQN you have to reverse the left argument and then do arithmetic: โ‰ โˆ˜โŠฃ-1+โŒฝโŠธโА.

+

Can't access array ordering directly

+

Only โ‹โ’ use array ordering rather than just array equality or numeric ordering. Getting at the actual ordering to just compare two arrays is not hard but also not obvious: โ‹โŒพโ‹ˆ is TAO โ‰ค.

Glyphs that aren't great

Blanket issue for unintuitive glyphs. Currently I find โฅŠโŠโŠ‘โАโŠ’โทโผโމโš‡ to not be particularly good fits for what they describe.

Can't mix define and modify in multiple assignment

-- cgit v1.2.3