Simple Language

A minimalist, human-readable programming language that compiles to Go. Code designed for humans first, computers second.

βœ… No Complex Syntax

No semicolons, brackets, or confusing symbols to remember.

πŸ“– Reads Like English

Commands are natural language instructions you already understand.

🌐 Built-in HTTP

Make API requests and parse JSON with simple commands.

⚑ Compiles to Go

Efficient execution with Go's performance under the hood.

Why Simple?

Traditional Code Simple Code
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

1. Create your first program

Create a file called hello.simple:

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

2. Run it

# If you have Go installed
go run main.go hello.simple

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

πŸ“¦ Installation

Option 1: Direct Execution

Requires Go installed. Good for development.

go run main.go program.simple

Option 2: Compiled (Recommended)

Build once, run anywhere without dependencies.

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

Output & Variables

Display

CommandExample
saysay "Hello"
clearclear

Variables & Math

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 score > 90
    say "Grade: A"
elif score > 80
    say "Grade: B"
else
    say "Grade: F"
end

Loops

# 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 (Arrays)

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

Maps (Dictionaries)

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

🎨 Example Programs

1. Number Guessing Game

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

2. FizzBuzz

say "=== FIZZBUZZ ==="
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

3. Todo List Manager

say "=== TODO LIST MANAGER ==="
list todos is

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

define showTasks
    say ""
    say "=== YOUR TASKS ==="
    each task in todos
        say "β€’ " task
    end
    say "================="
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

4. Temperature Converter

say "=== TEMPERATURE CONVERTER ==="

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

πŸš€ Advanced Patterns

Nested Loops

say "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, Process, Save
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

❌ Bad

set x to 100
set y to 5

βœ… Good

set totalScore to 100
set lives to 5

Handle Edge Cases: Always check if files exist or inputs are valid before processing.

πŸ”§ Troubleshooting

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

🎯 Quick Reference Card

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ SIMPLE LANGUAGE β”‚ β”‚ Quick Reference Guide β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ 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, and computers second. No cryptic symbols, no hidden complexityβ€”just clear, expressive code.