3 ms·
Nial (and its interpreter QNial) is strangely unheard-of. It's an intruiging APL-like that uses English words and a simple, general syntax that permits nested p
by dTal 7y ago
Nial (and its interpreter QNial) is strangely unheard-of. It's an intruiging APL-like that uses English words and a simple, general syntax that permits nested parentheses, allowing lisp-like code. It extends APL to multidimensional arrays a la Numpy (which it well predates - 1981!), and throws in some interesting and exotic ideas for good measure such as arrays of point-free functions as a first-class structure. It's a lot of fun to do Project Euler type math problems in, and captures the essential spirit of APL/J/K etc but without the obfuscated syntax.
isprime is op n {not ((n = 1) or (0 in (n mod (rest count (floor (sqrt n))))))}
https://github.com/danlm/QNial7 https://github.com/danlm/QNial7
https://tangentstorm.github.io/nial/intro.ndf.html https://tangentstorm.github.io/nial/intro.ndf.html
https://en.wikipedia.org/wiki/Nial https://en.wikipedia.org/wiki/Nial