2
<p><span class="h-card" translate="no"><a href="https://bsd.network/@cynicalsecurity" class="u-url mention">@<span>cynicalsecurity</span></a></span> tons of these, take any beginner level compiler and it will do just that</p><p>tcc i think would fit?</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@regehr" class="u-url mention">@<span>regehr</span></a></span> <span class="h-card" translate="no"><a href="https://types.pl/@lenary" class="u-url mention">@<span>lenary</span></a></span> i do, but i don&#39;t want it to have its own quirky toolchain that nobody makes good devtools for, and i especially don&#39;t want it to generate code in an opaque build system</p><p>right now i&#39;m working on a heavily pattern matching oriented compiler in rust and the most i&#39;ve accepted is using macro-by-example (if you&#39;re unfamiliar, a slightly-above-regex flexibility and power language over token streams / partial ASTs)</p><p>not building a procedural macro that generates code is a direct goal</p>
<p>Pinker said this of Chomsky, and it perfectly sums up CS Ed (w/ Papert):</p><p>Linguistics is an eccentric field…because it was so polarized by a charismatic figure and his opponents that it didn’t proceed in the ordinary direction of making the theory more precise, more testable.</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://types.pl/@lenary" class="u-url mention">@<span>lenary</span></a></span> you don&#39;t want some sort of declarative language?</p>
<p><span class="h-card" translate="no"><a href="https://types.pl/@lenary" class="u-url mention">@<span>lenary</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@regehr" class="u-url mention">@<span>regehr</span></a></span> i have personally found cranelift to be vastly more pleasant to work with than tablegen (unsurprisingly, given how many lessons cranelift learned) but in my own compilers i still go very far to avoid making a tablegen</p>
<p>the LLVM people have made meta-TableGen. horrifying <a href="https://mlir.llvm.org/docs/Dialects/IRDL/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">mlir.llvm.org/docs/Dialects/IR</span><span class="invisible">DL/</span></a></p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://infosec.exchange/@0xabad1dea" class="u-url mention">@<span>0xabad1dea</span></a></span> <br />$readmemb me all the ones and zeros<br />they were once a mask rom of mine...</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@film_girl" class="u-url mention">@<span>film_girl</span></a></span> sad I won&#39;t get to see you at build this year 😥. Good luck on your next adventure!</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://haunted.computer/@iximeow" class="u-url mention">@<span>iximeow</span></a></span> naively I was hoping for something more like e.g. <a href="https://mlir.llvm.org/docs/Dialects/IRDL/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">mlir.llvm.org/docs/Dialects/IR</span><span class="invisible">DL/</span></a> and better interoperability even without FFI</p><p>but when you already have a hammer...</p><p>(also, even IRDL has e.g. a way to inject C++ code from a string: <a href="https://mlir.llvm.org/docs/Dialects/IRDL/#irdlc_pred-irdlcpredop" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">mlir.llvm.org/docs/Dialects/IR</span><span class="invisible">DL/#irdlc_pred-irdlcpredop</span></a>)</p>