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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Fl4m3Ph03n1x" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Fl4m3Ph03n1x/120/11709_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Fl4m3Ph03n1x
                    <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">
								<p>Afaik Dyalizer doesn’t do that as it was not aimed to.</p>
<p>You could in theory have typed structs and then pattern match on <code>handle_info</code> (or any of its friends) when receiving a message, but if your messages are dynamic you are in for a ride and I am not sure there are safety bells for that.</p>
<p>Gradualizer is still in an experimental phase and I do not personally recommend it. As bad as you might consider Dialyzer, it is still several times better than any of its competitors, hands down.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242339" 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/gradualyzer-vs-dialyzer-main-differences/27343/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-242339" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242339"
                     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 #21"></div>
  </section>
</div>
    <div class="postbit" id="242343" data-post-id="242343">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Rich_Morin" data-post="21" data-topic="27343">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rich_morin/48/2020_2.png" class="avatar"> Rich_Morin:</div>
<blockquote>
<p>it doesn’t even <em>try</em> to cover inter-process messages</p>
</blockquote>
</aside>
<p>From what I’ve read in the community on that topic it’s less of a “doesn’t try” for not wanting to handle it, but more a “doesn’t try” for it being a problem not easily solvable especially under the (lack of) constraints present on the erlang vm. Especially features like hot code updates really limit that dialyzer can confidently tell about message sending being incorrectly coded.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242343" 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/gradualyzer-vs-dialyzer-main-differences/27343/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-242343" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242343"
                     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="242740" data-post-id="242740">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>At runtime, you can automatically validate if the messaged struct matches its type with <a href="https://hexdocs.pm/domo/readme.html" rel="noopener nofollow ugc">Domo library</a>.<br>
The lib flawlessly generates appropriate pattern matchings automatically and adds validation <code>ensure_type/1</code> function and constructor <code>new/1</code> function to the struct at compile time.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242740" 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/gradualyzer-vs-dialyzer-main-differences/27343/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-242740" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242740"
                     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="242749" data-post-id="242749">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for bringing Domo to my attention.  It looks like a very powerful (and nicely documented!) suite of tools. However, I suspect that <a href="https://hexdocs.pm/domo/readme.html#performance" rel="noopener nofollow ugc">runtime performance</a> concerns may scare off some possible users. There’s also a bit of a conflict between the “check everything” and “let it crash” mantras.</p>
<p>So, I’ve been speculating about ways to employ Domo on a dynamic basis (e.g., controlling its activity via supervision trees). Although the following notes are pure science fiction, it might be possible to make something similar work.</p>
<p>Let’s assume that Domo has been compiled into a set of modules, but its runtime checking has not been activated. At some point, a process crashes and the appropriate supervision tree is called in to repair the mess.</p>
<p>At this point, we can “activate the immune system” of each of the restarted processes. We give each one a numeric value which, if non-zero, causes it to turn on Domo’s checking. Each time the process calls itself, the value gets decremented (stopping at zero). So, if this was just a random data glitch, the checking will go away.</p>
<p>However, if some other process is sending bad data on a repetitive basis, Domo will be primed to catch, analyze, and report the problem. And, as part of this activity, the initial counter value(s) can be restored or even increased.</p>
<p>It might even be possible to use some sort of graph-based tracking and analysis to get at the root cause(s) of the problem. For example, Domo could alert the process that sent the bad data, saying “you seem to have a problem; please turn on your Domo checks.”.</p>
<p>OK, that’s enough late-night speculation for this tired camper; let me know if anything here seems worth considering…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242749" 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/gradualyzer-vs-dialyzer-main-differences/27343/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-242749" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242749"
                     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="242812" data-post-id="242812">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Domo is aligned with “let it crash” quite well <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"> Library user may select places of check-point and call <code>MyStruct.ensure_type!(my_struct)</code> to have a crash if the struct’s data is invalid. These places can be the boundaries between modules or processes where f.e. the mapping between data structures occurs before passing these structs deeper.</p>
