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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi all; great to see all the different approaches. I’ve been doing AOC for some years now, but this year in elixir. I’ve been using elixir for some small projects over the last months, but AOC is a fun way to spend some more time learning the language and finding all kinds of nifty stuff in the standard libraries.</p>
<p>My day 4 in two different versions:</p>
<ul>
<li><a href="https://github.com/zevv/aoc2021/blob/master/lib/day04.ex" class="inline-onebox" rel="noopener nofollow ugc">aoc2021/lib/day04.ex at master · zevv/aoc2021 · GitHub</a> : basic functional approach, pretty compact I think</li>
<li><a href="https://github.com/zevv/aoc2021/blob/master/lib/day04-genserver.ex" class="inline-onebox" rel="noopener nofollow ugc">aoc2021/lib/day04-genserver.ex at master · zevv/aoc2021 · GitHub</a> : uses genserver for the game host and players, the host giving out the numbers and the players shouting “BINGO!” when they have a win.</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="234109" 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-2021-day-4/44250/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-234109" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234109"
                     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 #22"></div>
  </section>
</div>
    <div class="postbit" id="234112" data-post-id="234112">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I used MapSets all the way..</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Day4 do
  def board_to_sets(str_board) do
    str_board = Enum.map(str_board, &amp;String.split/1)
    hor_lines = 
      for line &lt;- str_board do
        for num &lt;- line do
          String.to_integer(num)
        end
      end
    vert_lines = Enum.zip(hor_lines) |&gt; Enum.map(&amp;Tuple.to_list/1)
    diag1 = for i &lt;- 0..4, do: Enum.at(Enum.at(hor_lines, i), i)
    diag2 = for i &lt;- 0..4, do: Enum.at(Enum.at(hor_lines, i), 4-i)
    hor_lines ++ vert_lines ++ [diag1, diag2]
    |&gt; Enum.map(&amp;MapSet.new/1)
  end

  def bingo?(input, board) do
    Enum.any?(board, fn line -&gt; MapSet.size(MapSet.intersection(input, line)) == 5 end)
  end

  def get_first_bingo_board(input, boards), do: get_first_bingo_board(input, boards, [])

  def get_first_bingo_board([h | tail], boards, current_numbers) do
    current_numbers = [h | current_numbers]
    set_current_numbers = MapSet.new(current_numbers)
    found_boards = for board &lt;- boards, bingo?(set_current_numbers, board), do: board
    case found_boards do
      [] -&gt; get_first_bingo_board(tail, boards, current_numbers)
      [board | _] -&gt; [board, current_numbers]
    end
  end

  # For the last board, we will start with the reverse input list, and find
  # the length of the input which has 99 bingos - i.e. 1 less that total boards
  def get_last_bingo_board([_h | tail] = current_numbers, boards) do
    set_current_numbers = MapSet.new(current_numbers)
    found_boards = for board &lt;- boards, bingo?(set_current_numbers, board), do: board
    case length(found_boards) do
      100 -&gt; get_last_bingo_board(tail, boards)
      99 -&gt; [MapSet.difference(MapSet.new(boards), MapSet.new(found_boards)), length(current_numbers)]
    end
  end
end
</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="234112" 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-2021-day-4/44250/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-234112" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234112"
                     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 #23"></div>
  </section>
</div>
    <div class="postbit" id="234114" data-post-id="234114">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>First part was easy with a naive solution. Second part I kept getting the wrong answer, possibly because my method for checking winners was off somehow. Reading through here helped, especially <a class="mention" href="/u/princemaple" rel="nofollow">@princemaple</a>’s solution. Using the cell value as the key with coords as the value in the map was the critical piece for me from that solution.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="234114" 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-2021-day-4/44250/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-234114" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234114"
                     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 #24"></div>
  </section>
