<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="270586" data-post-id="270586">
  <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>what editor/IDE setup are you using?<br>
also, in this particular case, how would the trailing whitespace characters affect your parsing of the input string?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="270586" 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-2022-day-5/52258/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-270586" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270586"
                     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="270589" data-post-id="270589">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m using VS Code. My test case looks / looked like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">test "parse_stacks 1b" do
  input = """
      [D]
  [N] [C]
  [Z] [M] [P]
   1   2   3
  """

  actual = Day.parse_stacks(input)

  expected = [
    ["N", "Z"],
    ["D", "C", "M"],
    ["P"]
  ]

  assert actual == expected
end
</code></pre>
<p>and my implementation is</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def parse_stacks(input) do
  input
  |&gt; String.split("\n", trim: true)
  |&gt; Enum.reverse()
  |&gt; Enum.drop(1)
  |&gt; Enum.map(&amp;String.graphemes/1)
  |&gt; Enum.map(&amp;Enum.chunk_every(&amp;1, 4))
  |&gt; Enum.map(&amp;Enum.map(&amp;1, fn chunks -&gt; Enum.join(chunks) end))
  |&gt; Enum.zip()
  |&gt; Enum.map(&amp;Tuple.to_list/1)
  |&gt; Enum.map(&amp;Enum.reverse/1)
  |&gt; Enum.map(&amp;to_proper_names/1)
  |&gt; dbg()
