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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Awesome! If it would be helpful, I’ll happily test things out on my system.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146118" 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/zigler-zig-nifs-for-elixir/25862/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-146118" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146118"
                     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="146151" data-post-id="146151">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ityonemo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/120/11341_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ityonemo
                    <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">
								<blockquote>
<p>I would just have you allocate a resource with enough space to hold a zig pointer</p>
</blockquote>
<p>lol i can do that?  Wow.  Thanks!  This will be relatively easy.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146151" 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/zigler-zig-nifs-for-elixir/25862/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-146151" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146151"
                     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="146847" data-post-id="146847">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="akoutmos" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/akoutmos/120/20230_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  akoutmos
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Build a Weather Station with Elixir and Nerves</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This looks really cool! Looks like I’ll have to add this to the todo list of things to play with alongside Rustler</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146847" 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/zigler-zig-nifs-for-elixir/25862/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-146847" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146847"
                     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="146860" data-post-id="146860">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ityonemo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/120/11341_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ityonemo
                    <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>I’m going to 0.1.0 on Hex.pm by the end of the month.  Currently I’m working on three last major features - seamless integration of zig tests into ExUnit, translation of compiler warnings to reflect the actual location of code, and assembly of zig docstrings into full zig documentation as a part of ExDoc. =D  This might take some time since I need to revamp the parser to be not a terrible ad-hoc solution.</p>
<p>However aside from the QoL features it basically “just works”, so I’d suggest checking it out now.  You’ll have a much easier time getting up and running with zigler than rustler since in zigler you literally write your zig code <em>inside the elixir</em>.</p>
<p>Also having eyes on MacOS and an expert in Erlang Windows would be awsome, since I don’t have the capability to test those platforms ATM.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146860" 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/zigler-zig-nifs-for-elixir/25862/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-146860" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146860"
                     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="146877" data-post-id="146877">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This looks really interesting!</p>
<p>I wonder if you’ve considered creating a <code>zigler</code> mix compiler?  That way we could write <code>.zif</code> files that are compiled as an alternative to sigils? I wonder if that might feel more natural?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146877" 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/zigler-zig-nifs-for-elixir/25862/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-146877" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146877"
                     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="146879" data-post-id="146879">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ityonemo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/120/11341_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ityonemo
                    <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>Why not both?</p>
<p>I do like the idea of it being like the c “asm” keyword, you can call out zig file dependencies with zig’s <span class="mention">@include</span> directive if you need more code than you’d like to ship (and you should do that anyway) (in this case, path relative to the elixir module) and currently “it just works”.  The nice thing about making it module local is that it carries with it inferrable information about how to bind it in using erlang’s nif adapters, which you’d have to manually configure if you lose the association with an elixir module.</p>
<p>I probably should also give a common location setting to draw files from.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146879" 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/zigler-zig-nifs-for-elixir/25862/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-146879" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146879"
                     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="146894" data-post-id="146894">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Sorry if I implied replacing your currently strategy. I mean “in addition to”.  <code>@include</code> sounds a good half-way house but I wouldn’t suggest my opinion carries any weight.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="146894" 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/zigler-zig-nifs-for-elixir/25862/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-146894" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="146894"
                     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="154392" data-post-id="154392">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ityonemo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/120/11341_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ityonemo
                    <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>Version 0.1.0 is out.</p>
<p><a href="https://hexdocs.pm/zigler/Zigler.html" class="onebox" target="_blank" rel="noopener nofollow ugc">https://hexdocs.pm/zigler/Zigler.html</a></p>
<p>Features:</p>
<ul>
<li><code>~Z</code> used as an inline entry point for the NIF:  all function bindings are inferred from these entry points and correctly and automatically marshalled into the erlang NIF template, including type checking and conversion on ingress and type conversions on egress, and correct <code>@spec</code> for static type checking.<br>
Example:</li>
</ul>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule ExampleTest do
  use ExUnit.Case, async: true
  use Zigler, app: :zigler

  ~Z"""
  /// nif: i64_list_in/1
  fn i64_list_in(val: []i64) i64 {
    var total: i64 = 0;
    for (val) |item| {
      total += item;
    }
    return total;
  }
  """
  describe "i64 lists can be ingressed" do
    test "correctly" do
      assert 6 == i64_list_in([1, 2, 3])
    end
  end
end
</code></pre>
<ul>
<li>
<p>Compilation assistance:  If you should encounter a Zig compiler error, the compiler will redirect you to the correct file/line (including if it’s inside a <code>~Z</code> block)</p>
</li>
<li>
<p>integration of erlang’s native alloc/realloc/free with zig’s composable allocator idiom</p>
</li>
<li>
<p>Full documentation integration with ExDoc (for example, this doc file is entirely created from Zig docstrings:  <a href="https://hexdocs.pm/zigler/beam.html#content" class="inline-onebox" rel="noopener nofollow ugc">beam — zigler v0.16.0</a>).</p>
</li>
<li>
<p>Unit test integration with ExUnit.</p>
</li>
<li>
<p>Ability to statically or dynamically bind external libraries with the C ABI<br>
Example (from the unit tests):</p>
</li>
</ul>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule BlasStatic do
      use Zigler, app: :zigler, libs: ["/usr/lib/x86_64-linux-gnu/blas/libblas.a"]

      ~Z"""
      const blas = @cImport({
        @cInclude("/usr/include/x86_64-linux-gnu/cblas.h");
      });

      /// nif: blas_axpy/3
      fn blas_axpy(env: beam.env, a: f64, x: []f64, y: []f64) beam.term {

        if (x.len != y.len) {
          return beam.throw_function_clause_error(env);
        }

        blas.cblas_daxpy(@intCast(c_int, x.len), a, &amp;x[0], 1, &amp;y[0], 1);

        return beam.make_f64_list(env, y) catch {
          return beam.throw_function_clause_error(env);
        };
      }
      """
    end

    test "we can use statically-linked blas" do
      # returns aX+Y
      assert [11.0, 18.0] == BlasStatic.blas_axpy(3.0, [2.0, 4.0], [5.0, 6.0])
    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="154392" data-batch-url="/posts/batch_likers">
                        5
                      </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/zigler-zig-nifs-for-elixir/25862/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-154392" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="154392"
                     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="154398" data-post-id="154398">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ityonemo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/120/11341_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ityonemo
                    <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>One last thing, I’ll be giving a talk about this at the San Francisco Elixir/erlang meetup.in January if you’d like to ask questions or learn more in person</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="154398" 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/zigler-zig-nifs-for-elixir/25862/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-154398" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="154398"
                     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="156733" data-post-id="156733">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ityonemo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/120/11341_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ityonemo
                    <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>vscode support coming soon (after I figure out azure devops)</p>
<p><a href="https://github.com/ityonemo/vscode-zigler" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/ityonemo/vscode-zigler</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="156733" data-batch-url="/posts/batch_likers">
                        5
                      </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/zigler-zig-nifs-for-elixir/25862/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-156733" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="156733"
                     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 #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/25862/load_more?page=3">Load more posts (36 remaining)</a>
</div></template></turbo-stream>