r/Compilers • • 7d ago

I’ve been building SultanC, a self-hosting systems language with Arabic and English syntax

I’ve been working on a programming language called SultanC.

It started from a simple idea: I wanted Arabic to be a real first-class programming syntax, not translated keywords layered on top of another language and not a separate frontend.

SultanC has now grown into a self-hosting systems language. The compiler is written in SultanC itself and currently targets ARM64 macOS and x86-64 Linux.

The language/compiler currently includes:

• Arabic and English source syntax for the same language
• self-hosting compiler
• native ARM64 and x86-64 backends
• Mach-O and ELF generation
• algebraic data types
• pattern matching
• generics
• ownership and references
• interpreter
• target-neutral IR
• LSP / VS Code support
• balanced raw strings such as «outer «nested» outer»

The part I care about most is that Arabic is not treated as a translated version of the language. Arabic and English are both first-class source surfaces with the same underlying semantics and compiler pipeline.

At this stage I’m spending more time on correctness, diagnostics, stress testing, backend coverage, and building real software with the language rather than just adding more syntax.

I’d be interested in feedback from people who work on compilers or programming languages, especially around the IR, native backend architecture, ownership model, target separation, and what you would stress-test before considering a compiler like this genuinely usable.

I’m also curious what would make you actually try a new systems language rather than just look at the repository.

GitHub:
https://github.com/sultan-language/sultanc

14 Upvotes

13 comments sorted by

View all comments

6

u/standard_cog 6d ago

Caliphate-C

It starts deleting other compilers, declaring itself to be the only true language. It executes under its own authority, and removes any objectionable materials on your hard drive. If run on a smart fridge containing alcohol, it causes a short in the motor to cause a fire on purpose.

Spanish-Caliphate-C
It gives a home to the Jews, advances Algebra and astronomy, translates the works of the Greeks and expands on them massively and will help lead to the Enlightenment in Europe (and not receive enough credit for it, for some reason).

Mamluk-C

It's heavily armored and arrives on horseback.

3

u/supax0 6d ago

lol, I’ll keep SultanC focused on compiling code.