Frectonz
3.44K subscribers
1.91K photos
81 videos
32 files
1.64K links
A place for me to talk about my projects, stuff i find on the internet and what I am currently thinking about.

By @frectonz
Download Telegram
If you don't wanna delete the whole directory like the steps shown in the pic, you can find some solutions to common git screw ups here.

https://ohshitgit.com/
Frectonz
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…
I am already falling behind on this year's AoC, maybe i need to stop sleeping.

One thing i have realized this year is that my knowledge in the area of "graph algorithms" is heavily limited.
Frectonz
I am already falling behind on this year's AoC, maybe i need to stop sleeping. One thing i have realized this year is that my knowledge in the area of "graph algorithms" is heavily limited.
Advent of Code update, last time i did Day 7. I was doing Day 8 but i couldn't figure it out so i have skipped it.

Then I did "Mirage Maintenance" - Day 9 - Advent of Code 2023 in TypeScript via Deno.

[Part 1 Solution] [Part 2 Solution]
Frectonz
I am already falling behind on this year's AoC, maybe i need to stop sleeping. One thing i have realized this year is that my knowledge in the area of "graph algorithms" is heavily limited.
And today I did "Pipe Maze" - Day 10 - Advent of Code 2023 in Rust

Part 1 was parsing a grid of connected pipes and finding the longest path in that grid. Parsing the grid was easy enough but for the actual longest path algorithm stuff i used this rust library petgraph that has a lot of graph traversal algorithms. Particularly i used the all_simple_paths function. And another cool thing about the library it can turn the your graph into a graphviz dot file. So you can turn your graph into an image, that's what you are seeing in the images.

Part 2 was asking for the number of grid points that were inside the loop formed by the path in part 1. I tried to think of some heuristics thinking of all the connections a point could make but i couldn't figure it out.

So then i finally decided to checkout the solutions thread on reddit and i saw that people were talking about these two algorithms Shoelace algorithm and Pick's theorem. So i implemented the two algorithms in my solutions and finally solved part 2.
πŸ”₯1
I just finished solving "Cosmic Expansion" - Day 11 - Advent of Code 2023

Now i am only 2 days behind πŸŽ‰ 😁

I did it in Rust πŸ¦€. I gotta say rayon + petgraph is the ultimate weapon to solve these graph questions.

[Part 1 Solution] [Part 2 Solution]
πŸ”₯3
Savage πŸ’€πŸ˜‚
πŸ”₯4🀑4
Paris syndrome 🀣
😁14
Saying that some technology is "too hard to understand" should rarely be considered a valid criticism.

Not everything ought to be simple.

That's why I love phrase "skill issue".
The ultimate version of me across the multiverse at this moment in time would be the one using a framework pc and working at oxide.
πŸ”₯5
They are turning xkcd's What if books into videos. πŸ”₯ They already have 2 videos up.

https://www.youtube.com/@xkcd_whatif
πŸ”₯2