<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: kazinator</title><link>https://news.ycombinator.com/user?id=kazinator</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 13 Aug 2026 21:38:33 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=kazinator" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by kazinator in "What garbage collection actually costs"]]></title><description><![CDATA[
<p>Generally speaking, whenever you trace into the old generation, you stop and back out. Given a young generation object with pointer fields, you don't know which of them are also young and which are old, unless you examine them, which is tracing. So the tracing pokes into the surface of the sediment generation, so to speak.<p>Then if the language allows mutation of objects, special consideration has to be given to old objects that were mutated to point to new ones. You can treat those as additional roots; the graph of young objects reachable from a mutated old object is reachable. (Considered so on the assumption of the old object being reachable, which we can only disprove by doing a full scan.)</p>
]]></description><pubDate>Thu, 13 Aug 2026 20:23:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=49291365</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49291365</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49291365</guid></item><item><title><![CDATA[New comment by kazinator in "What garbage collection actually costs"]]></title><description><![CDATA[
<p>When you get it working, you will figure it out. (Or even well before then; the rest is just bugs.)<p>I wrote one for TXR Lisp which there are no generation heaps; but objects have a generation. In the same heap, you can have adjacent (unrelated) objects that are in different generations. Objects never move from their heap; they keep their position in the same heap over their lifetime.<p>The allocator therefore records the new generations in a fresh log, which serves as the nursery. When that log gets full, a pass is triggered.<p>Implementations with separate heaps (typically copying collectors) allocate in a nursery heap and promote objects from there, but it is conceptually similar.<p>In the marking phase, we do not process this nursery. We start at the usual root pointers: stack, globals and proceed with normal marking, like in a pure mark-sweep collector (or a full pass), with a small modification: whenever we hit an old gen object, we skip it. We assume that the old gen object is reachable, and every object reachable through it is similarly an old-gen object. This is where the generational algorithm wins, chopping down the graph of objects to be marked, possibly drastically so.<p>Where the nursery/fresh log comes in is the sweep phase.   Because we know that we did not traverse any old generation objects, it would be wasteful to do a full sweep. In the case of the fresh log, we sweep just through the fresh log. Anything in the fresh log that is reachable is promoted to the old generation. Anything not reachable is reclaimed: either immediately or through the finalization treadmill, if applicable. The fresh log is then reset to empty.  In the case of a nursery, we similarly just sweep through the nursery heap and promote (by copying) reachable objects to the old generation, reclaiming the rest. The nursery is empty.<p>There may be additional structures. Note that we have the assumption that old objects only point to old. But what if (it is allowed that) the program mutates an old object to point to a newly allocated new one? That would break the assumption. We can make the program (code generated by compiler or whatever) report whenever that happens.<p>In the TXR Lisp implementation of generational GC, mutation of old objects is handled via two strategies. A single value assignment of a young object to a field in an old one will cause the young object to be appended to a "check" log.   In some cases, this is not practical for various reasons. For instance, an operation mutates a large number of fields of the same object (e.g. array).  In such cases we add the old objects to a "mutated" log.  The objects added to both arrays have their generation field reset to -1: neither young (0) nor old (1).<p>Both the check log and mutated log are marked during marking.  The check log contains only young objects and so sweeping those is already taken care of by the freshlog, it needs not be visited during the sweep phase.<p>The mutated log is processed during sweep in order to reset the generations from -1 back to 1.<p>When the check and mutated logs fill up, GC is not triggered immediately then, but the flag is set for the next GC to be a full one. What that does is turn off the mechanism: since we know a full GC is coming, we don't have to record mutations of old objects pointing to new.</p>
]]></description><pubDate>Thu, 13 Aug 2026 17:23:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=49289110</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49289110</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49289110</guid></item><item><title><![CDATA[New comment by kazinator in "What garbage collection actually costs"]]></title><description><![CDATA[
<p>In 1990s C++ we did:<p><pre><code>  void foo::method(const &smart_ptr<thing> x) { ... }
</code></pre>
The smart pointer passed reference isn't copy-constructed and so no refcount is bumped. It has a scoped lifetime. The calling function owns a reference (baseline correctness assumption or else we are screwed). That caller is suspended while the callee executes.</p>
]]></description><pubDate>Thu, 13 Aug 2026 16:52:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=49288710</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49288710</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49288710</guid></item><item><title><![CDATA[New comment by kazinator in "What garbage collection actually costs"]]></title><description><![CDATA[
<p>> <i>Think of a service that keeps a large cache in memory, or an index built out of millions of small objects that all point at each other. Every one of those pointers has to be followed on every cycle, for as long as the process is up.</i><p>That's a strange thing to assert, having acknowledged the existence of generational GC.</p>
]]></description><pubDate>Thu, 13 Aug 2026 15:36:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=49287619</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49287619</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49287619</guid></item><item><title><![CDATA[New comment by kazinator in "Why Target Common Lisp for Code Generation?"]]></title><description><![CDATA[
<p>I'm into Lisp because Lisp languages are easy to work in. I advocate the family as being good for nonprogrammers.<p>Small children should learn some kind of Lisp, and easily can.<p>Richard Stallman famously shared an anecdote in the article "My Lisp Experiences and the Development of GNU Emacs" (<a href="https://www.gnu.org/gnu/rms-lisp.en.html" rel="nofollow">https://www.gnu.org/gnu/rms-lisp.en.html</a>) about the secretaries:<p><i>> The editor itself was written entirely in Lisp. Multics Emacs proved to be a great success—programming new editing commands was so convenient that even the secretaries in his office started learning how to use it. They used a manual someone had written which showed how to extend Emacs, but didn't say it was a programming. So the secretaries, who believed they couldn't do programming, weren't scared off. They read the manual, discovered they could do useful things and they learned to program.</i><p>People, whether inside or outside of Lisp, who spread myths that that it is some scary, esoteric elite family of languages, have been pretty harmful.</p>
]]></description><pubDate>Thu, 13 Aug 2026 00:57:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=49280560</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49280560</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49280560</guid></item><item><title><![CDATA[New comment by kazinator in "Why Target Common Lisp for Code Generation?"]]></title><description><![CDATA[
<p>"Für Elite" by Letrec Var Bughaven</p>
]]></description><pubDate>Thu, 13 Aug 2026 00:49:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=49280511</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49280511</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49280511</guid></item><item><title><![CDATA[New comment by kazinator in "Bike Bureau: Report Bike Lane Obstructions"]]></title><description><![CDATA[
<p>Still, I should consult with a lawyer; they deserve compensation!</p>
]]></description><pubDate>Thu, 13 Aug 2026 00:14:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=49280272</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49280272</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49280272</guid></item><item><title><![CDATA[New comment by kazinator in "uBlock Origin Is Giving Up the Fight to Keep Ads Off Facebook"]]></title><description><![CDATA[
<p>> <i>very hard to write selectors against.</i><p>Or was hard to write selectors against before, you know, AI.<p>It seems ironic to give up now. You can probably rig up an agent to automatically look for new div labyrinths and write selectors for them.<p>You can bet Facebook are using AI to generate these labyrinths!!!</p>
]]></description><pubDate>Wed, 12 Aug 2026 20:57:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=49278442</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49278442</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49278442</guid></item><item><title><![CDATA[New comment by kazinator in "uBlock Origin Is Giving Up the Fight to Keep Ads Off Facebook"]]></title><description><![CDATA[
<p>They will not book them once they learn they have been defrauded for a while.</p>
]]></description><pubDate>Wed, 12 Aug 2026 20:55:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=49278429</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49278429</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49278429</guid></item><item><title><![CDATA[New comment by kazinator in "uBlock Origin is giving up the fight to keep ads off Facebook"]]></title><description><![CDATA[
<p>I would say, then, that Facebook is perpetrating fraud. They are knowingly defeating ad blockers to sell ad space that they know will not lead to any click-throughs and conversions.</p>
]]></description><pubDate>Wed, 12 Aug 2026 20:55:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=49278423</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49278423</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49278423</guid></item><item><title><![CDATA[New comment by kazinator in "Bike Bureau: Report Bike Lane Obstructions"]]></title><description><![CDATA[
<p>I have found that the vehicle that most often cuts off cyclists is the transit bus, pulling into a stop. This is not necessarily a bike lane, but sometimes actual designated bike lanes, too, pass in front of bus stops rather than correctly behind them.</p>
]]></description><pubDate>Wed, 12 Aug 2026 20:45:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=49278308</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49278308</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49278308</guid></item><item><title><![CDATA[New comment by kazinator in "Bike Bureau: Report Bike Lane Obstructions"]]></title><description><![CDATA[
<p>On the east walkway of Knight St. Bridge between Richmond, BC (Canada) and Vancouver, just on the last stage (from a north-bound point of view) before the turn-off to Marine Way, there is a permanent obstruction in the path: a concrete light pole smack in the middle of the path.<p>I got hurt there two weeks ago. I swerved right around the pole. Unfortunately, just after the pole there is bad drainage, with inches of accumulated dirt. Though it was a sunny August day, there was a thick mud puddle due to it having rained the previous day. I had not seen any patch of wetness anywhere all day; it all concentrated there. That in itself wouldn't have been a problem, had I gone straight through the mud. Unfortunately, maybe two meters after that point, some scavenging person left several garbage bags of junk (such as wire to be recycled).   After swerving right around the pole, my attention was on the bags which I planned to avoid by swerving left again. My back tire skidded on the strip of mud and I fell over.<p>Though I had no scratches or bruises anywhere, something happened to my left knee. I don't remember having landed in any funny position, and there was none of the typical pain from after an impact. But I noticed a sharp pain in the knee after standing up and trying to get back on the bike. It became very painful and swollen the next day.  I was not able to straighten the leg or completely fold the knee. It became impossible to crouch down. Putting a sock or shoe on the left foot became a challenge. Multiple places are sprained in that joint, it seems. I've had hip pain as well, as if shooting up the hamstring or IT band from that knee to the hip.<p>Two-and-a-half weeks later, it's showing only small signs of recovery and slightly improved mobility. I can fully straighten the leg and I've been able to bend the knee all thee way with my hand (no weight on it: that hurts like hell). Had an X-ray last week. I don't know the result; nothing might show. Dr's office called today for a follow-up appointment in two days.<p>The ironic thing is that I had crossed the entire bridge deck in a vehicle traffic lane, not on the bike/pedestrian walkway! I decided to get off the road and enter this last stage of the walkway, just before that pole, to avoid the traffic pile up on the off-ramp due to big trucks taking up most of the shoulder and whatnot.</p>
]]></description><pubDate>Wed, 12 Aug 2026 20:33:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=49278162</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49278162</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49278162</guid></item><item><title><![CDATA[New comment by kazinator in "The US tried to stop cartel money-laundering; devastated mom-and-pop businesses"]]></title><description><![CDATA[
<p>You can't practically use foreign institutions for your day-to-day banking.<p>Someone writes you a check. Can you easily cash that with your bank in another country? Best scenario: they have a check cashing app for your phone, so you don't have to mail anything off or present in person; but will that take an American check?</p>
]]></description><pubDate>Wed, 12 Aug 2026 18:36:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=49276769</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49276769</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49276769</guid></item><item><title><![CDATA[New comment by kazinator in "The US tried to stop cartel money-laundering; devastated mom-and-pop businesses"]]></title><description><![CDATA[
<p>Since the cartels have no problem moving money, this is like an incompetent surgeon cutting in the wrong place, taking out entirely the wrong thing.</p>
]]></description><pubDate>Wed, 12 Aug 2026 18:30:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=49276707</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49276707</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49276707</guid></item><item><title><![CDATA[New comment by kazinator in "Compression is prediction"]]></title><description><![CDATA[
<p>You can compress syntax, losslessly even, with zero understanding of its semantics. Zero understanding not only imbued into the compressor/decompressor, but even the designer of the compressor doesn't require understanding the semantics.  Actually, even of the syntax.<p>A compression program can compress a book written in a language that the author of the program doesn't understand, on a topic he knows little about.</p>
]]></description><pubDate>Wed, 12 Aug 2026 01:40:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=49266886</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49266886</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49266886</guid></item><item><title><![CDATA[New comment by kazinator in "Compression is prediction"]]></title><description><![CDATA[
<p>Shorter description isn't understanding, let alone of it is lossy.<p>When you shorten a description in a lossy way, you are deciding <i>a priori</i> that some differences in the object don't matter, and it's not because you understand the object, but because it serves your goal of shortening the description.</p>
]]></description><pubDate>Tue, 11 Aug 2026 22:36:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=49265438</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49265438</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49265438</guid></item><item><title><![CDATA[New comment by kazinator in "Compression is prediction"]]></title><description><![CDATA[
<p>It's more or less obvious that the LLM is a lossy-compressed version of the training data; it reproduces sequences of tokens that are the sort of thing that could plausibly occur in the training data, and avoids sequences that are implausible.<p>Because most of the training data has good grammar, the LLM is strongly trained on grammar; it will rarely predict ungrammatical gibberish. Even if there are grammar mistakes in the data, they are not systematic and so don't reinforce each other.</p>
]]></description><pubDate>Tue, 11 Aug 2026 22:31:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=49265386</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49265386</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49265386</guid></item><item><title><![CDATA[New comment by kazinator in "Ask HN: How much Adderall do you use?"]]></title><description><![CDATA[
<p>When preparing my morning shake, I open the pill bottle and add `er all, like the name says.</p>
]]></description><pubDate>Tue, 11 Aug 2026 18:49:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=49262781</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49262781</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49262781</guid></item><item><title><![CDATA[New comment by kazinator in "The “mechanical miracle” that ruined Mark Twain’s life"]]></title><description><![CDATA[
<p>Being able to type a repeated phrase fast is something; it's better than not being able to.<p>You want the typist to memorize some test sentences so that they are fast enough to demo what the machine can handle.<p>However, if the phrase was contrived to be sympathetic to the workings of the machine, that would have been a misleading demo.</p>
]]></description><pubDate>Tue, 11 Aug 2026 18:33:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=49262571</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49262571</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49262571</guid></item><item><title><![CDATA[New comment by kazinator in "Tail-call optimization in C is relatively recent (2025)"]]></title><description><![CDATA[
<p>We have to avoid the situation whereby we have a tail calling loop, in the course of which a growing chain of these fixup thunks is accumulating, such that when we return to the original caller, a cascade of these goes off.  That will clearly cause accumulation of something on the stack.   Maybe we just need one global thunk. When a function sees that its return address points to the tail fixup thunk, it avoids installing another one, but instead updates some word at a well-known frame offset location to inform that thunk that more words need to be cleaned up.  All of this obviously does relate to trampoline-based tail calling.</p>
]]></description><pubDate>Tue, 11 Aug 2026 18:26:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=49262445</link><dc:creator>kazinator</dc:creator><comments>https://news.ycombinator.com/item?id=49262445</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49262445</guid></item></channel></rss>