What is the easiest language?
What is the easiest language?
#FunctionalProgramming #Haskell #OCamel #Programming
#FunctionalProgramming #Haskell #OCamel #Programming
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.
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.
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.
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.
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?
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?
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).
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).
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.
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.
lean-lang.org/lean4/doc/do...
lean-lang.org/lean4/doc/do...
github.com/mdr/aoc-2024...
github.com/mdr/aoc-2024...