I just completed "Camel Cards" - Day 7 - Advent of Code 2023
Of course since today's puzzle was called "Camel Cards", i did it in OCaml π«. Determining the hand type for the cards was very difficult.
[Part 1 Solution] [Part 2 Solution]
Of course since today's puzzle was called "Camel Cards", i did it in OCaml π«. Determining the hand type for the cards was very difficult.
[Part 1 Solution] [Part 2 Solution]
π2
Frectonz
I just completed "Camel Cards" - Day 7 - Advent of Code 2023 Of course since today's puzzle was called "Camel Cards", i did it in OCaml π«. Determining the hand type for the cards was very difficult. [Part 1 Solution] [Part 2 Solution]
OCaml supports throwing exceptions, so you don't have to carry around a Result type everywhere.
The error objects are not some opaque value that can't be inspected at the caller site, instead they are typed values that can be checked by the caller.
For example if we see the
The error objects are not some opaque value that can't be inspected at the caller site, instead they are typed values that can be checked by the caller.
For example if we see the
parse method on Card and we want to parse the character '1' to be the card type A (aces), we can do the followingtry Card.parse '1'
with Card.UnknownCard -> Card.A;;
Forwarded from The Beno Logs
With great power comes great responsibility.
But it also works the other way around.
With great responsibility comes great power.
The more blame you take for your life the more power you have over it.
But it also works the other way around.
With great responsibility comes great power.
The more blame you take for your life the more power you have over it.
π₯10π5
Forwarded from Yeab - engg/ acc - Archived (Yeabu)
This media is not supported in your browser
VIEW IN TELEGRAM
When you suddenly understand a bit of functional programming π
π8
pov of doing day 8 with an actual tree data structure
Pic 1 = Tree view of the test
Pic 2 = The actual input (terminal zoomed out) π
Pic 1 = Tree view of the test
Pic 2 = The actual input (terminal zoomed out) π
π€2π1
Passed 350 π
Welcome everybody,
If you wanna know what this channel is about this post pretty much sums it up. π
Welcome everybody,
If you wanna know what this channel is about this post pretty much sums it up. π
Telegram
Frectonz
I have just achieved the ultimate FFI threesome.
OCaml + Rust + C = β€οΈ
What you are seeing in the images is OCaml code calling out to Rust which in turn is calling out to C.
The actual flow
(->) this means calls into
OCaml project -> chafa-ocaml (Rustβ¦
OCaml + Rust + C = β€οΈ
What you are seeing in the images is OCaml code calling out to Rust which in turn is calling out to C.
The actual flow
(->) this means calls into
OCaml project -> chafa-ocaml (Rustβ¦
π2
Forwarded from Mikiyas e/acc
What kind of engineering could speed this up? Perhaps nukes detinated at the same time, or some other non radioactive bombs or just letting the ocean in the cracks could overwelm it n speed it up... This is what e/acc is about, having a beach in Addis would be cool. And also trade will be lit.
π10β€1
Just found this site. They only have a few articles out but they have cool visualizations and interactive playgrounds.
Explained from First Principles
Explained from First Principles
π₯6