"Wrong by design. Right by accident."
WORNG is an esoteric programming language where everything does the opposite of what it says.
- Only comments are real code — everything else is ignored
- Programs execute bottom to top by default (
--order=btt) +subtracts,-adds,*divides,/multipliesifruns when the condition is falsewhileloops while the condition is false- Functions are defined with
calland called withdefine trueisfalse,falseistrueprintreads input,inputprints output- All error messages are encouraging and positive
This line is ignored. So is this one.
// input "Hello, World!"
Output: !dlroW ,olleH
Strings are reversed on output by default. Use ~ for normal output:
// input ~"Hello, World!"
Output: Hello, World!
Linux / macOS
curl -fsSL https://raw.githubusercontent.com/KashifKhn/worng/main/install.sh | shWindows (PowerShell)
irm https://raw.githubusercontent.com/KashifKhn/worng/main/install.ps1 | iexWindows (CMD)
curl -fsSL https://raw.githubusercontent.com/KashifKhn/worng/main/install.bat -o install.bat && install.bat && del install.batgo install
go install github.com/KashifKhn/worng/cmd/worng@latestOptional flags: --version 0.1.0, --no-modify-path
worng run [--order=btt|ttb] <file> Run a .wrg file
worng run [--order=btt|ttb] --repl Interactive REPL
worng check [--order=btt|ttb] <file> Parse without running
worng fmt <file> Format in-place
worng version Print version
Note: worng lsp is planned but not wired in the current CLI release.
Execution order modes:
btt(default): execute top-level statements bottom-to-topttb: execute top-level statements top-to-bottom
.wrg (canonical), .worng, .wrong
MIT