We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Himalaya
- This entry isn't about the Himalayan Mountain Range.
Himalaya is a programming language designed by PSTF which is based on Tibetan language. Fun fact: The author is not from Xizang (Tibet).
Design Philosophy
- All keywords are valid Tibetan words (no arbitrary coinages).
- Synonyms bridge technical gaps: e.g., བཤད (say/speak) for output, ཉར (store/keep) for assignment, ལས་ཀ (work/task) for function definition.
- Script: Uses standard Uchen script (Unicode range 0F00–0FFF).
- Dynamic typing with native numeric (གྲངས), textual (ཡིག), boolean (བདེན/རྫུན), and list (ཐོ) types.
- Blocks are defined by indentation (4 spaces recommended).
Core Syntax
Core Keywords & Vocabulary
English Concept Tibetan Keyword Literal Meaning Store / Assign ཉར Keep / Deposit Function / Def ལས་ཀ Work / Task Return / End མཇུག End / Conclusion Print / Output བཤད Speak / Say Read / Input ཉན Hear / Listen If གལ་ཏེ If Else གཞན་ན Otherwise While བསྐོར Cycle / Revolve For (in) རིམ ... ནང་ Sequence ... in True / False བདེན / རྫུན Truth / Lie Comment འཆར Plan / Note
Data Types and Names
- གྲངས (Number)
- ཡིག (String)
- ཐོ (Array/List)
- བདེན་རྫུན (Boolean)
Data Structures: Strings & Arrays
Strings (ཡིག)
- Literals are written in double quotes. For example,
"བཀྲ་ཤིས་བདེ་ལེགས". - Concatenation: + operator.
- Indexing:
ཡིག[ཨང་](returns a single-character string).
Arrays / Lists (ཐོ)
- Literal:
ཐོ་གསར [༡, ༢, "ཨ", "བ"](new list). - Built‑in operations (all are valid Tibetan compound words):
Operation Syntax Meaning Length ཐོ་ཐིག(ཐོ) Count the list Get element ཐོ[ཨང་] Bracket indexing Set element ཐོ་འཇོག(ཐོ, ཨང་, གྲངས) Put value at index Append ཐོ་བསྣན(ཐོ, དངོས) Add element to end Pop last ཐོ་ལེན(ཐོ) Take the last element
Operators
Arithmetic (+, -, *, /) operators are written in standard infix notation.
Comparison operator table:
Operator Meaning མཚུངས Equal to (==) མི་མཚུངས Not equal (!=) ཆེ Greater than (>) ཆུང Less than (<) ཆེ་མཚུངས Greater or equal (>=) ཆུང་མཚུངས Less or equal (<=)
Logical operators:
- AND: དང་ (and)
- OR: ཡང་ན (or)
- NOT: མིན (not)
Range for loops: གྲངས་བཀོལ – e.g., ༡..༡༠ (1 to 10 inclusive).
Control Flows
If-elif-else
གལ་ཏེ ཀྲི་ཆེན > ༡༠ {
བཤད "ཆེ་དྲགས" # "Too large"
} གཞན་ན ཀྲི་ཆེན < ༠ {
བཤད "ཆུང་དྲགས" # "Too small"
} གཞན་ན {
བཤད "འཚམ་འཚམ" # "Just right"
}
While-loop
ཉར ཀྲི་ཆེན = ༠
བསྐོར ཀྲི་ཆེན < ༥ {
བཤད ཀྲི་ཆེན
ཉར ཀྲི་ཆེན = ཀྲི་ཆེན + ༡
}
Iterative loop
# Over a numeric range (1 to 5)
རིམ ཨང་ ནང་ ༡..༥ {
བཤད ཨང་
}
# Over an array
ཉར མིང་ཐོ = ཐོ་གསར ["ཨ", "བ", "ཅ"]
རིམ ཡིག་ཆ་ ནང་ མིང་ཐོ {
བཤད ཡིག་ཆ་
}
Functions (ལས་ཀ)
Defined with ལས་ཀ followed by name and parameters.
Return value with མཇུག.
Recursion is supported (crucial for Turing completeness).
For example, this is a factorial function:
ལས་ཀ ཨང་བསྒྱུར (ཨང་) {
གལ་ཏེ ཨང་ <= ༡ {
མཇུག ༡
}
མཇུག ཨང་ * ཨང་བསྒྱུར(ཨང་ - ༡)
}
བཤད ཨང་བསྒྱུར(༥) # Output: 120
Example Programs
May you be lucky and happy!
བཤད "བཀྲ་ཤིས་བདེ་ལེགས" # Prints "Tashi Delek"
FizzBuzz
རིམ ཨང་ ནང་ ༡..༡༥ {
གལ་ཏེ ཨང་ % ༣ == ༠ དང་ ཨང་ % ༥ == ༠ {
བཤད "བཅོ་ལྔ།" # "Fifteen"
} གཞན་ན ཨང་ % ༣ == ༠ {
བཤད "ཨང་གསུམ" # "Three"
} གཞན་ན ཨང་ % ༥ == ༠ {
བཤད "ཨང་ལྔ" # "Five"
} གཞན་ན {
བཤད ཨང་
}
}
One Round Cat with Prompt
ཉར མིང་ = ཉན() # "Hear/listen" to user input བཤད "ཁྱེད་ཀྱི་མིང་: " + མིང་
Simple Calculator
འཆར ཨང་རྩིས་འཕྲུལ # Basic 4‑operation calculator
ལས་ཀ རྩིས (དང་པོ, མཚན་ཤོག, གཉིས་པ) {
གལ་ཏེ མཚན་ཤོག == "+" {
མཇུག དང་པོ + གཉིས་པ
} གཞན་ན མཚན་ཤོག == "-" {
མཇུག དང་པོ - གཉིས་པ
} གཞན་ན མཚན་ཤོག == "*" {
མཇུག དང་པོ * གཉིས་པ
} གཞན་ན མཚན་ཤོག == "/" {
གལ་ཏེ གཉིས་པ == ༠ {
བཤད "བགྲང་མི་ཆོག །ཐེངས་གཞན་འབྲི།"
མཇུག ༠
} གཞན་ན {
མཇུག དང་པོ / གཉིས་པ
}
} གཞན་ན {
བཤད "མཚན་ཤོག་མི་འཚམ །ཐེངས་གཞན་འབྲི།"
མཇུག ༠
}
}
# Interactive loop for the calculator
བསྐོར བདེན == བདེན {
བཤད "ཨང་དང་པོ (ལྡོག་པར་ཡིག་ཆ་འབྲི་ན་མཇུག་འགྲིལ): "
ཉར སྣང་༡ = ཉན()
གལ་ཏེ སྣང་༡ == "ལྡོག" {
བཤད "རྩིས་འཕྲུལ་ལ་བྱེ།"
མཇུག # exit the whole program (or break)
}
ཉར དང་པོ = གྲངས་བཟོ(སྣང་༡)
བཤད "མཚན་ཤོག (+, -, *, /): "
ཉར མཚན་ཤོག = ཉན()
བཤད "ཨང་གཉིས་པ: "
ཉར གཉིས་པ = གྲངས་བཟོ(ཉན())
ཉར འབྲས་བུ = རྩིས(དང་པོ, མཚན་ཤོག, གཉིས་པ)
བཤད "འབྲས་བུ: " + འབྲས་བུ
}
Turing Completeness Proof
Himalaya is Turing‑complete because it satisfies the three fundamental criteria:
- Mutable state – ཉར provides unbounded, mutable variables.
- Conditional branching – གལ་ཏེ / གཞན་ན enables arbitrary decision points.
- Repetition or recursion – བསྐོར (while) and རིམ (for) offer unbounded looping; functions can recurse indefinitely.
With these, we can:
- Simulate a Minsky machine (unbounded counters via variables, conditionals, and བསྐོར).
- Encode arbitrary string and array manipulations (which can serve as a Turing tape).
- Implement a universal interpreter (given enough time and memory).
Thus, any computable function can be expressed in Himalaya.
Quick Reference
Comment: འཆར This is a comment
Assign: ཉར x = ༡༠
Print: བཤད x
If: གལ་ཏེ x > ༡ { ... } གཞན་ན { ... }
While: བསྐོར x < ༡༠ { ... }
For range: རིམ i ནང་ ༡..༡༠ { ... }
For list: རིམ v ནང་ ཐོ_མིང་ { ... }
Function: ལས་ཀ མིང་ (ཕྱི་) { ... མཇུག དངོས ... }
Array get: ཐོ[༠]
Array len: ཐོ་ཐིག(ཐོ)
Array push: ཐོ་བསྣན(ཐོ, དངོས)
Input: ཉན()
Summary
༄ སྐད་ཡིག་གི་ནུས་པས་ལས་འཕྲོ།