Ako's Tedious Coding Language (ATCL)

From Esolang
Jump to navigation Jump to search

ATCL (Ako's Tedious Coding Language) is an esoteric programming language designed to maximize inconvenience. It is also the second of the Ako Esolangs. the first being * Ako's Simple Coding Language Programs are not written in text files, but encoded as a hierarchy of folders. Additionally, all instructions are written in fully reversed text, requiring mental or mechanical reversal before interpretation.

ATCL combines a trivial stack-based computational model with an intentionally cumbersome source format.


ATCL (Ako's Tedious Coding Language)

Overview

An ATCL program consists of:

  1. A strictly ordered folder structure
  1. A sequence of reversed instructions
  1. A stack-based execution model

Each instruction is stored as a folder name, reversed character-by-character before execution.

Program Structure

An ATCL program is a directory containing subdirectories named:

1, 2, 3, ..., n

The following rules apply:

  • Folder names must be consecutive integers starting from 1
  • No gaps are allowed
  • Each numbered folder must contain exactly one folder
  • The name of that inner folder represents a single instruction
  • Instructions are executed in ascending numerical order

Example Structure

program/
 ├── 1/
 │    └── 5
 ├── 2/
 │    └── 3
 ├── 3/
 │    └── dda
 ├── 4/
 │    └── tnirp

Syntax

All instructions are written in reversed form. Before execution, each instruction is reversed character-by-character.

Example

&olleH&𒐪tnirp

is interpreted as:

print𒐪&Hello&

Special Symbols

string delimiter= & (paired) Seperator (:) = 𒐪 Parenthesis = $$ (ambigious)


Strings

Strings are enclosed in &.

Example (source form):

&olleH&

Interpreted as:

"Hello"

Parentheses and Ambiguity

The token $$ represents both opening and closing parentheses.

After reversal, occurrences of $$ alternate between closing and opening parentheses. This can lead to unintuitive or invalid structures.

Programs with invalid parenthesis structure result in runtime errors.

Execution Model

ATCL is a stack-based language.

  • A global stack is used
  • Values are pushed and popped
  • Supported types:
 ** integers
 ** strings

Instructions

All instructions are written reversed in source form.

print → removes the top value from the stack and prints it

add → pops the top two values, adds them, pushes the result

dup → duplicates the top value of the stack

swap → swaps the top two values on the stack

inc → increments the top value by 1

dec → decrements the top value by 1

input → takes user input and pushes it onto the stack

Control Flow

Loops

Loops are defined using the $$ token.

A pair of $$ encloses a loop body:

$$ ... $$

Semantics:

  • At loop start:
 ** If the stack is empty or top value is 0, skip the loop
  • At loop end:
 ** If the top value is not 0, repeat the loop

Due to the ambiguous nature of $$, loop pairing is determined by position rather than strict nesting, and may not behave as expected.

Examples

Hello World

program/
 ├── 1/
 │    └── &dlroW olleH&
 ├── 2/
 │    └── tnirp

Output:

Hello World

Arithmetic

program/
 ├── 1/
 │    └── 5
 ├── 2/
 │    └── 3
 ├── 3/
 │    └── dda
 ├── 4/
 │    └── tnirp

Output:

8

Stack Manipulation

program/
 ├── 1/
 │    └── 5
 ├── 2/
 │    └── pud
 ├── 3/
 │    └── dda
 ├── 4/
 │    └── tnirp

Explanation:

  • Push 5
  • Duplicate → 5, 5
  • Add → 10
  • Print → 10

Output:

10

Loop (Countdown)

program/
 ├── 1/
 │    └── 3
 ├── 2/
 │    └── $$
 ├── 3/
 │    └── pud
 ├── 4/
 │    └── tnirp
 ├── 5/
 │    └── ced
 ├── 6/
 │    └── $$

Output:

3
2
1

Characteristics

  • Extremely tedious to write
  • Fully reversed syntax
  • Filesystem-based source representation
  • Minimal instruction set
  • Deterministic execution with unintuitive control flow

See also