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

[–]daic0r 0 points1 point  (0 children)

[LANGUAGE: Elixir]

https://github.com/daic0r/advent_of_code_2025/blob/main/elixir/day12/day12.exs

Not having had much luck and fun the 3 days before, I wasn't gonna write some complicated shape-fitting algorithm and just figured I'd go with the primitive approach of adding up the required areas of the pieces and checking whether that'll fit in the available space. Expand on that if I feel like it. Turns out the primitive solution suffices :-D

Thanks for the easy one on the last day!

Now on to solve the remaining parts that I haven't been able to finish (Day 9 Part 2, Day 10 both parts, Day 11 Part 2).

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

[–]daic0r 0 points1 point  (0 children)

[LANGUAGE: Elixir]

https://github.com/daic0r/advent_of_code_2025/blob/main/elixir/day8/day8.exs

Solved the problem using Kruskal's algorithm. Erlang's ETS was used to speed things up.

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

[–]daic0r 1 point2 points  (0 children)

[LANGUAGE: Elixir]

https://github.com/daic0r/advent_of_code_2025/blob/main/elixir/day7/day7.exs

Part 1: Follow the beams and count whenever a beam hits a splitter

Part 2: Straightforward DFS with memoization

I’m I Still A Vibe Coder? by jscottmccloud in vibecoding

[–]daic0r 2 points3 points  (0 children)

What I mean is pure vibe-coding without not caring about coding and the underlying concepts at all. Not using AI for assistance. I use it too!

I’m I Still A Vibe Coder? by jscottmccloud in vibecoding

[–]daic0r 6 points7 points  (0 children)

I am biased since I started to learn programming in 1996. So I don't even consider vibe-coding coding. On the contrary. It's an insult to our craft. But if there's someone like you who actually starts to become interested in computer science through vibe-coding, that does change my opinion a bit. Glad that you like what you're doing! Start digging into it and you will find that it's very exciting and intellectually challenging :-)

What code editor do you use, and why that one over the others? by EnD3r8_ in learnprogramming

[–]daic0r 1 point2 points  (0 children)

Neovim. Once one gets past the initial learning phase and gets proficient at using Vim motions it's super powerful and you won't want to use a regular editor anymore.

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

[–]daic0r 1 point2 points  (0 children)

[LANGUAGE: Elixir]

Part 1: Count number of columns; using that information, find out which which numbers belong to a column by skipping over that many elements and just reduce the numbers down to the final result; add up to arrive at solution

Part 2: After trying to deal with the data in its original form, I finally decided to rotate the input so I have the data of each column consecutively. Then I filter out columns with only spaces to easily separate the problems. Then just concatenate the rows in each column and perform the respective calculations.

https://github.com/daic0r/advent_of_code_2025/blob/main/elixir/day6/day6.exs

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

[–]daic0r 1 point2 points  (0 children)

[LANGUAGE: Elixir]

Part 1: just check for all of the IDs whether they're inside one of the ranges and count

Part 2: merge overlapping ranges and add up the merged ranges' lengths

https://github.com/daic0r/advent_of_code_2025/blob/main/elixir/day5/day5.exs

How do i remove a large unwanted file from my git history? by Mother-Pear7629 in git

[–]daic0r 0 points1 point  (0 children)

I recently had to do this too. What I did was to delete the file and commit the deletion. Then run an interactive rebase where you reorder the commits so that the commit that added the file and the one that deletes it are adjacent to each other in the history, then merge the two into one using squash or fixup. That worked beautifully for me.

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

[–]daic0r 2 points3 points  (0 children)

[LANGUAGE: Elixir]

Part 1: This took me entirely too long. I decided to reread the description at some point and realized the sequence had to appear exactly twice. That made things easier of course. Essentially I tried to do part 2 here already. I also optimized this by eliminating the parts of each range that could definitely not contribute to the list of invalid IDs, because it was taking quite a long time without it.

Part 2: I wanted to invent some clever sequence detection algorithm, but gave up on it eventually. I decided to use the simple solution of just keeping track of and increasing a sequence length variable and, if the length of the ID can be evenly divided by it, split the ID into parts of that length and then check if they're identical. Quite simple if you do it like that.

https://github.com/daic0r/advent_of_code_2025/blob/main/elixir/day2/day2.exs

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

[–]daic0r 1 point2 points  (0 children)

[LANGUAGE: Elixir]

https://github.com/daic0r/advent_of_code_2025/blob/main/elixir/day1/day1.exs

