xuu

txt.sour.is

Xuu /zuː/ I am AWESOME! ○△□ ⍼

In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

What? You are still using chrome? Firefox is where its at. But if you need WebKit there is always chromium which strips out all the google nonsense.

⤋ Read More
In-reply-to » Why isn't inkjet printer ink simply replaceable like the windscreen wiper fluid in our cars? Why does it have to be so expensive and complicated?

Laser all the way. Inkjets are cheaper to replace the printer than to buy the ink for a reason.

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@lyse@lyse.isobeef.org I have read the white papers for MLS before. I have put a lot of thought on how to do it with salty/ratchet. Its a very good tech for ensuring multiple devices can be joined to an encrypted chat. But it is bloody complicated to implement.

⤋ Read More
In-reply-to » man... day17 has been a struggle for me.. i have managed to implement A* but the solve still takes about 2 minutes for me.. not sure how some are able to get it under 10 seconds.

So, I finally got day 17 to under a second on my machine. (in the test runner it takes 10)

I implemented a Fibonacci Heap to replace the priority queue to great success.

https://git.sour.is/xuu/advent-of-code/src/branch/main/search.go#L168-L268

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

OH MY FREAKING HECK. So.. I made my pather able to run as Dijkstra or A* if the interface includes a heuristic.. when i tried without the heuristic it finished faster :|

So now to figure out why its not working right.

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

i am wondering if maybe i need a better heap like a btree backed one instead of just list sort on Dequeue.

I found a bug where i didnt include an open/closed list that seemed to shave off a little. right now it runs in about 70 seconds on my machine.. it takes over the 300s limit when it runs on the testrunner on the same box.. docker must be restricting resources for it.

I might come back to it after i work through improving my code for day 23. Its similar but looking for the longest path instead of shortest.

⤋ Read More

man… day17 has been a struggle for me.. i have managed to implement A* but the solve still takes about 2 minutes for me.. not sure how some are able to get it under 10 seconds.

Solution: https://git.sour.is/xuu/advent-of-code/src/branch/main/day17/main.go
A* PathFind: https://git.sour.is/xuu/advent-of-code/src/branch/main/search.go

some seem to simplify the seen check to only be horizontal/vertical instead of each direction.. but it doesn’t give me the right answer

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

I have been doing interview prep for next year. The problems have been great to get practice and make it fun when compared to the dry solve this you get on hacker rank or code scene.

That and so many great write-ups to explain the problems.

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@movq@www.uninformativ.de So.. i eventually made it to the end on this one.. was able to reuse code from days 8 and 9!

SSBzdGlsbCBkbyBub3QgdW5kZXJzdGFuZCB3aHkgdXNpbmcgdGhlIHJhdGUgb2YgY2hhbmdlIGlu
IHRoZSBwdXNoZXMgZ2l2ZXMgbWUgdGhlIGFuc3dlci4uIGJ1dCB5ZWFoLi4K

https://git.sour.is/xuu/advent-of-code/pulls/13/files

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

The word forms is part two. In this one you want to find the first digit and last digit. Think searching ‘1’ - ‘9’

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@movq@www.uninformativ.de It took a little over a minute on my machine.. i should try to make it multi threaded.. 🤔

Executed in   68.96 secs    fish           external
   usr time   60.84 secs  242.00 micros   60.84 secs
   sys time   12.52 secs  252.00 micros   12.52 secs

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@eapl.me@eapl.me I have many fond memories of Turbo pascal and Turbo C(++). They really did have a great help system. And debug tools! Its rare for language docs to be as approachable. QBasic was great. As was PHP docs when I first came into web.

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

I could have made my search smarter using a prefix search rather than scanning the full buffer for each iteration.

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@movq@www.uninformativ.de Dang. Really going overboard with this!

@prologic@twtxt.net I didn’t have to do much backtracking. I parsed into an AST-ish table and then just needed some lookups.

The part 2 was pretty easy to work into the AST after.

https://git.sour.is/xuu/advent-of-code-2023/commit/c894853cbd08d5e5733dfa14f22b249d0fb7b06c

⤋ Read More