🛠️ blabla

blabla is a command line interface to chat with ChatGPT.

blabla

> How can I simulate a d20 if I only have a d6?

Use base‑6 to get 20 distinct outcomes with minimal bias.

One simple method (3d6):

1. Roll three d6: call them A, B, C (each 1–6).
2. Compute `N = (A−1)*36 + (B−1)*6 + (C−1)` → range 0–215.
3. If `N ≥ 200`, discard and reroll all three dice.
4. Otherwise, output `N mod 20 + 1` as the d20 result.

That’s exact and uniform, just with occasional rejection.

>

I live in the terminal, and I can't be bothered to open the browser for quick lookups.

It's my first "real" babashka script. Wrote it while killing time before Conj 2023. Notably, had to implement a (partial) Server-Sent-Event parser to get streaming working.

Behind the scenes, it's prompted with "Give brief responses as if talking to an expert that just needs to be reminded" because otherwise, GPT tends to be overly verbose.

Lots to potentially do...

...but, for quick questions, it's Good Enough™.

If you want something like this for yourself, you should probably use https://github.com/simonw/llm

2023-04-26
blabla
:project-started-on2023-04-26
:project-updated-on2023-04-26
:post-created-on2025-12-05
:post-updated-on2025-12-05
:repohttps://github.com/rafd/blabla