<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Bug on Dear Fortuna</title><link>http://dearfortuna.blog/tags/bug/</link><description>Recent content in Bug on Dear Fortuna</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Vasyl Bodnar | Text: CC BY 4.0 | Code: BSD-3</copyright><lastBuildDate>Mon, 25 Aug 2025 23:04:15 -0400</lastBuildDate><atom:link href="http://dearfortuna.blog/tags/bug/index.xml" rel="self" type="application/rss+xml"/><item><title>To Debug or Apply AI</title><link>http://dearfortuna.blog/posts/to-debug-or-aai/</link><pubDate>Mon, 25 Aug 2025 23:04:15 -0400</pubDate><guid>http://dearfortuna.blog/posts/to-debug-or-aai/</guid><description>&lt;h2 id="intro">Intro&lt;/h2>
&lt;p>Recently, I have come across a peculiar issue.
A bug most deranged.
A kind of unspoken true evil you would not easily find in your kind and forgiving languages.&lt;/p>
&lt;p>Can you find it in this cleaned-up function with totally all the necessary info?&lt;/p>





&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> &lt;span style="color:#a6e22e">send_data&lt;/span>(&lt;span style="color:#66d9ef">int&lt;/span> sd, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">char&lt;/span> &lt;span style="color:#f92672">*&lt;/span>txk, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">char&lt;/span> &lt;span style="color:#f92672">*&lt;/span>data,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">uint64_t&lt;/span> data_len, &lt;span style="color:#66d9ef">struct&lt;/span> header &lt;span style="color:#f92672">*&lt;/span>pack,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">struct&lt;/span> sockaddr_in &lt;span style="color:#f92672">*&lt;/span>saddr) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">struct&lt;/span> header spack;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#66d9ef">uint64_t&lt;/span> max_size &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">sizeof&lt;/span>(pack&lt;span style="color:#f92672">-&amp;gt;&lt;/span>packet) &lt;span style="color:#f92672">-&lt;/span> ABYTES;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> pack&lt;span style="color:#f92672">-&amp;gt;&lt;/span>packet.off &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">while&lt;/span> (data_len &lt;span style="color:#f92672">&amp;gt;&lt;/span> max_size) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">memcpy&lt;/span>(&lt;span style="color:#f92672">&amp;amp;&lt;/span>spack, pack, &lt;span style="color:#66d9ef">sizeof&lt;/span>(spack));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">send_pack&lt;/span>(sd, txk, data, max_size, &lt;span style="color:#f92672">&amp;amp;&lt;/span>spack, saddr);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> pack&lt;span style="color:#f92672">-&amp;gt;&lt;/span>packet.off &lt;span style="color:#f92672">+=&lt;/span> max_size;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> data_len &lt;span style="color:#f92672">-=&lt;/span> max_size;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="to-debug">To Debug&lt;/h2>
&lt;h3 id="is-to-find-wrongdoings">Is to find wrongdoings&lt;/h3>
&lt;p>Ignore the code quality for a bit.&lt;/p></description><content:encoded><![CDATA[<h2 id="intro">Intro</h2>
<p>Recently, I have come across a peculiar issue.
A bug most deranged.
A kind of unspoken true evil you would not easily find in your kind and forgiving languages.</p>
<p>Can you find it in this cleaned-up function with totally all the necessary info?</p>





<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#66d9ef">int</span> <span style="color:#a6e22e">send_data</span>(<span style="color:#66d9ef">int</span> sd, <span style="color:#66d9ef">unsigned</span> <span style="color:#66d9ef">char</span> <span style="color:#f92672">*</span>txk, <span style="color:#66d9ef">unsigned</span> <span style="color:#66d9ef">char</span> <span style="color:#f92672">*</span>data,
</span></span><span style="display:flex;"><span>              <span style="color:#66d9ef">uint64_t</span> data_len, <span style="color:#66d9ef">struct</span> header <span style="color:#f92672">*</span>pack,
</span></span><span style="display:flex;"><span>              <span style="color:#66d9ef">struct</span> sockaddr_in <span style="color:#f92672">*</span>saddr) {
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">struct</span> header spack;
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">const</span> <span style="color:#66d9ef">uint64_t</span> max_size <span style="color:#f92672">=</span> <span style="color:#66d9ef">sizeof</span>(pack<span style="color:#f92672">-&gt;</span>packet) <span style="color:#f92672">-</span> ABYTES;
</span></span><span style="display:flex;"><span>  pack<span style="color:#f92672">-&gt;</span>packet.off <span style="color:#f92672">=</span> <span style="color:#ae81ff">0</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">while</span> (data_len <span style="color:#f92672">&gt;</span> max_size) {
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">memcpy</span>(<span style="color:#f92672">&amp;</span>spack, pack, <span style="color:#66d9ef">sizeof</span>(spack));
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">send_pack</span>(sd, txk, data, max_size, <span style="color:#f92672">&amp;</span>spack, saddr);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    pack<span style="color:#f92672">-&gt;</span>packet.off <span style="color:#f92672">+=</span> max_size;
</span></span><span style="display:flex;"><span>    data_len <span style="color:#f92672">-=</span> max_size;
</span></span><span style="display:flex;"><span>  }
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">return</span> <span style="color:#ae81ff">0</span>;
</span></span><span style="display:flex;"><span>}</span></span></code></pre></div><h2 id="to-debug">To Debug</h2>
<h3 id="is-to-find-wrongdoings">Is to find wrongdoings</h3>
<p>Ignore the code quality for a bit.</p>
<p>There are only so many things that could fail in these few lines,
but I will spare you a need to write everything around it yourself (somehow).</p>
<p>The issue is an infinite loop, pretty simple.</p>
<p>We only have one loop (ignore <code>send_pack</code> for a moment),
so it&rsquo;s got to be that.
But what could be wrong? <code>max_size</code> is clearly being subtracted from <code>data_len</code>,
and nothing else really matters for this while loop.
We could prove correctness or use a debugger,
but it is easier to just put a few <code>printf</code>s like a true master.</p>
<p>Alright, after sprinkling them like <del>friends</del> mines on a minefield, we find a trace:</p>





<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span>data_len: <span style="color:#ae81ff">248</span>
</span></span><span style="display:flex;"><span>max_size: <span style="color:#ae81ff">512</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">memcpy</span>()..
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">send_pack</span>()..
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>data_len: <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span>max_size: <span style="color:#ae81ff">512</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>pack<span style="color:#f92672">-&gt;</span>packet.off..
</span></span><span style="display:flex;"><span>data_len..
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>data_len: <span style="color:#ae81ff">0</span>
</span></span><span style="display:flex;"><span>max_size: <span style="color:#ae81ff">512</span></span></span></code></pre></div><h3 id="a-0-in-search-of-a-better-place">A 0 in search of a better place</h3>
<p>Hmm, that is a <code>0</code> where it was not supposed to be. Now, this would not be surprising if we modified <code>data_len</code> somewhere.
Maybe its address is messed with in some pointer I did not see.
But, it is a <code>const</code>, right?</p>
<p>Checking the full code again.. and no. <code>data_len</code> is a <code>const</code> after all.
There are no assignments or addresses misused.</p>
<p>Alright, there is clearly a change after the <code>memcpy</code> and <code>send_pack</code>. Got to be those then.
Well, the <code>memcpy</code> is fine, those are equal sizes and <code>sizeof</code> is not incorrect thankfully.</p>
<p>What about my <code>send_pack</code>?
I have tested it before and it seemed to work,
but maybe it is completely broken inside for this specific usecase.</p>
<p>Here it is in all its (cleanish) glory:</p>





<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#66d9ef">int</span> <span style="color:#a6e22e">send_pack</span>(<span style="color:#66d9ef">int</span> sd, <span style="color:#66d9ef">unsigned</span> <span style="color:#66d9ef">char</span> <span style="color:#f92672">*</span>txk, <span style="color:#66d9ef">unsigned</span> <span style="color:#66d9ef">char</span> <span style="color:#f92672">*</span>data,
</span></span><span style="display:flex;"><span>              <span style="color:#66d9ef">uint64_t</span> data_len, <span style="color:#66d9ef">struct</span> header <span style="color:#f92672">*</span>pack,
</span></span><span style="display:flex;"><span>              <span style="color:#66d9ef">struct</span> sockaddr_in <span style="color:#f92672">*</span>saddr) {
</span></span><span style="display:flex;"><span>  pack<span style="color:#f92672">-&gt;</span>packet.size <span style="color:#f92672">=</span> data_len <span style="color:#f92672">+</span> ABYTES;
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">memcpy</span>(pack<span style="color:#f92672">-&gt;</span>packet.payload, data <span style="color:#f92672">+</span> pack<span style="color:#f92672">-&gt;</span>packet.off, data_len);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">hash</span>(pack<span style="color:#f92672">-&gt;</span>packet.hash, <span style="color:#66d9ef">sizeof</span>(pack<span style="color:#f92672">-&gt;</span>packet.hash), 
</span></span><span style="display:flex;"><span>       pack<span style="color:#f92672">-&gt;</span>packet.payload, data_len, <span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">0</span>))
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">encrypt</span>(<span style="color:#f92672">&amp;</span>pack<span style="color:#f92672">-&gt;</span>packet, <span style="color:#ae81ff">0</span>, <span style="color:#f92672">&amp;</span>pack<span style="color:#f92672">-&gt;</span>packet,
</span></span><span style="display:flex;"><span>          <span style="color:#66d9ef">sizeof</span>(pack<span style="color:#f92672">-&gt;</span>packet) <span style="color:#f92672">-</span> ABYTES, <span style="color:#ae81ff">0</span>,
</span></span><span style="display:flex;"><span>          <span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">0</span>, pack<span style="color:#f92672">-&gt;</span>nonce, txk)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">sendto</span>(sd, pack, <span style="color:#66d9ef">sizeof</span>(<span style="color:#f92672">*</span>pack), <span style="color:#ae81ff">0</span>, (<span style="color:#66d9ef">struct</span> sockaddr <span style="color:#f92672">*</span>)saddr, 
</span></span><span style="display:flex;"><span>         <span style="color:#66d9ef">sizeof</span>(<span style="color:#f92672">*</span>saddr));
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">return</span> <span style="color:#ae81ff">0</span>;
</span></span><span style="display:flex;"><span>}</span></span></code></pre></div><p>Could look nicer, let&rsquo;s ignore that, not important or related at all.</p>
<p>Well, nothing immediately outstanding, but if you look closer.</p>
<h3 id="const-does-not-mean-const-always">Const does not mean const <em>always</em></h3>
<p><code>data_len</code> is used to decide the packet size and it is even in the <code>memcpy</code> and <code>hash</code>.
Of course, in this case size refers to the payload, but what is <code>max_size</code> set to again?</p>





