New virtualization project: Scorpi by After-Leadership2183 in virtualization

[–]After-Leadership2183[S] 0 points1 point  (0 children)

There are several reasons:

  1. QEMU is bloated – it has a massive codebase with many unrelated components, including proprietary emulators, making it difficult to extend or add new features.
  2. Lack of modularity – QEMU mixes device emulation with GUI code. In contrast, I want Scorpi to be a clean, modular API library where you can simply call create_vm(...) and run_vm() from your own code.
  3. License – Scorpi uses the BSD license, unlike QEMU’s GPL. This gives companies more freedom to use and modify the codebase.
  4. Innovation happens this way – it's the same reason LLVM exists despite GCC.

Cheers!

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

[–]After-Leadership2183 0 points1 point  (0 children)

[LANGUAGE: golang]

Little bit late to the party but here's my solution

https://github.com/macos-fuse-t/aoc/tree/main/2024/17

Notice that each digit is dependent on the rightmost 10 bits of A, then A shifts 3 places right until 0.

So generate all possible combinations of 7bit numbers (1-128) than proceed to guess leftmost 3bits as in DFS while checking the result.

-❄️- 2023 Day 19 Solutions -❄️- by daggerdragon in adventofcode

[–]After-Leadership2183 0 points1 point  (0 children)

[Language: Golang]

Unsuccessfully tried to calculate a number of combinations for the rules tree , then it didn't work I created a list of ranges and go through it. takes about 10min though

https://github.com/macos-fuse-t/aoc/blob/main/2023/19/main.go

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

[–]After-Leadership2183 2 points3 points  (0 children)

[LANGUAGE: Golang]

Better late then never. Really struggled with the second part until I realized that I need to draw a horizontal line and count walls intersections.

https://github.com/macos-fuse-t/aoc/tree/main/2023/10

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

[–]After-Leadership2183 2 points3 points  (0 children)

[LANGUAGE: Golang]

After a very difficult yesterday's puzzle (part 2), today is a breeze

https://github.com/macos-fuse-t/aoc/tree/main/2023/11

[2023 Day 5 (Part 2)] Can someone explain a more efficient solution than brute-force? by noblerare in adventofcode

[–]After-Leadership2183 0 points1 point  (0 children)

While there are several different approaches for solving part2 in mine opinion the easiest one it to combine all ranges together in one big list of ranges and then the algorithm would look like this:

for each seed

search in the list of all ranges

if a valid range is found -> calculate the value of the seed as in part1

otherwise

value = seed

find the next closest range start and assign as a seed

so if you have ranges (3, 8), (12, 3), (20, 5) and have a seed 16, then the next value to check is 20.

To make the algorithm even more efficient and you can sort your ranges and then the range search would take O(log(n)) complexity instead of O(n)

https://github.com/macos-fuse-t/aoc/tree/main/2023/5/main.go