Microposts
2025-03-25
#microposts
TIL you can do some funky stuff with satisfies and template literal types in TS.
const startWithA = {
1: "a",
2: "ab",
3: "abc",
} satisfies Record<number, `a${string}`>;
const names = ["bob", "john"] as const;
type Hello = "Hello";
type Name = (typeof names)[number];
type TL = `${Hello} ${Name}`;
const greetings = ["Hello john", "Hello bob", "Hello walter"] as const;
greetings.forEach((g) => {
g satisfies TL;
}); 2025-03-25
#microposts
My enthusiasm for FP is mostly curbed but every so often for reasons unknown I am compelled to write implementations of foldl and foldr
2025-03-24
#microposts
While we’re at it, the term “vibe coding” has gtg. If you provide a prompt like “Hey, based on XY, write me a Z essay” - did you “vibe write an essay”? No, you wrote nothing… This term is inaccurate and provides improper meaning
2025-03-24
#microposts
Look, I’m not one of those people who wish to watch the world burn. But - I think we need to let Bad Things happen so we can get over this infatuation with “vibe coding”
2025-03-20
#microposts
tsdoc is rly nice actly