Skip to content

✨ Add Tinyapl (and some missing Kap) #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,28 @@ There are several sites that do these kinds of comparisons:

### Language / Library Websites

| | Language | :heavy_dollar_sign: | Main Website | Help / Docs | Online REPL |
| :---: | :--------: | :-----------------: | :----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :------------------------------------------------------------------: |
| 💚 | Dyalog APL | | [dyalog.com](https://www.dyalog.com/) | [Dyalog Help](https://help.dyalog.com/18.2/) | [TryAPL](https://tryapl.org/) |
| 💛 | Kap | | [kapdemo.dhsdevelopments.com](https://kapdemo.dhsdevelopments.com/) | [Kap Ref](https://kapdemo.dhsdevelopments.com/reference.html) | [Kap Interpreter](https://kapdemo.dhsdevelopments.com/clientweb2/) |
| 💚 | 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/#) |
| 💚 | 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/) |
| 💚 | Uiua | | [uiua.org](https://www.uiua.org/) | [Uiua Docs](https://www.uiua.org/docs) | [UiuaPAD](https://www.uiua.org/pad) |
| 💚 | Q | :heavy_dollar_sign: | [code.kx.com/q](https://code.kx.com/q/) | [Q Ref](https://code.kx.com/q4m3/A_Built-in_Functions/) | ⛔ |
| 💙 | Julia | | [julialang.org](https://julialang.org/) | [Julia Docs](https://docs.julialang.org/en/v1/) | [Replit](https://julialang.org/learning/tryjulia/) |
| 💙 | 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: |
| 💙 | NumPy* | | [numpy.org](https://numpy.org/) | [NumPy Docs](https://numpy.org/doc/stable/) | [Replit](https://replit.com/languages/python3) |
| 💙 | R | | [r-project.org](https://www.r-project.org/) | [R Docs](https://www.rdocumentation.org/) | [JDoodle](https://www.jdoodle.com/execute-r-online/) |
| 💜 | 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) |
| 💜 | Futhark | | [futhark-lang.org](https://futhark-lang.org/) | [Futhark Docs](https://futhark-lang.org/docs.html) | ⛔ |
| 💜 | Dex | | [github.com/google-research/dex-lang](https://github.com/google-research/dex-lang) | [InDex](https://google-research.github.io/dex-lang/index.html) | ⛔ |
| 💜 | 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) | ⛔ |
| 💜💗 | SaC | | [sac-home.org](https://www.sac-home.org/) | [SaC Docs](https://www.sac-home.org/docs:main) | ⛔ |
| 💗 | ArrayFire* | | [arrayfire.com](https://arrayfire.com/) | [ArrayFire Docs](https://arrayfire.org/docs/) | ⛔ |
| 💗 | MatX* | | [nvidia.github.io/MatX](https://nvidia.github.io/MatX/index.html) | [MatX API Ref](nvidia.github.io/MatX) | ⛔ |
| 💗 | ATen* | | - | [ATen Docs](https://pytorch.org/cppdocs/#aten) | ⛔ |
| 💗 | Eigen* | | [eigen.tuxfamily.org](https://eigen.tuxfamily.org/) | [Eigen Dox](https://eigen.tuxfamily.org/dox/) | [Godbolt](https://godbolt.org/) |
| | Language | 💲 | Main Website | Help / Docs | Online REPL |
| :---: | :--------: | :---: | :----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :------------------------------------------------------------------: |
| 💚 | Dyalog APL | | [dyalog.com](https://www.dyalog.com/) | [Dyalog Help](https://help.dyalog.com/18.2/) | [TryAPL](https://tryapl.org/) |
| 💛 | Kap | | [kapdemo.dhsdevelopments.com](https://kapdemo.dhsdevelopments.com/) | [Kap Ref](https://kapdemo.dhsdevelopments.com/reference.html) | [Kap Interpreter](https://kapdemo.dhsdevelopments.com/clientweb2/) |
| 💛 | TinyAPL | | [tinyapl.rubenverg.com](https://tinyapl.rubenverg.com/) | [TinAPL Primitives](https://tinyapl.rubenverg.com/docs/primitive) | [Online REPL](https://tinyapl.rubenverg.com/run/latest/) |
| 💚 | 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/#) |
| 💚 | 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/) |
| 💚 | Uiua | | [uiua.org](https://www.uiua.org/) | [Uiua Docs](https://www.uiua.org/docs) | [UiuaPAD](https://www.uiua.org/pad) |
| 💚 | Q | 💲 | [code.kx.com/q](https://code.kx.com/q/) | [Q Ref](https://code.kx.com/q4m3/A_Built-in_Functions/) | ⛔ |
| 💙 | Julia | | [julialang.org](https://julialang.org/) | [Julia Docs](https://docs.julialang.org/en/v1/) | [Replit](https://julialang.org/learning/tryjulia/) |
| 💙 | MATLAB | 💲 | [mathworks.com/products/matlab.html](https://www.mathworks.com/products/matlab.html) | [MATLAB Help](https://www.mathworks.com/help/matlab/) | 💲 |
| 💙 | NumPy* | | [numpy.org](https://numpy.org/) | [NumPy Docs](https://numpy.org/doc/stable/) | [Replit](https://replit.com/languages/python3) |
| 💙 | R | | [r-project.org](https://www.r-project.org/) | [R Docs](https://www.rdocumentation.org/) | [JDoodle](https://www.jdoodle.com/execute-r-online/) |
| 💜 | 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) |
| 💜 | Futhark | | [futhark-lang.org](https://futhark-lang.org/) | [Futhark Docs](https://futhark-lang.org/docs.html) | ⛔ |
| 💜 | Dex | | [github.com/google-research/dex-lang](https://github.com/google-research/dex-lang) | [InDex](https://google-research.github.io/dex-lang/index.html) | ⛔ |
| 💜 | 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) | ⛔ |
| 💜💗 | SaC | | [sac-home.org](https://www.sac-home.org/) | [SaC Docs](https://www.sac-home.org/docs:main) | ⛔ |
| 💗 | ArrayFire* | | [arrayfire.com](https://arrayfire.com/) | [ArrayFire Docs](https://arrayfire.org/docs/) | ⛔ |
| 💗 | MatX* | | [nvidia.github.io/MatX](https://nvidia.github.io/MatX/index.html) | [MatX API Ref](nvidia.github.io/MatX) | ⛔ |
| 💗 | ATen* | | - | [ATen Docs](https://pytorch.org/cppdocs/#aten) | ⛔ |
| 💗 | Eigen* | | [eigen.tuxfamily.org](https://eigen.tuxfamily.org/) | [Eigen Dox](https://eigen.tuxfamily.org/dox/) | [Godbolt](https://godbolt.org/) |

\* Library, not an actual language
* 💚 Main (APL-Family) Array Languages
Expand All @@ -75,6 +76,7 @@ There are several sites that do these kinds of comparisons:
| :-------: | :---: | :-------------: | :-------: | :---: | :----: |
| APL | 💚 | 1 (or `⎕IO`) | `LA`/`TA` | `RL` | Row |
| Kap | 💚 | 0 | `LA`/`TA` | `RL` | Row |
| TinyAPL | 💚 | 0 | `LA` | `RL` | Row |
| J | 💚 | 0 | `LA` | `RL` | Row |
| BQN | 💚 | 0 | `LA` | `RL` | Row |
| Uiua | 💚 | 0 | `LA` | `RL` | Row |
Expand All @@ -100,6 +102,7 @@ There are several sites that do these kinds of comparisons:
| :-------: | :------------: | :----------: | :---------------: | :------------------: |
| APL | `≢` | `⍴` | `⍴⍴` | `×/⍴` |
| Kap | `≢` | `⍴` | `⍴⍴` | `×/⍴` |
| TinyAPL | `≢` | `⍴` | `ϼ` | `×⍆⍴` |
| J | `#` | `$` | `$$` | `*/@$` |
| BQN | `≠` | `≢` | `≢≢` | `×´≢` |
| Uiua | `⧻` | `△` | `⧻△` | `⧻♭` |
Expand Down Expand Up @@ -160,6 +163,7 @@ Note that even when using `rlwrap`, some of the limitations will remain (such as
| :-------: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| APL | 💚 | ⛔ | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
| Kap | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
| TinyAPL | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
| J | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
| BQN | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
| Uiua | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 | 💚 |
Expand Down
3 changes: 2 additions & 1 deletion comparisons/leetcode/P0064_Max_Gap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
| | Solution | Link |
| :-------: | :-----------------------------------: | :---: |
| APL | `MaxGap ← {⌈/2-/(⊂⍤⍒⌷⊢)⍵}` | |
| Kap | `MaxGap ⇐ ⌈/2-⍨/(⊂⍋)⍛⌷` | |
| Kap | `MaxGap ⇐ ⌈/2-/∨` | |
| TinyAPL | `MaxGap ← {⌈⍆2-⍆↡⊵⍵}` |
| J | `MaxGap =. {{ >./ 2-/\ \:~ y }}` | |
| BQN | `MaxGap ← {⌈´-´˘2↕∨𝕩}` | |
| Uiua | `MaxGap ← /↥≡/-◫2⊏⍏.` | |
Expand Down
2 changes: 2 additions & 0 deletions comparisons/leetcode/P0485_MCO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ There are two general solutions covered here.
| :-------: | :--------------------------------------------------------------------------: | :---------------------------------------------------------------------------: |
| APL | `mco ← {0⌈⌈/(≢¨⊆⍨)⍵}` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.apl) |
| Kap | `Mco ⇐ ⌈/≢¨⊂⍨` |
| TinyAPL | `Mco ← {⌈⍆≢¨⊆⍨⍵}` <br> `Mco ← ⌈⍆⍤(≢¨⍤⊆⍨)` |
| J | `mco =. [: >./ [: (#;._1) 0,]` <br> `mco =. {{ >./ (#;._1) 0,y }}` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.ijs) |
| BQN | ``Mco ← ⌈´·+´¨(+`¬)⊸⊔ `` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.bqn) |
| Uiua | `Mco ← /↥⊜⧻.` | |
Expand All @@ -31,6 +32,7 @@ There are two general solutions covered here.
| :-------: | :--------------------------------------------------------------: | :---------------------------------------------------------------------------: |
| APL | scan is broken | |
| Kap | `mco ⇐ ⌈/⊢«×»+\` | |
| TinyAPL | `Mco ← ⦅⌈⍆⋄⊢«×»+⍆↟⦆` |
| J | `mco =. {{ >./(([*+)/\.)&.\|. y }}` | |
| BQN | ``Mco ← ⌈´(⊢×+)` `` | [Link](https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.bqn) |
| Uiua | `Mco ← /↥\(×+,)` | |
Expand Down
1 change: 1 addition & 0 deletions comparisons/leetcode/P0674_LCIS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
| :-------: | :----------------------------------------------------: | :---------------------------------------------------------------------------: |
| APL | `lcis ← ⌈/≢¨((1,2≥/⊢)⊂⊢)`<br>`lcis ← {1⌈1+⌈/≢¨⊆⍨2</⍵}` | [Link](https://github.com/codereport/LeetCode/blob/master/0049_Problem_1.apl) |
| Kap | `Lcis ⇐ 1+⌈/≢¨⊂⍨2</` | |
| TinyAPL | `lcis ← {1+⌈⍆≢¨⊆⍨2<⍆↡⍵}` |
| J | `lcis =. {{ 1 + >./ (#;._1) 0,2</\ y }}` | [Link](https://github.com/codereport/LeetCode/blob/master/0049_Problem_1.ijs) |
| BQN | `LCIS ← {1+⌈´(⊢×+)``<´˘2↕𝕩}` | [Link](https://github.com/codereport/katas/blob/main/Top10/03_lcis.bqn) |
| Uiua | `Lcis ← +1/↥\(×+,)≡/>◫2` | |
Expand Down
1 change: 1 addition & 0 deletions comparisons/leetcode/P1351_Count_Negatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| :-------: | :-----------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------: |
| APL | `+/0>,` | [Link](https://github.com/codereport/LeetCode/blob/master/0176_Problem_1.apl) |
| Kap | `+/,0>` | |
| TinyAPL | `⦅+⍆⋄0⋄>⋄,⦆` |
| J | `[:+/0>,` | [Link](https://github.com/codereport/LeetCode/blob/master/0176_Problem_1.ijs) |
| BQN | `+´0>⥊` | |
| Uiua | `/+<0♭` |
Expand Down
Loading