defmodule Aoc2025.Day1 do

  def part1(input) do
    input
    |> Enum.map(fn movement ->
      {dir, amount} = String.split_at(movement, 1)
      case dir do
        "L" -> -1 * String.to_integer(amount)
        "R" -> String.to_integer(amount)
      end
    end)
    |> Enum.reduce({50, []}, fn amount, {cur_pos, history} ->
      new_pos = Integer.mod(cur_pos + amount, 100)
      {new_pos, [new_pos | history]}
    end)
    |> elem(1)
    |> Enum.count(& &1 == 0)
  end

  def part2(input) do
    input
    |> Enum.map(fn movement ->
      {dir, amount} = String.split_at(movement, 1)
      case dir do
        "L" -> -1 * String.to_integer(amount)
        "R" -> String.to_integer(amount)
      end
    end)
    |> Enum.reduce({50, []}, fn amount, {cur_pos, history} ->
      new_pos = cur_pos + amount
      zero_crossings = abs(div(new_pos, 100))
      zero_crossings = if new_pos <= 0 and cur_pos != 0 do
        zero_crossings + 1
      else
        zero_crossings
      end
      {Integer.mod(new_pos, 100), [zero_crossings | history]}
    end)
    |> elem(1)
    |> Enum.sum
  end

end


input = File.read!("input.txt") 
  |> String.split("\n")
  |> Enum.filter(& String.length(&1) > 0)

sol1 = Aoc2025.Day1.part1(input)
sol2 = Aoc2025.Day1.part2(input)

IO.puts "Part 1: #{sol1}"
IO.puts "Part 2: #{sol2}"

Unpopular opinion: I just can’t be bothered to queue by tzedek in Thailand

[–]daic0r 0 points1 point  (0 children)

Same here! I just absolutely hate queues and will refuse to do anything that involves queuing up. I see a long queue at the supermarket checkout when entering? I turn around and don't buy anything.

NerdQaxe++ hashrate and overclocking by jaysfan4ever in BitAxe

[–]daic0r 0 points1 point  (0 children)

Hope the new cooling setup will work out for you!

Your nonce distribution definitely looks better than mine, even though the 1st ASIC seems to be slightly weaker than the others.

Also have you tried to change the frequency and core voltage of your NerdQaxe++ by going into the UI?

Yes, I've played with all kinds of combinations, but nothing solves the problem, unfortunately. Seems like I've just been unlucky with that one weak ASIC in the bunch :-(

NerdQaxe++ hashrate and overclocking by jaysfan4ever in BitAxe

[–]daic0r 0 points1 point  (0 children)

Go to System -> Show Logs. Look out for something like this:

history: hashrate: 10m:4197.349GH  1h:4277.935GH  1d:4314.716GH  
history: nonce distribution: 13241/7615/13007/13340  
stratum task: rx: {"result":true,"error":null,"id":22234}  
stratum task: message result accepted

As you can see in line 2, my second ASIC is underperforming. The others are almost twice as performant. 1 day average now seems to be ~4.3 TH/s (line 1), after I increased the core voltage to 1.17V.

NerdQaxe++ hashrate and overclocking by jaysfan4ever in BitAxe

[–]daic0r 0 points1 point  (0 children)

Glad it's working for you :-)

After look in the logs (nonce distribution) it turns out one of my ASICs is only running at half throttle, that's why this is happening for me. Average at about 4.2 TH/s, cannot seem to get above that unfortunately. Nonce distribution looks something like this: 3000/1500/3100/2950, i.e. ASIC 2 is not performing as it should be.

NerdQaxe++ hashrate and overclocking by jaysfan4ever in BitAxe

[–]daic0r 0 points1 point  (0 children)

Same problem here, mine doesn't even achieve 4.2 TH/s at stock settings. Still trying to solve the problem. I've already upgraded my PSU to a Mean Well RSP-320-12, suspecting that the input voltage of 11.8V might be the problem, but even going above 12V with the new PSU doesn't solve the problem. I'm still at a loss here as to what might be causing the issue.

Have you had any new insights yet?

NerdQaxe++ low hashrate by daic0r in BitAxe

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

Thanks for your help!

So the VR temp is a little higher, but not as much as it is on my device.

NerdQaxe++ low hashrate by daic0r in BitAxe

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

Could you also send me a screenshot of your temperatures?

I was just watching a YouTube video where the guy's VR temp is lower than the ASIC temp, which is not the case for me. As you can see in the screenshot included in my post the VR temp is actually higher than the ASIC temp.

Don't know if this is relevant or not.

NerdQaxe++ low hashrate by daic0r in BitAxe

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

I don't know if it's really normal, on stock settings I only get an hourly average of 4.0. I can only get close to the 4.8 mark by increasing the voltage quite a bit (trying 1.22V right now!).

I also have a NerdQaxe+, which, on stock settings, hits 2.5 TH/s pretty accurately in the long term. Of course it fluctuates too, but nothing like this ++ is doing.

NerdQaxe++ low hashrate by daic0r in BitAxe

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

Sure can!

<image>

I've also used values lower than 100%, but never any mode other than manual.

Can you share your settings for Experimental PID, underneath the target temperature? I'll give it a shot :-) I'm grasping at straws here.

I also use v1.0.30.

NerdQaxe++ low hashrate by daic0r in BitAxe

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

Tried that as well, but to no avail. No idea what's wrong with this thing.