
Chapter 1 · GAD language
Library and modules
What GAD gives without asking, what it gives only when the program asks with sèvi ak, and the library families.
Capabilities: sèvi ak
Pure calculation is always there: mathematics, text, lists, dictionaries and time. Everything that gives the program a power over the outside world must be asked for at the top of the file.
sèvi ak vizyon # open a window, draw on the screen
sèvi ak simbi # network: HTTP, JSON, server
sèvi ak depo # data that stays
sèvi ak fichye # read and write files
sèvi ak sekirite # random tokens, passwords
sèvi ak pon # call C, C++ or Rust code
- You read the top of a file and you know what the program can do.
- A file that does not write
sèvi ak simbicannot send your data on the internet: the engine refuses. - Your own file is used with its path:
sèvi ak "pataje/modèl.gad".
The library families

- Click Language Libraries in the left bar.
- Click the tab Bibliotek GAD.
- Choose GAD keywords or GAD functions in the list, then double-click a line to insert it in the file.
| Family | What it holds |
|---|---|
| nonb | numbers and mathematics |
| tèks | text, base64, hashes |
| lis | lists: sort, filter, group |
| diksyonè | dictionaries |
| tan | dates and time |
| json, csv, toml, yaml, xml | data formats |
| regex | regular expressions |
| fichye, chemen | files, zip, paths |
| simbi | HTTP client, TCP, UDP, WebSocket |
| depo, sql | built-in database |
| sekirite | passwords, tokens |
| matris | matrix calculation for neural networks |
| imaj, son | PNG images, WAV sound |
| gwo, desimal | integers without limit, exact decimals |
| bit, petwo | exact 32-bit words, memory blocks |
| paralèl | several cores, with messages |
- A function has a short form and a clear form:
won(2.6)andnonb.won(2.6)are the same.
An SQL database and exact numbers
b = sql.louvri(":memwa:")
sql.egzekite(b, "CREATE TABLE pwodui (id INTEGER PRIMARY KEY, non TEXT NOT NULL, pri REAL)")
sql.egzekite(b, "INSERT INTO pwodui (non, pri) VALUES (?, ?)", ["Kafe", 250])
sql.egzekite(b, "INSERT INTO pwodui (non, pri) VALUES (?, ?)", ["Diri", 480])
sql.egzekite(b, "INSERT INTO pwodui (non, pri) VALUES (?, ?)", ["Lwil", 900])
pou chak p nan sql.egzekite(b, "SELECT non, pri FROM pwodui WHERE pri < ? ORDER BY pri", [500])
montre "{p.non} : {p.pri} goud"
fini
montre gwo.pisans(2, 128)
montre desimal.ajoute("0.1", "0.2")
Kafe : 250 goud
Diri : 480 goud
340282366920938463463374607431768211456
0.3
":memwa:"is a database that lives only while the program runs. A file path keeps it on disk.
Draw an image
sèvi ak fichye
im = imaj.nouvo(300, 180, "#00209f")
imaj.ranpli(im, 0, 90, 300, 90, "#d21034")
imaj.ranpli(im, 120, 60, 60, 60, "#ffffff")
imaj.ekri(im, "drapo.png")

