Getting started
Garo (가로) is an array language. You hand it a list of numbers, a matrix or a table, and it works on the whole thing at once. There are no loops to write.
닫 [[1, 2], [3, 4]]That one character, 닫, summed each row of the matrix. It is a single Korean syllable, and it is put together from three parts. Each part tells you something about what the operator does. Once you know the parts, you can read most operators on sight, even ones you have never seen.
What Garo is for
Garo is for data work. It covers the same ground as NumPy, as SQL, and as a spreadsheet's formulas:
- statistics on a column of numbers: means, spreads, running totals;
- the matrix math inside a neural network: matrix products, adding a bias, clamping;
- reports from keyed data: group by, join, filter, top N;
- time series: moving averages, running maxima, windows.
It is not a general-purpose language. It has no files, no network and no printing. It computes values from values.
Try it
The box on the home page runs the real Garo interpreter in your browser. Nothing is sent to a server.
- Type an expression and press Enter to run it.
- Press Shift+Enter to add another line.
- A line of the form
name := exprnames a value. Put such lines before the last line, and the last line can use the names.
So this runs as one program, and the result is the mean of the squared distances from the mean (the variance):
xs := [2, 4, 4, 4, 5, 5, 7, 9]
d := xs - 당 xs
당 (d × d)Every example in these docs with a result under it is a program like that. The site checks each one against the interpreter when it is built, so the result shown is what Garo prints.
Typing Hangul
You do not need a Korean keyboard. There are three ways in:
- The jamo bar. Under the box is a row of buttons. A jamo is one letter of the Korean alphabet, and a syllable is built from two or three of them. Click ㄷ, then ㅏ, then ㄷ, and the box shows 닫. The bar always offers the letters that can come next.
- Lone jamo from the keyboard. If you can type the letters ㄷ, ㅏ and ㄷ one at a time, the box puts them together into 닫 the same way.
- A Korean keyboard. A syllable typed whole goes in as it is.
Backspace takes a syllable apart one letter at a time. So to change 닫 into 닥, press Backspace once (leaving 다) and click ㄱ.
Reading your first syllable
Here is 닫 taken apart:
| Part | Letter | Name here | What it says |
|---|---|---|---|
| first consonant | ㄷ | the family | what the operator does: reduce, collapse many values into one |
| vowel | ㅏ | the flow | what it runs over: along each row (the last axis) |
| last consonant | ㄷ | the final | how it finishes: sum |
Reduce, along rows, by summing: the row sums. Change one part and you get a neighbor. 닥 has the final ㄱ (toward the greater), so it finds each row's largest value:
닥 [[1, 2], [3, 4]]And 덛 has the flow ㅓ (along the first axis, down each column), so it sums the columns:
덛 [[1, 2], [3, 4]]There are 12 families, 9 flows and 9 finals: 30 parts in all. Not every combination means something, and 258 syllables are in use. The operator list has every one.
Where to go next
- The tutorial builds up the language a step at a time, starting from plain values.
- The guides build one realistic thing each: statistics, a neural network layer, a sales report and a time series.
- The reference pages cover the syntax, values and types, the lattice of parts and errors.
What is ready and what is not
Garo is alpha. Names, syllables and printed forms may still change.
What runs today is the expression layer: values, operators and the ways to combine them, which is everything in these docs. The spec also describes a sentence layer, where programs read like Korean sentences, and live views that update when their data changes. Both are planned, and neither runs yet.
There is no native install yet. The install page says where that stands. Until then, the box on the home page is the way to run Garo.