Coder Social home page Coder Social logo

athas / array-language-comparisons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codereport/array-language-comparisons

0.0 1.0 0.0 31 KB

A comparison of array languages: APL, J, BQN, Q, Julia, R, NumPy, Nial, Futhark & SaC.

License: MIT License

array-language-comparisons's Introduction

This is a collection of idioms and small programs in APL, J, BQN, Julia, R and NumPy.

There are several sites that do these kinds of comparisons:

General

Array Language Specific

Language / Library Websites

Language Main Website Help / Docs Online REPL
πŸ’š Dyalog APL dyalog.com Dyalog Help TryAPL
πŸ’š J jsoftware.com J NuVoc J Playground
πŸ’š BQN mlochbaum.github.io/BQN BQN Docs BQNPAD
πŸ’š Q code.kx.com/q Q Ref 🚫
πŸ’™ Julia julialang.org Julia Docs Replit
πŸ’™ NumPy* numpy.org NumPy Docs Replit
πŸ’™ R r-project.org R Docs JDoodle
πŸ’œ Nial nial-array-language.org Nial Dictionary TIO
πŸ’œ Futhark futhark-lang.org Futhark Docs 🚫
πŸ’œ SaC sac-home.org SaC Docs 🚫

* Library, not an actual language

  • πŸ’š Main (APL-Family) Array Languages
  • πŸ’™ Main (Non-APL-Family) Array Languages
  • πŸ’œ Fringe Array Languages

Comparisons

  1. REPL
  2. Index Base
  3. Length of Array (Leading Axis)
  4. Shape of Array
  5. Number of Elements in Array
1 2 3 4 5
APL 🟒 1 (or βŽ•IO) β‰’ ⍴ Γ—/⍴
J 🟒 0 # $ */@$
BQN 🟒 0 β‰  β‰’ Γ—Β΄β‰’
Q 🟑 0 count 🚫 count raze
Julia 🟒 1 size(a, 1) size(a) length(a)
NumPy 🟒 0 len(a) a.shape a.size
R 🟒 1 dim(a)[1] dim(a) length(a)
Nial 🟑 0 first shape shape tally
Futhark 🟑 0 length 🚫 flatten |> length
SaC 🚫 0 shape(a)[0] shape(a) prod(shape(a))

🟑 Means the REPL has limitations

  • Q REPL has no HOME, END, or any arrows (CTRL or not)
  • Nial REPL has no CTRL left or right arrow
  • Futhark REPL has no HOME, END, or DEL

If 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:

sudo apt install rlwrap
rlwrap taskset -c 0 ./q

Other Comparisons

  1. Creating an Identity Matrix
  2. Creating an Iota Matrix
  3. Reversing a Matrix Row-wise and Column-wise

array-language-comparisons's People

Contributors

codereport avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.