From a25cb2b0bf26033c9bc778d816618a752d015d99 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 5 Jul 2022 16:46:42 -0400 Subject: Somehow, all the docs have now been edited --- docs/doc/fromDyalog.html | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'docs/doc/fromDyalog.html') diff --git a/docs/doc/fromDyalog.html b/docs/doc/fromDyalog.html index ea036ec9..1e36dada 100644 --- a/docs/doc/fromDyalog.html +++ b/docs/doc/fromDyalog.html @@ -35,8 +35,7 @@ -

BQN shares the terms "cell" and "major cell" with Dyalog, and uses -"element" (which may mean different things to different Dyalog users) not for a 0-cell but for the value it contains.

+

BQN shares the terms "cell" and "major cell" with Dyalog, and uses "element" (which may mean different things to different Dyalog users) not for a 0-cell but for the value it contains.

Roles

Dyalog uses value types (array, function, and so on) to determine syntax while BQN uses a separate concept called syntactic roles. See context-free grammar.

@@ -71,7 +70,7 @@

Syntax

BQN comments are written with #, not . BQN strings use double quotes "" while single quotes '' enclose a character.

-

BQN's functions use {}, like Dyalog's dfns. The names for inputs and self-reference are different:

+

BQN's block functions use {}, like Dyalog's dfns. The names for inputs and self-reference are different:

@@ -106,11 +105,11 @@
-

BQN doesn't have guards: it uses modifiers or control structures instead. However, BQN function and modifier blocks have headers that allow pattern matching. See the block documentation.

+

Blocks don't have guards exactly, but headers and predicates support some similar functionality (first-class functions can also be used for control structures). Headers can also be used to make a block more explicit about its inputs, more like a tradfn.

The assignment arrow defines a new variable in a block, while modifies an existing one.

-

BQN uses the ligature character for stranding, instead of plain juxtaposition. It also has a list notation using ⟨⟩.

+

BQN uses the ligature character for stranding, instead of plain juxtaposition. It also has a list notation using ⟨⟩, and [] for higher-rank arrays.

For reading

-

Here are some closest equivalents in Dyalog APL for the BQN functions that don't use the same glyphs as APL. Correspondence can be approximate, and is just used as a decorator to mean "reverse some things".

+

Here are some closest equivalents in Dyalog APL for the BQN functions that don't use the same glyphs. Correspondence can be approximate, and is just used as a decorator to mean "reverse some things".

@@ -265,16 +264,34 @@ - + - +
¨ . A ⍤f
-

In BQN is Rank and is Atop. Dyalog's Atop () and Over () were added in version 18.0.

+

Some other BQN modifiers have been proposed as future Dyalog extensions:

+ + + + + + + + + + + + + + + + + +
BQN
Dyalog proposed Under Depth Reverse Compose

For writing

The tables below give approximate implementations of Dyalog primitives for the ones that aren't the same. First- and last-axis pairs are also mostly omitted. BQN just has the first-axis form, and you can get the last-axis form with 1.

The form FG (Power with a function right operand; Power limit) must be implemented with recursion instead of primitives because it performs unbounded iteration. The modifier _while_ {𝔽𝔾𝔽_𝕣_𝔾𝔽𝔾𝕩} provides similar functionality without risk of stack overflow. It's discussed here and called as Fn _while_ Cond arg.

@@ -283,7 +300,7 @@ Glyph Monadic Dyadic * - ! ×´1+↕ -˜((×´))1+↕ + ! ×´1+↕ ((×´)1+)˜ π× •math ~ ¬ ¬∊/⊣ ? •rand.Range0 •rand.Deal @@ -294,10 +311,10 @@ ˘ 01 > - <˘ + <˘ < +` <(0<≡) (¬-˜⊢×·+`»>) - {(∾𝕊¨)(0<≡𝕩)𝕩} + {(∾𝕊¨)(0<≡)𝕩} {𝕩(𝕨/)𝕨0𝕩} ∊/⊣ @@ -310,8 +327,8 @@ •BQN •Fmt {+(𝕨×)´𝕩} - {>𝕨|⌊÷`𝕨«˜<𝕩} - Inverse from hereSolve + {𝕨|>⌊÷`𝕨«˜<𝕩} + Inverse, Solve from here N/A -- cgit v1.2.3