Whole-known-network
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> <span class="h-card" translate="no"><a href="https://chaos.social/@mega" class="u-url mention">@<span>mega</span></a></span> the stack machine that JVM and Wasm have, and the SSA form that LLVM has, are literally equivalent (they are different ways to serialize the same IR, essentially; with the caveat that Wasm forbids irreducible control flow)</p><p>if you have your code in SSA/CPS form you would find it easy to emit stack bytecode, if you do not, it is most convenient to use locals (and the runtimes are aware of this and optimize for it)</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://chaos.social/@mega" class="u-url mention">@<span>mega</span></a></span> if i am writing/generating code why would i use the stack for live variables instead of the locals, or vice versa?</p>
<p><span class="h-card" translate="no"><a href="https://chaos.social/@mega" class="u-url mention">@<span>mega</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> there is the caveat that both wasm and java have the separate concept of locals, which is why i said "temporaries"; you still have to do liveness analysis for locals-locals if you want high quality codegen</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://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> Also (maybe relevant for the JIT comment): the stack at any given point *is* the set of live variables.</p><p>If you calculate a kind of "virtual stack" for a given basic block you will end up with the amount of elements that it pops from the stack (phi nodes/basic block arguments/whatever you want to call them) and the amount of elements it adds to the stack at the end of its execution (values that will be consumed by another block).</p>
<p><span class="h-card" translate="no"><a href="https://spookygirl.boo/@amy" class="u-url mention">@<span>amy</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@cliffle" class="u-url mention">@<span>cliffle</span></a></span> I once wrote a parser framework from scratch for the sole reason of being able to collect MC/DC-like metrics on the parsing grammar rules, which paid off in droves</p>
<p><span class="h-card" translate="no"><a href="https://spookygirl.boo/@amy" class="u-url mention">@<span>amy</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@cliffle" class="u-url mention">@<span>cliffle</span></a></span> exactly! unfortunately I have never used a language/runtime/test framework/web service which actually support MC/DC, branch coverage is the best i could manage to set up for an open source project with reporting, long term tracking, etc. MC/DC is what I aim for in my mind</p>
<p><span class="h-card" translate="no"><a href="https://spookygirl.boo/@amy" class="u-url mention">@<span>amy</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@cliffle" class="u-url mention">@<span>cliffle</span></a></span> for high-reliability code my target is "test every meaningfully distinct code path". this is mostly infeasible (without formal methods anyway) but i can get within a mile of that goal by writing a test for every combination of booleans each condition has and then checking that i really hit them all</p><p>i do this a decent amount and i often find obscure bugs this way</p>
<p>"JSON-LD" is short for "JavaScript Object Notation - LaserDisc" and refers simply to the standard JSON file format, stored on LaserDisc. JSON-LD was chosen for use in ActivityPub due to the many advantages of the LaserDisc format.</p><p><a href="https://social.coop/@cwebber/114621322748408513" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">social.coop/@cwebber/114621322</span><span class="invisible">748408513</span></a></p><p>cc <span class="h-card" translate="no"><a href="https://social.coop/@cwebber" class="u-url mention">@<span>cwebber</span></a></span></p>
<p><span class="h-card" translate="no"><a href="https://social.treehouse.systems/@rcombs" class="u-url mention">@<span>rcombs</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> like for SIMD?</p>