end
</code></pre>
<p>as you can see i placed a <code>dbg</code> there for now to show where the problem is because when zipping it’s missing the last stack because the lists do not have enough elements:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">input #=&gt; "    [D]\n[N] [C]\n[Z] [M] [P]\n 1   2   3\n"
|&gt; String.split("\n", trim: true) #=&gt; ["    [D]", "[N] [C]", "[Z] [M] [P]", " 1   2   3"]
|&gt; Enum.reverse() #=&gt; [" 1   2   3", "[Z] [M] [P]", "[N] [C]", "    [D]"]
|&gt; Enum.drop(1) #=&gt; ["[Z] [M] [P]", "[N] [C]", "    [D]"]
|&gt; Enum.map(&amp;String.graphemes/1) #=&gt; [
  ["[", "Z", "]", " ", "[", "M", "]", " ", "[", "P", "]"],
  ["[", "N", "]", " ", "[", "C", "]"],
  [" ", " ", " ", " ", "[", "D", "]"]
]
|&gt; Enum.map(&amp;Enum.chunk_every(&amp;1, 4)) #=&gt; [
  [["[", "Z", "]", " "], ["[", "M", "]", " "], ["[", "P", "]"]],
  [["[", "N", "]", " "], ["[", "C", "]"]],
  [[" ", " ", " ", " "], ["[", "D", "]"]]
]
|&gt; Enum.map(&amp;Enum.map(&amp;1, fn chunks -&gt; Enum.join(chunks) end)) #=&gt; [["[Z] ", "[M] ", "[P]"], ["[N] ", "[C]"], ["    ", "[D]"]]
|&gt; Enum.zip() #=&gt; [{"[Z] ", "[N] ", "    "}, {"[M] ", "[C]", "[D]"}]
|&gt; Enum.map(&amp;Tuple.to_list/1) #=&gt; [["[Z] ", "[N] ", "    "], ["[M] ", "[C]", "[D]"]]
|&gt; Enum.map(&amp;Enum.reverse/1) #=&gt; [["    ", "[N] ", "[Z] "], ["[D]", "[C]", "[M] "]]
|&gt; Enum.map(&amp;to_proper_names/1) #=&gt; [["N", "Z"], ["D", "C", "M"]]
</code></pre>
<p>(And thanks for the help <img src="https://forum.elixirforum.com/images/emoji/apple/slightly_smiling_face.png?v=15" title=":slightly_smiling_face:" class="emoji" alt=":slightly_smiling_face:" 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="270589" 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-2022-day-5/52258/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-270589" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270589"
                     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="270590" data-post-id="270590">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="stevensonmt" data-post="32" data-topic="52258">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/stevensonmt/48/20503_2.png" class="avatar"> stevensonmt:</div>
<blockquote>
<p>how would the trailing whitespace characters affect your parsing</p>
</blockquote>
</aside>
<p>Technically, once we know the length is 3, we might do</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Enum.reduce(input, ..., fn
  &lt;&lt;?[, c1, ?], ?\s, ?[, c2, ?], ?\s, ?[, c3, ?]&gt;&gt; -&gt; [c1, c2, c3]
end)
</code></pre>
<p>This might be generated, and it might be generated for different numbers of crates (say, up to 10 plus a <em>slow</em> fallback with <code>String.split/2</code>.)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="270590" 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-2022-day-5/52258/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-270590" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270590"
                     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="270593" data-post-id="270593">
  <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>Yeah, that’s basically how I did it with <code>Enum.take_every(4)</code>. Not sure if that addresses the issue <a class="mention" href="/u/ilosophiep" rel="nofollow">@IloSophiep</a> is having. I think the issue they are having has to do with the <code>Enum.chunk_every(&amp;1, 4)</code> call. If instead they used <code>Enum.drop(&amp;1, 1) |&gt;  Enum.take_every(4)</code> without the join, then I think the zip would be accurate.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="270593" 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-2022-day-5/52258/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-270593" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270593"
                     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="270599" data-post-id="270599">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I tried to change my code to use what you suggested, but even then i get to the point where my list for the stacks end up with different sizes. Basically i end up with</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">after_take_every = [["Z", "M", "P"], ["N", "C"], ["", "D"]]
</code></pre>
<p>instead of</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">after_take_every = [["Z", "M", "P"], ["N", "C", ""], ["", "D", ""]]
</code></pre>
<p>so my `Enum.zip/1) leaves out the last stack, because my input string does not have the trailing whitespaces. My workaround was writing</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">input =
  "" &lt;&gt;
    "    [D]    \n" &lt;&gt;
    "[N] [C]    \n" &lt;&gt;
    "[Z] [M] [P]\n" &lt;&gt;
    " 1   2   3 \n"
</code></pre>
<p>and it works.. - i just figured there might be some smart way that i’m missing.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="270599" 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-2022-day-5/52258/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-270599" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270599"
                     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="270601" data-post-id="270601">
  <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>Yeah, I don’t guess there’s a better way to handle that. I don’t use VSCode but it seems likely that there is some autoformat setting that is removing trailing whitespace.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="270601" 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-2022-day-5/52258/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-270601" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270601"
                     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="270602" data-post-id="270602">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Parsing the stacks/crates was the difficult part here. I was sure that I will find out here that there’s some clever solution for that, but it looks like there’s not. <img src="https://forum.elixirforum.com/images/emoji/apple/grimacing.png?v=15" title=":grimacing:" class="emoji" alt=":grimacing:" loading="lazy" width="20" height="20"> <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20"></p>
<p>I used something like this to get a crate from a line for a specific stack:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">grapheme_position = fn
  1 -&gt; 1
  pos -&gt; (pos - 1) * 4 + 1
end

grapheme_position = grapheme_position.(stack_index)
crate = String.at(line, grapheme_position)
</code></pre>
<p><a href="https://github.com/stefanluptak/advent-of-code/blob/main/2022/day_05.livemd" rel="noopener nofollow ugc">My solution in LiveBook</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="270602" 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-2022-day-5/52258/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-270602" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270602"
                     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="270605" data-post-id="270605">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>If you are using the ElixirLS extension, it might be the Elixir formatter removing the spaces. But VS Code may be doing it as well, although I would have guessed that this is a setting that needs to be opted into.</p>
<p>I personally just hand coded the stacks part of the input, as I didn’t have the patience to parse such a poor format. I hope it’s not a sign of things to come where parsing gets more and more annoying. In this case, the stacks could have been listed horizontally instead.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="270605" 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-2022-day-5/52258/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-270605" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270605"
                     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="270610" data-post-id="270610">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Attempt at a compact but straightforward code. Parsing included <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"></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Day5 do

  def run(callback) do
    # split the input in the lines for the initial state, and the moves
    [state_str, moves_str] = File.read!("input") |&gt; String.split("\n\n", trim: true)

    # split the lines for the initial state stacks, drop the last one
    state_lines = state_str |&gt; String.split("\n") |&gt; Enum.drop(-1)

    # compute how many stacks we have (divide length of one line by 4)
    stacks_count = (String.length(hd(state_lines)) + 1) / 4 |&gt; trunc()

    # reduce the states lines in a Map, key = stack id, value = list of letters, top at the start
    stacks = Enum.reduce(state_lines, %{}, fn line, acc -&gt;
      # go over all the positions where we might find a letter in the line string
      Enum.reduce((0..stacks_count-1), acc, fn key, acc -&gt;
        pos = key*4+1 # compute letter position from the key (stack index)
        case String.at(line, pos) do
          " "  -&gt; acc # space, no letter, don't add anything to the Map
          char -&gt; acc |&gt; Map.update(key, [char], fn stack -&gt; stack ++ [ char ] end) # found a letter, append it in the stack
        end
      end)
    end)
    # now, go over the moves lines
    stacks = moves_str |&gt; String.split("\n") |&gt; Enum.reduce(stacks, fn line, acc -&gt;
      # parse the line string, get how much should be moved from where to where
      [count, from, to] = ~r/move (\d+) from (\d+) to (\d+)/
                          |&gt; Regex.run(line, capture: :all_but_first)
                          |&gt; Enum.map(&amp;String.to_integer/1)
      # take from one stack to the other, reversing on the go if needed
      {to_move, acc} = acc |&gt; Map.get_and_update!(from-1, &amp; Enum.split(&amp;1, count) )
      acc |&gt; Map.update!(to-1, &amp; callback.(to_move) ++ &amp;1)
    end)
    stacks |&gt; Map.values() |&gt; Enum.map_join(&amp;hd/1) |&gt; IO.inspect()
  end
end

Day5.run(&amp;Enum.reverse/1) # part 1, reverse when moving over
Day5.run(&amp; &amp;1)            # part 2, don't reverse
</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="270610" 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-2022-day-5/52258/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-270610" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270610"
                     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="270611" data-post-id="270611">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><code>File.read!("input.txt")</code> <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"></p> 
	            </div>

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