</div>
    <div class="postbit" id="234117" data-post-id="234117">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi all, Similar to <a class="mention" href="/u/zevv" rel="nofollow">@zevv</a> I too am doing it in elixir for the first time and I’m also trying to force my brain into writing the code in a manner that is as functional as possible (which not exactly easy for someone who’s been doing all manner of imperative languages for years)</p>
<p>I do think that day four <a href="https://github.com/ramuuns/aoc/blob/master/2021/day-04.exs" rel="noopener nofollow ugc">did turn out quite elegant</a>, but would love to hear additional feedback.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="234117" 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-2021-day-4/44250/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-234117" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234117"
                     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 #25"></div>
  </section>
</div>
    <div class="postbit" id="234137" data-post-id="234137">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a href="https://github.com/trbngr/advent_of_code/blob/main/lib/2021/4.ex" rel="noopener nofollow ugc">Day 4 solution</a></p>
<p>I opted to just create a BingoBoard struct that kept track of the state of the board, the score, and used single element tuple to mark a number.</p>
<p>Criteria for each part was implemented using Enum.reduce_while.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="234137" 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-2021-day-4/44250/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-234137" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234137"
                     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 #26"></div>
  </section>
</div>
    <div class="postbit" id="234138" data-post-id="234138">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>My solution now cleaned up a bit:<br>
<a href="https://github.com/stevensonmt/advent_of_code/blob/977d9eaace9352802815fa470730fc003149fcbb/2021/day4/lib/day4.ex" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/stevensonmt/advent_of_code/blob/977d9eaace9352802815fa470730fc003149fcbb/2021/day4/lib/day4.ex</a></p>
<p>I still think it could be better organized but I’m tired of it. This year seems tougher the last couple days than I remember the early going last year.  Maybe I’m just rusty.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="234138" 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-2021-day-4/44250/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-234138" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234138"
                     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 #27"></div>
  </section>
</div>
    <div class="postbit" id="234144" data-post-id="234144">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Here’s <a href="https://github.com/qhwa/AdventOfCode/blob/master/lib/aoc/2021/day04.exs" rel="noopener nofollow ugc">my try</a>.</p>
<p>A few things I tried:</p>
<ul>
<li>The board is represented as a map, with <code>{x, y} =&gt; number</code></li>
<li>When a number is taken, the <code>{pos, number}</code> will be removed from the map</li>
<li>Checking diagonally at <code>{0, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}</code> to see if any column or row has been fully taken</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="234144" 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-2021-day-4/44250/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-234144" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234144"
                     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 #28"></div>
  </section>
</div>
    <div class="postbit" id="234146" data-post-id="234146">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gus" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gus/120/37315_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gus
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Nerves Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I tried something a little different - instead of keeping track of the position of called numbers, I only keep track of the number of times a number has been called in a specific row/column. When a row or column then has 5, I know that board had a bingo.</p>
<p>I calculated the number of moves to win a bingo for each board, which made part two really easy. I just needed to use the Enum.min/2 or Enum.max/2 functions to determine the board that was the winner/loser.</p>
<p>Code below, run in LiveBook:<br>
(edit: I was reading other methods that people used and I realize that there is a Enum.reduce_while function. That would have been helpful! Will use in the future)</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Part1 do

  def get_board_statistics(board, numbers) do
    numbers
    |&gt; Enum.reduce({[0,0,0,0,0], [0,0,0,0,0], 0, "", false}, fn number, acc = {row_counts, col_counts, count_til_bingo, winning_number, stop} -&gt;
      unless stop do
        case get_index_row_col(board, number) do
          {row_index, col_index} -&gt;
            row_counts = List.update_at(row_counts, row_index, &amp; &amp;1 + 1)
            col_counts = List.update_at(col_counts, col_index, &amp; &amp;1 + 1)
            {row_counts, col_counts, count_til_bingo + 1, number, 5 in row_counts or 5 in col_counts}
          nil -&gt;
            {row_counts, col_counts, count_til_bingo + 1, winning_number, stop}
        end
      else
        acc
      end
    end)
  end

  defp get_index_row_col(board, number) do
    row_index = 
      board
      |&gt; Enum.find_index(&amp;(number in &amp;1))

    unless is_nil(row_index) do
      col_index = 
        board
        |&gt; Enum.at(row_index)
        |&gt; Enum.find_index(&amp;(number == &amp;1))
  
      {row_index, col_index}
    end
  end
