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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is not a win today.  I wrote the code, and it had an off-by-one error with the sample input in the final cycle.  I couldn’t figure it out at all.</p>
<p>Someone else on reddit ran into the same problem, and I ended up peeking at their code.  It’s a one-line <code>Enum.reject</code> in my code to fix it, but I don’t fully understand why I needed it.</p>
<p>The neighbor selection/search could be better.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Day17 do
  def readinput() do
    File.read!("17.input.txt")
    |&gt; String.split("\n", trim: true)
    |&gt; Enum.map(&amp;String.split(&amp;1, "", trim: true))
  end

  def neighbors3({x, y, z}) do
    for i &lt;- -1..1 do
      for j &lt;- -1..1 do
        for k &lt;- -1..1 do
          {x + i, y + j, z + k}
        end
      end
    end
    |&gt; List.flatten()
    # we have to return the neighbors of a point, so we explicitly
    # remove the point from the output
    |&gt; Enum.reject(fn {a, b, c} -&gt; a == x and b == y and c == z end)
  end

  def neighbors4({x, y, z, w}) do
    for i &lt;- -1..1 do
      for j &lt;- -1..1 do
        for k &lt;- -1..1 do
          for l &lt;- -1..1 do
            {x + i, y + j, z + k, w + l}
          end
        end
      end
    end
    |&gt; List.flatten()
    |&gt; Enum.reject(fn {a, b, c, d} -&gt; a == x and b == y and c == z and d == w end)
  end

  def activeneighbors(state, neighborfn, point) do
    Enum.count(neighborfn.(point), &amp;Map.has_key?(state, &amp;1))
  end

  def cycle(state, _, 0) do
    state
    |&gt; Map.values()
    |&gt; Enum.count(fn cell -&gt; cell == "#" end)
  end

  def cycle(state, neighborfn, count) do
    # find the neighbors of active cells
    tocheck =
      state
      |&gt; Map.keys()
      |&gt; Enum.flat_map(neighborfn)
      |&gt; Enum.frequencies()

    Enum.map(tocheck, fn {point, _} -&gt;
      cell = Map.get(state, point)
      countactive = activeneighbors(state, neighborfn, point)

      cond do
        cell == "#" and countactive not in [2, 3] -&gt; {point, :inactive}
        countactive == 3 -&gt; {point, :active}
        true -&gt; nil
      end
    end)
    |&gt; Enum.filter(&amp; &amp;1)
    |&gt; Enum.reduce(state, fn {p, newstate}, acc -&gt;
      case newstate do
        :inactive -&gt; Map.delete(acc, p)
        :active -&gt; Map.put(acc, p, "#")
      end
    end)
    # why does this happen?
    |&gt; Enum.reject(fn {point, _} -&gt; !Map.get(tocheck, point) end)
    |&gt; Map.new()
    |&gt; cycle(neighborfn, count - 1)
  end

  def part1(input \\ readinput()) do
    rows = length(input)
    cols = length(Enum.at(input, 0))

    for c &lt;- 0..(cols - 1) do
      for r &lt;- 0..(rows - 1) do
        {{c, r, 0}, Enum.at(input, r) |&gt; Enum.at(c)}
      end
      |&gt; Enum.filter(fn {_, v} -&gt; v == "#" end)
      |&gt; Enum.into(%{})
    end
    # i don't like this
    |&gt; Enum.reduce(%{}, fn m, acc -&gt; Map.merge(acc, m) end)
    |&gt; cycle(&amp;neighbors3/1, 6)
  end

  def part2(input \\ readinput()) do
    rows = length(input)
    cols = length(Enum.at(input, 0))

    for c &lt;- 0..(cols - 1) do
      for r &lt;- 0..(rows - 1) do
        {{c, r, 0, 0}, Enum.at(input, r) |&gt; Enum.at(c)}
      end
      |&gt; Enum.filter(fn {_, v} -&gt; v == "#" end)
      |&gt; Enum.into(%{})
    end
    # i don't like this
    |&gt; Enum.reduce(%{}, fn m, acc -&gt; Map.merge(acc, m) end)
    |&gt; cycle(&amp;neighbors4/1, 6)
  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="197825" 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-2020-day-17/36283/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-197825" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="197825"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="197829" data-post-id="197829">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I refactored my solution to be generic for n dimensional space as well!  That was the real fun part for me today.</p>
