CloudFlare suffered a massive security issue affecting all of its customers, including Rosetta Code. All passwords not changed since February 19th 2017 have been expired, and session cookie longevity will be reduced until late March.--Michael Mol (talk) 05:15, 25 February 2017 (UTC)


From Rosetta Code
This programming language may be used to instruct a computer to perform a task.
See Also:

Listed below are all of the tasks on Rosetta Code which have been solved using AntLang.
Your Help Needed
If you know AntLang, please write code for some of the tasks not implemented in AntLang.

AntLang is a functional scripting language named after its creator Anthony Cipriano. Its main distinctive feature is short syntax oriented towards mathematical equations.

It is a combination of APL and M-Expressions, which main strength is its short and concise syntax.

The first implementation of AntLang was written in Haskell, another one called OpenCally is a C framework and can be used as a software library to write AntLang compilers.

This framework is in use for writing the AntLang-to-JavaScript-compiler antlang-js and the command run-antlang.

Code examples[edit]

Simple math[edit]

 5*1+2 /=> 15

AntLang uses right-to-left evaluation, so 1+2 gets executed before 5*3.

Even though AntLang evaluates right-to-left, it is recommended to read left-to-right in a top-down manner.

Hello World[edit]


The echo function is called with the string helloworld, prints it and returns it.


factorial:{1 */ 1+range[x]}

The times-reduction (*/) with the accumulator value 1 over the list 1+range[x].

Fibonacci sequence[edit]




hsAntLang was the first AntLang implementation, which is still used by most of AntLang users.

It fully implements the language standard plus several extensions, like multithreading, file Input/output and exception handling.

It is hosted on GitHub.


OpenCally is an AntLang compiler by AntLang Software.

It is under active development and doesn't support all the standard functions and syntax yet.

OpenCally adds interfaces to all its target languages (currently JavaScript):

/ load the standard library
/ make a JavaScript function available to AntLang (prefix: v_)
js)v_console_log = console.log;
/ call that function from within AntLang
console_log each <"APL"; "Haskell"; "Erlang">

To execute the code above on a machine with OpenCally installed, run:

$ run-antlang file.ant

It is also hosted on GitHub.