Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ardium Programming Language

Version 2.0.0 (Codename: Ascension)

Ardium is an advanced, high-performance native programming language engineered specifically for macOS. It integrates a declarative, component-driven user interface paradigm with a comprehensive, natively-compiled standard library ecosystem. By leveraging the LLVM compiler infrastructure, Ardium achieves C-level performance while providing modern, high-level abstractions.

1. Overview and Key Capabilities

  • Declarative User Interface Architecture: A sophisticated layout system providing structural paradigms such as VStack, HStack, and ZStack, inspired by modern declarative frameworks.
  • Hardware-Accelerated Computation: Native integration with the Apple Accelerate framework for optimized, high-throughput matrix operations and machine learning workloads.
  • Native Networking Stack: A robust, built-in HTTP client for synchronous and asynchronous network communications.
  • Cryptographic Primitives: Standardized implementation of secure cryptographic hashing algorithms, including SHA-256.
  • Persistent Storage Mechanisms: Streamlined file input/output operations for structured data persistence.
  • Zero-Cost Abstractions: Direct compilation to optimized LLVM Intermediate Representation (IR) and native machine code, bypassing virtual machine overhead.
  • Advanced Compiler Design: A two-pass compilation model facilitating forward referencing and laying the foundation for self-hosting.

2. Getting Started

2.1. System Requirements

Ensure the following dependencies are installed prior to compiling the Ardium toolchain:

  • macOS 12.0 (Monterey) or later
  • OCaml version 4.14 or newer
  • Dune build system
  • LLVM version 14.0 or newer
  • Apple Xcode Command Line Tools

2.2. Installation Procedure

To acquire and build the Ardium compiler from source, execute the following commands:

# Clone the repository
git clone <repository-url>
cd ardium

# Compile the toolchain
dune build

# Execute a sample application
dune exec -- ardium run examples/hello.ar

3. Language Syntax Examples

3.1. Standard Standard Output

import "Core"

fn main() {
    println("Ardium Execution Environment Initialized.")
    return 0
}

3.2. Graphical User Interface Initialization

import "Core"
import "CoreUI"

fn on_click() {
    println("Event registered: Button click.")
}

fn build_ui() {
    VStack(resolve_symbol("content"))
}

fn content() {
    Title("Ardium GUI Framework")
    Subtitle("Version 2.0 Ascension")
    Spacer(20)
    Button("Execute Action", resolve_symbol("on_click"))
}

fn main() {
    App("Application Instance", resolve_symbol("build_ui"))
    return 0
}

4. Documentation References

Comprehensive documentation for the Ardium programming language and its standard library can be found in the following directories:

5. Standard Library Ecosystem

The Ardium 2.0.0 release encompasses eight foundational frameworks:

Framework Primary Objective Key Components
Core System Fundamentals Standard I/O operations (print, println)
CoreUI Interface Rendering VStack, HStack, Button, TextField, Image
CoreAI Machine Learning Hardware-accelerated matrix and tensor mathematics
CoreData Persistence Management File descriptors, input/output streams (Load, Save)
CoreNetwork Network Protocol Stack HTTP client utilities (Fetch)
CoreCrypto Security and Integrity Cryptographic hashing (SHA256)
CoreKits Utility Functions Data structures, diagnostic logging
PlaygroundSupport Interactive Development Hot-module reloading, debugging utilities

6. Toolchain and Build System

The Ardium compiler provides a robust command-line interface for development and compilation:

# Purge build artifacts and recompile
dune clean && dune build

# Interpret and execute an Ardium source file
dune exec -- ardium run application.ar

# Compile an Ardium source file to a native executable
dune exec -- ardium build application.ar -o application_binary
./application_binary

# Execute the automated test suite
dune exec -- ardium run tests/test_frameworks_basic.ar

7. Project Architecture

7.1. Directory Structure

ardium/
├── bin/              # Compiler executable entry point
│   └── main.ml
├── lib/              # Core compiler implementation
│   ├── lexer.mll     # Lexical analysis logic
│   ├── parser.mly    # Syntactic analysis logic
│   ├── codegen.ml    # LLVM Intermediate Representation generation
│   └── runtime.m     # Native Objective-C runtime bridge
├── stdlib/           # Standard library frameworks
│   ├── Core.ar
│   ├── CoreUI.ar
│   └── ...
├── tests/            # Automated verification suite
└── docs/             # Technical documentation

7.2. Compilation Pipeline

The Ardium compiler translates source code into native executables through a highly optimized pipeline:

  1. Lexical Analysis: Source tokenization via ocamllex.
  2. Syntactic Analysis: Abstract Syntax Tree (AST) construction via menhir.
  3. Semantic Analysis: Type inference and validation.
  4. Intermediate Representation: Two-pass LLVM IR code generation.
  5. Native Code Generation: Final compilation to machine code utilizing the LLVM backend.

The Two-Pass Compilation model operates as follows:

  • Pass 1 (Declaration): Registration of global signatures, types, and external symbol definitions.
  • Pass 2 (Definition): Synthesis of function bodies and resolution of forward-referenced identifiers.

8. Versioning History

  • Version 2.0.0 (Ascension)

    • Introduction of the eight-framework standard library ecosystem.
    • Implementation of the two-pass compilation architecture.
    • Integration of the __builtin_ intrinsics system.
    • Structural refactoring of the stdlib/ import namespace.
    • Establishment of self-hosting compiler foundations.
  • Version 1.x

    • Initial conceptual release and proof-of-concept.

9. Contribution Guidelines

We welcome contributions from the community. Primary areas of interest for future development include:

  • Compiler optimization passes and LLVM backend tuning.
  • Expansion of the standard library frameworks.
  • Enhancements to the automated test suite coverage.
  • Technical documentation refinement.

10. License

The Ardium programming language and its associated toolchain are distributed under the MIT License.

11. Acknowledgments

The development of Ardium is made possible through the utilization of:

  • The LLVM Compiler Infrastructure Project
  • Apple Developer Tools and Frameworks
  • The OCaml Programming Language and Community

About

Official Ardium Language , Build with OCaml and LLVM

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages