Coder Social home page Coder Social logo

codereport / array-language-comparisons Goto Github PK

View Code? Open in Web Editor NEW
135.0 135.0 8.0 161 KB

A comparison of array languages & libraries: APL, J, BQN, Uiua, Q, Julia, R, NumPy, Nial, Futhark, Dex, Ivy, SaC & ArrayFire.

License: MIT License

C++ 36.12% Makefile 1.69% CMake 16.72% Cuda 42.78% M 0.70% MATLAB 1.98%

array-language-comparisons's People

Contributors

athas avatar cliffburdick avatar codereport avatar garklein avatar kaikalii avatar sroccaserra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

array-language-comparisons's Issues

Additional information about array properties

First of all, I'd like to thank you for very nice project (and especially mentioning BQN, which is very nice language IMHO).

It would be nice to expand table with language comparison with additional information about array properties.
Especially:

  1. are arrays mutable or immutable in this language?
  2. is it possible to change shape "in place" for mutable arrays?
  3. are arrays homogenous or heterogenous - i.e. is it possible to mix element types or not?
  4. for mutable heterogenous arrays - is it possible to recursively use the array itself as its element to create infinite recursion/loop in the structure? (IMHO just Julia is able to do it)

Add Ivy

It might be probably interesting to add K language into the comparison table. It's a bit tricky as there are various K language "versions", but at least one very nice open sourced implementation exists:
https://github.com/kevinlawler/kona/wiki

Also Ivy is interesting language (or rather "desk calculator on steroids"). It supports rational numbers etc.
https://pkg.go.dev/robpike.io/ivy


To Do:

  • Add Ivy
  • Add K6

"Number of Elements in Array" is inconsistent

Besides for those languages that have a direct built-in, some flatten and count, while others multiply the axis lengths. It might make for a better comparison to show both (with ๐Ÿšซ for unavailable methods), e.g. โ‰ข, in APL and #@, in J, etc.

Maximum Nesting Depth + Julia

I came across this page https://github.com/codereport/array-language-comparisons/blob/main/comparisons/leetcode/P1614_Max_Paren_Depth.md

For Julia, I'm not too sure what "no row-wise minus reduction" means, but it sounds like you are looking for maximum(cumsum(..., something like this:

julia> str = "(1)+((2))+(((3)))";

julia> maximum(cumsum([(c=='(')-(c==')') for c in str]))
3

julia> maximum(Iterators.accumulate(+, (c=='(')-(c==')') for c in str))  # lazy version
3

julia> foldl(str; init=(0,0)) do (i,maxi), c
         c=='(' && return i+1, max(i+1,maxi)
         c==')' && return i-1, maxi
         i, maxi
       end[2]
3

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.