Matt Russell
Matt Russell
@mattrusselluk.bsky.social
Not explicity, but I was trying out the imperative-ish do syntax, and I believe that uses partial functions when desugared. For example:

private def infiniteLoop: Nat := Id.run do
let mut n: Nat := 0
while true do
n := n + 1
n
December 9, 2024 at 10:53 PM
Reposted by Matt Russell
I would love a chiller version of AOC where all the problems are first-week level of difficulty.
December 8, 2024 at 3:04 PM
Nice! I'm really thrown by Lean's imperative syntax in do blocks - for loops, while loops, mutation. I need to read up on what's going on!
December 8, 2024 at 8:42 PM
"Falling in love" and "thinking it sucks" are both limiting perspectives on TypeScript. It's a remarkable piece of pragmatic programming language tech that bolts some sanity on top of JS and its ecosystem - but all the warts of JS are all still there. The Web should aspire to better.
December 8, 2024 at 8:08 PM
What does a partial def do?
December 4, 2024 at 7:42 PM
github.com/mdr/aoc-2024...

I stole and ported this "diagonals" function for today's puzzle. It might be interesting to prove some properties about it, e.g. that the elements of `join (diagonals grid)` are the same (ignoring order) as the elements of `join grid`.
December 4, 2024 at 7:16 PM
It would work, but the extra wrappers would make me sad:

[ShapeCircle (Circle 3.0), ShapeSquare (Square 4.0)]
December 4, 2024 at 5:57 PM
How do you find it compared to the proprietary models?
December 4, 2024 at 3:45 PM
Are you thinking along the lines of:

data Circle = Circle { radius :: Double }
data Square = Square { side :: Double }

data Shape where
CircleShape :: Circle -> Shape
SquareShape :: Square -> Shape

filterCircles :: [Shape] -> [Circle]
December 4, 2024 at 3:38 PM
PostHog is a top tier name for (amongst other things) a session replay tool!
December 3, 2024 at 7:32 PM
I hadn't come across Dave Farley before, but he talks a lot of sense!
December 3, 2024 at 7:26 PM
Me too! I did Unison last year, and Idris the year before. I suspect I might only get through a dozen puzzles or so, but I like the excuse to tinker with something new.
December 2, 2024 at 9:31 PM