SlangLang is a production-ready compiler for the Gen Z slang programming language, implemented in Julia with aggressive optimization using Julia's multiple dispatch and JIT compilation.
- Install Julia 1.10 or later
- Install PackageCompiler:
julia -e "using Pkg; Pkg.add("PackageCompiler")" - Run:
julia build_windows.jl(Windows) ormake(Linux)
The compiler translates slang code to Julia code which can then be executed by Julia:
slanglang input.slang output.jl
julia output.jlSlangLang uses Gen Z slang keywords:
bussin- ifbussd- elif/else ifno cap- elseslay- whilelet's go- fordrop- def (function definition)tea- returnweak- var (variable declaration)strong- const (constant declaration)sus- Truefake- Falsebased- andcrazy- orcap- not- And many more!
Example:
drop greet(name):
tea "Hello " + name + "!"
weak message = greet("World")
print(message)
- Full support for control structures (if/else, while, for)
- Function definitions and calls
- Variable declarations
- Boolean and arithmetic operations
- Semantic analysis with error reporting
- Code generation targeting Julia
- Leverages Julia's JIT compilation for performance
We welcome contributions to SlangLang! Please see our Contributing Guide for details on how to get started.