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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks so much for this detailed feedback <a class="mention" href="/u/mwmiller" rel="nofollow">@mwmiller</a>!</p>
<aside class="quote no-group quote-modified" data-username="mwmiller" data-post="11" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/48/38469_2.png" class="avatar"> mwmiller:</div>
<blockquote>
<aside class="quote no-group">
<blockquote>
<ul>
<li>The technical implementation details around init and component lifecycle?</li>
</ul>
</blockquote>
</aside>
<p>This tripped me up a lot. Part of the “problem” with writing Elixir everywhere is that I assume that it is all running in a BEAM server context. I forget that some of it is being packaged up to run on client machines in a JS engine context. I have sort of settled on a conception that “actions will probably run on the client” and “commands will definitely run on the server.”</p>
</blockquote>
</aside>
<p>This is a really important conceptual hurdle that I need to address better in the docs. Where and how do you think the documentation could be improved to make this client/server boundary clearer?</p>
<aside class="quote no-group quote-modified" data-username="mwmiller" data-post="11" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/48/38469_2.png" class="avatar"> mwmiller:</div>
<blockquote>
<aside class="quote no-group">
<blockquote>
<ul>
<li>The macOS file system watcher issues? (tell me more about this - it’s not clear to me whether you meant Hologram live reload)</li>
</ul>
</blockquote>
</aside>
<p>This is partially the live reload. It will sometimes have 404s for newly digested <code>runtime-</code> or <code>page-</code> files. (I saw there is a GitHub issue about this. I am still hoping to provide more reproduction steps thereon.) It seems like these 404s are where I felt like my changes had broken the data pipeline when, in fact, not much of anything was happening on the client.</p>
</blockquote>
</aside>
<p>I haven’t experienced this myself since v0.5.0, but I have some ideas about a possible race condition that might be causing this. I’ll try to implement a fix that should resolve this once and for all.</p>
<aside class="quote no-group quote-modified" data-username="mwmiller" data-post="11" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/48/38469_2.png" class="avatar"> mwmiller:</div>
<blockquote>
<aside class="quote no-group">
<blockquote>
<ul>
<li>Something in the documentation that was unclear or missing?</li>
</ul>
</blockquote>
</aside>
<p>However, it would be extremely helpful to people like me if the left-hand navigation for the focused page had a list of sections (with <code>#</code>-links would be even better!)</p>
</blockquote>
</aside>
<p>Yeah, this is a must-have feature and I already have it in my backlog.</p>
<aside class="quote no-group" data-username="mwmiller" data-post="11" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/48/38469_2.png" class="avatar"> mwmiller:</div>
<blockquote>
<p>I also found the “contrast” between the headers and the text sections to be too low. I (probably) scanned down a bit and felt overwhelmed by the “wall of text” which seemed to be focused on different stuff than I expected.</p>
</blockquote>
</aside>
<p>Can you elaborate on how this could be improved? Are you thinking bigger/bolder headers, more whitespace, breaking up large sections, or something else entirely?</p>
<aside class="quote no-group quote-modified" data-username="mwmiller" data-post="11" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/48/38469_2.png" class="avatar"> mwmiller:</div>
<blockquote>
<aside class="quote no-group">
<blockquote>
<ul>
<li>Any error messages that could be improved or made more helpful?</li>
</ul>
</blockquote>
</aside>
<p>The template rendering errors are exceptionally long stack traces which have seemingly no connection to the code as written. I’m really good at generating them, so let’s make one now!</p>
<p>(…)</p>
<p>Ok, that first bit seems reasonable. I’ve apparently made a typo! Surely this giant traceback will help me find it! The first line seems helpful, except that there is no such typo on line 9. Maybe there’s more down here. Nope, none of that was written by me. Oh, I can just count 9 lines into the <code>~HOLO</code> sigil which is apparently the anonymous fn in question!</p>
</blockquote>
</aside>
<p>This should probably be a simple <code>TemplateError</code> saying that the given template variable was not set, along with the line number within the template, right?</p>
<aside class="quote no-group" data-username="mwmiller" data-post="11" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/48/38469_2.png" class="avatar"> mwmiller:</div>
<blockquote>
<p>It just really exposes that I am much better at writing mathematically and algorithmically interesting backend code than building UIs.</p>
</blockquote>
</aside>
<p>Not really - it just means the developer experience isn’t the best at the moment… but we’ll get there! <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="371126" 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/architecting-a-page-for-updates/71985/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-371126" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371126"
                     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="371145" data-post-id="371145">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mwmiller" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/120/38469_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mwmiller
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="bartblast" data-post="12" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartblast/48/17647_2.png" class="avatar"> bartblast:</div>
<blockquote>
<p>This is a really important conceptual hurdle that I need to address better in the docs. Where and how do you think the documentation could be improved to make this client/server boundary clearer?</p>
</blockquote>
</aside>
<p>I wish I knew what to say here.  On the one hand the promise is “write Elixir and everything will just work!”  The reality of client/server communication is much more complex and nuanced.  There are also ethical, privacy and security concerns with making it all look like one big machine image where the constituent nodes are under the control of different agents.</p>
<p>Instead let me tell a story which sort of goes along with the section on confusing error messages.  I was trying to pre-parse some of the settings into the proper types.  I suddenly got weird errors where <code>Integer.count_digits</code> was having trouble because it received a string. So that looks like I’m hitting a runtime BEAM error, but it shows up in the Javascript error console.  It also doesn’t appear to be the code I actually wrote but rather something helping me marshal.</p>
<p>I don’t know why I couldn’t immediately wrap my head around the fact that it was JS running on the client.  I suspect it looked “too much like” Elixir which had run on the server and returned the error over the wire instead of a more expected response.</p>
<p>I don’t know how this story might help.</p>
<aside class="quote no-group">
<blockquote>
<p>Can you elaborate on how this could be improved? Are you thinking bigger/bolder headers, more whitespace, breaking up large sections, or something else entirely?</p>
</blockquote>
</aside>
<p>I’m far from a UX expert, but as a reader I need clear delineation between section header and body material.  Maybe the header typeface is too small and the body text too large? Maybe some horizontal rules setting off the bits? More indentation cues?  Subtle but noticeable color differences?</p>
<aside class="quote no-group">
<blockquote>
<p>This should probably be a simple <code>TemplateError</code> saying that the given template variable was not set, along with the line number within the template, right?</p>
</blockquote>
</aside>
<p>That would probably work so long as I still get the affected file name or module. It doesn’t seem  likely that there would be more than one <code>HOLO</code> sigil per file.</p>
<p>It might also be worth noting that it is fairly difficult to <code>inspect</code> which variables are available while developing.  They look like module attributers but they only vivify inside the sigil, so you need to know whence they come in order to poke at them in <code>template/0</code> before hitting the sigil.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371145" 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/architecting-a-page-for-updates/71985/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-371145" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371145"
                     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="371155" data-post-id="371155">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="mwmiller" data-post="13" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/48/38469_2.png" class="avatar"> mwmiller:</div>
<blockquote>
<p>Instead let me tell a story which sort of goes along with the section on confusing error messages. I was trying to pre-parse some of the settings into the proper types. I suddenly got weird errors where <code>Integer.count_digits</code> was having trouble because it received a string. So that looks like I’m hitting a runtime BEAM error, but it shows up in the Javascript error console. It also doesn’t appear to be the code I actually wrote but rather something helping me marshal.</p>
<p>I don’t know why I couldn’t immediately wrap my head around the fact that it was JS running on the client. I suspect it looked “too much like” Elixir which had run on the server and returned the error over the wire instead of a more expected response.</p>
</blockquote>
</aside>
<p>That confusion you experienced is actually a perfect illustration of Hologram working exactly as intended - though I totally understand why it was disorienting! <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>The whole idea behind Hologram is that it should be completely seamless. You write Elixir everywhere, and the framework handles whether that code runs on the server (as native Elixir/BEAM) or gets transpiled to run on the client (as JavaScript). From your perspective as a developer, it should just be “Elixir code” regardless of where it executes.</p>
<p>So when you used <code>Integer.count_digits/1</code> in what turned out to be client-side code, Hologram transpiled that to JavaScript and ran it in the browser - which is why you saw the error in the browser console instead of your server logs.</p>
<p>The stack trace situation you encountered is an important feature that I haven’t started working on yet, but it’s definitely on the roadmap. Eventually, you’ll get proper Elixir stack traces that point to your actual source files and line numbers, even for client-side errors. Right now that Elixir source mapping isn’t implemented yet, so you’re seeing the transpiled JavaScript stack traces. You can see this on the official <a href="https://hologram.page/docs/roadmap" rel="noopener nofollow ugc">Roadmap</a> - “Client Error Stacktraces - Ensure error messages and stacktraces on the client match those on the server for easier debugging”.</p>
<p>The good news is that the transpiled code is very readable since it’s a one-to-one mapping from your Elixir code - but I know it’s still not ideal for debugging.</p>
<p>Your mental model of “actions probably run on client, commands definitely run on server” is actually pretty solid as a working heuristic! But the real beauty of Hologram is that you shouldn’t need to think about it at all - it should just work seamlessly no matter where the code runs.</p>
<p>I know this kind of architecture can be a little disorienting at first, but once you get the hang of how it works and what’s executed where, it becomes much easier and you really don’t want to go back to the traditional approach of juggling different languages and contexts.</p>
<p>Thanks for surfacing this!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371155" data-batch-url="/posts/batch_likers">
                        3
                      </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/architecting-a-page-for-updates/71985/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-371155" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371155"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="371156" data-post-id="371156">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mwmiller" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mwmiller/120/38469_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mwmiller
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="bartblast" data-post="14" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartblast/48/17647_2.png" class="avatar"> bartblast:</div>
<blockquote>
<p>So when you used <code>Integer.count_digits/1</code></p>
</blockquote>
</aside>
<p>Just to be clear, I was not intentionally using this code from (I believe it is called) <code>IntegerUtils</code>.  I was using or attempting to use <code>Integer.parse/1</code> and it “just showed up”. When I want to count digits, I use logarithms. <img src="https://forum.elixirforum.com/images/emoji/apple/grinning_face.png?v=15" title=":grinning_face:" class="emoji" alt=":grinning_face:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="bartblast" data-post="14" data-topic="71985">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartblast/48/17647_2.png" class="avatar"> bartblast:</div>
<blockquote>
<p>I know this kind of architecture can be a little disorienting at first, but once you get the hang of how it works and what’s executed where, it becomes much easier and you really don’t want to go back to the traditional approach of juggling different languages and contexts.</p>
</blockquote>
</aside>
<p>I’m sure you’ll be happy to hear that I am already at this point!  There are some rough edges, but it’s quite compelling even as is.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371156" 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/architecting-a-page-for-updates/71985/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-371156" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371156"
                     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>