<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: pebal</title><link>https://news.ycombinator.com/user?id=pebal</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 17 Apr 2026 07:57:36 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=pebal" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by pebal in "Giving C a superpower: custom header file (safe_c.h)"]]></title><description><![CDATA[
<p>RC is a GC method and the least efficient one.</p>
]]></description><pubDate>Mon, 17 Nov 2025 16:21:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=45955042</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=45955042</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45955042</guid></item><item><title><![CDATA[New comment by pebal in "Should I choose Ada, SPARK, or Rust over C/C++? (2024)"]]></title><description><![CDATA[
<p>The C++ standard has never included a garbage collector. It only provided mechanisms intended to facilitate the implementation of a GC, but they were useless.</p>
]]></description><pubDate>Tue, 07 Oct 2025 21:52:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=45509379</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=45509379</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45509379</guid></item><item><title><![CDATA[New comment by pebal in "There is no memory safety without thread safety"]]></title><description><![CDATA[
<p>This isn't fully concurrent GC. It pauses mutators threads and delegates them to perform some of the work for the GC.</p>
]]></description><pubDate>Fri, 25 Jul 2025 14:50:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=44683799</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=44683799</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44683799</guid></item><item><title><![CDATA[New comment by pebal in "Garbage Collection for Systems Programmers"]]></title><description><![CDATA[
<p>> I haven't seen a C++ programmer carefully opt into GC for a subset of their allocations even though there are GC libraries written for the language.<p>Can you give an example of such GC libraries?<p>> Whoever made that claim? Gamedevs particulary have been writing custom memory allocators since decades precisely because they know free() is not free and malloc() isn't fast.<p>Game developers use engines based on the GC.<p>> It's not an illusion, you literally use control over memory management.<p>The shared_ptr does not provide full control.<p>> What they don't want is random stalls in odd frames.<p>You can have fully concurrent GC, without any stalls.</p>
]]></description><pubDate>Wed, 23 Jul 2025 10:13:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=44657505</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=44657505</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44657505</guid></item><item><title><![CDATA[New comment by pebal in "Redesigned Swift.org is now live"]]></title><description><![CDATA[
<p>But that's why Swift generates slower code. Memory is cheap, also for Apple, although Apple would like to hide that fact.</p>
]]></description><pubDate>Thu, 05 Jun 2025 12:25:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=44190979</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=44190979</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44190979</guid></item><item><title><![CDATA[New comment by pebal in "Four Years of Jai (2024)"]]></title><description><![CDATA[
<p>It doesn't matter at all. C4 uses STW.</p>
]]></description><pubDate>Sat, 19 Apr 2025 22:09:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=43739876</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43739876</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43739876</guid></item><item><title><![CDATA[New comment by pebal in "Four Years of Jai (2024)"]]></title><description><![CDATA[
<p>Azul C4 is not a pauseless GC. In the documentation it says "C4 uses a 4-stage concurrent execution mechanism that eliminates almost all stop-the-world pauses."</p>
]]></description><pubDate>Sat, 19 Apr 2025 09:37:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=43735299</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43735299</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43735299</guid></item><item><title><![CDATA[New comment by pebal in "Four Years of Jai (2024)"]]></title><description><![CDATA[
<p>There are no production implementations of GC algorithms that don't stop the world at all. I know this because I have some expertise in GC algorithms.</p>
]]></description><pubDate>Fri, 18 Apr 2025 23:21:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=43732755</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43732755</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43732755</guid></item><item><title><![CDATA[New comment by pebal in "Four Years of Jai (2024)"]]></title><description><![CDATA[
<p>There are none, at least not production grade.</p>
]]></description><pubDate>Fri, 18 Apr 2025 22:13:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=43732292</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43732292</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43732292</guid></item><item><title><![CDATA[New comment by pebal in "Go Optimization Guide"]]></title><description><![CDATA[
<p>Yes, SGCL is my project.<p>You can't write concurrent code without atomic operations — you need them to ensure memory consistency, and concurrent GCs for Java also rely on them. However, atomic loads and stores are cheap, especially on x86. What’s expensive are atomic counters and CAS operations — and SGCL uses those only occasionally.<p>Java’s GCs do use state-of-the-art technology, but it's technology specifically optimized for moving collectors. SGCL is optimized for non-moving GC, and some operations can be implemented in ways that are simply not applicable to Java’s approach.<p>I’ve never tried modeling SGCL's algorithms in TLA+.</p>
]]></description><pubDate>Wed, 02 Apr 2025 13:45:22 +0000</pubDate><link>https://news.ycombinator.com/item?id=43556629</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43556629</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43556629</guid></item><item><title><![CDATA[New comment by pebal in "Go Optimization Guide"]]></title><description><![CDATA[
<p>Java currently has no fully concurrent GC, and due to the volume of garbage it manages and the fact that it moves objects, a truly fully concurrent GC for this language is unlikely to ever exist.<p>Non-moving GCs, however, can be fully concurrent — as demonstrated by the SGCL project for C++.<p>In my opinion, the GC for Go is the most likely to become fully concurrent in the future.</p>
]]></description><pubDate>Wed, 02 Apr 2025 09:24:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=43554962</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43554962</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43554962</guid></item><item><title><![CDATA[New comment by pebal in "Go Optimization Guide"]]></title><description><![CDATA[
<p>That time may seem negligible, since the OS can context switch threads anyway, but it’s still additional time during which your code isn’t doing its actual work.<p>Generations are used almost exclusively in moving GCs — precisely to reduce the negative performance impact of data relocation. Non-moving GCs are less invasive, which is why they don’t need generations and can be fully concurrent.</p>
]]></description><pubDate>Wed, 02 Apr 2025 07:45:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=43554488</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43554488</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43554488</guid></item><item><title><![CDATA[New comment by pebal in "How to Secure Existing C and C++ Software Without Memory Safety [pdf]"]]></title><description><![CDATA[
<p>First, there are no Java GCs that completely eliminate stop-the-world pauses. ZGC and Shenandoah reduce them to very short, sub-millisecond windows — but they still exist. Even the most concurrent collectors require STW phases for things like root scanning, final marking, or safepoint synchronization. This is documented in OpenJDK sources, benchmarks, and even in Oracle’s own whitepapers. Claiming Java has truly pause-less GC is simply false.<p>Second, you’re suggesting there are moving GCs that don’t use read barriers and don’t stop mutator threads at all. That’s technically implausible. Moving collectors by definition relocate objects, and unless you stop the world or have some read barrier/hazard indirection, you can’t guarantee pointer correctness during concurrent access. You must synchronize with the mutator somehow — either via stop-the-world, read barriers, or epoch/hazard-based coordination. It’s not magic, it’s basic memory consistency.<p>SGCL works without moving anything. That’s why it doesn’t need synchronization, read barriers, or even slow-path allocation stalls. That’s not a limitation — that’s a design goal. You can dislike the model, but let’s keep the facts straight.</p>
]]></description><pubDate>Tue, 01 Apr 2025 20:14:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=43550868</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43550868</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43550868</guid></item><item><title><![CDATA[New comment by pebal in "How to Secure Existing C and C++ Software Without Memory Safety [pdf]"]]></title><description><![CDATA[
<p>As I mentioned earlier, take a look at the Golang. It's newer than Java, yet it uses a non-moving GC. Are you assuming its creators are intentionally making slower this language?</p>
]]></description><pubDate>Tue, 01 Apr 2025 20:03:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=43550779</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43550779</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43550779</guid></item><item><title><![CDATA[New comment by pebal in "How to Secure Existing C and C++ Software Without Memory Safety [pdf]"]]></title><description><![CDATA[
<p>There isn’t a single truly pause-less GC for Java — and I’ve already proven that to you before. If such a GC exists for any other language, name it.<p>And no, SGCL doesn’t introduce slow paths, because mutators never have to synchronize with the GC. Pointer access is completely normal — unlike in other languages that rely on mechanisms like read barriers.<p>Poluzuj gumkę, serio.</p>
]]></description><pubDate>Tue, 01 Apr 2025 18:32:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=43550021</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43550021</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43550021</guid></item><item><title><![CDATA[New comment by pebal in "How to Secure Existing C and C++ Software Without Memory Safety [pdf]"]]></title><description><![CDATA[
<p>Compaction doesn't necessarily guarantee cache friendliness. While it does ensure contiguity, object layout can still be arbitrary. True cache performance often depends on the locality of similar objects — for example, memory pools are known for their cache efficiency. It's worth noting that Go deliberately avoids compaction, which suggests there's a trade-off at play.</p>
]]></description><pubDate>Tue, 01 Apr 2025 18:11:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=43549810</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43549810</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43549810</guid></item><item><title><![CDATA[New comment by pebal in "Go Optimization Guide"]]></title><description><![CDATA[
<p>It doesn't matter if objects die young — the other objects on the heap are still moved around periodically, which reduces performance. When you're using a moving GC, you also have additional read barriers that non-moving GCs don't require.</p>
]]></description><pubDate>Tue, 01 Apr 2025 15:17:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=43547834</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43547834</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43547834</guid></item><item><title><![CDATA[New comment by pebal in "How to Secure Existing C and C++ Software Without Memory Safety [pdf]"]]></title><description><![CDATA[
<p>SGCL introduces the `tracked_ptr` smart pointer, which is used similarly to `shared_ptr`. The collector doesn't move data, which makes it highly efficient and — perhaps surprisingly — more cache-friendly than moving GCs.</p>
]]></description><pubDate>Tue, 01 Apr 2025 11:04:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=43545328</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43545328</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43545328</guid></item><item><title><![CDATA[New comment by pebal in "How to Secure Existing C and C++ Software Without Memory Safety [pdf]"]]></title><description><![CDATA[
<p>C++ isn't hostile toward garbage collection — it's more the programmers using C++ who are . C++ is the only language that can have an optional, totally pause-less, concurrent GC engine (SGCL). No other programming language, not even Java, offers such a collector.</p>
]]></description><pubDate>Tue, 01 Apr 2025 10:25:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=43545060</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43545060</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43545060</guid></item><item><title><![CDATA[New comment by pebal in "Go Optimization Guide"]]></title><description><![CDATA[
<p>If you have a moving, generational GC, then all the benefits of fast allocation are lost due to data moving and costly memory barriers.</p>
]]></description><pubDate>Tue, 01 Apr 2025 03:54:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=43542676</link><dc:creator>pebal</dc:creator><comments>https://news.ycombinator.com/item?id=43542676</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43542676</guid></item></channel></rss>