end

inputs =
  "advent/inputs/day04.txt"
  |&gt; Path.relative()
  |&gt; File.read!()
  |&gt; String.split("\n")
  |&gt; Enum.drop(-1)

[numbers | rest] = inputs
numbers = numbers |&gt; String.trim() |&gt; String.split(",")

boards = 
  rest
  |&gt; Enum.drop(1)
  |&gt; Enum.chunk_every(5, 6)
  |&gt; Enum.map(fn board -&gt;
    Enum.map(board, fn row -&gt;
      row
      |&gt; String.trim() 
      |&gt; String.split(" ") 
      |&gt; Enum.reject(&amp;(&amp;1 == ""))
    end)
  end)

{count_to_win, winning_number, winning_board} =
  Enum.map(boards, fn board -&gt;
    {_, _, count_til_bingo, winning_number, _} = Part1.get_board_statistics(board, numbers)
    {count_til_bingo, winning_number, board}
  end)
  |&gt; Enum.min(fn {num1, _, _}, {num2, _, _} -&gt; num1 &lt; num2 end)

numbers_called = Enum.take(numbers, count_to_win)

score = 
  winning_board
  |&gt; List.flatten()
  |&gt; Enum.reject(&amp; &amp;1 in numbers_called)
  |&gt; Enum.map(&amp;String.to_integer/1)
  |&gt; Enum.sum
  |&gt; Kernel.*(String.to_integer(winning_number))

# part 2
{count_to_lose, losing_number, losing_board} =
  Enum.map(boards, fn board -&gt;
    {_, _, count_til_bingo, losing_number, _} = Part1.get_board_statistics(board, numbers)
    {count_til_bingo, losing_number, board}
  end)
  |&gt; Enum.max(fn {num1, _, _}, {num2, _, _} -&gt; num1 &gt; num2 end)
  |&gt; IO.inspect

numbers_called = Enum.take(numbers, count_to_lose)

score = 
  losing_board
  |&gt; List.flatten()
  |&gt; Enum.reject(&amp; &amp;1 in numbers_called)
  |&gt; Enum.map(&amp;String.to_integer/1)
  |&gt; Enum.sum
  |&gt; Kernel.*(String.to_integer(losing_number))
</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="234146" 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-2021-day-4/44250/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-234146" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234146"
                     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 #29"></div>
  </section>
</div>
    <div class="postbit" id="234207" data-post-id="234207">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>VOD of day 4 is here: <a href="https://www.twitch.tv/videos/1225076231" class="inline-onebox" rel="nofollow">Twitch</a></p>
<p>I solved Advent of Code in the first half of the video and in the second half we used Elixir’s inspect protocol to print the board using Christmas colors. Then we also did sigils. <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p>
<p>Code is here: <a href="https://github.com/josevalim/aoc/blob/main/2021/day-04.livemd" rel="nofollow">https://github.com/josevalim/aoc/blob/main/2021/day-04.livemd</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="234207" 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-2021-day-4/44250/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-234207" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234207"
                     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 #30"></div>
  </section>
</div>
    <div class="postbit" id="234224" data-post-id="234224">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>part 1:</p>
<p><a href="https://github.com/rugyoga/aoc2021/blob/main/day4.exs" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/rugyoga/aoc2021/blob/main/day4.exs</a></p>
<p>part 2</p>
<p><a href="https://github.com/rugyoga/aoc2021/blob/main/day4b.exs" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/rugyoga/aoc2021/blob/main/day4b.exs</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="234224" 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-2021-day-4/44250/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-234224" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="234224"
                     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>
</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/44250/load_more?page=4">Load more posts</a>
</div></template></turbo-stream>