<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="348903" data-post-id="348903">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="billylanchantin" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/billylanchantin/120/28428_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  billylanchantin
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Haha thanks y’all <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> Don’t worry, I think my AOC code is unreadable too. It’d never get merged in prod! But I’m going for fewest LOC (w/ the stock formatter), so it is what it is sometimes.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348903" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-348903" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348903"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #31"></div>
  </section>
</div>
    <div class="postbit" id="348907" data-post-id="348907">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="leifmetcalf" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  leifmetcalf
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Iterating backwards, like in <a href="https://write.as/leif/notes-for-advent-of-code-2024" rel="noopener nofollow ugc">https://write.as/leif/notes-for-advent-of-code-2024</a> :</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Day7 do
  def input() do
    File.read!("/home/leif/Documents/aoc/7")
  end

  def parse(input) do
    input
    |&gt; String.split("\n", trim: true)
    |&gt; Enum.map(fn line -&gt;
      [objective, xs] = String.split(line, ": ")
      objective = String.to_integer(objective)
      xs = String.split(xs) |&gt; Enum.map(&amp;String.to_integer/1)
      {objective, xs}
    end)
  end

  def go(input) do
    input
    |&gt; parse()
    |&gt; Stream.filter(fn {objective, xs} -&gt; go_rec(objective, Enum.reverse(xs)) end)
    |&gt; Stream.map(&amp;elem(&amp;1, 0))
    |&gt; Enum.sum()
  end

  defp go_rec(obj, [x]) do
    obj == x
  end
  
  defp go_rec(obj, [x | xs]) do
    next_power_of_10 =
      cond do
        x &lt; 10 -&gt; 10
        x &lt; 100 -&gt; 100
        x &lt; 1000 -&gt; 1000
      end

    (rem(obj, next_power_of_10) == x and go_rec(div(obj, next_power_of_10), xs)) or
      (rem(obj, x) == 0 and go_rec(div(obj, x), xs)) or
      (x &lt;= obj and go_rec(obj - x, xs))
  end
end

:timer.tc(Day7, :go, [Day7.input()])
</code></pre>
<p>Runs in 5.5ms.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348907" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-348907" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348907"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #32"></div>
  </section>
</div>
    <div class="postbit" id="348910" data-post-id="348910">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dpreston" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dpreston
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Skipping the input file parsing and showing just juicy bits …</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  # takes the parsed list of integers [result, a, b, c ...] 
  # and an optional flag to activate concatination
  def search([result | operands], concat? \\ false) do
    # if a valid combination is found, return the calculated result for the final summation
    if search(result, operands, concat?), do: result, else: 0
  end

  # handle the last 2 operands, if the total result is a match, pass true back down the chain
  def search(result, [a, b], concat?) do
    cond do
      a + b == result -&gt; true
      a * b == result -&gt; true
      concat? and a &lt;~&gt; b == result -&gt; true
      true -&gt; false
    end
  end

  # for the preceeding operands, prepend the rolling total to the remaining list tail
  # shortcircuit if the total is already greater than the provided result
  def search(result, [a, b | tail], concat?) do
    cond do
      result &lt; a -&gt; false
      search(result, [a + b | tail], concat?) -&gt; true
      search(result, [a * b | tail], concat?) -&gt; true
      concat? and search(result, [a &lt;~&gt; b | tail], concat?) -&gt; true
      true -&gt; false
    end
  end

  # custom concat operator, the operands have a maximum of 3 digits in the input file
  def left &lt;~&gt; right when right &lt; 10, do: left * 10 + right
  def left &lt;~&gt; right when right &lt; 100, do: left * 100 + right
  def left &lt;~&gt; right when right &lt; 1000, do: left * 1000 + right
</code></pre>
<p>My first solution had an exhaustive search of all the operation/operand combination and then ignored all the duplicate solutions. Using <code>cond</code> to return as soon as the first combo was found dropped the part 2 from 800ms to 60ms.<br>
Calling the search function asynchronously cut part 2 time by 60% and memory by 95%!</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def part2(input) do
    input
    |&gt; Enum.map(&amp;search(&amp;1, true))
    |&gt; Enum.sum()
  end

  def part2a(input) do
    input
    |&gt; Task.async_stream(&amp;search(&amp;1, true))
    |&gt; Enum.reduce(0, fn {:ok, x}, acc -&gt; acc + x end)
  end
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">Name                     ips        average  deviation         median         99th %
part 1                414.96        2.41 ms     ±5.17%        2.36 ms        2.97 ms
part 1 - async        109.09        9.17 ms     ±5.02%        9.11 ms       10.70 ms
part 2 - async         49.66       20.14 ms     ±8.52%       19.76 ms       26.21 ms
part 2                 16.82       59.46 ms     ±2.38%       59.19 ms       64.41 ms

