Quetite is a small interpreted scripting language with a friendly, Ruby-like syntax, dynamic typing, and an stdlib of native helpers. It is implemented as a classic three-stage interpreter (lexer -> parser -> evaluator) in Rust.
println("Hello Quetite!")
[!WARNING]
Quetite is still a WIP (work in progress) language. Expect breaking changes!
Bool, Num, Str etc...)Callable type) and objects with constructors, static and bound methods (Obj type)List and Dict types)Str.len(), List.push(), Dict.keys(), etc.)if/else, while, for over iterables, matchthrow and try/catch/ensure.. and ..= operators), list/string slicing (str[a..b]), nullish coalescing (a ?? b), power (a**b) and ternary (cond ? a : b) operatorsfalse, Null, 0 are falsy; everything else is truthy)Sys, Math, Rand, Term etc.)usehelp commandPrereqs: Rust toolchain installed via rustup.
Build and run a script:
cargo run path/to/script.qte
Run the example snake.qte:
cargo run examples/snake.qte
Run the interactive REPL:
cargo run
Use the help command inside the REPL to interactively explore "The Quetite Language Reference" and "API Reference" documentations. Also check out the examples folder to see other examples!
println("Rock Paper Scissors in Quetite!")
var moves = ["rock", "paper", "scissors"]
var beats = {
"rock": "scissors",
"paper": "rock",
"scissors": "paper"
}
while true do
print("\nMake your move: ")
var user = read()
if user == "q" break
if !moves.contains(user) do
print("Invalid move! Valid moves are: ")
println(moves)
continue
end
var computer = Rand.list(moves)
println("\nYour move: " + user)
println("Computer's move: " + computer)
if beats[computer] == user println("\nComputer wins!")
if beats[user] == computer println("\nYou win!")
if user == computer println("\nIt's a draw!")
end
See "The Quetite Language Reference" for a full list and detailed explanations of Quetite's features.
Values & Prototypes
type(), type_of(), type_check() on any value; conversions via to_*() helpers.
Strings
Indexing and slicing; len(), repeat(n), and terminal color/style helpers.
Lists
Dynamic arrays with len(), push(), pop(), insert(i, v), remove(i), first(), last(), contains(v).
Dicts
Hash maps keyed by Null/Bool/Num/Str; len(), contains(k), insert(k, v), remove(k), get(k), keys(), values().
Control Flow
if/else, while, for value, index in iterable, match, ternary cond ? a : b, ranges a..b and a..=b with optional step, slicing with ranges.
Errors
try/catch/ensure and throw; internal error types include TypeErr, NameErr, ArityErr, ValueErr, NativeErr, IOErr, UserErr.
Objects & Functions
First-class functions; objects with optional init() constructor, static methods, and bound methods using self.
examples - example Quetite scriptssrc/lexer - tokenizersrc/parser - recursive descent parser producing ASTsrc/evaluator - tree-walk interpreter and stdlib nativesREFERENCE.md - full language referenceLast modified 15 January 2026