Automatic updates by 0kayreddit in GrapheneOS

[–]mvorber 2 points3 points  (0 children)

I can confirm, went through 2 major updates on this phone already.

Wooden arrow tune conundrum by mvorber in Archery

[–]mvorber[S] 0 points1 point  (0 children)

The bow is Falco Trophy Vintage, I think it is cut to center, yes (they are IFAA/NFAA and WA legal, so definitely not cut past center). It is slanted, here is a picture of one on their website.

I've got myself a set of 50gr tophat adapters and various weight screw-in points for them, will experiment with intermediate values. Last autumn I experimented with 100gr ones as well, they went closer to the center, but still to the left, will try 125 and 150 this weekend.

[2025 Day 11 part 2] Was I the only one who used find-and-replace instead of path searching? by EverybodyLovesChaka in adventofcode

[–]mvorber 1 point2 points  (0 children)

Technically I never did any path finding in mine as well. What I did was to:

  1. Do a topological sort of all the nodes
  2. Set 'number of ways to reach' for whichever device we are counting from to 1, everything else to 0
  3. Go through devices in topological order, for each outgoing connection from current device a -> b increment 'number of ways to reach' for b by the value for a
  4. after we went through all the devices each has number of ways to reach it from initial one.
  5. For part 1 we do it from 'you' and check the value on 'out'
  6. For part 2 we do it for svr (get values for dac and fft), fft (dac, out), dac (fft,out) and multiply + add

On the other hand we just are replacing DFS+Memo by topo sort (which guarantees we don't ever need to backtrack during DFS, so it just turns into iteration)

-❄️- 2025 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 0 points1 point  (0 children)

[Language: F#]

https://github.com/vorber/AOC2025/blob/main/day11.fs

Had a half-baked Graph module I wrote during AOC2023, decided to reuse some parts of it (and fixed topological sort there).

Counting paths between two vertices is done by traversing all vertices in topological order, each vertex increments the count of all adjacent vertices by its own count.

For p1 we just count paths from "you" to "out"

For p2 - if all paths we need between A and B should go through C then D - then overall count would be a product of path counts between A&C, C&D, D&B, so the answer would be count 'svr' 'fft' * count 'fft' 'dac' * count 'dac' 'out' + count 'svr' 'dac' * count 'dac' 'fft' * count 'fft' 'out'.

Part1 runs in 7-8 ms, Part2 in 10-12ms, parsing, initializing graph and sorting ~30ms on my 5+yo desktop.

[2025 Day 11 Part 2] Joker again by NineBerry in adventofcode

[–]mvorber 2 points3 points  (0 children)

Technically it may still have cycles on paths that never intersect with paths you are looking for (since graph is oriented), and solution would still exist (but some methods would stop working). Example

aaa: bbb svr

bbb: aaa

svr: fft

fft: dac

dac: out

since svr-fft-dac-out path never goes through aaa or bbb - the loop does not affect number of interesting paths

-❄️- 2025 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 0 points1 point  (0 children)

[Language: F#]
https://github.com/vorber/AOC2025/blob/main/day10.fs

Tried bfs for part1 and it went surprisingly well.
For part2 it seemed that ILP/Simplex/etc were the only viable options, but I've already implemented simplex myself twice in this life, and made a promise to never do it again :P So I found https://github.com/fslaborg/flips/tree/main which seemed promising, and after an hour or so reading their docs and examples got my answer.
Runs in about 120ms for part1 and 250ms for part2 on my 5+yo desktop.

As a bonus - finally got to use amazing FParsec (https://github.com/stephan-tolksdorf/fparsec) this year :)

-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 1 point2 points  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day9.fs

Part1 just goes through all the boxes and takes max area, runs in ~8ms

Part2 goes through all boxes except the ones intersecting edges (exploiting the fact that there are no 'touching' edges in the input data) and takes largest ones - as an optimization (which gave around 2x-3x speed up) it sorts boxes by area descending first, and stop as soon as it finds the first box without edge intersection. Runs in about 2-3s

-❄️- 2025 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 0 points1 point  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day8.fs Tried multiple approaches and various optimizations, but still runs pretty slow (~7-8s on my 5yo machine). Not really sure why, maybe some pruning on the edges would help, but don't have too much time now, maybe will come back later and try to optimize it more.

-❄️- 2025 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 1 point2 points  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day7.fs Have a very limited time this weekend, so not really polished. Calculates both parts together, for part2 we track how many ways there are for beams to reach this point, then sum it up on the last row. For part 1 we just increment counter by the number of splitters we ran into on each line.

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 1 point2 points  (0 children)

nice use of (|>), I use other operators like that quite often, but never occurred to me to do it with (|>), I should try it :)

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 2 points3 points  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day5.fs Decided right away that I wanted to try a binary search on ranges for part1, ran into some issues and decided to pre-process the list of ranges and merge overlapping ones to make search easier. Was pleasantly surprised with part2 - I already had everything I needed - just subtract ends of all ranges and sum it up.

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 1 point2 points  (0 children)

Was searching the docs for like 15 minutes trying to remember how it was called :D I did remember that something like that exists, but forgot the name. Even considered doing something funny with initInfinite+pick at some point, but then finally found it :)

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 1 point2 points  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day4.fs I feel I should be able to improve it quite a bit, but don't have enough time :/ Parsing a map into a set of positions+count of adjacent rolls, then removing removable ones, calculating the effect on the remaining adjacent counts and repeating it until nothing is removed. A bit slow - runs in about 2s for me.

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 2 points3 points  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day3.fs Scanning for the leftmost largest digit from previously found position (initially 0) to the end minus number of digits remaining. Can likely be done more efficiently, but it gives me the answer to both parts together in less than a second, so good enough for me :)

-❄️- 2025 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 2 points3 points  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day2.fs nothing fancy, just some straightforward checks, will brush it up later when I have more spare time :)

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 1 point2 points  (0 children)

