smoλ
A safe & fast low-level language.
smoλ

Tutorial

for beginners
smoλ

Description

for those familiar with other languages
smoλ

Material

white papers and blog posts (under construction)
@include std.builtins
@include std.file
@include std.mem -> memory

smo len(file f)
    &length = 0  // mutable
    nom          // going to create a safe type
    :chunks(f, 1024, memory.stack)
    :while next(str& chunk)
        length = length+chunk:len
    ---> length  // end `while` then return from `len`

service main()
    print("Give a file:")
    path = str:read  // equivalent to read(str)
    print(str(f:file:len/1024)+" KB")
    --  // end without return