Home

Awesome

Arn

Build Status

A general-purpose functional golfing language. Tutorial

Installation

Post 1.0

First, ensure Rust is installed on your system and that these requirements are fulfilled. You can either build from source by cloning the repository and then running

cargo install --path path/to/repository

for the latest features, or by simply running

cargo install arn-language

for the current release edition. You then can run

arn --help

to get a list of commands.

Prior to 1.0

To install Arn you must have Node.js installed on your system. Once installed, run

npm install -g arn-language

You can then use

arn help

to get a list of commands

About

Arn is a golfing language; that is, it is designed to perform tasks in as few bytes as possible. It draws heavy inspiration from J/APL

Arn is constructed of variable declarations, functions, and symbols. These symbols come in the forms of prefixes, infixes, and suffixes. A full syntax and description can be found at this page. This format, however, may lead to instances where your program needs to be a few bytes shorter in order to compete. This is where Carn (Compressed Arn) comes in.

Compression

Carn is the compressed version of Arn. The interpeter has the ability to distinguish between these two program formats and interpret each separately, without any input from the user. Carn is encoded using its own Code Page, based on CP1252. It can be found below. The Arn interpreter will compress your program by passing in the -c flag to the compiler through the command line.

Code Page

__0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F
0_!"#$%&'()*+,-./0
1_123456789:;<=>?@
2_ABCDEFGHIJKLMNOP
3_QRSTUVWXYZ[\]^_`
4_abcdefghijklmnop
5_qrstuvwxyz{|}~¡¢
6_£¤¥¦§¨©ª«¬®¯°
7_
8_±²³
9_´µ·¸¹º»¼½¾¿ÀÁÂÃ
A_ÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓ
B_ÔÕÖ×ØÙÚÛÜÝÞßàáâã
C_äåæçèéêëìíîïðñòó
D_ôõö÷øùúûüýþÿŒœŠš
E_ŸŽžƒƥʠˆ˜
F_Δ

Some sample programs

Hello, World

'yt, bs!

Cat program

_

FizzBuzz (1->100)

~e2@"Fizz"^!%3|`#&`^!%5||

Fibonacci Sequence

[1 1{+

Prime Check

#.:}=

Uses Wilson's Theorem

!(f/+1)%

Future Plans

I plan on working on more practical features in the future, and I'm also going to look into changing the way certain operations work on sequences, among other things.