Skip to content

transicle/ADAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADAN

Version Latest Release Docs

Beginner friendly language with inferred typing and no memory managing.

What is ADAN?

ADAN is a general purpose programming language built around the idea that low level work should not require low level complexity. It gives you the readability and simplicity of a high level language while still being capable enough for jobs that typically demand something closer to the hardware.

Features

  • Inferred typing -- types are resolved at compile time without requiring you to write them everywhere
  • Readable syntax -- borrows the clarity of Python with the structure of a curly-brace language
  • Module system -- explicit exports keep your code organized and your namespaces clean
  • Multiple loop forms -- for-in, entry-controlled, while, and repeat-until loops out of the box
  • Null handling -- built-in null coalescing and not-null assertion operators
  • Global scope modifier -- promote a variable to global scope from anywhere using the global keyword
  • Lambdas -- anonymous single-expression functions for quick inline logic
  • Variadic functions -- accept any number of arguments with the ... parameter

Quick Look

At its simplest, ADAN stays out of your way.

var name = "world";
var message = "Hello, " + name;

Functions are straightforward, and types are only written when you need them.

func add(a, b) return a + b;

func greet(name: String): String {
    return "Hello, " + name;
}

As things get more involved, the language scales with you.

using module std.io;
using module std.fs;

export func readLines(path: String): String[] {
    var file = fs.open(path);
    var lines: String[] = [];

    for _, line in file.lines() {
        if line != "" {
            lines += line;
        }
    }

    return lines;
}

And at the more complex end, you have the full picture: modules, exports, typed signatures, loops, and null handling, all still readable.

using module std.io;
using module std.net;

readonly var MAX_RETRIES = 3;

func fetchWithRetry(url: String, retries: Int): String {
    var response: String = None;
    var attempts = 0;

    repeat {
        response = net.get(url);
        attempts += 1;
    } until response != None or attempts >= retries;

    return response ?: "no response";
}

export func main() {
    var result = fetchWithRetry("https://adan.sh/api/version", MAX_RETRIES);
    io.print(result);
}

Status

ADAN is actively in development. Things will change, break, and improve. If you want to follow along with development in real time, streams are live on YouTube !!

Note: 0 AI is being used for the code, only used for small research.

About

Beginner friendly language with inferred typing and no memory managing. Use high level programming for lower level jobs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors