Code
Clone this repository
Search code
zern
A very cool language
Features
- Clean indentation-based syntax
- Targets x86-64 Linux and Windows*
- No libc required!
- Produces tiny static executables (10KB for unstripped
hello.zr) - Has static typing, UFCS, generics, variadics, custom allocator, hashmaps, HTTP library, DNS resolver, etc.
Syntax
include "io.zr"
func main[] : i64
answer := os.urandom_i64()->abs() % 100
while true
io.println("Guess a number: ")
guess, err := io.read_line()->parse_i64()
if err
io.println("Not a number!")
continue
if guess == answer
io.println("You win!")
break
else if guess < answer
io.println("Too low!")
else
io.println("Too high!")
For more see examples/.
Quickstart
git clone https://git.ton1.dev/toni/zern
cd zern
# make sure /usr/local/bin is in your PATH or set custom PREFIX
./install.sh
zern