Standard Library Guide
Hüma comes with a rich set of built-in libraries to speed up your development process. Everything from mathematics to the file system is optimized.
Use the 'yükle' directive to include a module in your project:
yükle "matematik.hb"
calculate
matematik.hb
Modern mathematical functions and constants.
CONSTANTS
PI
= 3.14159265…
Circle constant π
E
= 2.71828182…
Euler's number e
FUNCTIONS
karesi(n: Sayı) → SayıReturns n²
küpü(n: Sayı) → SayıReturns n³
mutlak(n: Sayı) → SayıAbsolute value |n|
kuvvet(a: Sayı, b: Sayı) → SayıReturns aᵇ
yuvarla(n: Sayı) → SayıRounds to nearest integer
faktöriyel(n: Sayı) → SayıReturns n! (factorial)
palette
renkler.hb
ANSI color outputs for current terminals.
CONSTANTS
KIRMIZI
= \x1b[31m
Red ANSI color code
YEŞİL
= \x1b[32m
Green ANSI color code
SARI
= \x1b[33m
Yellow ANSI color code
MAVI
= \x1b[34m
Blue ANSI color code
FUNCTIONS
renkli_yaz(metin: Yazı, renk: Yazı)Prints text in the specified ANSI color
başarı_yaz(m: Yazı)Prints text in green (success style)
hata_yaz(m: Yazı)Prints text in red (error style)
uyarı_yaz(m: Yazı)Prints text in yellow (warning style)
schedule
zaman.hb
Time measurement and delay tools.
FUNCTIONS
beklet(saniye: Sayı)Pauses execution for given seconds
kronometre_başlat() → SayıReturns current timestamp (milliseconds)
kronometre_bitir(başlangıç: Sayı) → SayıReturns elapsed ms since başlangıç
filter_list
liste.hb
Advanced list operations (map, filter).
FUNCTIONS
eşle(liste: Liste, f: Fonksiyon) → ListeMap — applies f to every element, returns new list
filtrele(liste: Liste, f: Fonksiyon) → ListeFilter — keeps elements where f returns truthy
indirge(liste: Liste, f: Fonksiyon, baş: Değer) → DeğerReduce — folds list into single value starting from baş
ters_cevir(liste: Liste) → ListeReturns a reversed copy of the list
içeriyor_mu(liste: Liste, eleman: Değer) → MantıksalReturns 1 if element exists in the list
dilimle(liste: Liste, baş: Sayı, son: Sayı) → ListeReturns a sub-list from start to end index
folder_open
dosya.hb
File read, write, and line splitting.
FUNCTIONS
güvenli_oku(yol: Yazı) → Yazı | hataReads file at yol; returns contents or raises an error on failure
satırlara_ayır(metin: Yazı) → ListeSplits text into a list of lines
dosya_oku_bayt(yol: Yazı) → BaytReads file as binary data — Rust built-in
settings
built-in
Environment variables and shell interaction.
FUNCTIONS
ortam_değişkeni(anahtar: Yazı) → Yazı | BoşReturns the value of the environment variable
sistem(komut: Yazı) → YazıExecutes a shell command and returns its output
analytics
istatistik.hb
Mean, variance, and standard deviation calculations.
FUNCTIONS
ortalama(liste: Liste) → SayıCalculates arithmetic mean
en_büyük(liste: Liste) → SayıReturns the maximum value in the list
en_küçük(liste: Liste) → SayıReturns the minimum value in the list
varyans(liste: Liste) → SayıCalculates population variance
standart_sapma(liste: Liste) → SayıCalculates standard deviation
text_fields
dizgi.hb
Character checks and string helpers.
FUNCTIONS
büyük_mü(karakter: Yazı) → MantıksalChecks if character is uppercase
küçük_mü(karakter: Yazı) → MantıksalChecks if character is lowercase
boşluk_mu(karakter: Yazı) → MantıksalChecks if character is whitespace
casino
rastgele.hb
Random number generation and list shuffling.
FUNCTIONS
r_tamsayı(min: Sayı, max: Sayı) → SayıGenerates random integer in range [min, max]
r_seç(liste: Liste) → DeğerPicks a random element from the list
r_karıştır(liste: Liste) → ListeShuffles the list randomly
bug_report
birim_test.hb
Unit test framework: test_et, iddia_et, test_raporu.
FUNCTIONS
test_et(ad: Yazı, f: Fonksiyon) → BoşRuns test function and reports result
iddia_et(beklenen: Değer, gelen: Değer, mesaj: Yazı) → MantıksalAsserts two values are equal, returns 1 if true
test_raporu() → BoşPrints summary of all test results