About Algorizm
Algorizm is a general-purpose programming language whose keywords are Uzbek words. Its syntax follows Python closely, so programs are short and easy to read, and everything learned in Algorizm carries over to other languages.
funksiya salom(ism):
agar ism == "":
chiqar("Salom, dunyo!")
aks holda:
chiqar(f"Salom, {ism}!")
salom("Ali")
salom("")Salom, Ali! Salom, dunyo!
Program files have the extension .alg, and the command that runs them is algorizm.
Who it is for
- Pupils and students who are learning to program. They can concentrate on conditions, loops and functions without first having to learn English words.
- Teachers who want to explain algorithms in the language of the classroom. Error messages are in Uzbek too, so a pupil can read what went wrong.
- Anyone who is curious how a programming language works inside. Algorizm is small enough to read from start to finish.
Where the name comes from
The language takes its name from algorismus, the medieval Latin form of the name of Muhammad ibn Muso al-Xorazmiy (about 780–850), a mathematician and astronomer born in Khorezm, in today's Uzbekistan. In Latin translations of his book on Indian numerals his name was written Algoritmi, and the way of calculating that the book taught came to be called algorismus; from it comes the word algorithm. The title of his book on solving equations gave the world the word algebra. Every program is an algorithm, so every program already carries his name.
What it can do
- Whole numbers, real numbers, text, lists, dictionaries, sets, tuples and bytes.
- Conditions, loops, functions with default and named arguments, nameless functions and closures.
- Classes with inheritance, computed fields and static methods.
- Generators that produce values one at a time.
- Error handling with
urin,ushlaandtashla. - Modules: your own files and a standard library for mathematics, random numbers, time and dates, files and folders, JSON and regular expressions.
- An interactive mode for trying things out line by line.
- Full Unicode text: Latin, Cyrillic and any other script.
How it works
Algorizm is written in portable C11 and uses no outside libraries. The source of a program is read into a syntax tree, compiled to bytecode and run on a stack-based virtual machine. Memory is freed automatically by a garbage collector. The whole language is one program of about a megabyte, and it runs the same way on Windows, Linux and macOS.
What it does not have yet
Algorizm is young; this is version 0.1. Some things known from Python are not there yet: list comprehensions, format rules inside f-strings, operator overloading and network access. The page For Python programmers lists the differences.
Where to go next
- Download Algorizm for your system.
- Write your first program.
- Read the tutorial from the beginning.
- Look at complete example programs.
- Ask questions and show your programs on the forum.