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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This one reminded of the image language in SICP so I tried to replicate that with a module for handling the tiles. It ended up working out pretty well. Still, Day20 was pretty long in comparison to the rest of the days.</p>
<p><a href="https://github.com/felix-alonso/advent-of-code/blob/master/2020/day-20.ex" rel="noopener nofollow ugc">Day20</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="198243" 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/avent-of-code-2020-day-20/36342/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-198243" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198243"
                     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="198508" data-post-id="198508">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Not sure if it’s too late, but here’s my day 20 solution if anyone’s interested.</p>
<p><a href="https://github.com/h-j-k/advent20/blob/master/lib/advent_of_code/day20.ex" rel="noopener nofollow ugc">advent20/day20.ex at master · h-j-k/advent20 (github.com)</a></p>
<p>I’ve also documented my walkthrough if you want to understand the logic behind the steps I’ve taken… <a href="https://github.com/h-j-k/advent20/blob/master/README.md" rel="noopener nofollow ugc">advent20/README.md at master · h-j-k/advent20 (github.com)</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="198508" 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/avent-of-code-2020-day-20/36342/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-198508" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198508"
                     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="198517" data-post-id="198517">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I rewrote my Day 20 for part 2 yesterday to get the last star.</p>
<p>My first implementation made the same assumptions and worked really well for the test code but broke on the real data. I thought it was due to those assumptions and rewrote it into a solution that searched through all possibilities until it found the solution.</p>
<p>When copying some code to optimise my second implementation I realised the bug in my first implementation.</p>
<pre data-code-wrap="diff"><code class="lang-diff">   def vflip({dir, str}) do
     case dir do
-      :top -&gt; {:top, str}
+      :top -&gt; {:bottom, str}
       :left -&gt; {:left, String.reverse(str)}
-      :bottom -&gt; {:bottom, str}
+      :bottom -&gt; {:top, str}
       :right -&gt; {:right, String.reverse(str)}
     end
</code></pre>
<p>Fixing that in my initial solution made it work and ran in 0.2s instead of the 6s for the new one.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198517" 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/avent-of-code-2020-day-20/36342/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-198517" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198517"
                     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="198883" data-post-id="198883">
  <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>Wow I finally cracked day 20, such a bummer <img src="https://forum.elixirforum.com/images/emoji/apple/exploding_head.png?v=15" title=":exploding_head:" class="emoji" alt=":exploding_head:" loading="lazy" width="20" height="20"><br>
So many stupid mistakes (like searching for monsters for hours with rows in random y order …)</p>
<p>At least my code is performing well (about 100ms)</p>
<p>My code for <a href="https://github.com/cblavier/advent/blob/master/lib/2020/day20/part1.ex" rel="noopener nofollow ugc">Part1</a> and <a href="https://github.com/cblavier/advent/blob/master/lib/2020/day20/part2.ex" rel="noopener nofollow ugc">Part2</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="198883" 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/avent-of-code-2020-day-20/36342/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-198883" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198883"
                     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>