-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Orgena Wiki
Welcome to the official documentation for Orgena and Orgena-Web! Orgena is a beginner-friendly, English-like scripting language and interpreter designed for learning, creativity, and automation in the browser.
Table of Contents
What is Orgena? Getting Started Language Reference Basic Syntax Variables Lists Control Flow Functions User Input Math & String Operations Date & Time Other Built-in Abilities Examples Advanced Features Contributing Credits License What is Orgena?
Orgena is an intuitive, English-like language that lets you write scripts in plain language and run them instantly in your browser using Orgena-Web.
Natural language syntax: Write code almost like you speak. Instant feedback: See results live in Orgena-Web. Extensible: Add your own commands and abilities. Open source: GitHub repo Getting Started
Open Orgena-Web in your browser (see GitHub or use your own local .html file). Type Orgena code in the textbox. Click Run Orgena to see the output. No installation required!
Language Reference
Basic Syntax
Statements are written in plain English and are case-insensitive. Each command goes on its own line. Indentation is used for blocks (loops, functions). Example
(Some of the)Codes:
Say "Hello, world!" ——————————————(prints “Hello, world!” to the console
Remember name is "Alice" ———————-(saves a variable named “name” as “Alice”
Variables:
Store and use values with natural English:
Remember age is 23 ————— age variable is 23 Say age ——————- prints 23 Or:
Code: —————- x var is 10 x is 10 Say x ——— prints 10
Lists:
Create and use lists: ———- I think this place is easy to understand ⬇️
Code: Add "apple" to fruits Add "banana" to fruits Show fruits Remove "apple" from fruits Clear fruits Count fruits List Operations (examples):
Add "item" to list Remove "item" from list Show list Clear list Count list Join list with ", " Sort list Reverse list Concat list1 with list2 Unique list Slice list from 2 to 4 Replace "a" with "b" in list Sum numbers Product numbers Min numbers Max numbers Index of 5 in numbers Length of names Control Flow
If / Else:
Code:
If x is greater than 5, Say "Big" else Say "Small" If name is equal to "Alice", Say "Hello, Alice!" Repeat While (Loops)
Code:
Repeat while x is less than 5, Say x x is x plus 1 End For Each (List Loop)
Code:
For each fruit in fruits, Say fruit End Functions
Define and call custom functions:
Code:
Define greet with who, Say "Hello, " plus who End
Call greet with "Bob" User Input
Prompt the user:
Code:
Ask for name Say "Hello, " plus name Math & String Operations
Math:
Arithmetic: x is 3 plus 5, x is 10 minus 2, x is 4 times 2, x is 9 divided by 3 Powers: Say power 2 8 Roots: Say sqrt of 25 Modulo: Say modulo 7 3 Absolute: Say abs of -5 Random: x is Random between 1 and 10 Rounding: Say round 4.6, Say floor 5.7, Say ceil 5.2 Trigonometry: Say sin 3.14, Say cos 0, Say tan 1 Logarithms: Say log 100 Exponents: Say exp 2
Strings:
Uppercase "hello world" Lowercase "HELLO" Substring "Orgena" from 2 to 5 Repeat "ha" 3 times Trim " space " Pad "42" to 5 with "0" Contains "gen" in "Orgena" Starts with "Or" in "Orgena" Ends with "na" in "Orgena" Date & Time
Say Now ———- prints current time, date Say current time ————- prints time Say current date ———— prints the date Other Built-in Abilities:
Orgena supports over 120+ built-in abilities, including but NOT LIMITED to:
All standard math, list, and string operations Advanced list manipulation (map, filter, reduce, unique, concat, sort, reverse, slice) Control flow (loops, if/else, repeat, break, continue) Custom functions User input System time/date Random number and random choice from lists Indexing and searching (index of, contains, starts/ends with) List arithmetic (sum, product, min, max) Extensive type conversions For the full, ever-expanding list, see the Abilities Wiki Page.
Examples
Hello World
Code: Say "Hello, world!" Lists and Loops
Code: Add "red" to colors Add "green" to colors Add "blue" to colors For each c in colors, Say c End Asking for Input
Code: Ask for name Say "Hello, " plus name Math
Code: x is 5 y is 8 Say x plus y Say sqrt of y Say power 2 10 Advanced List Operations
Code: Add 1 to nums Add 2 to nums Add 3 to nums Sum nums Say sum_result Reverse nums Show nums Advanced Features
Custom Functions: Define and call your own routines with parameters. Blocks: Use indentation for multi-line loops, conditionals, and functions. Comments: Use # or // at the start of a line to add comments. Extensibility: Add new English-like commands in the interpreter. Contributing
Found a bug? Have a feature request? Open an issue or submit a pull request! Want to add new commands or abilities? See the interpreter logic in the HTML/JS code—it's easy to extend. Credits
Created by HPD666 and contributors. Inspired by Scratch, Snap!, Python, and natural-language coding communities.
License:
Orgena and Orgena-Web are released under the Apache 2.0 License. See LICENSE for details.
Happy scripting with Orgena! (Orgena will have more features soon)🔜
Please support us