summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-31 14:38:04 +0300
committerPaul Buetow <paul@buetow.org>2026-05-31 14:38:04 +0300
commit10bd3f5e754bd73aa798fd59d2375c4617a013b8 (patch)
tree1de8c4263a284c484508b20b415706e195ee5d90
parent5e512dec42e18504e00803efe9aa3bc2fce6c3ac (diff)
Update content for gemtext
-rw-r--r--gemfeed/2026-06-01-gt-calculator.gmi90
-rw-r--r--gemfeed/2026-06-01-gt-calculator.gmi.tpl88
-rw-r--r--gemfeed/atom.xml116
-rw-r--r--index.gmi2
-rw-r--r--uptime-stats.gmi20
5 files changed, 280 insertions, 36 deletions
diff --git a/gemfeed/2026-06-01-gt-calculator.gmi b/gemfeed/2026-06-01-gt-calculator.gmi
index c361712a..c47c2a93 100644
--- a/gemfeed/2026-06-01-gt-calculator.gmi
+++ b/gemfeed/2026-06-01-gt-calculator.gmi
@@ -28,6 +28,7 @@ And no, this wasn't vibe-coded. I used a specific technique and a set of AI skil
* ⇢ ⇢ What it does
* ⇢ ⇢ Percentage calculations
* ⇢ ⇢ RPN arithmetic
+* ⇢ ⇢ ⇢ Modulo
* ⇢ ⇢ ⇢ Logarithms
* ⇢ ⇢ ⇢ Hyper operators (n-ary)
* ⇢ ⇢ ⇢ Comparisons and booleans
@@ -39,6 +40,7 @@ And no, this wasn't vibe-coded. I used a specific technique and a set of AI skil
* ⇢ ⇢ ⇢ Metric-aware arithmetic
* ⇢ ⇢ ⇢ Custom metrics
* ⇢ ⇢ ⇢ SI vs IEC modes
+* ⇢ ⇢ ⇢ Discovering metrics
* ⇢ ⇢ Stack manipulation
* ⇢ ⇢ Rational number mode
* ⇢ ⇢ The REPL
@@ -98,6 +100,15 @@ Six basic operators: `+`, `-`, `*`, `/`, `^`, `%`. All work on the stack, poppin
The fast integer power operator `**` uses binary exponentiation (O(log n) instead of O(n)). So `2 100 **` does about 7 multiplications instead of 99. It only accepts integer exponents — use `^` for fractional powers.
+### Modulo
+
+`%` gives the remainder after division:
+
+```sh
+gt '17 5 %' # → 2
+gt '100 7 %' # → 2
+```
+
### Logarithms
Three unary operators for when you need them:
@@ -123,7 +134,13 @@ gt '2 5 10 [*]' # → 100 (product)
gt '1000 2 2 2 2 [/]' # → 62.5
```
-Full set: `[+]`, `[-]`, `[*]`, `[/]`, `[^]`, `[%]` for arithmetic, plus `[lg]`, `[log]`, `[ln]` for logarithms. The log hyper operators work differently from the arithmetic ones — they compute the sum of the log function applied to each value, not a left-associative reduction. The square-bracket syntax is inspired by Raku's hyper operators.
+Full set: `[+]`, `[-]`, `[*]`, `[/]`, `[^]`, `[%]` for arithmetic, plus `[lg]`, `[log]`, `[ln]` for logarithms. The log hyper operators work differently from the arithmetic ones — they compute the sum of the log function applied to each value, not a left-associative reduction. A quick entropy calculation:
+
+```sh
+gt '0.25 0.5 0.25 [lg]' # → -5 (information theory entropy bits)
+```
+
+The square-bracket syntax is inspired by Raku's hyper operators.
=> https://raku.org
@@ -151,6 +168,13 @@ gt '72 68 gte 100 lte +' # → 2 (both checks pass, temp is in range)
gt '105 68 gte 100 lte +' # → 1 (out of range)
```
+Booleans also do plain arithmetic, which is occasionally useful:
+
+```sh
+gt 'true true +' # → 2 (1 + 1)
+gt 'false 5 +' # → 5 (0 + 5)
+```
+
## Variables and symbols
Store values with three assignment styles:
@@ -163,7 +187,16 @@ gt 'rate 100Mbps =' # standard (or rate = 100Mbps)
`vars` lists them, `clear` wipes all variables and constants, `:name d` deletes one. In REPL mode, variables persist to disk between sessions.
-Symbols (the `:x` syntax) are named placeholders on the stack. They're how you do explicit variable assignment and deletion without ambiguity. Bare identifiers that don't match any variable or constant also push as symbols.
+Symbols (the `:x` syntax) are named placeholders on the stack. The `:` prefix makes intent explicit: `:x` always pushes the symbol `x`, even if a variable named `x` already exists. This is how you delete a variable without ambiguity, and how you push a name onto the stack without resolving it.
+
+```sh
+> x 10 := # define x
+> x # pushes 10 (variable resolved)
+> :x # pushes :x (the symbol itself)
+> :x d # deletes the variable x
+```
+
+Bare identifiers that don't match any variable or constant also push as symbols.
## Built-in constants
@@ -178,6 +211,8 @@ gt 'sqrt2 sqrt3 *' # → 2.449 (√6)
Greek letter aliases work too: `π`, `τ`, `φ`, `√2`, `√3`, `√5`.
+There's also a `constants` command that lists all 36 in one shot. Edge cases are covered too — `inf`, `-inf`, and `nan` exist as constants if you ever need them.
+
## The metrics system
This is where `gt` earns its swiss army knife title. Every number carries a unit of measurement, and arithmetic understands those units.
@@ -242,16 +277,46 @@ gt '1GB 1024MB eq' # → false (SI: 1GB = 1000MB)
Define your own units:
```sh
-custom define reel 304.8 Distance # surveyor's reel
-custom define fortnight 1209600 Time
+custom define reel 304.8 Distance # surveyor's reel
+custom define fortnight 1209600 Time # 14 days
+custom define cup 240 Weight # cooking measure
```
-Then use them like built-ins: `5reel @m convert` → 1524.
+Then use them like built-ins:
+
+```sh
+> 5reel @m convert
+1524
+> 2fortnight @day convert
+28
+> 3cup @g convert
+720
+```
### SI vs IEC modes
Data size units have two modes. SI (default) uses powers of 1000. IEC uses powers of 1024. Switch with `metric decimal set` / `metric binary set`. The dedicated IEC units (KiB, MiB, GiB) are always unambiguous.
+### Discovering metrics
+
+You can explore what's available without leaving the REPL:
+
+```sh
+> metric list
+DataRate, DataSize, Distance, Speed, Time, Universal, Weight
+> metric DataRate
+Gbps, Kbps, Mbps, Tbps, bps
+```
+
+`metric compatible` checks whether two values can be combined before you try:
+
+```sh
+> 1km 5mi metric compatible
+km (Distance) and mi (Distance): true
+> 100Mbps 2hr metric compatible
+Mbps (DataRate) and hr (Time): false
+```
+
## Stack manipulation
Five operators for managing the RPN stack:
@@ -262,7 +327,7 @@ Five operators for managing the RPN stack:
- `show` / `showstack` / `print` — display the stack without modifying it
- `clear` — clear all variables and constants
-`dup` and `swap` come up a lot. Square a number: `7 dup *` → 49. Reverse operand order: `2 10 swap /` → 5 (instead of 0.2).
+`dup` and `swap` come up a lot. Square a number: `7 dup *` → 49. Reverse operand order: `2 10 swap /` → 5 (instead of 0.2). `pop` discards the top value if you pushed something by accident: `5 6 pop` → 5.
## Rational number mode
@@ -296,9 +361,16 @@ REPL-only. Has a known limitation with non-dyadic decimals and metric operations
Run `gt` with no arguments when attached to a terminal and you get the interactive session. Command history (1000 entries, persisted to `~/.gt_history`), tab completion, Emacs-style line editing, Ctrl+R reverse search.
-Variables save to disk between sessions. Session logging with `--log session.log`. Session state lives in `~/.local/state/gt/vars`.
+Variables save to disk between sessions. Session state lives in `~/.local/state/gt/vars`. For auditing or note-taking, session logging works like this:
-Built-in REPL commands: `help`, `clear`, `quit`/`exit`, `rpn`/`calc`, `rat`, `stack`. Tab-completes.
+```sh
+$ gt --log calc-session.log
+> 1Gbps 1hr *
+> @GB convert
+> quit
+```
+
+Built-in REPL commands: `help`, `clear`, `quit`/`exit`, `rpn`/`calc`, `rat`, `stack`. `stack` is a shorthand hint for viewing the RPN stack. Tab-completes.
Here's what a session looks like:
@@ -408,6 +480,8 @@ go install codeberg.org/snonux/gt/cmd/gt@latest
Or from the source directory: `mage install`.
+One quirk: there are no `-h` or `--help` flags. `gt version` gives you the version, and bare `gt` with no TTY prints usage. If you pass `-h`, `gt` tries to evaluate it as RPN and errors. It's intentional and keeps the surface area small.
+
## Wrapping up
The local LLM experiment worked. The code is clean enough, the tests pass, the docs are thorough, and I use the tool. The logo was generated by a local model too.
diff --git a/gemfeed/2026-06-01-gt-calculator.gmi.tpl b/gemfeed/2026-06-01-gt-calculator.gmi.tpl
index 6efb3bd8..2cba2842 100644
--- a/gemfeed/2026-06-01-gt-calculator.gmi.tpl
+++ b/gemfeed/2026-06-01-gt-calculator.gmi.tpl
@@ -74,6 +74,15 @@ Six basic operators: `+`, `-`, `*`, `/`, `^`, `%`. All work on the stack, poppin
The fast integer power operator `**` uses binary exponentiation (O(log n) instead of O(n)). So `2 100 **` does about 7 multiplications instead of 99. It only accepts integer exponents — use `^` for fractional powers.
+### Modulo
+
+`%` gives the remainder after division:
+
+```sh
+gt '17 5 %' # → 2
+gt '100 7 %' # → 2
+```
+
### Logarithms
Three unary operators for when you need them:
@@ -99,7 +108,13 @@ gt '2 5 10 [*]' # → 100 (product)
gt '1000 2 2 2 2 [/]' # → 62.5
```
-Full set: `[+]`, `[-]`, `[*]`, `[/]`, `[^]`, `[%]` for arithmetic, plus `[lg]`, `[log]`, `[ln]` for logarithms. The log hyper operators work differently from the arithmetic ones — they compute the sum of the log function applied to each value, not a left-associative reduction. The square-bracket syntax is inspired by Raku's hyper operators.
+Full set: `[+]`, `[-]`, `[*]`, `[/]`, `[^]`, `[%]` for arithmetic, plus `[lg]`, `[log]`, `[ln]` for logarithms. The log hyper operators work differently from the arithmetic ones — they compute the sum of the log function applied to each value, not a left-associative reduction. A quick entropy calculation:
+
+```sh
+gt '0.25 0.5 0.25 [lg]' # → -5 (information theory entropy bits)
+```
+
+The square-bracket syntax is inspired by Raku's hyper operators.
=> https://raku.org
@@ -127,6 +142,13 @@ gt '72 68 gte 100 lte +' # → 2 (both checks pass, temp is in range)
gt '105 68 gte 100 lte +' # → 1 (out of range)
```
+Booleans also do plain arithmetic, which is occasionally useful:
+
+```sh
+gt 'true true +' # → 2 (1 + 1)
+gt 'false 5 +' # → 5 (0 + 5)
+```
+
## Variables and symbols
Store values with three assignment styles:
@@ -139,7 +161,16 @@ gt 'rate 100Mbps =' # standard (or rate = 100Mbps)
`vars` lists them, `clear` wipes all variables and constants, `:name d` deletes one. In REPL mode, variables persist to disk between sessions.
-Symbols (the `:x` syntax) are named placeholders on the stack. They're how you do explicit variable assignment and deletion without ambiguity. Bare identifiers that don't match any variable or constant also push as symbols.
+Symbols (the `:x` syntax) are named placeholders on the stack. The `:` prefix makes intent explicit: `:x` always pushes the symbol `x`, even if a variable named `x` already exists. This is how you delete a variable without ambiguity, and how you push a name onto the stack without resolving it.
+
+```sh
+> x 10 := # define x
+> x # pushes 10 (variable resolved)
+> :x # pushes :x (the symbol itself)
+> :x d # deletes the variable x
+```
+
+Bare identifiers that don't match any variable or constant also push as symbols.
## Built-in constants
@@ -154,6 +185,8 @@ gt 'sqrt2 sqrt3 *' # → 2.449 (√6)
Greek letter aliases work too: `π`, `τ`, `φ`, `√2`, `√3`, `√5`.
+There's also a `constants` command that lists all 36 in one shot. Edge cases are covered too — `inf`, `-inf`, and `nan` exist as constants if you ever need them.
+
## The metrics system
This is where `gt` earns its swiss army knife title. Every number carries a unit of measurement, and arithmetic understands those units.
@@ -218,16 +251,46 @@ gt '1GB 1024MB eq' # → false (SI: 1GB = 1000MB)
Define your own units:
```sh
-custom define reel 304.8 Distance # surveyor's reel
-custom define fortnight 1209600 Time
+custom define reel 304.8 Distance # surveyor's reel
+custom define fortnight 1209600 Time # 14 days
+custom define cup 240 Weight # cooking measure
```
-Then use them like built-ins: `5reel @m convert` → 1524.
+Then use them like built-ins:
+
+```sh
+> 5reel @m convert
+1524
+> 2fortnight @day convert
+28
+> 3cup @g convert
+720
+```
### SI vs IEC modes
Data size units have two modes. SI (default) uses powers of 1000. IEC uses powers of 1024. Switch with `metric decimal set` / `metric binary set`. The dedicated IEC units (KiB, MiB, GiB) are always unambiguous.
+### Discovering metrics
+
+You can explore what's available without leaving the REPL:
+
+```sh
+> metric list
+DataRate, DataSize, Distance, Speed, Time, Universal, Weight
+> metric DataRate
+Gbps, Kbps, Mbps, Tbps, bps
+```
+
+`metric compatible` checks whether two values can be combined before you try:
+
+```sh
+> 1km 5mi metric compatible
+km (Distance) and mi (Distance): true
+> 100Mbps 2hr metric compatible
+Mbps (DataRate) and hr (Time): false
+```
+
## Stack manipulation
Five operators for managing the RPN stack:
@@ -238,7 +301,7 @@ Five operators for managing the RPN stack:
- `show` / `showstack` / `print` — display the stack without modifying it
- `clear` — clear all variables and constants
-`dup` and `swap` come up a lot. Square a number: `7 dup *` → 49. Reverse operand order: `2 10 swap /` → 5 (instead of 0.2).
+`dup` and `swap` come up a lot. Square a number: `7 dup *` → 49. Reverse operand order: `2 10 swap /` → 5 (instead of 0.2). `pop` discards the top value if you pushed something by accident: `5 6 pop` → 5.
## Rational number mode
@@ -272,9 +335,16 @@ REPL-only. Has a known limitation with non-dyadic decimals and metric operations
Run `gt` with no arguments when attached to a terminal and you get the interactive session. Command history (1000 entries, persisted to `~/.gt_history`), tab completion, Emacs-style line editing, Ctrl+R reverse search.
-Variables save to disk between sessions. Session logging with `--log session.log`. Session state lives in `~/.local/state/gt/vars`.
+Variables save to disk between sessions. Session state lives in `~/.local/state/gt/vars`. For auditing or note-taking, session logging works like this:
-Built-in REPL commands: `help`, `clear`, `quit`/`exit`, `rpn`/`calc`, `rat`, `stack`. Tab-completes.
+```sh
+$ gt --log calc-session.log
+> 1Gbps 1hr *
+> @GB convert
+> quit
+```
+
+Built-in REPL commands: `help`, `clear`, `quit`/`exit`, `rpn`/`calc`, `rat`, `stack`. `stack` is a shorthand hint for viewing the RPN stack. Tab-completes.
Here's what a session looks like:
@@ -384,6 +454,8 @@ go install codeberg.org/snonux/gt/cmd/gt@latest
Or from the source directory: `mage install`.
+One quirk: there are no `-h` or `--help` flags. `gt version` gives you the version, and bare `gt` with no TTY prints usage. If you pass `-h`, `gt` tries to evaluate it as RPN and errors. It's intentional and keeps the surface area small.
+
## Wrapping up
The local LLM experiment worked. The code is clean enough, the tests pass, the docs are thorough, and I use the tool. The logo was generated by a local model too.
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index 84ca32f8..6e3566e3 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2026-05-31T14:32:45+03:00</updated>
+ <updated>2026-05-31T14:37:53+03:00</updated>
<title>foo.zone feed</title>
<subtitle>To be in the .zone!</subtitle>
<link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" />
@@ -49,6 +49,7 @@
<li>⇢ <a href='#what-it-does'>What it does</a></li>
<li>⇢ <a href='#percentage-calculations'>Percentage calculations</a></li>
<li>⇢ <a href='#rpn-arithmetic'>RPN arithmetic</a></li>
+<li>⇢ ⇢ <a href='#modulo'>Modulo</a></li>
<li>⇢ ⇢ <a href='#logarithms'>Logarithms</a></li>
<li>⇢ ⇢ <a href='#hyper-operators-n-ary'>Hyper operators (n-ary)</a></li>
<li>⇢ ⇢ <a href='#comparisons-and-booleans'>Comparisons and booleans</a></li>
@@ -60,6 +61,7 @@
<li>⇢ ⇢ <a href='#metric-aware-arithmetic'>Metric-aware arithmetic</a></li>
<li>⇢ ⇢ <a href='#custom-metrics'>Custom metrics</a></li>
<li>⇢ ⇢ <a href='#si-vs-iec-modes'>SI vs IEC modes</a></li>
+<li>⇢ ⇢ <a href='#discovering-metrics'>Discovering metrics</a></li>
<li>⇢ <a href='#stack-manipulation'>Stack manipulation</a></li>
<li>⇢ <a href='#rational-number-mode'>Rational number mode</a></li>
<li>⇢ <a href='#the-repl'>The REPL</a></li>
@@ -128,6 +130,18 @@ gt <font color="#808080">'3 4 + 5 6 + *'</font> <i><font color="silv
<br />
<span>The fast integer power operator <span class='inlinecode'>**</span> uses binary exponentiation (O(log n) instead of O(n)). So <span class='inlinecode'>2 100 **</span> does about 7 multiplications instead of 99. It only accepts integer exponents — use <span class='inlinecode'>^</span> for fractional powers.</span><br />
<br />
+<h3 style='display: inline' id='modulo'>Modulo</h3><br />
+<br />
+<span><span class='inlinecode'>%</span> gives the remainder after division:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>gt <font color="#808080">'17 5 %'</font> <i><font color="silver"># → 2</font></i>
+gt <font color="#808080">'100 7 %'</font> <i><font color="silver"># → 2</font></i>
+</pre>
+<br />
<h3 style='display: inline' id='logarithms'>Logarithms</h3><br />
<br />
<span>Three unary operators for when you need them:</span><br />
@@ -159,7 +173,16 @@ gt <font color="#808080">'2 5 10 [*]'</font> <i><font color="silve
gt <font color="#808080">'1000 2 2 2 2 [/]'</font> <i><font color="silver"># → 62.5</font></i>
</pre>
<br />
-<span>Full set: <span class='inlinecode'>[+]</span>, <span class='inlinecode'>[-]</span>, <span class='inlinecode'>[*]</span>, <span class='inlinecode'>[/]</span>, <span class='inlinecode'>[^]</span>, <span class='inlinecode'>[%]</span> for arithmetic, plus <span class='inlinecode'>[lg]</span>, <span class='inlinecode'>[log]</span>, <span class='inlinecode'>[ln]</span> for logarithms. The log hyper operators work differently from the arithmetic ones — they compute the sum of the log function applied to each value, not a left-associative reduction. The square-bracket syntax is inspired by Raku&#39;s hyper operators.</span><br />
+<span>Full set: <span class='inlinecode'>[+]</span>, <span class='inlinecode'>[-]</span>, <span class='inlinecode'>[*]</span>, <span class='inlinecode'>[/]</span>, <span class='inlinecode'>[^]</span>, <span class='inlinecode'>[%]</span> for arithmetic, plus <span class='inlinecode'>[lg]</span>, <span class='inlinecode'>[log]</span>, <span class='inlinecode'>[ln]</span> for logarithms. The log hyper operators work differently from the arithmetic ones — they compute the sum of the log function applied to each value, not a left-associative reduction. A quick entropy calculation:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>gt <font color="#808080">'0.25 0.5 0.25 [lg]'</font> <i><font color="silver"># → -5 (information theory entropy bits)</font></i>
+</pre>
+<br />
+<span>The square-bracket syntax is inspired by Raku&#39;s hyper operators.</span><br />
<br />
<a class='textlink' href='https://raku.org'>https://raku.org</a><br />
<br />
@@ -196,6 +219,16 @@ http://www.gnu.org/software/src-highlite -->
gt <font color="#808080">'105 68 gte 100 lte +'</font> <i><font color="silver"># → 1 (out of range)</font></i>
</pre>
<br />
+<span>Booleans also do plain arithmetic, which is occasionally useful:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>gt <font color="#808080">'true true +'</font> <i><font color="silver"># → 2 (1 + 1)</font></i>
+gt <font color="#808080">'false 5 +'</font> <i><font color="silver"># → 5 (0 + 5)</font></i>
+</pre>
+<br />
<h2 style='display: inline' id='variables-and-symbols'>Variables and symbols</h2><br />
<br />
<span>Store values with three assignment styles:</span><br />
@@ -211,7 +244,19 @@ gt <font color="#808080">'rate 100Mbps ='</font> <i><font color="silv
<br />
<span><span class='inlinecode'>vars</span> lists them, <span class='inlinecode'>clear</span> wipes all variables and constants, <span class='inlinecode'>:name d</span> deletes one. In REPL mode, variables persist to disk between sessions.</span><br />
<br />
-<span>Symbols (the <span class='inlinecode'>:x</span> syntax) are named placeholders on the stack. They&#39;re how you do explicit variable assignment and deletion without ambiguity. Bare identifiers that don&#39;t match any variable or constant also push as symbols.</span><br />
+<span>Symbols (the <span class='inlinecode'>:x</span> syntax) are named placeholders on the stack. The <span class='inlinecode'>:</span> prefix makes intent explicit: <span class='inlinecode'>:x</span> always pushes the symbol <span class='inlinecode'>x</span>, even if a variable named <span class='inlinecode'>x</span> already exists. This is how you delete a variable without ambiguity, and how you push a name onto the stack without resolving it.</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; x <font color="#000000">10</font> := <i><font color="silver"># define x</font></i>
+&gt; x <i><font color="silver"># pushes 10 (variable resolved)</font></i>
+&gt; :x <i><font color="silver"># pushes :x (the symbol itself)</font></i>
+&gt; :x d <i><font color="silver"># deletes the variable x</font></i>
+</pre>
+<br />
+<span>Bare identifiers that don&#39;t match any variable or constant also push as symbols.</span><br />
<br />
<h2 style='display: inline' id='built-in-constants'>Built-in constants</h2><br />
<br />
@@ -229,6 +274,8 @@ gt <font color="#808080">'sqrt2 sqrt3 *'</font> <i><font color="silv
<br />
<span>Greek letter aliases work too: <span class='inlinecode'>π</span>, <span class='inlinecode'>τ</span>, <span class='inlinecode'>φ</span>, <span class='inlinecode'>√2</span>, <span class='inlinecode'>√3</span>, <span class='inlinecode'>√5</span>.</span><br />
<br />
+<span>There&#39;s also a <span class='inlinecode'>constants</span> command that lists all 36 in one shot. Edge cases are covered too — <span class='inlinecode'>inf</span>, <span class='inlinecode'>-inf</span>, and <span class='inlinecode'>nan</span> exist as constants if you ever need them.</span><br />
+<br />
<h2 style='display: inline' id='the-metrics-system'>The metrics system</h2><br />
<br />
<span>This is where <span class='inlinecode'>gt</span> earns its swiss army knife title. Every number carries a unit of measurement, and arithmetic understands those units.</span><br />
@@ -311,16 +358,55 @@ gt <font color="#808080">'1GB 1024MB eq'</font> <i><font color="silv
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre>custom define reel <font color="#000000">304.8</font> Distance <i><font color="silver"># surveyor's reel</font></i>
-custom define fortnight <font color="#000000">1209600</font> Time
+<pre>custom define reel <font color="#000000">304.8</font> Distance <i><font color="silver"># surveyor's reel</font></i>
+custom define fortnight <font color="#000000">1209600</font> Time <i><font color="silver"># 14 days</font></i>
+custom define cup <font color="#000000">240</font> Weight <i><font color="silver"># cooking measure</font></i>
</pre>
<br />
-<span>Then use them like built-ins: <span class='inlinecode'>5reel @m convert</span> → 1524.</span><br />
+<span>Then use them like built-ins:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; 5reel @m convert
+<font color="#000000">1524</font>
+&gt; 2fortnight @day convert
+<font color="#000000">28</font>
+&gt; 3cup @g convert
+<font color="#000000">720</font>
+</pre>
<br />
<h3 style='display: inline' id='si-vs-iec-modes'>SI vs IEC modes</h3><br />
<br />
<span>Data size units have two modes. SI (default) uses powers of 1000. IEC uses powers of 1024. Switch with <span class='inlinecode'>metric decimal set</span> / <span class='inlinecode'>metric binary set</span>. The dedicated IEC units (KiB, MiB, GiB) are always unambiguous.</span><br />
<br />
+<h3 style='display: inline' id='discovering-metrics'>Discovering metrics</h3><br />
+<br />
+<span>You can explore what&#39;s available without leaving the REPL:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; metric list
+DataRate, DataSize, Distance, Speed, Time, Universal, Weight
+&gt; metric DataRate
+Gbps, Kbps, Mbps, Tbps, bps
+</pre>
+<br />
+<span><span class='inlinecode'>metric compatible</span> checks whether two values can be combined before you try:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; 1km 5mi metric compatible
+km (Distance) and mi (Distance): <b><u><font color="#000000">true</font></u></b>
+&gt; 100Mbps 2hr metric compatible
+Mbps (DataRate) and hr (Time): <b><u><font color="#000000">false</font></u></b>
+</pre>
+<br />
<h2 style='display: inline' id='stack-manipulation'>Stack manipulation</h2><br />
<br />
<span>Five operators for managing the RPN stack:</span><br />
@@ -331,7 +417,7 @@ custom define fortnight <font color="#000000">1209600</font> Time
<span>- <span class='inlinecode'>show</span> / <span class='inlinecode'>showstack</span> / <span class='inlinecode'>print</span> — display the stack without modifying it</span><br />
<span>- <span class='inlinecode'>clear</span> — clear all variables and constants</span><br />
<br />
-<span><span class='inlinecode'>dup</span> and <span class='inlinecode'>swap</span> come up a lot. Square a number: <span class='inlinecode'>7 dup *</span> → 49. Reverse operand order: <span class='inlinecode'>2 10 swap /</span> → 5 (instead of 0.2).</span><br />
+<span><span class='inlinecode'>dup</span> and <span class='inlinecode'>swap</span> come up a lot. Square a number: <span class='inlinecode'>7 dup *</span> → 49. Reverse operand order: <span class='inlinecode'>2 10 swap /</span> → 5 (instead of 0.2). <span class='inlinecode'>pop</span> discards the top value if you pushed something by accident: <span class='inlinecode'>5 6 pop</span> → 5.</span><br />
<br />
<h2 style='display: inline' id='rational-number-mode'>Rational number mode</h2><br />
<br />
@@ -371,9 +457,19 @@ Rational mode enabled
<br />
<span>Run <span class='inlinecode'>gt</span> with no arguments when attached to a terminal and you get the interactive session. Command history (1000 entries, persisted to <span class='inlinecode'>~/.gt_history</span>), tab completion, Emacs-style line editing, Ctrl+R reverse search.</span><br />
<br />
-<span>Variables save to disk between sessions. Session logging with <span class='inlinecode'>--log session.log</span>. Session state lives in <span class='inlinecode'>~/.local/state/gt/vars</span>.</span><br />
+<span>Variables save to disk between sessions. Session state lives in <span class='inlinecode'>~/.local/state/gt/vars</span>. For auditing or note-taking, session logging works like this:</span><br />
<br />
-<span>Built-in REPL commands: <span class='inlinecode'>help</span>, <span class='inlinecode'>clear</span>, <span class='inlinecode'>quit</span>/<span class='inlinecode'>exit</span>, <span class='inlinecode'>rpn</span>/<span class='inlinecode'>calc</span>, <span class='inlinecode'>rat</span>, <span class='inlinecode'>stack</span>. Tab-completes.</span><br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>$ gt --log calc-session.log
+&gt; 1Gbps 1hr *
+&gt; @GB convert
+&gt; quit
+</pre>
+<br />
+<span>Built-in REPL commands: <span class='inlinecode'>help</span>, <span class='inlinecode'>clear</span>, <span class='inlinecode'>quit</span>/<span class='inlinecode'>exit</span>, <span class='inlinecode'>rpn</span>/<span class='inlinecode'>calc</span>, <span class='inlinecode'>rat</span>, <span class='inlinecode'>stack</span>. <span class='inlinecode'>stack</span> is a shorthand hint for viewing the RPN stack. Tab-completes.</span><br />
<br />
<span>Here&#39;s what a session looks like:</span><br />
<br />
@@ -501,6 +597,8 @@ http://www.gnu.org/software/src-highlite -->
<br />
<span>Or from the source directory: <span class='inlinecode'>mage install</span>.</span><br />
<br />
+<span>One quirk: there are no <span class='inlinecode'>-h</span> or <span class='inlinecode'>--help</span> flags. <span class='inlinecode'>gt version</span> gives you the version, and bare <span class='inlinecode'>gt</span> with no TTY prints usage. If you pass <span class='inlinecode'>-h</span>, <span class='inlinecode'>gt</span> tries to evaluate it as RPN and errors. It&#39;s intentional and keeps the surface area small.</span><br />
+<br />
<h2 style='display: inline' id='wrapping-up'>Wrapping up</h2><br />
<br />
<span>The local LLM experiment worked. The code is clean enough, the tests pass, the docs are thorough, and I use the tool. The logo was generated by a local model too.</span><br />
diff --git a/index.gmi b/index.gmi
index 9e039799..4294400b 100644
--- a/index.gmi
+++ b/index.gmi
@@ -1,6 +1,6 @@
# Hello!
-> This site was generated at 2026-05-31T14:33:01+03:00 by `Gemtexter`
+> This site was generated at 2026-05-31T14:37:53+03:00 by `Gemtexter`
Welcome to the foo.zone!
diff --git a/uptime-stats.gmi b/uptime-stats.gmi
index b42b3699..4050b9f6 100644
--- a/uptime-stats.gmi
+++ b/uptime-stats.gmi
@@ -1,6 +1,6 @@
# My machine uptime stats
-> This site was last updated at 2026-05-31T14:33:00+03:00
+> This site was last updated at 2026-05-31T14:37:53+03:00
The following stats were collected via `uptimed` on all of my personal computers over many years and the output was generated by `goprecords`, the global uptime records stats analyser of mine.
@@ -13,7 +13,7 @@ Also check out my blog post:
=> ./gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.gmi Unveiling `guprecords.raku`: Uptime records with Raku (and also there is a version in Go now)
-> Uptime stats were last updated Sun 31 May 14:33:01 EEST 2026
+> Uptime stats were last updated Sun 31 May 14:37:53 EEST 2026
## Top 20 Uptime's by Host
@@ -128,13 +128,13 @@ Boots is the total number of host boots over the entire lifespan.
| 10. | makemake | 81 | Linux 6.9.9-200.fc40.x86_64 |
| 11. | uranus | 59 | NetBSD 10.1 |
| 12. | pluto | 51 | Linux 3.2.0-4-amd64 |
-| 13. | *mega-m3-pro | 50 | Darwin 25.3.0 |
-| 14. | mega15289 | 50 | Darwin 23.4.0 |
-| 15. | *fishfinger | 50 | OpenBSD 7.8 |
+| 13. | *fishfinger | 50 | OpenBSD 7.8 |
+| 14. | *mega-m3-pro | 50 | Darwin 25.3.0 |
+| 15. | mega15289 | 50 | Darwin 23.4.0 |
| 16. | *blowfish | 50 | OpenBSD 7.8 |
| 17. | t450 | 46 | FreeBSD 14.2-RELEASE |
-| 18. | phobos | 40 | Linux 3.4.0-CM-g1dd7cdf |
-| 19. | mega8477 | 40 | Darwin 13.4.0 |
+| 18. | mega8477 | 40 | Darwin 13.4.0 |
+| 19. | phobos | 40 | Linux 3.4.0-CM-g1dd7cdf |
| 20. | *pi0 | 34 | Linux 6.1.31-v8.1.el9.altarch |
+-----+----------------+-------+-------------------------------+
```
@@ -190,14 +190,14 @@ Boots is the total number of host boots over the entire lifespan.
| 10. | *OpenBSD 7... | 110 |
| 11. | Darwin 13... | 40 |
| 12. | Darwin 24... | 27 |
-| 13. | Darwin 23... | 25 |
-| 14. | FreeBSD 5... | 25 |
+| 13. | FreeBSD 5... | 25 |
+| 14. | Darwin 23... | 25 |
| 15. | Linux 2... | 22 |
| 16. | Darwin 21... | 17 |
| 17. | Darwin 15... | 15 |
| 18. | Darwin 22... | 12 |
| 19. | Darwin 18... | 11 |
-| 20. | FreeBSD 7... | 10 |
+| 20. | FreeBSD 6... | 10 |
+-----+----------------+-------+
```