HTLL is a low-level programming language that compiles directly to x86-64 Linux assembly via FASM, creating small, fast, and dependency-free statically linked binaries. It's built on the "Escape Programming" philosophy, which rejects the bloat and restrictions of modern toolchains in favor of absolute control.
HTLL's simplicity translates directly to hyper-efficient executables.
- A standard
Hello, World!program in HTLL compiles to a 440-byte assembly (.s) file. When assembled, the final statically linked binary file is only 255 bytes. - A more complex program, like a full Bubble Sort algorithm, produces a final statically linked executable of just 1.1 kilobytes.
This is the result of speaking directly to the metal without unnecessary abstraction layers.
HTLL provides a powerful set of primitives for systems programming:
- Direct Memory Control: Manipulate data using arrays as raw byte buffers.
- Simple Syntax: A straightforward syntax inspired by the "least keystroke" philosophy.
- Core Functionality: Includes variables, functions, loops, and conditionals.
- Built-in System Calls: Direct access to file I/O (read, append, delete) and user input without external libraries.
For a complete guide, including detailed explanations of every feature, syntax rules, and extensive examples, please read the full documentation:
Read the Full HTLL Documentation
- Architecture: x86-64
- Operating System: 64-bit Linux
- Compiler:
g++(for the initial compiler bootstrap) - Assembler:
fasm(flat assembler)
Installing FASM:
- Arch Linux / Manjaro:
sudo pacman -S fasm - Debian / Ubuntu:
sudo apt install fasm
The build process is separated into a one-time compiler setup and the process for your own programs.
To build the HTLL compiler from source, follow these exact steps in order:
- Compile the temporary bootstrap compiler:
g++ HTLL.cpp -o HTLL
- Run it to generate the initial assembly:
./HTLL HTLL.htll
- Rename the output file:
mv finalASM_HTLL_ASM.s HTLL.s
- Compile the C++ Backend Library:
g++ -shared -fPIC HTLL.cpp wrapper.cpp -o libHTLL-lib.so
- Regenerate the assembly:
./HTLL HTLL.htll
- Assemble the Compiler:
fasm HTLL.s HTLL.o
- Link the Compiler:
ld -o HTLL HTLL.o -L. -lHTLL-lib --dynamic-linker /lib64/ld-linux-x86-64.so.2 -rpath '$ORIGIN'
Once the compiler is built, use this simple workflow for your own .htll files:
- Compile Source to Assembly:
./HTLL my_program.htll
- Assemble to a Static Executable:
fasm my_program.s
- Run:
./my_program
- Definition: "Escaping Programming" means rejecting the authority of external compilers and interpreters (
g++, Python, GCC, etc.) that impose their own rules, syntax, and constraints. It's about seizing absolute control over the entire software creation process. - The Ultimate Goal: A fully self-hosting development environment where I only code in my own syntax. The final compiler will be a single, statically linked binary that produces code with zero dependencies (no
libc), speaking directly to the kernel via syscalls. - The Enemy: Restriction and Bloat.
g++is a dictator.libcis a dependency chain. I reject any tool that forces me to think within its predefined box.
- Currently, the HTLL compiler relies on a
.solibrary for some built-in functions. - The ultimate goal is a full bootstrap, removing all external dependencies.
- The future statically linked HTLL compiler will produce binaries under 100 KB with zero dependencies.
This project is licensed under the GNU General Public License v3.0 (GPLv3).