<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: purplesyringa</title><link>https://news.ycombinator.com/user?id=purplesyringa</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 11 Oct 2026 00:45:12 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=purplesyringa" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by purplesyringa in "Grieving the loss of details"]]></title><description><![CDATA[
<p>Yes, that's a good argument, thank you. You bring up a good point and I'll try to avoid making such claims in the future.</p>
]]></description><pubDate>Sat, 10 Oct 2026 21:24:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=50037335</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=50037335</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50037335</guid></item><item><title><![CDATA[New comment by purplesyringa in "Grieving the loss of details"]]></title><description><![CDATA[
<p>Perhaps I didn't formulate this too well. Say, rustc is a gigantic program, but the parser alone, or the borrow checker alone, or the LLVM backend alone are small enough to work on individually, and from the perspective of any such unit all the others can be treated as black boxes, deliberately designed to have as small of a public API surface as reasonable and to be as predictable as possible. That's just architecture 101. With LLM code, I notice, such abstractions fall apart, and the interconnectedness, duplicated code, and unclear expectations make it impossible to reason about the result except as a giant lump. Of course, tech debt is nothing new, but at least it used to be held back by the physical inability to make progress once things get dire; with LLMs, this misery gets prolonged.</p>
]]></description><pubDate>Sat, 10 Oct 2026 20:40:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=50036951</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=50036951</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50036951</guid></item><item><title><![CDATA[New comment by purplesyringa in "Grieving the loss of details"]]></title><description><![CDATA[
<p>I'll take your claim that I'm capable of writing a psyop piece as compliment :) Truth be told I'd rather be writing a psyop arguing the opposite point than dealing with these emotions.<p>To your main argument: I absolutely agree that LLMs are terrible at producing working code, or efficient code, and that they're incapable of solving lots of important problems. I've seen LLMs make embarrassing typos, patch vulnerabilities with differently vulnerable code, and go through the motions of optimization as if blindfolded.<p>That is, however, not the central matter here. IMO, at present what management thinks LLMs are capable off has a larger impact than what LLMs are actually capable off, and while I'm hoping that the market will regulate itself once more and more slop projects break down, that'll take time, and I'm not confident that LLMs won't improve sufficiently by that point that the most glaring mistakes will be fixed. Of course, new and non-obvious issues may still be present, and they may cause trouble at a later point, but again, that won't happen immediately and I think we'll just end up in this infinite loop for the time being.<p>I will also add that AI companies' claims affect the general public's perception of the acceptable level of software quality. If Anthropic says 1000ms is great, and other companies follow the same approach, people will consider that the norm and not demand better software. This enshittification has started a long time ago -- just look at how bloated Windows and the web are -- and I don't think it's going to end just because we know things can work better.<p>Taking a step back, I think it's really a question of how many people will understand the value of what people like you and I can deliver. That number has been falling bit by bit before the LLMpocalypse, but now it's just becoming abysmal.</p>
]]></description><pubDate>Sat, 10 Oct 2026 20:31:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=50036862</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=50036862</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50036862</guid></item><item><title><![CDATA[New comment by purplesyringa in "Grieving the Loss of Details"]]></title><description><![CDATA[
<p>Yeah, this struggle doesn't ever really end, it just gets easier.</p>
]]></description><pubDate>Sat, 26 Sep 2026 05:51:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=49853597</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49853597</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49853597</guid></item><item><title><![CDATA[New comment by purplesyringa in "Don't call yourself an artisanal programmer"]]></title><description><![CDATA[
<p>I think you might be interested in reading the post Are We Really Engineers (<a href="https://www.hillelwayne.com/post/are-we-really-engineers/" rel="nofollow">https://www.hillelwayne.com/post/are-we-really-engineers/</a>), which in part covers the point about whether "engineer" is closer to a profession designator or a respectable title. It really surprised me when I read it first time!</p>
]]></description><pubDate>Sun, 13 Sep 2026 13:25:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=49683744</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49683744</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49683744</guid></item><item><title><![CDATA[New comment by purplesyringa in "Don't call yourself an artisanal programmer"]]></title><description><![CDATA[
<p>I won't lie, of course my code has bugs. The difference, as I see it, is the kinds of bugs that manifest, and how well they can be avoided.<p>There are two steps to writing the program: building a model in your head to map understanding to algorithms, and then implementing the algorithm in code (and of course this can get recursive if the algorithm relies on other high-level mechanisms, like data structures).<p>I have found that most of the time, the kind of bugs that unit tests find are typos, i.e. mistakes in the second step; but the errors that actually cost time to resolve are errors in understanding, i.e. the first step.<p>They can't be found with testing or verification because what it <i>means</i> for code to be correct depends on the specification, and the error is that the specification itself is incorrect. Asking an LLM to check this one specific part of the software is thus useless, and whole-program analysis is not cheap enough to employ at this point.<p>So what about avoidance? When I say hand-written code is 100% correct (or at least approaches that number), I mean that with experience, I learn more about which models tend to be correct, and thus avoid bugs of the latter kind by construction. Of course typos still exist, which is why I write unit tests, and I expect LLMs to be able to find them as well; but I believe the only way to avoid incorrect models is to learn stuff by doing, failing and failing again, figuring out nitty-gritty low-level details, until at some point you become an expert in that area and know what to use.</p>
]]></description><pubDate>Sun, 13 Sep 2026 13:23:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=49683714</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49683714</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49683714</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>To expand on this, the imprecision arises the moment you write 0.1 (decimal) in source code and the compiler converts it to binary; the arithmetic itself is (mostly) exact. So as long as you use numbers that look "good enough" in base-2, floats behave very reasonably. The constantly made assumption that floats are imprecise is, in this sense, a user error -- the user shouldn't have used decimals.</p>
]]></description><pubDate>Wed, 29 Jul 2026 12:42:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=49096752</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49096752</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49096752</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>`log_a x < log_b x` is the mathematically correct result. Due to inherent rounding from floats being a finite representation of real numbers, `log_a x <= log_b x` would be expected from any correct implementation using floats. So either `true true false` or `true false true` would be reasonable. (I made a mistake in the previous comment, LuaJIT returns `<` for me, just like in your comment, not `=`.)<p>The topic of the post is that in PHP and Lua (without LuaJIT), sometimes this inequality doesn't hold, and instead we get `log_a x > log_b x`, which is very incorrect and cannot be explained away by rounding.<p>Does that make more sense?</p>
]]></description><pubDate>Wed, 29 Jul 2026 12:37:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=49096710</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49096710</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49096710</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>I sort of needed to do that. I needed to compress data with an approximately geometric distribution, and as part of that process I needed to invert its CDF, which is `CDF = 1 - (1 - p)^x`. That translates to `x = log_(1 - p) (1 - CDF)`, which is variable over both the argument and the base. At that point I wondered how consistent the implementation of double-argument `log` is, since the encoder and the decoder need to agree about it, which led to this article.</p>
]]></description><pubDate>Wed, 29 Jul 2026 10:07:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=49095419</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49095419</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49095419</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>That's interesting! On my PC it reproduces under Lua 5.5 (`log_a x > log_b x`), but not under LuaJIT (`log_a x = log_b x`). I took a look at LuaJIT's implementation (<a href="https://github.com/LuaJIT/LuaJIT/blob/faaf663340347a78b22ed94c63c24fe090bd9784/src/lib_math.c#L58" rel="nofollow">https://github.com/LuaJIT/LuaJIT/blob/faaf663340347a78b22ed9...</a>) and noticed that it always uses the `ln x / ln a` formula -- or, rather, `log_2 x / log_2 a`, which is just as correct I guess. Have you perhaps misinterpreted the results? (I do think it's valuable to add that this doesn't apply to LuaJIT though.)</p>
]]></description><pubDate>Wed, 29 Jul 2026 09:57:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=49095346</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49095346</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49095346</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>Thank you! This point has been driving me mad for the last couple of years.<p>While answering a sibling comment, I found a paper analyzing various libms for their precision: <a href="https://homepages.loria.fr/pzimmermann/papers/glibc238-20230921.pdf" rel="nofollow">https://homepages.loria.fr/pzimmermann/papers/glibc238-20230...</a> (2023). I only skimmed it, but it looks like only LLVM's libm guarantees 0.5 ulp for every supported single-precision operation, and everyone else is wildly off. That's a pretty good result, though -- it means there's at least one reasonably compliant libm :)<p>Another sibling comments says that guaranteeing 0.5 ulp for double-precision operations is nigh impossible (and then another says it is after all). I don't have the knowledge to confirm which is true, but it's possible that this is the best we can get.</p>
]]></description><pubDate>Wed, 29 Jul 2026 09:50:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=49095302</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49095302</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49095302</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>Thank you! I completely agree with this, floats are treated as a lot more magical than they actually are. I myself often rely on their exact guarantees for fun tricks (e.g. fast precise int<->float conversion: <a href="https://purplesyringa.moe/blog/fast-limited-range-conversion-between-ints-and-floats/" rel="nofollow">https://purplesyringa.moe/blog/fast-limited-range-conversion...</a>). But while IEEE-754 is very precise, some subtleties arise when you add library functions to the mix -- many libm's and userland libraries don't guarantee 0.5 ulp precision for certain operations <i>and</i> don't document the guaranteed precision either, at which point you're left guessing and saying "well, I guess I should treat floats as magic in this case after all". I added "it's not imprecision" to step around this whole question.</p>
]]></description><pubDate>Wed, 29 Jul 2026 09:38:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=49095216</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49095216</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49095216</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>The log base is a parameter, not a function, so that doesn't typecheck. Multivariate monotonicity isn't really a popular term, as far as I'm aware, so I'm not aware of good terminology for this. Maybe "log is non-monotonic with respect to the base"?</p>
]]></description><pubDate>Fri, 24 Jul 2026 10:17:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=49033426</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49033426</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49033426</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>Python, PHP, and Rust do indeed use libm. Not LLVM's libm specifically, though, but rather just about anything they can find in runtime, and those libraries can have suboptimal accuracy.<p>Node uses V8, which notably implements a ton of math manually, because it needs the results to be deterministic across devices. It seemingly uses LLVM's libm, which IIRC promises 0.5 ulp for most operations. (<a href="https://github.com/v8/v8/blob/f24c62fbc342d616032734b714116e1fdb891445/src/base/ieee754.cc#L24" rel="nofollow">https://github.com/v8/v8/blob/f24c62fbc342d616032734b714116e...</a>)<p>Go avoids dynamic linking, so they also have their own implementation. (<a href="https://github.com/golang/go/blob/543ead71a8e7acc2bd6f326327a090b64902b6a8/src/math/log.go" rel="nofollow">https://github.com/golang/go/blob/543ead71a8e7acc2bd6f326327...</a>) They only promise 1 ulp, but I guess in this specific case it works out better than approximations used by the default libm on their system by pure chance?</p>
]]></description><pubDate>Thu, 23 Jul 2026 19:16:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=49026680</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49026680</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49026680</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>> PHP uses a JIT from Lua.<p>Wow, TIL! I was certain this is a mistake, but apparently PHP uses DynAsm (<a href="https://wiki.php.net/rfc/jit" rel="nofollow">https://wiki.php.net/rfc/jit</a>), which was developed for LuaJIT (<a href="https://luajit.org/dynasm.html" rel="nofollow">https://luajit.org/dynasm.html</a>). Cool stuff!<p>To answer your question, probably not. I dated the PHP change that added this "optimization" back to 2014 (<a href="https://github.com/php/php-src/commit/b547e1358d3846fad4cd0c86e2d2e9f5a9039b35" rel="nofollow">https://github.com/php/php-src/commit/b547e1358d3846fad4cd0c...</a>), while DynAsm only started being used around 2019 (<a href="https://wiki.php.net/rfc/jit" rel="nofollow">https://wiki.php.net/rfc/jit</a>). I think this is just convergent evolution.<p>(I'm putting "optimization" in quotes because it changes semantics.)</p>
]]></description><pubDate>Thu, 23 Jul 2026 19:07:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=49026564</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49026564</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49026564</guid></item><item><title><![CDATA[New comment by purplesyringa in "Log is non-monotonic in PHP and Lua"]]></title><description><![CDATA[
<p>Yeah, I simplified it a little. Though I must say I'm surprised pretty much every library I looked at uses the natural logarithm specifically, and not log2, which would seemingly be easier to compute with floats. Does anyone here know why, by any chance?</p>
]]></description><pubDate>Thu, 23 Jul 2026 19:01:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=49026492</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=49026492</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49026492</guid></item><item><title><![CDATA[New comment by purplesyringa in "Optimizing Lua string literals to save 400 bytes"]]></title><description><![CDATA[
<p>> small source files<p>How small are we talking? We've had great success with bzip-style compression on ~400 KB (about 20% better than gzip), but I don't know if it scales well. It's also relatively fast to decode (something like 2x slower than DEFLATE, IIRC).<p>I was also considering other approaches, specifically GLZA (<a href="https://encode.su/threads/2427-GLZA" rel="nofollow">https://encode.su/threads/2427-GLZA</a>) looks promising. I think it should be well-suited for code due to its design, and it seems to produce better results than bzip on LTCB (<a href="https://mattmahoney.net/dc/text.html" rel="nofollow">https://mattmahoney.net/dc/text.html</a>), and with a faster decompression time.</p>
]]></description><pubDate>Sun, 19 Jul 2026 21:58:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=48972043</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=48972043</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48972043</guid></item><item><title><![CDATA[New comment by purplesyringa in "Optimizing Lua string literals to save 400 bytes"]]></title><description><![CDATA[
<p>We considered it, but that requires knowing the path to the file and being able to open it, which I don't think is possible in general (e.g. if the file is loaded with `loadstring`, or if it's loaded from tmpfs and then deleted, etc.).</p>
]]></description><pubDate>Sun, 19 Jul 2026 21:16:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=48971725</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=48971725</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48971725</guid></item><item><title><![CDATA[New comment by purplesyringa in "Optimizing Lua string literals to save 400 bytes"]]></title><description><![CDATA[
<p>Thanks! I relayed this to Yuki and we'll make sure to fix the issues.<p>> You can include the start delimiter in the string:<p>At first I had no clue why we thought that didn't work, in fact, my prototype had a fun commit specifically about adding opening brackets:<p><pre><code>    -while b"]" + b"=" * level + b"]" in obj:
    +# Somewhat surprisingly, Lua forbids even opening brackets inside brackets.
    +while b"[" + b"=" * level + b"[" in obj or b"]" + b"=" * level + b"]" in obj:
</code></pre>
...but I think I've figured out the problem. It seems like Lua 5.1 specifically forbids level-0 opening brackets within level-0 strings:<p><pre><code>    > print [[ a [[b c ]]
    stdin:1: nesting of [[...]] is deprecated near '['
</code></pre>
...and Cobalt implements this check for compatibility. So that's another edge case to handle, I guess.<p>> Another note that this doesn't cover is ending with a part of the ending terminator.<p>That's very useful to know, thanks!<p>> So you can't just use the bracketed form to encode arbitrary byte sequences, [...] if you care about the exact representation of line breaks<p>That's right, and the post actually covers how we resolved that closer to the end. In a nutshell, we replace CRs with an escape character, and then use a bitset to denote which symbols are supposed to be CRs and which ones are literal characters. It's not quite a string <i>literal</i> per se, but it's rather cheap in runtime and minimizes file size.</p>
]]></description><pubDate>Sun, 19 Jul 2026 21:12:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=48971693</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=48971693</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48971693</guid></item><item><title><![CDATA[New comment by purplesyringa in "Quadrupling code performance with a "useless" if"]]></title><description><![CDATA[
<p>> the fence basically means "resolve all funny business with this variable before proceeding"<p>Thanks, that's a good explanation! I understand it better now.<p>> What I'd actually worry most about is poisoning the prefetchers, and speculation more generally.<p>I didn't know prefetchers rely on address generation instructions, I thought they only tracked accessed memory. Good to know! Do you know any relevant external resources about this, by any chance?</p>
]]></description><pubDate>Tue, 14 Jul 2026 18:27:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=48911088</link><dc:creator>purplesyringa</dc:creator><comments>https://news.ycombinator.com/item?id=48911088</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48911088</guid></item></channel></rss>