AntLang

From Deletionpedia.org: a home for articles deleted from Wikipedia
Jump to: navigation, search
This article was considered for deletion at Wikipedia on October 15 2016. This is a backup of Wikipedia:AntLang. All of its AfDs can be found at Wikipedia:Special:PrefixIndex/Wikipedia:Articles_for_deletion/AntLang, the first at Wikipedia:Wikipedia:Articles_for_deletion/AntLang. Purge

Wikipedia editors had multiple issues with this page:

Primary sources

The topic of this article may not meet Wikipedia's general notability guideline. But, that doesn't mean someone has to… establish notability by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond its mere trivial mention. (October 2016)

Template:Infobox programming language 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 (Yukihiro Matsumoto), 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 library to write AntLang compilers.

Code examples

Simple math

 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.Template:Clarify

Hello World

echo["helloworld"]

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

Factorial

<source lang="J">

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

</source>

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

Fibonacci sequence

<source lang="J">

fib:{<0;1>{x,<+|-2#x>}/range[x]}

</source>

Implementations

hsAntLang

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

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): <source>

/ load the standard library
:"?/lib/stdlib.a"
/ 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">

</source>

To execute the code above on a machine with OpenCally installed, run: <source lang="sh"> $ run-antlang file.ant </source>

It is also hosted on GitHub.

See also

External links