Name                   average  deviation         median         99th %
part 1                 3.18 MB     ±0.00%        3.18 MB        3.18 MB
part 1 - async         1.08 MB     ±0.18%        1.08 MB        1.09 MB
part 2 - async         1.25 MB     ±0.88%        1.25 MB        1.28 MB
part 2                51.33 MB     ±0.00%       51.33 MB       51.33 MB
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348910" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-348910" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348910"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #33"></div>
  </section>
</div>
    <div class="postbit" id="348934" data-post-id="348934">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mwilsoncoding" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwilsoncoding/120/36815_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mwilsoncoding
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I still haven’t looked at answers from this thread (closed my eyes and scrolled to the reply section <img src="https://forum.elixirforum.com/images/emoji/apple/stuck_out_tongue_closed_eyes.png?v=15" title=":stuck_out_tongue_closed_eyes:" class="emoji" alt=":stuck_out_tongue_closed_eyes:" loading="lazy" width="20" height="20"> ). I’m on part 2, but sleep debt is kicking in and I’ll likely have to continue catching up in the morning.</p>
<p>Here’s my part 1 solution for now:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">#!/usr/bin/env elixir

defmodule Day7.Part1 do
  defp parse(str) do
    [target_str, numbers] =
      str
      |&gt; String.trim()
      |&gt; String.split(":")

    target =
      target_str
      |&gt; String.to_integer()

    args =
      numbers
      |&gt; String.split(" ", trim: true)
      |&gt; Enum.map(&amp;String.to_integer/1)

    max_bit_length =
      args
      |&gt; Enum.reduce(
        0,
        fn n, max_bit_len -&gt;
          bit_len = ceil(:math.log2(n))
          if bit_len &gt; max_bit_len, do: bit_len, else: max_bit_len
        end
      )

    %{target: target, args: args, max_bit_length: max_bit_length}
  end

  defp intercalate(bit_length, argv, separators) do
    case {argv, separators} do
      {&lt;&lt;h::size(^bit_length), h_2::size(^bit_length)&gt;&gt;, &lt;&lt;s::size(1)&gt;&gt;} -&gt;
        &lt;&lt;h::size(bit_length), s::1, h_2::size(bit_length)&gt;&gt;

      {&lt;&lt;h::size(^bit_length), h_2::size(^bit_length), argv_tail::bits&gt;&gt;,
       &lt;&lt;s::size(1), sep_tail::bits&gt;&gt;} -&gt;
        tail = &lt;&lt;h_2::size(bit_length), argv_tail::bits&gt;&gt;
        rest = intercalate(bit_length, tail, sep_tail)
        &lt;&lt;h::size(bit_length), s::size(1), rest::bits&gt;&gt;
    end
  end

  # expects args to be reversed
  defp calculate(bit_length, instructions) do
    case instructions do
      &lt;&lt;a::size(^bit_length)&gt;&gt; -&gt;
        a

      &lt;&lt;a::size(^bit_length), op::size(1), b::bits&gt;&gt; -&gt;
        b = calculate(bit_length, b)

        case op do
          0 -&gt; a + b
          1 -&gt; a * b
        end
    end
  end

  defp count_if_possible(%{target: target, args: args, max_bit_length: bit_length}) do
    argv =
      args
      |&gt; Enum.reduce(
        &lt;&lt;&gt;&gt;,
        fn n, bitstring -&gt;
          # reverses order of args
          &lt;&lt;n::size(bit_length), bitstring::bitstring&gt;&gt;
        end
      )

    argc = args |&gt; Enum.count()
    ops_count = argc - 1

    limit = Bitwise.bsl(1, ops_count + 1)

    Stream.unfold(
      {0, &lt;&lt;0::size(ops_count)&gt;&gt;},
      fn {index, &lt;&lt;i::size(ops_count)&gt;&gt;} = state -&gt;
        if index &gt;= limit, do: nil, else: {state, {index + 1, &lt;&lt;i + 1::size(ops_count)&gt;&gt;}}
      end
    )
    |&gt; Stream.transform(
      nil,
      fn e, nil -&gt;
        {[e |&gt; elem(1)], nil}
      end
    )
    |&gt; Enum.reduce_while(
      0,
      fn op_combo, acc -&gt;
        instructions = intercalate(bit_length, argv, op_combo)
        total = calculate(bit_length, instructions)
        if target == total, do: {:halt, acc + target}, else: {:cont, acc}
      end
    )
  end

  def solve() do
    File.stream!("07/input.txt")
    |&gt; Stream.transform(
      nil,
      fn line, nil -&gt;
        {[parse(line)], nil}
      end
    )
    |&gt; Enum.reduce(
      0,
      fn scenario, acc -&gt;
        acc + count_if_possible(scenario)
      end
    )
    |&gt; IO.puts()
  end