<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#66d9ef">uint64_t</span> max_size <span style="color:#f92672">=</span> <span style="color:#66d9ef">sizeof</span>(pack<span style="color:#f92672">-&gt;</span>packet) <span style="color:#f92672">-</span> ABYTES;</span></span></code></pre></div><p>Hmm, I guess I never showed, but <code>pack-&gt;packet</code> is the entire struct, not the payload.</p>





<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#66d9ef">struct</span> packet {
</span></span><span style="display:flex;"><span>  <span style="color:#75715e">// ...
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>  <span style="color:#66d9ef">uint64_t</span> off;
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">unsigned</span> <span style="color:#66d9ef">char</span> payload[<span style="color:#ae81ff">200</span>];
</span></span><span style="display:flex;"><span>};
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">struct</span> header {
</span></span><span style="display:flex;"><span>  <span style="color:#75715e">// ...
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>  <span style="color:#66d9ef">struct</span> packet packet;
</span></span><span style="display:flex;"><span>};</span></span></code></pre></div><p>So getting size of that would give you too many bytes to work with (it is larger than just the payload).
Not so much that everything is corrupted, but a handful of things will be.
The end result is this friend:</p>





<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#a6e22e">memcpy</span>(pack<span style="color:#f92672">-&gt;</span>packet.payload, data <span style="color:#f92672">+</span> pack<span style="color:#f92672">-&gt;</span>packet.off, data_len);</span></span></code></pre></div><p>It will go too far and overwrite some stack space.
And, of course, what comes after that <code>spack</code> we use inside of <code>send_pack</code> on the stack?</p>





