Shanraq.org Shanraq.org

Publishing archive

Wednesday, 2 September 2026

Wednesday

September 2026
MonTueWedThuFriSatSun
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

The highlighted days are the ones with something published; those are clickable.

IT

Strings and runes in Go: why a Kazakh letter is two bytes

The seventh lesson of the Go course. Why len("шаңырақ") comes back as 14 rather than 7, how a byte differs from a letter, and what a rune is. Walking a string with range, counting letters honestly with utf8.RuneCountInString, and the trap that matters: cutting a string by bytes splits a Kazakh letter clean in half.

IT

Branching and loops in Go: if, else and the only for

The sixth lesson of the Go course. How a program picks between two paths: if, else if and else, comparisons, and the AND, OR and NOT that join them. And the loop — Go has exactly one, the word for, in three shapes: with a counter, on a condition, and endless with a break. The language has no while, no do-while and no foreach.