Readablewiki

Nial

Content sourced from Wikipedia, licensed under CC BY-SA 3.0.

Nial, short for Nested Interactive Array Language, is a high-level language designed around arrays. It was created around 1981 by Mike Jenkins at Queen’s University in Kingston, Canada. Nial blends ideas from APL (array programming) and Lisp (functional style) and uses a formal array theory developed by Trenchard More. It is mainly used for quick prototyping and explorations in artificial intelligence.

In 1982 Jenkins started Nial Systems Ltd to market the language and its Q'Nial implementation. By 2014 there was an open-source Q'Nial project with binaries and source code available. The license is based on the Artistic License 1.0 with a few wording changes for NIAL Systems Limited.

Nial treats all data as nested rectangular arrays. Simple data types such as integers, booleans, and characters are treated as single-element arrays. Arrays can contain other arrays, creating arbitrarily deep structures. Nial also supports Records, which are non-homogeneous array structures.

In Nial, functions are called Operations. An operation takes an input array and returns another array. You apply an operation to an argument to perform a call. Like many APL-inspired languages, Nial unifies binary operators with functions, so symbols like + can mean either numeric addition or an operation.

The language also includes higher-order features. Transformers are functions that build new operations from existing ones. An atlas is an operation made from several component operations; applying an atlas runs all its parts on a value. These features support point-free style definitions, where you define how data is transformed without naming intermediate variables.

Shape tells you the dimensions of an array, and you can reshape arrays to change their form. Definitions use the form: is .

Practical example: checking if N is prime. You generate a list 1..N, test each number for divisibility, and replace divisible numbers with 1 and others with 0. If N is prime, the sum of that transformed list will be 2 (itself and 1). You can then filter the list to keep only primes.

Nial is an influential example of array programming, focusing on concise, algebraic ideas for data.


This page was last edited on 3 February 2026, at 08:03 (CET).