<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#66d9ef">struct</span> header spack;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#66d9ef">uint64_t</span> max_size <span style="color:#f92672">=</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">sizeof</span>(pack<span style="color:#f92672">-&gt;</span>packet) <span style="color:#f92672">-</span> ABYTES;</span></span></code></pre></div><p>So we just write too much. Stack corruption, yay!</p>
<p><code>data</code> has space because <code>packet.off</code> is also incremented by <code>max_size</code>, a.k.a. <code>0</code>.
And of course we blow past <code>spack</code> into <code>max_size</code>,
because both of them are right next to each other on stack.
<code>const</code> is just a compiler hint when you write to arbitrary stack memory.</p>
<p>And here I thought that using the stack was always superiour to <code>malloc</code>. Haha.</p>
<p>Well, this was all in the debugging build without really any optimizing,
so what about that <code>-O2</code>.</p>
<p>It just works. Ok, no it doesn&rsquo;t. But there is no infinite loop,
it just sends the packets as it is supposed to and ends the program.
Those packets are not correct and
the other end kindly lets me know it did not like what it had to receive.</p>
<p>Data is probably corrupted in some other ways (<code>max_size</code> is probably not on the stack anymore).
Thankfully fixing it (i.e. using <code>sizeof(pack-&gt;packet.payload)</code> in <code>max_size</code>)
makes it run perfectly on either build.
At least as far as I am aware and that is good enough for prod (i.e. me).</p>
<p>Thus, lessons learned. <del>Use a safer language</del>, <del>write nicer code</del>, ask AI?</p>
<h2 id="to-apply-ai">To Apply AI</h2>
<h3 id="it-is-not-included-solely-for-joke-purposes">It is not included solely for joke purposes</h3>
<p>Indeed, it did not take me long really,
probably not much longer than what it took you to get to here reading-wise.
Not the hardest bug, nor the most annoying one,
but more protein in code is rarely good.</p>
<p>Now I am not a vibe coder nor do I condone such violence upon the computer.
And I would not really say I use all that much AI tooling (certainly not the latest and greatest).
Still, I find it useful to occasionally indulge in these simple chatbots that most people would use.</p>
<p>Brainstorming, summarizing, finding info, maybe even being of help in debugging sometimes?</p>
<p>So I shall run some basic tests, will it (GPT-5, Claude Son 4) find this bug?</p>
<h3 id="tests-for-testss-sake">Tests for tests&rsquo;s sake</h3>
<p>First the basic basic, copy and paste the entire file (~300 LOC).
Same question to both:</p>
<blockquote>
<p>Can you fix this bug for me please. <code>send_data</code> is in an infinite loop. <strong>pasted code</strong></p></blockquote>
<p>Not the finest prompt engineering, but what do I know of the arcane.
This is realistic in that this is the info I know from just running it.
The total code size should not be an issue, it is not long, and not that dense.
Yet, both of these nice machines reply with essentially the same issue and fixes.</p>
<p>Has to be those offsets. Granted they are done inside <code>send_pack</code>,
so the bots must be confused upon seeing <code>send_data</code> without any offsets in the argument list.
They must assume that offset handling is broken and thus infinite loop somehow goes from there?</p>
<p>If I listened to the voices, I would be led astray.</p>
<p>Except what was that Claude Son 4?
Ah right, it has randomly suggested to use <code>pack-&gt;packet.payload</code>
in place of <code>pack-&gt;packet</code> in that cursed <code>sizeof</code>.</p>
<p>It was an off-hand change, but a correct solution nonetheless.</p>
<blockquote>
<p>Line 9: Also fixed max_size calculation to use sizeof(pack-&gt;packet.payload) instead of sizeof(pack-&gt;packet) - this ensures we&rsquo;re using the actual payload size</p></blockquote>
<p>I did not even notice it immediately.
GPT-5 did not even compete too, it has ignored that entirely.
I had repeated trials, but given the kinds of &ldquo;memory&rdquo; chatbots may use,
I am skeptical of how useful that would be.</p>
<p>Another test I prepared was feeding it just the essentials:
the structs, the <code>send_pack</code>, and the <code>send_data</code>, all you need. Same question.
(Yes, could be this mystical &ldquo;memory&rdquo;, but it is not the exact same code at least)</p>
<p>GPT-5 is doing the same as it did before.</p>
<p>Son 4 is still obsessed with offsets, but it has the right idea about it being <code>sizeof(payload)</code>.
Except that for some reasons it excluded <code>ABYTES</code>, authentication bytes,
which should count given that they are appended to the payload (i.e. in it)?</p>
<p>Ok, last test, what if I introduce it piecemeal.</p>
<p>First the <code>send_data</code>, front and center.
Same good propositions from GPT, those data offsets, underflow,
<code>max_size</code> is 0 but that was without solutions.
Though what do you know, GPT does not know about internals of <code>send_pack</code>.
Let us give it that next then. Same boring stuff about offsets again.
I share the structs, and GPT finally realizes that it indeed was that <code>sizeof</code> thing.</p>
<p>Claude&rsquo;s second dearest does not perform as well as you would think given above two tests.
Obsession over offsets given only <code>send_data</code> is expected.
But then the same happens with <code>send_pack</code>?
Well it probably fixed it for me according to previous function so whatever.
Finally, the structs open its eyes and it fixes the <code>sizeof</code>, while also removing <code>ABYTES</code>. Hmm.</p>
<h3 id="to-be-advised-by-the-enemy">To be advised by the enemy</h3>
<p>From these simple tests,
you could make a quick generalization of &ldquo;Claude likes big code&rdquo;,
and &ldquo;GPT likes chewing slowly&rdquo;.
I would also like to note that GPT-5 does not produce much text at all in comparison to Son 4,
which could be significant and even explain this difference.
But this is no peer reviewed study across three generations.
I would recommend to not dwell on these points too much, get your own conclusions.</p>
<h2 id="and-conclusion">And Conclusion</h2>
<p>The result is not the most impressive,
GPT-5 required specific massaging of pieces to get it right, which is annoying.
Also note that, if I did not know that the struct sizes were the issue,
I would probably not give them to GPT-5. Yet they were the last piece that it needed.</p>
<p>Claude did better, but in weird ways. Sure it got the right answer given the full code,
but that seems like an unnecessary divulgence (I have not hosted it on Github YET).
And when given less information,
it seems to have gotten more lost and started removing <code>ABYTES</code> for some reason.</p>
<p>Both also got heavy on offsets, basically all their tokens were on that.
It probably confused them too much.
Maybe it is wrong, but doubt is an enemy.</p>
<p>This is a hobby project in the end, I don&rsquo;t put too much focus on perfectness,
but I do care about learning and experiencing as much as possible myself.
Will I use AI for debugging here?
Maybe in desperation, after hours of incorrect turns.
I have yet to get there with this project. But soon enough.</p>
]]></content:encoded></item></channel></rss>