This week's code snippet, Baklava in Formality, is brought to you by Subete and the Sample Programs repo.
baklavaLine(n: Nat): String
let numSpaces = if Nat.gte(n, 10) then Nat.sub(n, 10) else Nat.sub(10, n)
let numStars = Nat.sub(21, Nat.mul(2, numSpaces))
String.repeat(" ", numSpaces) | String.repeat("*", numStars) | "\n"
baklava(lines: String, n:Nat): String
case n {
zero: lines | baklavaLine(0),
succ: lines | baklavaLine(n) | baklava(lines, n.pred)
}
Main: IO(Unit)
do IO {
IO.put_string(baklava("", 20))
}
Below you'll find an up-to-date list of articles by me on The Renegade Coder. For ease of browsing, emojis let you know the article category (i.e., blog: ✒️, code: 💻, meta: 💭, teach: 🍎)
- ✒️ Academics Are Turning on AI Companies
- ✒️ I’m Dabbling in Dungeons & Dragons
- ✒️ Staying Relevant Is Holding You Back
- ✒️ Nobody Talks About What Actually Makes Japanese Difficult
- 🍎 The Other Side of Letters of Recommendation
- ✒️ Yet Another Consequence of Car-Centric Infrastructure
- 🍎 What’s More Important: Having Knowledge or Knowing How to Access Knowledge?
- ✒️ Generative AI Lets You Be as Delusional as a CEO
- ✒️ Recommended Reading: “The Law of Leaky Abstractions” by Joel Spolsky
- ✒️ LLMs Are Not Like Compilers
Also, here are some fun links you can use to support my work.
This document was automatically rendered on 2026-11-20 using SnakeMD.