end

Day7.Part1.solve()
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348934" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-348934" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348934"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #34"></div>
  </section>
</div>
    <div class="postbit" id="348964" data-post-id="348964">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jarlah" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jarlah/120/24789_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jarlah
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>this is propably highly non performant way to solve the equations. But I figured after a while i could stop solving equation when i found one that matched the wanted result. That speeded it up from hours to 5 mins … for Part1</p>
<p><a href="https://github.com/jarlah/advent_of_code/blob/master/lib/2024/day_7/OperatorPermutations.ex" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/jarlah/advent_of_code/blob/master/lib/2024/day_7/OperatorPermutations.ex</a></p>
<p>now im waiting for the part2 answer … will NOT use 5 minutes .. hopefully less than 30 min …</p>
<p>tips on improving peformance? i havent even looked at other solutions yet. Just scrolled quickly down</p>
<p>the “problem elephant” in the room is of course this bit of code</p>
<p><a href="https://github.com/jarlah/advent_of_code/blob/master/lib/2024/day_7/Input.ex#L37" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/jarlah/advent_of_code/blob/master/lib/2024/day_7/Input.ex#L37</a></p>
<p>which tries to “weed out” too high numbers .. but i might remove it .. or change the limit …since the largest possible number in the input file is 15 digits i can just check if combined digits is larger than 15 and fail if so</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348964" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-348964" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348964"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #35"></div>
  </section>
</div>
    <div class="postbit" id="348969" data-post-id="348969">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dpreston" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dpreston
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>a few things I’m noticing immediately:</p>
<ul>
<li>you don’t need to handle the <code>-</code> and <code>/</code> operators, which reduces your permutations by <em>a lot</em></li>
<li>you generate the permutations list each time for set of operands, you could generate them once in advance and reuse them (there are also solutions that don’t require pregenerated permutations at all, but I haven’t compared the speeds directly)</li>
<li><code>double_pipe/2</code>doesn’t need to handle floats, and you can check your puzzle input to confirm the max char length of the individual operands is 3 and just handle that</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348969" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-348969" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348969"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #36"></div>
  </section>
</div>
    <div class="postbit" id="348970" data-post-id="348970">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jarlah" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jarlah/120/24789_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jarlah
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>oh .. my .. gawd … i just “assumed” i needed to use all operators .. <img src="https://forum.elixirforum.com/images/emoji/apple/man_facepalming.png?v=15" title=":man_facepalming:" class="emoji" alt=":man_facepalming:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348970" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-348970" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348970"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #37"></div>
  </section>
</div>
    <div class="postbit" id="348971" data-post-id="348971">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jarlah" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jarlah/120/24789_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jarlah
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>and since i dont need / i dont need to handle floats .. duh!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348971" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-348971" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348971"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #38"></div>
  </section>
</div>
    <div class="postbit" id="348972" data-post-id="348972">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dpreston" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dpreston
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>you may also want to use the restricted <code>+</code>, <code>*</code> &amp; <code>||</code> operator set to short-circuit the calculation if you go over the target as you can never come back down</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348972" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-348972" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348972"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #39"></div>
  </section>
</div>
    <div class="postbit" id="348973" data-post-id="348973">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jarlah" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jarlah/120/24789_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jarlah
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>ah that might need some refactoring indead … maybe i should go with strings for the operators instead of the actual functions .. and pattern matching and short curcuit</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="348973" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-2024-day-7/67938/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-348973" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="348973"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #40"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/67938/load_more?page=5">Load more posts (9 remaining)</a>
</div></template></turbo-stream>