<p><a href="https://github.com/camilleryr/advent20/blob/main/lib/day_17.ex" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/camilleryr/advent20/blob/main/lib/day_17.ex</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="197829" 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-2020-day-17/36283/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-197829" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="197829"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="197831" data-post-id="197831">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/faried" rel="nofollow">@faried</a></p>
<p>First thing is you can actually have multiple generators in your <code>for</code> construct, so you do not have to flatten:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def neighbors3({x, y, z}) do
    for i &lt;- -1..1,
        j &lt;- -1..1,
        k &lt;- -1..1 do
      {x + i, y + j, z + k}
    end
    # we have to return the neighbors of a point, so we explicitly
    # remove the point from the output
    |&gt; Enum.reject(fn {a, b, c} -&gt; a == x and b == y and c == z end)
  end
</code></pre>
<p>The best part is that you can still pull values out of a previous generated value, for example:</p>
<p><code>for values &lt;- rows, value &lt;- values, do: something(value)</code></p>
<p>Now, you need to use <code>Enum.reject</code> is simply because at one moment of the iteration, <code>i</code> is <code>0</code>, <code>j</code> is <code>0</code> and <code>k</code> is also <code>0</code>, so your expression <code>{x + i, y + j, z + k}</code> does not represent a neighbour but the central element itself.</p>
<p>That is why you have to “explicitly remove the point from the output” as you have said.</p>
<p>So you could filter-out the central point directly in the generator (in you case, that would be in the most inner <code>for</code>.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def neighbors3({x, y, z} = coords) do
    for i &lt;- -1..1,
        j &lt;- -1..1,
        k &lt;- -1..1,
        n = {x + i, y + j, z + k},
        n != coords do              # &lt;-- accept only when !=coords
      n
    end
  end
</code></pre>
<p>What I did today, though, is directly count the numbers of neighbours, with a <code>for + reduce</code> loop. My map contains <code>0</code> for inactive cubes and <code>1</code> for active ones.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  defp active_neighbours_count(map, {x, y, z} = coords) do
    for nx &lt;- (x - 1)..(x + 1),
        ny &lt;- (y - 1)..(y + 1),
        nz &lt;- (z - 1)..(z + 1),
        {nx, ny, nz} != coords,
        reduce: 0 do
      acc -&gt;
        Map.get(map, {nx, ny, nz}, 0) + acc
    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="197831" 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-2020-day-17/36283/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-197831" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="197831"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="197836" data-post-id="197836">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks.  I have used multiple generators with for in the past – I just didn’t think of it this time.  I don’t work with Elixir on a day-to-day basis.  One of the reasons I’m trying to do them all in Elixir this year is to learn from other solutions.</p>
<p>The <code>Enum.reject</code> I mentioned is in my <code>cycle</code> function, where I remove cubes that have no neighbors. That’s what fixes my off-by-one error.  I had a lot of trouble figuring out why I need that.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="197836" 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-2020-day-17/36283/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-197836" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="197836"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="197838" data-post-id="197838">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi there <img src="https://forum.elixirforum.com/images/emoji/apple/wave.png?v=15" title=":wave:" class="emoji" alt=":wave:" loading="lazy" width="20" height="20"></p>
<p>My take on generic code that will work with n dimensions.</p>
<p><a href="https://github.com/cblavier/advent/blob/master/lib/2020/day17/part1.ex" rel="noopener nofollow ugc">Part1</a> / <a href="https://github.com/cblavier/advent/blob/master/lib/2020/day17/part2.ex" rel="noopener nofollow ugc">Part2</a></p>
<p>Not really fast (4s for part2)<br>
<img src="https://forum.elixirforum.com/images/emoji/apple/snail.png?v=15" title=":snail:" class="emoji only-emoji" alt=":snail:" 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="197838" 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-2020-day-17/36283/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-197838" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="197838"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="197860" data-post-id="197860">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I used MapSet to store and check coordinates; each generation builds a new set via Enum.reduce. Neighbor-fetching uses basic list comprehensions. Part 2 was mostly copy/paste from Part 1.</p>
<p><a href="https://github.com/APB9785/AoC-2020-elixir/blob/main/day_17.ex" rel="noopener nofollow ugc">Github link</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="197860" 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-2020-day-17/36283/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-197860" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="197860"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="198032" data-post-id="198032">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Here my solution: <a href="https://github.com/jkmrto/aoc2020/blob/master/lib/day17/day17.ex" class="inline-onebox" rel="noopener nofollow ugc">aoc2020/lib/day17/day17.ex at master · jkmrto/aoc2020 · GitHub</a></p>
<p>My second part takes like 30 seconds, probably I am doing something wrong but not sure what.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198032" 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-2020-day-17/36283/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-198032" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198032"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="198086" data-post-id="198086">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Same here, two-line change for <a href="https://github.com/adamu/AdventOfCode2020/blob/main/day17/day17part2.exs" rel="noopener nofollow ugc">Part 2</a>. Was also expecting loads of cycles, but 4th dimension was my second guess. <img src="https://forum.elixirforum.com/images/emoji/apple/grinning_face_with_smiling_eyes.png?v=15" title=":grinning_face_with_smiling_eyes:" class="emoji" alt=":grinning_face_with_smiling_eyes:" loading="lazy" width="20" height="20"></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">17c17
&lt;             "#", {x, cubes} -&gt; {x + 1, MapSet.put(cubes, {x, y, 0})}
---
&gt;             "#", {x, cubes} -&gt; {x + 1, MapSet.put(cubes, {x, y, 0, 0})}
53,54c53,60
&lt;   def neighbours({x, y, z} = me) do
&lt;     all = for x &lt;- (x - 1)..(x + 1), y &lt;- (y - 1)..(y + 1), z &lt;- (z - 1)..(z + 1), do: {x, y, z}
---
&gt;   def neighbours({x, y, z, w} = me) do
&gt;     all =
&gt;       for x &lt;- (x - 1)..(x + 1),
&gt;           y &lt;- (y - 1)..(y + 1),
&gt;           z &lt;- (z - 1)..(z + 1),
&gt;           w &lt;- (w - 1)..(w + 1),
&gt;           do: {x, y, z, w}
&gt;
</code></pre>
<p><a href="https://github.com/adamu/AdventOfCode2020/tree/main/day17" rel="noopener nofollow ugc">Notes</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="198086" 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-2020-day-17/36283/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-198086" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198086"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="198087" data-post-id="198087">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Not sure without looking in more detail, but could be that doing ~6400 O(n) list searches for every active cube is slow. You’re also using <code>uniq</code> so maybe the lists are long and have duplicates? Using MapSet may speed things up.</p>
<aside class="quote no-group" data-username="faried" data-post="15" data-topic="36283">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/faried/48/17538_2.png" class="avatar"> faried:</div>
<blockquote>
<p>The <code>Enum.reject</code> I mentioned is in my <code>cycle</code> function, where I remove cubes that have no neighbors. That’s what fixes my off-by-one error. I had a lot of trouble figuring out why I need that.</p>
</blockquote>
</aside>
<p>Also just a hunch, but my guess is that although your <code>neighborfn</code> excludes the original cube, in your <code>cycle</code> function you 1) generate a map of all the neighbors to check but then 2) in <code>activeneighbors</code> find all the neighbors of the neighbors, which will include the original cube. So maybe you’re adding the original cube back in to the set, even though it’s not part of your original <code>tocheck</code> list. Maybe…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198087" 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-2020-day-17/36283/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-198087" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198087"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="198275" data-post-id="198275">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had also some difficulties with the example… The missing point in my thought process was that it is an ‘infinite’ grid and so it’s spreading around the basic portion given at the beginning… I get it now.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198275" 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-2020-day-17/36283/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-198275" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198275"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>