Skip to content

Commit fd63181

Browse files
authored
Merge pull request #18 from codereport/tinyapl
✨ Add Tinyapl (and some missing Kap)
2 parents 26ec2d3 + ededea0 commit fd63181

14 files changed

+49
-26
lines changed

README.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,28 @@ There are several sites that do these kinds of comparisons:
2828

2929
### Language / Library Websites
3030

31-
| | Language | :heavy_dollar_sign: | Main Website | Help / Docs | Online REPL |
32-
| :---: | :--------: | :-----------------: | :----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :------------------------------------------------------------------: |
33-
| 💚 | Dyalog APL | | [dyalog.com](https://www.dyalog.com/) | [Dyalog Help](https://help.dyalog.com/18.2/) | [TryAPL](https://tryapl.org/) |
34-
| 💛 | Kap | | [kapdemo.dhsdevelopments.com](https://kapdemo.dhsdevelopments.com/) | [Kap Ref](https://kapdemo.dhsdevelopments.com/reference.html) | [Kap Interpreter](https://kapdemo.dhsdevelopments.com/clientweb2/) |
35-
| 💚 | J | | [jsoftware.com](https://www.jsoftware.com/) | [J NuVoc](https://code.jsoftware.com/wiki/NuVoc) | [J Playground](https://jsoftware.github.io/j-playground/bin/html2/#) |
36-
| 💚 | BQN | | [mlochbaum.github.io/BQN](https://mlochbaum.github.io/BQN/) | [BQN Docs](https://mlochbaum.github.io/BQN/doc/index.html) | [BQNPAD](https://bqnpad.mechanize.systems/) |
37-
| 💚 | Uiua | | [uiua.org](https://www.uiua.org/) | [Uiua Docs](https://www.uiua.org/docs) | [UiuaPAD](https://www.uiua.org/pad) |
38-
| 💚 | Q | :heavy_dollar_sign: | [code.kx.com/q](https://code.kx.com/q/) | [Q Ref](https://code.kx.com/q4m3/A_Built-in_Functions/) ||
39-
| 💙 | Julia | | [julialang.org](https://julialang.org/) | [Julia Docs](https://docs.julialang.org/en/v1/) | [Replit](https://julialang.org/learning/tryjulia/) |
40-
| 💙 | MATLAB | :heavy_dollar_sign: | [mathworks.com/products/matlab.html](https://www.mathworks.com/products/matlab.html) | [MATLAB Help](https://www.mathworks.com/help/matlab/) | :heavy_dollar_sign: |
41-
| 💙 | NumPy* | | [numpy.org](https://numpy.org/) | [NumPy Docs](https://numpy.org/doc/stable/) | [Replit](https://replit.com/languages/python3) |
42-
| 💙 | R | | [r-project.org](https://www.r-project.org/) | [R Docs](https://www.rdocumentation.org/) | [JDoodle](https://www.jdoodle.com/execute-r-online/) |
43-
| 💜 | Nial | | [nial-array-language.org](https://www.nial-array-language.org/) | [Nial Dictionary](https://www.nial-array-language.org/ndocs/NialDict2.html) | [TIO](https://tio.run/#Nial) |
44-
| 💜 | Futhark | | [futhark-lang.org](https://futhark-lang.org/) | [Futhark Docs](https://futhark-lang.org/docs.html) ||
45-
| 💜 | Dex | | [github.com/google-research/dex-lang](https://github.com/google-research/dex-lang) | [InDex](https://google-research.github.io/dex-lang/index.html) ||
46-
| 💜 | Ivy | | [pkg.go.dev/robpike.io/ivy](https://pkg.go.dev/robpike.io/ivy) | [Ivy Docs](https://pkg.go.dev/robpike.io/ivy#section-documentation) ||
47-
| 💜💗 | SaC | | [sac-home.org](https://www.sac-home.org/) | [SaC Docs](https://www.sac-home.org/docs:main) ||
48-
| 💗 | ArrayFire* | | [arrayfire.com](https://arrayfire.com/) | [ArrayFire Docs](https://arrayfire.org/docs/) ||
49-
| 💗 | MatX* | | [nvidia.github.io/MatX](https://nvidia.github.io/MatX/index.html) | [MatX API Ref](nvidia.github.io/MatX) ||
50-
| 💗 | ATen* | | - | [ATen Docs](https://pytorch.org/cppdocs/#aten) ||
51-
| 💗 | Eigen* | | [eigen.tuxfamily.org](https://eigen.tuxfamily.org/) | [Eigen Dox](https://eigen.tuxfamily.org/dox/) | [Godbolt](https://godbolt.org/) |
31+
| | Language | 💲 | Main Website | Help / Docs | Online REPL |
32+
| :---: | :--------: | :---: | :----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :------------------------------------------------------------------: |
33+
| 💚 | Dyalog APL | | [dyalog.com](https://www.dyalog.com/) | [Dyalog Help](https://help.dyalog.com/18.2/) | [TryAPL](https://tryapl.org/) |
34+
| 💛 | Kap | | [kapdemo.dhsdevelopments.com](https://kapdemo.dhsdevelopments.com/) | [Kap Ref](https://kapdemo.dhsdevelopments.com/reference.html) | [Kap Interpreter](https://kapdemo.dhsdevelopments.com/clientweb2/) |
35+
| 💛 | TinyAPL | | [tinyapl.rubenverg.com](https://tinyapl.rubenverg.com/) | [TinAPL Primitives](https://tinyapl.rubenverg.com/docs/primitive) | [Online REPL](https://tinyapl.rubenverg.com/run/latest/) |
36+
| 💚 | J | | [jsoftware.com](https://www.jsoftware.com/) | [J NuVoc](https://code.jsoftware.com/wiki/NuVoc) | [J Playground](https://jsoftware.github.io/j-playground/bin/html2/#) |
37+
| 💚 | BQN | | [mlochbaum.github.io/BQN](https://mlochbaum.github.io/BQN/) | [BQN Docs](https://mlochbaum.github.io/BQN/doc/index.html) | [BQNPAD](https://bqnpad.mechanize.systems/) |
38+
| 💚 | Uiua | | [uiua.org](https://www.uiua.org/) | [Uiua Docs](https://www.uiua.org/docs) | [UiuaPAD](https://www.uiua.org/pad) |
39+
| 💚 | Q | 💲 | [code.kx.com/q](https://code.kx.com/q/) | [Q Ref](https://code.kx.com/q4m3/A_Built-in_Functions/) ||
40+
| 💙 | Julia | | [julialang.org](https://julialang.org/) | [Julia Docs](https://docs.julialang.org/en/v1/) | [Replit](https://julialang.org/learning/tryjulia/) |
41+
| 💙 | MATLAB | 💲 | [mathworks.com/products/matlab.html](https://www.mathworks.com/products/matlab.html) | [MATLAB Help](https://www.mathworks.com/help/matlab/) | 💲 |
42+
| 💙 | NumPy* | | [numpy.org](https://numpy.org/) | [NumPy Docs](https://numpy.org/doc/stable/) | [Replit](https://replit.com/languages/python3) |
43+
| 💙 | R | | [r-project.org](https://www.r-project.org/) | [R Docs](https://www.rdocumentation.org/) | [JDoodle](https://www.jdoodle.com/execute-r-online/) |
44+
| 💜 | Nial | | [nial-array-language.org](https://www.nial-array-language.org/) | [Nial Dictionary](https://www.nial-array-language.org/ndocs/NialDict2.html) | [TIO](https://tio.run/#Nial) |
45+
| 💜 | Futhark | | [futhark-lang.org](https://futhark-lang.org/) | [Futhark Docs](https://futhark-lang.org/docs.html) ||
46+
| 💜 | Dex | | [github.com/google-research/dex-lang](https://github.com/google-research/dex-lang) | [InDex](https://google-research.github.io/dex-lang/index.html) ||
47+
| 💜 | Ivy | | [pkg.go.dev/robpike.io/ivy](https://pkg.go.dev/robpike.io/ivy) | [Ivy Docs](https://pkg.go.dev/robpike.io/ivy#section-documentation) ||
48+
| 💜💗 | SaC | | [sac-home.org](https://www.sac-home.org/) | [SaC Docs](https://www.sac-home.org/docs:main) ||
49+
| 💗 | ArrayFire* | | [arrayfire.com](https://arrayfire.com/) | [ArrayFire Docs](https://arrayfire.org/docs/) ||
50+
| 💗 | MatX* | | [nvidia.github.io/MatX](https://nvidia.github.io/MatX/index.html) | [MatX API Ref](nvidia.github.io/MatX) ||
51+
| 💗 | ATen* | | - | [ATen Docs](https://pytorch.org/cppdocs/#aten) ||
52+
| 💗 | Eigen* | | [eigen.tuxfamily.org](https://eigen.tuxfamily.org/) | [Eigen Dox](https://eigen.tuxfamily.org/dox/) | [Godbolt](https://godbolt.org/) |
5253

5354
\* Library, not an actual language
5455
* 💚 Main (APL-Family) Array Languages
@@ -75,6 +76,7 @@ There are several sites that do these kinds of comparisons:
7576
| :-------: | :---: | :-------------: | :-------: | :---: | :----: |
7677
| APL | 💚 | 1 (or `⎕IO`) | `LA`/`TA` | `RL` | Row |
7778
| Kap | 💚 | 0 | `LA`/`TA` | `RL` | Row |
79+
| TinyAPL | 💚 | 0 | `LA` | `RL` | Row |
7880
| J | 💚 | 0 | `LA` | `RL` | Row |
7981
| BQN | 💚 | 0 | `LA` | `RL` | Row |
8082
| Uiua | 💚 | 0 | `LA` | `RL` | Row |
@@ -100,6 +102,7 @@ There are several sites that do these kinds of comparisons:
100102
| :-------: | :------------: | :----------: | :---------------: | :------------------: |
101103
| APL | `` | `` | `⍴⍴` | `×/⍴` |
102104
| Kap | `` | `` | `⍴⍴` | `×/⍴` |
105+
| TinyAPL | `` | `` | `ϼ` | `×⍆⍴` |
103106
| J | `#` | `$` | `$$` | `*/@$` |
104107
| BQN | `` | `` | `≢≢` | `×´≢` |
105108
| Uiua | `` | `` | `⧻△` | `⧻♭` |
@@ -160,6 +163,7 @@ Note that even when using `rlwrap`, some of the limitations will remain (such as
160163
| :-------: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
161164
| APL | 💚 || 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
162165
| Kap | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
166+
| TinyAPL | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
163167
| J | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
164168
| BQN | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
165169
| Uiua | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |

comparisons/leetcode/P0064_Max_Gap.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
| | Solution | Link |
66
| :-------: | :-----------------------------------: | :---: |
77
| APL | `MaxGap ← {⌈/2-/(⊂⍤⍒⌷⊢)⍵}` | |
8-
| Kap | `MaxGap ⇐ ⌈/2-⍨/(⊂⍋)⍛⌷` | |
8+
| Kap | `MaxGap ⇐ ⌈/2-/∨` | |
9+
| TinyAPL | `MaxGap ← {⌈⍆2-⍆↡⊵⍵}` |
910
| J | `MaxGap =. {{ >./ 2-/\ \:~ y }}` | |
1011
| BQN | `MaxGap ← {⌈´-´˘2↕∨𝕩}` | |
1112
| Uiua | `MaxGap ← /↥≡/-◫2⊏⍏.` | |

comparisons/leetcode/P0485_MCO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ There are two general solutions covered here.
1010
| :-------: | :--------------------------------------------------------------------------: | :---------------------------------------------------------------------------: |
1111
| APL | `mco ← {0⌈⌈/(≢¨⊆⍨)⍵}` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.apl) |
1212
| Kap | `Mco ⇐ ⌈/≢¨⊂⍨` |
13+
| TinyAPL | `Mco ← {⌈⍆≢¨⊆⍨⍵}` <br> `Mco ← ⌈⍆⍤(≢¨⍤⊆⍨)` |
1314
| J | `mco =. [: >./ [: (#;._1) 0,]` <br> `mco =. {{ >./ (#;._1) 0,y }}` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.ijs) |
1415
| BQN | ``Mco ← ⌈´·+´¨(+`¬)⊸⊔ `` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.bqn) |
1516
| Uiua | `Mco ← /↥⊜⧻.` | |
@@ -31,6 +32,7 @@ There are two general solutions covered here.
3132
| :-------: | :--------------------------------------------------------------: | :---------------------------------------------------------------------------: |
3233
| APL | scan is broken | |
3334
| Kap | `mco ⇐ ⌈/⊢«×»+\` | |
35+
| TinyAPL | `Mco ← ⦅⌈⍆⋄⊢«×»+⍆↟⦆` |
3436
| J | `mco =. {{ >./(([*+)/\.)&.\|. y }}` | |
3537
| BQN | ``Mco ← ⌈´(⊢×+)` `` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.bqn) |
3638
| Uiua | `Mco ← /↥\(×+,)` | |

comparisons/leetcode/P0674_LCIS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
| :-------: | :----------------------------------------------------: | :---------------------------------------------------------------------------: |
77
| APL | `lcis ← ⌈/≢¨((1,2≥/⊢)⊂⊢)`<br>`lcis ← {1⌈1+⌈/≢¨⊆⍨2</⍵}` | [Link](https://github.com/codereport/LeetCode/blob/master/0049_Problem_1.apl) |
88
| Kap | `Lcis ⇐ 1+⌈/≢¨⊂⍨2</` | |
9+
| TinyAPL | `lcis ← {1+⌈⍆≢¨⊆⍨2<⍆↡⍵}` |
910
| J | `lcis =. {{ 1 + >./ (#;._1) 0,2</\ y }}` | [Link](https://github.com/codereport/LeetCode/blob/master/0049_Problem_1.ijs) |
1011
| BQN | `LCIS ← {1+⌈´(⊢×+)``<´˘2↕𝕩}` | [Link](https://github.com/codereport/katas/blob/main/Top10/03_lcis.bqn) |
1112
| Uiua | `Lcis ← +1/↥\(×+,)≡/>◫2` | |

comparisons/leetcode/P1351_Count_Negatives.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
| :-------: | :-----------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------: |
99
| APL | `+/0>,` | [Link](https://github.com/codereport/LeetCode/blob/master/0176_Problem_1.apl) |
1010
| Kap | `+/,0>` | |
11+
| TinyAPL | `⦅+⍆⋄0⋄>⋄,⦆` |
1112
| J | `[:+/0>,` | [Link](https://github.com/codereport/LeetCode/blob/master/0176_Problem_1.ijs) |
1213
| BQN | `+´0>⥊` | |
1314
| Uiua | `/+<0♭` |

0 commit comments

Comments
 (0)