Frectonz
3.45K subscribers
1.91K photos
82 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
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
I was going through the files in my PC deleting some stuff and found this pics of me messing around with the canvas API in IT class.