Simple Language

A minimalist programming language that compiles to Go. Designed for humans first, computers second.

View on GitHub
Syntax

No semicolons, brackets, or cryptic symbols.

Readability

Commands are plain English you already know.

Networking

HTTP requests and JSON parsing built in.

Performance

Compiles to Go for efficient execution.

Traditional Simple
for i := 0; i < 10; i++ repeat 10
arr = append(arr, val) push val to arr
if x == y { ... } if x is y

Quick Start

Create your first program

Save as hello.simple

hello.simple
say "Hello, World!"
ask text name "What's your name?"
say "Nice to meet you," name "!"

Run it

Terminal
# With Go installed
go run main.go hello.simple

# Or use the compiled binary
main.exe hello.simple
That's it. You're ready to write Simple programs.

Installation

Direct Execution

Requires Go. Good for development.

go run main.go program.simple

Compiled

Build once, run without dependencies.

go build -o main main.go
./main myprogram.simple

Output & Variables

Display

CommandExample
saysay "Hello"
clearclear

Variables & Math

Variables
set x to 10
set name to "Alice"

inc x
dec x
add 5 to x
multiply x by 2
random dice between 1 6

Control Flow

Conditionals

If / Elif / Else
if score > 90
    say "Grade: A"
elif score > 80
    say "Grade: B"
else
    say "Grade: F"
end

Loops

Repeat / While / Each
# Simple repeat
repeat 10
    say "Looping..."
end

# While loop
while i < 10
    inc i
end

# For-each loop
each color in colors
    say color
end

Data Structures

Lists

list fruits is "apple" "banana"
push "cherry" to fruits
get item from fruits at 0

Maps

map user
put "Alice" in user at "name"
key val from user at "name"

Functions

define greet with name
    say "Hello" name
end

run greet with "Alice"

I/O & Network

User Input

ask textask text var "Prompt"
ask numberask number var "Prompt"

File System

write data to "file.txt"
read "file.txt" into content
exists "file.txt" store hasFile

Web Requests

fetch "https://api.example.com" into response
json data into response

Examples

Number Guessing Game

guess.simple
say "=== NUMBER GUESSING GAME ==="
random secret between 1 100
set attempts to 0

set guessed to false
while guessed is false
    ask number guess "Your guess:"
    inc attempts

    if guess is secret
        say "Correct! You won in" attempts "attempts!"
        set guessed to true
    elif guess < secret
        say "Too low. Try again."
    else
        say "Too high. Try again."
    end
end

FizzBuzz

fizzbuzz.simple
set i to 1
while i < 101
    modulo i by 15 store mod15
    modulo i by 3 store mod3
    modulo i by 5 store mod5

    if mod15 is 0
        say "FizzBuzz"
    elif mod3 is 0
        say "Fizz"
    elif mod5 is 0
        say "Buzz"
    else
        say i
    end
    inc i
end

Todo List Manager

todo.simple
say "=== TODO LIST ==="
list todos is

define showMenu
    say ""
    say "1. Add task"
    say "2. View all tasks"
    say "3. Exit"
end

define showTasks
    say ""
    each task in todos
        say "  " task
    end
end

set running to true
while running is true
    run showMenu
    ask number choice "Choose option:"

    if choice is 1
        ask text task "Enter new task:"
        push task to todos
        say "Task added."
    elif choice is 2
        run showTasks
    elif choice is 3
        say "Goodbye."
        set running to false
    end
end

Temperature Converter

temp.simple
define celsiusToFahrenheit with c
    set f to c * 9
    divide f by 5
    add 32 to f
    say c "°C =" f "°F"
end

say "1. Celsius to Fahrenheit"
say "2. Fahrenheit to Celsius"
ask number choice "Choose:"

if choice is 1
    ask number temp "Enter °C:"
    run celsiusToFahrenheit with temp
end

Patterns

Nested Loops

Multiplication table
set i to 1
while i < 11
    set j to 1
    while j < 11
        set product to i * j
        say i "×" j "=" product
        inc j
    end
    inc i
end

Data Pipeline

Read, filter, write
read "data.csv" into raw
list processed is

each line in raw
    if line contains "error"
        push line to processed
    end
end

write processed to "errors.txt"

Best Practices

Naming

Use descriptive variable names. Your future self will thank you.

Avoid

set x to 100
set y to 5

Prefer

set totalScore to 100
set lives to 5

Edge Cases

Always check if files exist or inputs are valid before processing.

Troubleshooting

Variable not defined — Declare with set before using. Check spelling matches exactly.
Usage: go run main.go [file] — You forgot to provide the filename argument.

Quick Reference

OUTPUT say "text" Print to console clear Clear screen VARIABLES set x to 10 Create / assign inc x Increment dec x Decrement add 5 to x x += 5 CONDITIONS if x is 5 Equal if x > 10 Greater than if x contains "a" Contains elif / else / end Branches LOOPS repeat 10 ... end Loop N times while x < 10 ... end Conditional loop each item in list For-each FUNCTIONS define func ... end Declare function run func Call function I/O & WEB ask text x "msg" Input write x to "file" File write read "file" into x File read fetch "url" into x HTTP GET

Philosophy

Simple Language embodies the principle that code should be written for humans first. No cryptic symbols, no hidden complexity — just clear, expressive code.