{"id":43881572,"url":"https://github.com/codereport/array-language-comparisons","last_synced_at":"2026-02-06T15:30:02.466Z","repository":{"id":56781166,"uuid":"525080172","full_name":"codereport/array-language-comparisons","owner":"codereport","description":"A comparison of array languages \u0026 libraries: APL, J, BQN, Uiua, Q, Julia, R, NumPy, Nial, Futhark, Dex, Ivy, SaC \u0026 ArrayFire.","archived":false,"fork":false,"pushed_at":"2025-02-01T03:54:12.000Z","size":204,"stargazers_count":163,"open_issues_count":6,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-01T04:27:02.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codereport.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-15T17:36:51.000Z","updated_at":"2025-02-01T03:54:15.000Z","dependencies_parsed_at":"2023-10-01T14:55:15.747Z","dependency_job_id":"eb4fe37b-c99e-4660-abc5-93927d289871","html_url":"https://github.com/codereport/array-language-comparisons","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codereport/array-language-comparisons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereport%2Farray-language-comparisons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereport%2Farray-language-comparisons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereport%2Farray-language-comparisons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereport%2Farray-language-comparisons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codereport","download_url":"https://codeload.github.com/codereport/array-language-comparisons/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereport%2Farray-language-comparisons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29166467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T14:37:12.680Z","status":"ssl_error","status_checked_at":"2026-02-06T14:36:22.973Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-06T15:29:59.646Z","updated_at":"2026-02-06T15:30:02.458Z","avatar_url":"https://github.com/codereport.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cp align=\"center\"\u003eArray Language \u0026 Library Comparisons\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/codereport/array-language-comparisons/issues\" alt=\"contributions welcome\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://lbesson.mit-license.org/\" alt=\"MIT license\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" /\u003e\u003c/a\u003e        \n    \u003ca href=\"https://github.com/codereport?tab=followers\" alt=\"GitHub followers\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/followers/codereport.svg?style=social\u0026label=Follow\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://GitHub.com/codereport/array-language-comparisons/stargazers/\" alt=\"GitHub stars\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/stars/codereport/array-language-comparisons.svg?style=social\u0026label=Star\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://twitter.com/code_report\" alt=\"Twitter\"\u003e\n        \u003cimg src=\"https://img.shields.io/twitter/follow/code_report.svg?style=social\u0026label=@code_report\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n![image](https://github.com/codereport/array-language-comparisons/assets/36027403/13f7164e-d9ea-4c7c-a211-bd437d51949c)\n\nThis is a collection of idioms and small programs in APL, J, BQN, Julia, R, NumPy, Nial, Futhark \u0026 SaC.\n\nThere are several sites that do these kinds of comparisons:\n\n|                           General                            |                                             Array Language Specific                                              |                                                 Array Library Specific                                                  |\n| :----------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: |\n| [Rosetta Code](http://www.rosettacode.org/wiki/Rosetta_Code) |                   [BQN-Dyalog Dictionary](https://mlochbaum.github.io/BQN/doc/fromDyalog.html)                   | [ArrayFire-MATLAB-NumPy](https://github.com/arrayfire/arrayfire-api-cheat-sheet/blob/master/api_equiv_matlab_python.md) |\n|    [Programming-Idioms](https://programming-idioms.org/)     |                   [BQN-Dyalog Dictionary](https://mlochbaum.github.io/BQN/doc/fromDyalog.html)                   |        [ArrayFire-Eigen](https://github.com/arrayfire/arrayfire-api-cheat-sheet/blob/master/api_equiv_eigen.md)         |\n|                                                              |                       [J-Dyalog APL Rosetta](http://sigapl.org/_J-Dyalog_APL_Rosetta.html)                       |            [ArrayFire-Numpy](https://arrayfire.com/wp-content/uploads/2012/05/Matrix_WP_ArrayFire_2017.pdf)             |\n|                                                              | [Q-APL Dictionary](https://github.com/codereport/The_Q_Programming_Language/blob/master/Q-Built-in-Functions.md) |                          [MatX-MATALB-NumPy](https://nvidia.github.io/MatX/matlabpython.html)                           |\n\n### Language / Library Websites\n\n|       |  Language  |   💲   |                                     Main Website                                     |                                 Help / Docs                                 |                             Online REPL                              |\n| :---: | :--------: | :---: | :----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :------------------------------------------------------------------: |\n|   💚   | Dyalog APL |       |                        [dyalog.com](https://www.dyalog.com/)                         |                [Dyalog Help](https://help.dyalog.com/18.2/)                 |                    [TryAPL](https://tryapl.org/)                     |\n|   💛   |    Kap     |       |         [kapdemo.dhsdevelopments.com](https://kapdemo.dhsdevelopments.com/)          |        [Kap Ref](https://kapdemo.dhsdevelopments.com/reference.html)        |  [Kap Interpreter](https://kapdemo.dhsdevelopments.com/clientweb2/)  |\n|   💛   |  TinyAPL   |       |               [tinyapl.rubenverg.com](https://tinyapl.rubenverg.com/)                |      [TinAPL Primitives](https://tinyapl.rubenverg.com/docs/primitive)      |       [Online REPL](https://tinyapl.rubenverg.com/run/latest/)       |\n|   💚   |     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/#) |\n|   💚   |    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/)              |\n|   💚   |    Uiua    |       |                          [uiua.org](https://www.uiua.org/)                           |                   [Uiua Docs](https://www.uiua.org/docs)                    |                 [UiuaPAD](https://www.uiua.org/pad)                  |\n|   💚   |     Q      |   💲   |                       [code.kx.com/q](https://code.kx.com/q/)                        |           [Q Ref](https://code.kx.com/q4m3/A_Built-in_Functions/)           |                                  ⛔                                   |\n|   💙   |   Julia    |       |                       [julialang.org](https://julialang.org/)                        |               [Julia Docs](https://docs.julialang.org/en/v1/)               |          [Replit](https://julialang.org/learning/tryjulia/)          |\n|   💙   |   MATLAB   |   💲   | [mathworks.com/products/matlab.html](https://www.mathworks.com/products/matlab.html) |            [MATLAB Help](https://www.mathworks.com/help/matlab/)            |                                  💲                                   |\n|   💙   |   NumPy*   |       |                           [numpy.org](https://numpy.org/)                            |                 [NumPy Docs](https://numpy.org/doc/stable/)                 |            [Replit](https://replit.com/languages/python3)            |\n|   💙   |     R      |       |                     [r-project.org](https://www.r-project.org/)                      |                  [R Docs](https://www.rdocumentation.org/)                  |         [JDoodle](https://www.jdoodle.com/execute-r-online/)         |\n|   💜   |    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)                     |\n|   💜   |  Futhark   |       |                    [futhark-lang.org](https://futhark-lang.org/)                     |             [Futhark Docs](https://futhark-lang.org/docs.html)              |                                  ⛔                                   |\n|   💜   |    Dex     |       |  [github.com/google-research/dex-lang](https://github.com/google-research/dex-lang)  |       [InDex](https://google-research.github.io/dex-lang/index.html)        |                                  ⛔                                   |\n|   💜   |    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)     |                                  ⛔                                   |\n|  💜💗   |    SaC     |       |                      [sac-home.org](https://www.sac-home.org/)                       |               [SaC Docs](https://www.sac-home.org/docs:main)                |                                  ⛔                                   |\n|   💗   | ArrayFire* |       |                       [arrayfire.com](https://arrayfire.com/)                        |                [ArrayFire Docs](https://arrayfire.org/docs/)                |                                  ⛔                                   |\n|   💗   |   MatX*    |       |          [nvidia.github.io/MatX](https://nvidia.github.io/MatX/index.html)           |                    [MatX API Ref](nvidia.github.io/MatX)                    |                                  ⛔                                   |\n|   💗   |   ATen*    |       |                                          -                                           |               [ATen Docs](https://pytorch.org/cppdocs/#aten)                |                                  ⛔                                   |\n|   💗   |   Eigen*   |       |                 [eigen.tuxfamily.org](https://eigen.tuxfamily.org/)                  |                [Eigen Dox](https://eigen.tuxfamily.org/dox/)                |                   [Godbolt](https://godbolt.org/)                    |\n\n\\* Library, not an actual language\n* 💚 Main (APL-Family) Array Languages\n* 💛 Fringe (APL-Family) Array Languages\n* 💙 Main (Non-APL-Family) Array Languages\n* 💜 Fringe / Research Array Languages\n* 💗 Array Compiler Backends / Array Libraries\n\n### Comparisons\n\n1. REPL\n2. Index Base\n3. Axis/Rank Model\n   1. `LA` = [Leading Axis](https://aplwiki.com/wiki/Leading_axis_theory)\n   2. `TA` = Trailing Axis\n   3. `AA` = Axis Agnostic\n4. Application Model\n   1. `()` = Parentheses\n   2. `LR` = Left to Right\n   3. `RL` = Right to Left\n5. Row-major or Column-Major\n\n|           |   1   |        2        |     3     |   4   |   5    |\n| :-------: | :---: | :-------------: | :-------: | :---: | :----: |\n|    APL    |   💚   |  1 (or `⎕IO`)   | `LA`/`TA` | `RL`  |  Row   |\n|    Kap    |   💚   |        0        | `LA`/`TA` | `RL`  |  Row   |\n|  TinyAPL  |   💚   |        0        |   `LA`    | `RL`  |  Row   |\n|     J     |   💚   |        0        |   `LA`    | `RL`  |  Row   |\n|    BQN    |   💚   |        0        |   `LA`    | `RL`  |  Row   |\n|   Uiua    |   💚   |        0        |   `LA`    | `RL`  |  Row   |\n|     Q     |   💛   |        0        |     ⛔     | `RL`  |  Row   |\n|   Julia   |   💚   |        1        |   `AA`    | `()`  | Column |\n|  MATLAB   |   💚   |        1        |   `LA`    | `()`  | Column |\n|   NumPy   |   💚   |        0        |   `AA`    | `()`  |  Row   |\n|     R     |   💚   |        1        |   `AA`    | `()`  | Column |\n|   Nial    |   💛   |        1        |   `AA`    | `LR`  |  Row   |\n|  Futhark  |   💛   |        0        |     ⛔     | `LR`  |  Row   |\n|    Dex    |   💛   |        0        |           | `()`  |        |\n|    Ivy    |   💛   | 1 (or `origin`) |     ⛔     | `RL`  |  Row   |\n|    SaC    |   ⛔   |        0        |   `LA`    | `()`  |  Row   |\n| ArrayFire |   ⛔   |        0        |   `LA`    | `()`  | Column |\n|   MatX    |   ⛔   |        0        |   `LA`    | `()`  |  Row   |\n\n6. Length of Array (Leading Axis)\n7. Shape of Array\n8. Rank of Array\n9. Number of Elements in Array\n\n|           |       6        |      7       |         8         |          9           |\n| :-------: | :------------: | :----------: | :---------------: | :------------------: |\n|    APL    |      `≢`       |     `⍴`      |       `⍴⍴`        |        `×/⍴`         |\n|    Kap    |      `≢`       |     `⍴`      |       `⍴⍴`        |        `×/⍴`         |\n|  TinyAPL  |      `≢`       |     `⍴`      |        `ϼ`        |        `×⍆⍴`         |\n|     J     |      `#`       |     `$`      |       `$$`        |        `*/@$`        |\n|    BQN    |      `≠`       |     `≢`      |        `=`        |        `×´≢`         |\n|   Uiua    |      `⧻`       |     `△`      |       `⧻△`        |         `⧻♭`         |\n|     Q     |    `count`     |      ⛔       |         ⛔         |     `count raze`     |\n|   Julia   |  `size(a, 1)`  |  `size(a)`   |    `ndims(a)`     |     `length(a)`      |\n|  MATLAB   |  `length(a)`   |  `size(a)`   |     `rank(a)`     |      `numel(a)`      |\n|   NumPy   |    `len(a)`    |  `a.shape`   |   `np.ndim(a)`    |       `a.size`       |\n|     R     |  `dim(a)[1]`   |   `dim(a)`   | `length(dim(a))`  |     `length(a)`      |\n|   Nial    | `first shape`  |   `shape`    |     `valence`     |       `tally`        |\n|  Futhark  |    `length`    |      ⛔       |         ⛔         | `flatten \\|\u003e length` |\n|    Dex    |    `size`*     |      ⛔       |         ⛔         |                      |\n|    Ivy    |  `1 take rho`  |    `rho`     |     `rho rho`     |       `rho ,`        |\n|    SaC    | `shape(a)[0]`  |  `shape(a)`  | `shape(shape(a))` |   `prod(shape(a))`   |\n| ArrayFire | `a.dims()[0]`  | `a.dims()`\\* |  `a.numdims()`\\*  |    `a.elements()`    |\n|   MatX    | `a.Shape()[0]` | `a.Shape()`  |    `a.Rank()`     |    `TotalSize(a)`    |\n\n💛 Means the REPL has certain limitations\n* **Q** REPL has no HOME, END, or any arrows (CTRL or not)\n* **Nial** REPL has no CTRL left or right arrow\n* **Futhark** REPL has no HOME, END, or DEL\n* **Dex** REPL as no UP, DOWN and does not work with `rlwrap`\n\nIf you are using Q, Nial, Futhark or other languages with REPL limitations, you can get around this by invoking with `rlwrap`. On Linux using the Q REPL:\n\n```\nsudo apt install rlwrap\nrlwrap taskset -c 2 ./q\n```\nNote that even when using `rlwrap`, some of the limitations will remain (such as CTRL + arrows).\n\n### Other Comparisons\n\n1. [Creating an Identity Matrix](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/matrix_identity.md)\n2. [Creating an Iota Matrix](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/matrix_iota.md)\n3. [Reversing a Matrix Row-wise, Column-wise and in Memory](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/matrix_reversing.md)\n4. [Summing a Matrix Row-wise, Column-wise and Down to a Scalar](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/matrix_summing.md)\n\n### Leetcode / PWC Problems\n\n|   #   |       | Problem                                                                                                                                                              |                                                    :video_camera:                                                    |\n| :---: | :---: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------: |\n|   1   |   💛   | [P0485 - MCO (Max Consecutive Ones)](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P0485_MCO.md)                           |                                                          -                                                           |\n|   2   |   💚   | [P1351 - Count Negatives](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P1351_Count_Negatives.md)                          |                           [YouTube Solution](https://www.youtube.com/watch?v=MKb4WD6mioE)                            |\n|   3   |   💛   | [P1614 - Maximum Nesting Depth of the Parentheses](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P1614_Max_Paren_Depth.md) | [YouTube Solution](https://www.youtube.com/watch?v=zrOIQEN3Wkk) \\| [II](https://www.youtube.com/watch?v=6-mk6OpcUdM) |\n|   4   |   💚   | [P1672 - Richest Customer Wealth](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P1672_Richest_Customer_Wealth.md)          |                           [YouTube Solution](https://www.youtube.com/watch?v=MKb4WD6mioE)                            |\n|   5   |   💚   | [P1822 - Sign of the Product of Array](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P1822_Sign_Product_Array.md)          |                           [YouTube Solution](https://www.youtube.com/watch?v=a7CSK7HNEWQ)                            |\n|   6   |   💛   | [P2319 - Check if Matrix Is X-Matrix](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P2319_Check_Matrix.md)                 |                           [YouTube Solution](https://www.youtube.com/watch?v=8ynsN4nJxzU)                            |\n|   7   |   💛   | [P0674 - LCIS (Longest Continuous Increasing Subsequence)](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P0674_LCIS.md)    |                                                          -                                                           |\n|   8   |   💛   | [P00064 - Maixmum Gap](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P0064_Max_Gap.md)                                     |                                                          -                                                           |\n|   9   |   💛   | [PWC198 P1 - Maximum Gap Count](https://github.com/codereport/array-language-comparisons/blob/main/comparisons/pwc/PWC198_P1_Max_Gap_Count.md)                       |                                                          -                                                           |\n\n* 💚 = All solutions complete\n* 💛 = Some solutions missing\n\n#### Progress\n\n| Language  |  1a   |  1b   |   2   |   3   |   4   |   5   |   6   |   7   |   8   |   9   |\n| :-------: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n|    APL    |   💚   |   ⛔   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |\n|    Kap    |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |\n|  TinyAPL  |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |\n|     J     |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |\n|    BQN    |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |\n|   Uiua    |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |\n|     Q     |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |\n|   Julia   |   ⛔   |   💚   |   💚   |   ⛔   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|  MATLAB   |   🔜   |   ⛔   |   💚   |   ⛔   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|   NumPy   |   💚   |   💚   |   💚   |   ⛔   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|     R     |   🔜   |   💚   |   💚   |   🔜   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|   Nial    |   💚   |   ⛔   |   💚   |   💚   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|  Futhark  |   🔜   |   💚   |   💚   |   💚   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|    Dex    |   ⛔   |   ⛔   |   💚   |   ⛔   |   💚   |   💚   |   🔜   |   ⛔   |\n|    Ivy    |   ⛔   |   ⛔   |   💚   |   💚   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|    SaC    |   🔜   |   🔜   |   💚   |   🔜   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n| ArrayFire |   🔜   |   🔜   |   💚   |   🔜   |   💚   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |\n|   MatX    |   🔜   |   🔜   |   💚   |   🔜   |   💚   |   💚   |   🔜   |   🔜   |   🔜   |   🔜   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodereport%2Farray-language-comparisons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodereport%2Farray-language-comparisons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodereport%2Farray-language-comparisons/lists"}