<p>So it’s an explicit tradeoff. A call to <code>ensure_type(!)/1</code> trades some CPU cycles for understanding if the operation on the struct was correct. And these can be wisely selected depending on the problem.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242812" 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/gradualyzer-vs-dialyzer-main-differences/27343/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-242812" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242812"
                     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="242816" data-post-id="242816">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>In a large set of communicating processes, it may be impossible to predict where “the problem” may occur. Indeed, problems may arise almost spontaneously, because of changes in the input data, etc.</p>
<p>Placing checks strategically at key boundaries makes sense, but it’s still costing cycles at runtime. This is why I like the idea of putting some inactive checks in place, to be activated if and when problems are detected. A bit of macro magic could also be used to make this explicit and visible, yet largely unobtrusive in the 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="242816" 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/gradualyzer-vs-dialyzer-main-differences/27343/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-242816" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242816"
                     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="242827" data-post-id="242827">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Rich_Morin" data-post="27" data-topic="27343">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rich_morin/48/2020_2.png" class="avatar"> Rich_Morin:</div>
<blockquote>
<p>Placing checks strategically at key boundaries makes sense, but it’s still costing cycles at runtime.</p>
</blockquote>
</aside>
<p>Are you responsible for microseconds-latency-sensitive apps?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242827" 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/gradualyzer-vs-dialyzer-main-differences/27343/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-242827" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242827"
                     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="242832" data-post-id="242832">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>No. Happily, I’m not responsible for <em>any</em> apps at the moment. <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">  Also, please bear in mind that this is all exploratory armchair speculation on my part.</p>
<p>That said, I was talking in the context of someone scattering deep structure and pre-condition checks throughout a system. Any single check might be pretty fast, but running enough of them could bog things down noticeably.</p>
<p>So, having selected checks “activate” only when faults are detected might be a way to gather useful data while minimizing the impact on overall system latency and throughput.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242832" 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/gradualyzer-vs-dialyzer-main-differences/27343/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-242832" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242832"
                     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="242838" data-post-id="242838">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Rich_Morin" data-post="29" data-topic="27343">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rich_morin/48/2020_2.png" class="avatar"> Rich_Morin:</div>
<blockquote>
<p>That said, I was talking in the context of someone scattering deep structure and pre-condition checks throughout a system. Any single check might be pretty fast, but running enough of them could bog things down noticeably.</p>
</blockquote>
</aside>
<p>I don’t disagree but I think people fear this more than they should. I’ve worked for financiers a few times and yeah, there you should be afraid of lag spikes going to 10 <em>milliseconds</em>; something most apps wouldn’t even notice.</p>
<p>Everywhere else I ever worked though? Meh. Nobody bats an eye if 1 out of 20 requests takes 3 seconds even. Nobody cares. And to this day Rails developers insist that ActiveRecord (the ORM of Rails) being responsible for 100-150ms delay per web request (admittedly only if it has 3-10 DB queries, of course) is small and is not important. In the meantime a similar Phoenix endpoint in its entirety returns in 7ms at the most.</p>
<p>When it comes to such an impressively fast dynamic language environment like the BEAM VM I don’t view some minuscule delay like 2-10 more ms as consequential. Anything that helps avoid bugs, not leak people’s private data, and not lose money should be counted as a win, even if it comes at the expense of performance.</p>
<p>Another example: Rust’s compiler is slow but it does eliminate several entire classes of bugs by the mere virtue of your program compiling.</p>
<p>IMO we need more such tech in our line of work, including in the Elixir ecosystem. It’s amazing how much traffic can a mere modern i3 mini-computer with 32GB RAM and a SATA III SSD can serve; we should focus on correctness because buying 20% more hardware capacity is a rounding error in most companies.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242838" data-batch-url="/posts/batch_likers">
                        4
                      </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/gradualyzer-vs-dialyzer-main-differences/27343/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-242838" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242838"
                     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>