This week's code snippet, Baklava in F*, is brought to you by Subete and the Sample Programs repo.
module Baklava
open FStar.IO
open FStar.Math.Lib
open FStar.Mul
let baklava_line (n:nat {n <= 20}) : string =
let num_spaces:nat = (abs (n - 10)) in
let num_stars:nat = 21 - 2 * num_spaces in
(String.make num_spaces ' ') ^ (String.make num_stars '*') ^ "\n"
let rec baklava (lines:string) (n:nat {n <= 20}) : string =
match n with
| 0 -> lines ^ (baklava_line 0)
| _ -> lines ^ (baklava_line n) ^ (baklava lines (n - 1))
let main = print_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: π)
- βοΈ The Acceleration of the Enshittification of Everything
- π 4 Values We Have to Stop Pushing in Engineering Education
- βοΈ Generative AI Has a Short Shelf Life
- βοΈ Reflecting on My First Trip to Japan
- π SB1 Is the Death of Higher Education in Ohio
- βοΈ No, Generative AI Is Not Just Another Innovation
- π Generative AI Makes It Feel Bad to Be an Educator
- βοΈ The Problem With Centrism: A Case Study
- π Reflecting on My First Two Years as a Lecturer
- βοΈ Why I Left Twitter
Also, here are some fun links you can use to support my work.
This document was automatically rendered on 2025-06-27 using SnakeMD.