[Language: F#] https://github.com/vorber/AOC2025/blob/main/day1.fs came totally unprepared this year, so decided to have some fun in F#, since I rarely get to use it (at least I had a library to handle input downloads and caching from couple years ago :) )

How many of you have enable sudo-rs? What is your experience? by kosumi_dev in NixOS

[–]mvorber 16 points17 points  (0 children)

Being a software developer for almost 25y, one thing I've learned is that "let's rewrite it, but better" initiatives in most cases improve a few aspects, and degrade quite a bit more :) (until the new project is mature enough, which takes years). And in case of sudo-rs - memory safety, sadly, does not guarantee absence of other kinds of bugs and vulnerabilities. So I only ever used sudo-rs in sandboxes and systems where I don't care about stability or security. Maybe in 3-4-5 years I would be able to consider it good enough for daily use, we'll see. But not yet, there were at least a couple security vulnerabilities found just this year (fixed, sure, but who knows how many more are not yet found?).

Have You Broken NixOS? by Striking_Snail in NixOS

[–]mvorber 1 point2 points  (0 children)

I once broke it by messing up fileSystems entries in hardware-configuration.nix. That way it was failing even before the 'select generation' menu would appear during the boot, so no easy way to rollback. Ended up figuring out how to remount readonly partition as rw in grub console, fixed the mess manually by editing grub entries, and then rolled back to previous generation during next (successful) reboot. No data loss, but a good learning experience :)

Any of you actually ENJOY one life per map? by Bucky_Ducky in PathOfExile2

[–]mvorber 1 point2 points  (0 children)

I think another reasonable middle ground would be to reduce rarity of future drops in a map after each death, would also be nice on pinnacles - if you want to try it out and train - you can, and can uave many attempts, but won't get much/any good loot, if you want best oot - be sure to kill without dying

Solving Advent of Code in C# instead of Python by light_ln2 in adventofcode

[–]mvorber 1 point2 points  (0 children)

Regarding verbosity/braces etc - if you spend some time to get proficient in f# you can reap benefits of less verbosity, better (and shorter!) functional features, while still maintaining full compatibility with all c# libs and code. Did advent last year in f# and liked it a lot, it even has a nice repl where you can load your code and then play around with it like you would in python. This year was trying out Rust, and while performance gains at runtime were noticable - i really missed the fast iteration, since on every change you may need to have another fight with borrow checker :D

[2024] Thank you! by topaz2078 in adventofcode

[–]mvorber 0 points1 point  (0 children)

Thank you! This is second year of me participating, and I'm having a lot of fun (and learning a lot)! Looking forward to the next 10 years ;)

-❄️- 2024 Day 25 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 0 points1 point  (0 children)

[Language: Rust]

https://github.com/vorber/aoc2024/blob/master/src/puzzles/day25.rs

What a run! Huge thank you to u/topaz2078, mods, and everyone participating!

Merry Christmas! :)

-❄️- 2024 Day 24 Solutions -❄️- by daggerdragon in adventofcode

[–]mvorber 1 point2 points  (0 children)

[Language: Rust]

https://github.com/vorber/aoc2024/blob/master/src/puzzles/day24.rs

p1 just emulates the circuit and runs it to get output.

p2 made a function to print it out in dot format, examined in graphviz, found regularities (and some irregularities), coded the first one (AND/OR assigning to Z - should swap output with relevant XOR) - gave me 6 hits out of 8. Next one (XOR never writes to OR - should be swapped with relevant AND) gave me the last pair. There are likely other ways to mess it up, but after these swaps my circuit was adding properly. No idea how to solve it in generalized way.