From 3f2943af2a60afca1235f6b41fde8ea8abf1ae72 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 28 Feb 2021 21:59:14 -0500 Subject: =?UTF-8?q?Split=20up=20cases=20of=20J=20/=20since=20=CB=9D=20only?= =?UTF-8?q?=20matches=20the=20monadic=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/fromJ.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/fromJ.md b/doc/fromJ.md index e549533a..99d75821 100644 --- a/doc/fromJ.md +++ b/doc/fromJ.md @@ -78,7 +78,7 @@ Most of BQN's combinators have J equivalents. The J equivalent `"_` for `˙` ass |:---:|:----:|:---:|:----:|:----:|:-----:|:---:|:----:|:----:| | J | `"_` | `~` | `@:` | `&:` | `&.:` | `:` | `@.` | `::` | -For other modifiers the correspondence is looser. Here `⌜` shows the dyadic case and `´` the monadic case only. +For other modifiers the correspondence is looser. Here `⌜` shows the dyadic case and `´` `˝` the monadic case only. | BQN | `¨` | `⌜` | `´` | `˝` | `` ` `` | `˘` | `⎉` | `⚇` | `⍟` | `⁼` | |:---:|:-----:|:------:|:------:|:---:|:-------:|:-----:|:---:|:----:|:----:|:------:| @@ -101,9 +101,9 @@ Some other primitives are essentially the same in J and BQN, but with different |:---:|:---:|:---:|:---:|:----:|:----:|:----:|:----:|:---:|:---:|:-----:|:-----:| | BQN | `×` | `÷` | `⋆` | `⋆⁼` | `√` | `⌊` | `⌈` | `⊣` | `⊢` | `⌽` | `⍉` | -| J | `~` | `@:` | `&:` | `&.:` | `:` | `/` | `"` | `L:` | `^:` | -|:---:|:---:|:----:|:----:|:-----:|:---:|:---:|:---:|:----:|:----:| -| BQN | `˜` | `∘` | `○` | `⌾` | `⊘` | `˝` | `⎉` | `⚇` | `⍟` | +| J | `~` | `@:` | `&:` | `&.:` | `:` | `"` | `L:` | `^:` | +|:---:|:---:|:----:|:----:|:-----:|:---:|:---:|:----:|:----:| +| BQN | `˜` | `∘` | `○` | `⌾` | `⊘` | `⎉` | `⚇` | `⍟` | The tables below give approximate implementations of J primitives. J has a whole lot of complicated primitives that no one uses (some of which are officially deprecated), so not everything is translated here. Operations that only apply to complex numbers are omitted because no BQN implementation currently supports them. @@ -150,10 +150,13 @@ Some J modifier expressions are translated below. BQN doesn't keep track of the | J | BQN |----------------|----- | `&.>` | `¨` +| `F/ y` | `F˝ y` +| `x F&.>/ y` | `x F⌜ y` +| `x F/ y` | `x F⎉r‿∞ y` where `r` is `F`'s left rank | ``F`G`H@.C`` | `C◶⟨F,G,H⟩` | `x y} z` | `x⌾(y⊸⊏) z` -| `x F/ .G y` | `x F˝∘G⎉1‿∞ y` -| `F:.G` | `{𝕊: 𝕨F𝕩; 𝕊⁼: 𝕨G𝕩}` +| `x F/ . G y` | `x F˝∘G⎉1‿∞ y` +| `F :. G` | `{𝕊: 𝕨F𝕩; 𝕊⁼: 𝕨G𝕩}` | `<;._1` | ``((1-˜¬×+`)=⟜⊏⊘⊣)⊔⊢`` | `x {.!.f y` | `y » x⥊f` | `x \|.!.f y` | `x ⥊⟜f⊸« y`, or `(-x) ⥊⟜f⊸» y` if `𝕩<0` -- cgit v1.2.3