Matt Russell's Avatar

Matt Russell

@mattrusselluk.bsky.social

20 Followers  |  31 Following  |  27 Posts  |  Joined: 07.02.2024  |  1.5788

Latest posts by mattrusselluk.bsky.social on Bluesky


What is the Easiest Language?
YouTube video by jan Kekan San What is the Easiest Language?

youtu.be/U3GQePblz4M
What is the easiest language?

01.02.2025 06:02 โ€” ๐Ÿ‘ 59    ๐Ÿ” 16    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 1

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

09.12.2024 22:53 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Blundered into my first infinite loop bug in Lean - and it seems Lean isn't really as set-up to help rule out certain runtime issues ("panics" and non-termination) as I had initially assumed. A teeny bit disappointed!

09.12.2024 17:28 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I would love a chiller version of AOC where all the problems are first-week level of difficulty.

08.12.2024 15:04 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

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!

08.12.2024 20:42 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

"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.

08.12.2024 20:08 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Day 8 Advent of Code in Lean: github.com/mdr/aoc-2024...

08.12.2024 19:55 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Video thumbnail

I keep trying to migrate this one and the video gets corrupted. Itโ€™s just that powerful!

#FunctionalProgramming #Haskell #OCamel #Programming

21.11.2024 02:21 โ€” ๐Ÿ‘ 54    ๐Ÿ” 16    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 2

React but for TUIs would be fun, I bet that exists already

05.12.2024 10:30 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
advent-of-code/2024/lean/AoC/Day05.lean at main ยท chenson2018/advent-of-code Contribute to chenson2018/advent-of-code development by creating an account on GitHub.

Day 5 of #AdventofCode in Lean: github.com/chenson2018/...

One of my favorite days so far, came out very cleanly. Having quicksort in the language is nice. I enjoyed writing the function to get the middle of an Array with a provably correct index, though ran into some decidable equality trickiness.

05.12.2024 08:32 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
aoc-2024/Aoc2024/Day05/Solve.lean at main ยท mdr/aoc-2024 Solutions for Advent of Code 2024 in Lean 4. Contribute to mdr/aoc-2024 development by creating an account on GitHub.

Advent of Code Day 5 in Lean: github.com/mdr/aoc-2024...

05.12.2024 08:14 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

What does a partial def do?

04.12.2024 19:42 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

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`.

04.12.2024 19:16 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

It would work, but the extra wrappers would make me sad:

[ShapeCircle (Circle 3.0), ShapeSquare (Square 4.0)]

04.12.2024 17:57 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

How do you find it compared to the proprietary models?

04.12.2024 15:45 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
aoc-2024/Aoc2024/Day04/Solve.lean at main ยท mdr/aoc-2024 Solutions for Advent of Code 2024 in Lean 4. Contribute to mdr/aoc-2024 development by creating an account on GitHub.

Day 4 Advent of Code in Lean: github.com/mdr/aoc-2024...

I suspect I might begin to fall behind the daily pace soon! Today's was a straightforward puzzle, but it took me a while to get both parts working as a Lean novice.

04.12.2024 15:44 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

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]

04.12.2024 15:38 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

A Shape must be a Circle or a Square. In Scala, I can write

def findCircles(shapes: List[Shape]): List[Circle]

In Haskell (and other FP languages), I'm stuck with:

findCircles :: [Shape] -> [Shape]

Is there a way to achieve the expressivity of the former if you lack subtypes?

03.12.2024 21:06 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

PostHog is a top tier name for (amongst other things) a session replay tool!

03.12.2024 19:32 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I hadn't come across Dave Farley before, but he talks a lot of sense!

03.12.2024 19:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Yes... Microservices REALLY ARE Technical Debt
YouTube video by Continuous Delivery Yes... Microservices REALLY ARE Technical Debt

Microservices are just technical debt: www.youtube.com/watch?v=LltD...

03.12.2024 15:07 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
aoc-2024/Aoc2024/Day03/Solve.lean at main ยท mdr/aoc-2024 Solutions for Advent of Code 2024 in Lean 4. Contribute to mdr/aoc-2024 development by creating an account on GitHub.

Day 3 Lean Advent of Code solution:
github.com/mdr/aoc-2024...
I used regexes (but there was enough unpacking of matches that I suspect parser combinators would have been cleaner), and State monad to turn on/off instructions (probably overkill).

03.12.2024 18:54 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

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.

02.12.2024 21:31 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Day 2 Advent of Code solution in Lean: github.com/mdr/aoc-2024...

Lean's syntax sugar where you can call certain functions as if they were methods or properties - e.g "report.differences.toSet" - is very pleasant, especially if your day job is OO languages.

02.12.2024 21:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I'm trying to learn a little #leanlang theorem proving as well as use it as a programming language for Advent of Code. I would especially like to get to where I could start to prove some simple properties about programs!

02.12.2024 21:22 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Release release/0.5.29 ยท unisonweb/unison What's Changed Fixed a bug that can prevent delete.namespace due to a problem in a library dependency (not your problem) Fixed a bug when rendering code where use statements could interfere with l...

๐ŸŽ Just in time for your #AdventOfCode puzzles, the latest Unison version, 0.5.29 contains a few code rendering improvements and a hefty performance boost for some programs using the standard interpreter.

02.12.2024 20:57 โ€” ๐Ÿ‘ 11    ๐Ÿ” 4    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

I like Lean's Nested Actions syntax
lean-lang.org/lean4/doc/do...

01.12.2024 17:08 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Day 1 Advent of Code solution in Lean
github.com/mdr/aoc-2024...

01.12.2024 17:04 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Thanks! Where does the Discord server live?

01.12.2024 11:27 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I did look at the Lean Zulip, it does feel a bit intimidating though!

01.12.2024 11:11 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

@mattrusselluk is following 19 prominent accounts