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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="sodapopcan" data-post="11" data-topic="68059">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/48/34668_2.png" class="avatar"> sodapopcan:</div>
<blockquote>
<p>Lack of union types</p>
</blockquote>
</aside>
<p>This is a absolutely great point to address too, even though this falls into the extremely complex domain of types. For first releases I would be happy even with a few improvements over ecto.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="349717" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-349717" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349717"
                     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="349721" data-post-id="349721">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="libo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/libo/120/36923_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  libo
                    <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><a href="https://github.com/LiboShen/elixact/issues/1" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/LiboShen/elixact/issues/1</a></p>
<p>Since it seem more complex than everybody thought initially, I made this issue to track the discussion in GitHub. Feel free to add comments.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="349721" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-349721" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349721"
                     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="349735" data-post-id="349735">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Eiji" data-post="9" data-topic="68059">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>everything in core</p>
</blockquote>
</aside>
<p>Well, I meant stuff like <a href="https://hexdocs.pm/elixir/Supervisor.html#t:child_spec/0" rel="noopener nofollow ugc"><code>Supervisor.child_spec/0</code></a> which is “core” by all means. To support it, one should compile everything with docs chunks, load all these chunks, store them somewhere…</p>
<p>I went through this road till the end in <a href="https://github.com/am-kantox/tyyppi" rel="noopener nofollow ugc"><code>tyyppi</code></a>, and once I did, I immediately and inevitably abandoned the library. Even despite <em>validations</em> (including but not limited to unions) worked in a runtime (see <a href="https://github.com/am-kantox/tyyppi/blob/master/test/tyyppi/t_test.exs#L49-L58" rel="noopener nofollow ugc">this test</a>.)</p>
<p><a href="https://github.com/am-kantox/tyyppi/blob/master/lib/tyyppi/t/matchers.ex" rel="noopener nofollow ugc">Matchers</a> are proved to work and might be borrowed from there 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="349735" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-349735" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349735"
                     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="349768" data-post-id="349768">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh, for sure that’s a <code>Remote</code> type in <code>Elixir</code> core. <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>For initial support I wanted to suggest <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types" rel="noopener nofollow ugc">Basic types | Typespecs reference @ Elixir documentation</a> with few remote types like <code>ModuleName.t()</code> in core modules (Range, String), but without stuff like <code>Supervisor.child_spec/0</code>.</p>
<p>Well … there is no need to store them, right? I take a look what <code>iex</code> helpers are doing and they simply call <code>Code.fetch_docs/1</code> and deal with nested structures. It would not be few lines of code, but rather a small module so supporting it doesn’t look very hard.</p>
<p>However I agree that every project should not do that. I believe we need a hex package to:</p>
<ol>
<li>
<p>Fetch result typespec for functions, so we would be able to <code>@spec func_name(…) :: unquote(same_as(Mod.fun/arity))</code>.</p>
</li>
<li>
<p>Function to “flatten” typespec which would fetch <code>Remotes</code> and <code>User-defined</code> types and translate them into a same nested structure, but using only <code>Basic</code>, <code>Literals</code> and <code>Built in</code> types, so it would be easier to parse them.</p>
</li>
</ol>
<p>Did I miss something else?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="349768" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-349768" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349768"
                     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="349858" data-post-id="349858">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>In <code>:prod</code> we don’t have docs chunks, they are stripped out.  That’s why I said “To support it, one should compile everything with docs chunks, load all these chunks, store them somewhere…”</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="349858" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-349858" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349858"
                     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="349860" data-post-id="349860">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I see, so it’s only about <code>prod</code> runtime as docs could also be stripped when compiling code? Hmm … <img src="https://forum.elixirforum.com/images/emoji/apple/thinking.png?v=15" title=":thinking:" class="emoji" alt=":thinking:" loading="lazy" width="20" height="20"></p>
<p>So … we would need to fetch docs and if it fails load it from cache  …  That cache would need to be added to <code>priv</code> directory, let’s call it <code>priv//cache</code> for now … That’s really a problem … Even if we cache results we may not have them when compiling code to <code>prod</code>, so even cache may be a bad idea … The only way would be to fetch sources and get docs from there, but it’s too tricky … <img src="https://forum.elixirforum.com/images/emoji/apple/confused.png?v=15" title=":confused:" class="emoji" alt=":confused:" loading="lazy" width="20" height="20"></p>
<p>Yeah, there is no good way to deal with it. Will remember it, thanks. <img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji" alt=":+1:" 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="349860" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-349860" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349860"
                     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="367547" data-post-id="367547">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Been grinding on a fork of Elixact for the past week, as it’s a foundational dependency for the DSPy Elixir port in progress:</p>
<p><a href="https://github.com/nshkrdotcom/elixact" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/nshkrdotcom/elixact</a></p>
<p>The features are 99% on parity with Pydantic for the subset needed for a DSPy-style buildout.</p>
<p>Will be happy either way, whether the original project owner merges these significant changes or not. Will create a new project if the merges are declined.</p>
<p>edit: While the code is very stable, there are a few smells that came up. First was a somewhat disorganized layering with regard to so-called ‘enhanced’ functionality when I got to the runtime schemas. Further, some of the test or example names are poor, such as ‘phase 4 tests’ that were relevant at the time. The facade itself, however, should be fairly clean.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367547" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-367547" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367547"
                     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="367667" data-post-id="367667">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="libo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/libo/120/36923_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  libo
                    <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>Hey gtcode, thank you for working on the improvements.</p>
<p>Could you give me a list of what features you were adding, and ideally break your changes into small but self-contained chunks that can be meaningfully reviewed?</p>
<p>I saw your PRs yesterday and it will take me some time to review (bcs they are huge: 15000+ lines of new code in total <img src="https://forum.elixirforum.com/images/emoji/apple/joy.png?v=15" title=":joy:" class="emoji" alt=":joy:" 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="367667" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-367667" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367667"
                     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="367669" data-post-id="367669">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>hey Libo,</p>
<p>Did some review on the fork. It wound up being really clunky! So I cancelled the PR for now, since it is unclear if a frankenstein that can handle compile time and run time schemas per the “enhanced” arch is good/performant/useful.</p>
<p>I wound up making a new, minimal proj tailored for my needs:</p>
<p><a href="https://github.com/nshkrdotcom/sinter" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/nshkrdotcom/sinter</a></p>
<p>Thanks to your project, Libo, I was able to iterate and settle on the simplified Sinter arch as a result of the fork.</p>
<p>As for the Elixact mods, which are extensive, plz review to see if it makes sense.. It should be backwards compatible with your arch. I am just not stoked on my “enhanced” arch which evolved a bit organically and tried to do too much!</p>
<p>That’s why I cancelled the PR.</p>
<p>Having said that if you’d like to proceed, can you eval nshkrdotcom/elixact and provide feedback on revisions? I’ll work on refactoring per your direction (since the proj ultimately is your vision) before submitting a better PR. It may be worth considering whether to refactor/downsize/focus my fork.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367669" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-367669" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367669"
                     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="368656" data-post-id="368656">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/libo" rel="nofollow">@libo</a> The changes were so huge, it really isn’t the same lib anymore. I wound up just creating a new project.</p>
<p>The <code>README.md</code> includes a credit indicating that it was based on your work. Thank you.</p>
<p><a href="https://github.com/nshkrdotcom/exdantic" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/nshkrdotcom/exdantic</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="368656" 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/elixact-schema-definition-and-validation-think-pydantic-in-elixir/68059/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-368656" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="368656"
                     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>