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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/benwilson512" rel="nofollow">@benwilson512</a> you are right that interpreter could yield at any point, not just IO. Unlike languages like C# and its async/await implementation that only yields on IO. Not sure how that preemptive scheduler is done in BEAM but it’s really impressive and I bet it’s not that easy to copy it’s functionality.</p>
<p>In my earlier post I said that I see more future for ErlangRT. What I actually wanted to express, is that I see it as more as direct replacement for BEAM. Nothing wrong with having multiple VM implementations. One that would work with Webassembly, would be great, so you could do full stack Elixir.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="133266" 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/erlangrt-new-erlang-vm-in-rust/23343/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-133266" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="133266"
                     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="133516" data-post-id="133516">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I agree that it might be worthwhile to try new things, but honestly I’m pessimistic.  The advantages to a preemptive fair scheduler should be pretty obvious.  I’m super-optimistic about a rust-based VM in general though.</p>
<p>Also I should caution that I don’t mean that any rust-based VM should implement its multitasking in exactly the way that BEAM does (via goto statements? apparently?) but that it should implement a reduction-based fair scheduler <em>first</em> then elaborate other threading models.  Maybe even do a rust-safe fair scheduler, and then carefully abstract out a goto-based scheduler in an unsafe block?  Otherwise, we’re comparing apples to oranges.  Rust code is much more modular than C, so while difficult, I don’t imagine it to be insurmountably difficult.</p>
<p>I’d be curious if a rust-based BEAM could implement maps differently for better performance, with some sort of global heap, and instead of copy-on-write, (or I don’t know how BEAM does maps behind the scenes, TBH) some sort of linked-list overlay-on-write/overlay-on-pass-with-tombstoning model.  It might also not be terribly hard to mock this out on the BEAM itself using references.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="133516" 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/erlangrt-new-erlang-vm-in-rust/23343/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-133516" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="133516"
                     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="133624" data-post-id="133624">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>As with any improvement or substantial change, one first must have a prototype, a baseline to discuss. It is already hard to just repeat existing BEAM with a good degree of similarity, and I believe it is prohibitively hard to change something WHILE reimplementing BEAM. So all things come in their time. Rust makes this refactoring step simple and reliable.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="133624" data-batch-url="/posts/batch_likers">
                        8
                      </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/erlangrt-new-erlang-vm-in-rust/23343/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-133624" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="133624"
                     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="133758" data-post-id="133758">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ShalokShalom" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ShalokShalom/120/15829_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ShalokShalom
                    <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>So far as I know is the existing code not very well understood by many, so less hack on it. So,  it is also for educational reasons, code cleanup (due to rewrite :p) and such kinds of things. I honestly believe that alone is worth a rewrite since sooner or later, the people with a lot of understanding about the current implementation disappear, so its development stucks.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="133758" 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/erlangrt-new-erlang-vm-in-rust/23343/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-133758" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="133758"
                     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>