<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: thrwyexecbrain</title><link>https://news.ycombinator.com/user?id=thrwyexecbrain</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 10 Jun 2026 18:23:50 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=thrwyexecbrain" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by thrwyexecbrain in "Windows: Prefer the Native API over Win32"]]></title><description><![CDATA[
<p>The Zig maintainers clearly think that keeping up with the undocumented native API is less headache than using the documented but notoriously inelegant win32 API.<p>This might very well be a good idea. Microsoft is not going to change a vital piece of their OS just on a whim. I would wager that even if they wanted to, they would not be able to do so that easily. A large organization maintaining a large software with a billion users just does not move that fast.</p>
]]></description><pubDate>Wed, 18 Feb 2026 19:05:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=47064896</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=47064896</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47064896</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Thoughts on Go vs. Rust vs. Zig"]]></title><description><![CDATA[
<p>Overcommit only matters if you use the system allocator.<p>To me, the whole point of Zig's explicit allocator dependency injection design is to make it easy to <i>not</i> use the system allocator, but something more effective.<p>For example imagine a web server where each request handler gets 1MB, and all allocations a request handler does are just simple "bump allocations" in that 1MB space.<p>This design has multiple benefits:
- Allocations don't have to synchronize with the global allocator.
- Avoids heap fragmentation.
- No need to deallocate anything, we can just reuse that space for the next request.
- No need to care about ownership -- every object created in the request handler lives only until the handler returns.
- Makes it easy to define an upper bound on memory use and very easy to detect and return an error when it is reached.<p>In a system like this, you will definitely see allocations fail.<p>And if overcommit bothers someone, they can allocate all the space they need at startup and call mlock() on it to keep it in memory.</p>
]]></description><pubDate>Fri, 05 Dec 2025 10:42:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=46159503</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=46159503</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46159503</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Migrating the main Zig repository from GitHub to Codeberg"]]></title><description><![CDATA[
<p>Do the arguments have to be strong? I do not think they need to provide any justification. If the core developers decided that they would be more happy (or less miserable) with a different service, then let them.</p>
]]></description><pubDate>Thu, 27 Nov 2025 12:41:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=46068729</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=46068729</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46068729</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Zig's New Async I/O"]]></title><description><![CDATA[
<p>I miss the mention of boost::asio in this thread. At first glance this new Io interface feels not that dissimilar to it:<p>Both are generic interfaces over an event loop/executor supporting async or blocking operations. Both ship a thread-pool and a stackful coroutine backend and both can be used through their respective language's stackless coroutine implementation (co_yield in cpp and yet-unimplemented in zig).</p>
]]></description><pubDate>Sun, 13 Jul 2025 18:16:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=44552303</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=44552303</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44552303</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Zig's New Async I/O"]]></title><description><![CDATA[
<p>Having a limited number of known callees is already better than a virtual function (unrestricted function pointer). A compiler in theory could devirtualize every two-possible-callee callsite into `if (function_pointer == callee1) callee1() else callee2()` which then can be inlined at compile time or branch-predicted at runtime.<p>In any case, if you have two different implementations of something then you have to switch between them somewhere -- either at compile-time or link-time or load-time or run-time (or jit-time). The trick is to find an acceptable compromise of performance, (machine)code-bloat and API-simplicity.</p>
]]></description><pubDate>Sun, 13 Jul 2025 09:47:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=44548924</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=44548924</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44548924</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Zig breaking change – Initial Writergate"]]></title><description><![CDATA[
<p>I think you just initialize Reader and Writer with a zero-length buffer.</p>
]]></description><pubDate>Fri, 04 Jul 2025 20:07:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=44467480</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=44467480</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44467480</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Zig breaking change – Initial Writergate"]]></title><description><![CDATA[
<p>Just to start some discussion about the actual API and not the breaking change aspect of it:<p>I find the `Reader.stream(writer, limit)` and `Reader.streamRemaining(writer)` functions to be especially elegant to build a push-based data transformation pipeline (like GREP or compression/encryption). You just implement a Writer interface for your state machine and dump the output into another Writer and you don't have to care about how the bytes come and how they leave (be it a socket or shared memory or file) -- you just set the buffer sizes (which you can even set to zero as I gather!)<p>`Writer.sendFile()` is also nice, I don't know of any other stream abstraction that provides this primitive in the "generic interface", you usually have to downcast the stream to a "FileStream" and work on the file descriptor directly.</p>
]]></description><pubDate>Fri, 04 Jul 2025 14:32:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=44464908</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=44464908</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44464908</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Matt Godbolt sold me on Rust by showing me C++"]]></title><description><![CDATA[
<p>Nothing fancy, I found that one can do almost anything with std::vector, a good enough hash map and a simple hand-rolled intrusive list.</p>
]]></description><pubDate>Wed, 07 May 2025 15:48:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=43917239</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=43917239</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43917239</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Matt Godbolt sold me on Rust by showing me C++"]]></title><description><![CDATA[
<p>The C++ code I write these days is actually pretty similar to Rust: everything is explicit, lots of strong types, very simple and clear lifetimes (arenas, pools), non-owning handles instead of pointers. The only difference in practice is that the build systems are different and that the Rust compiler is more helpful (both in catching bugs and reporting errors). Neither a huge deal if you have a proper build and testing setup and when everybody on your team is pretty experienced.<p>By the way, using "atoi" in a code snippet in 2025 and complaining that it is "not ideal" is, well, not ideal.</p>
]]></description><pubDate>Tue, 06 May 2025 20:15:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=43909187</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=43909187</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43909187</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "how do you 'accurately' speak English in ancient Rome?"]]></title><description><![CDATA[
<p>For me, someone from outside the Anglosphere, the British Empire is a distant and unfamiliar concept. I am always bothered by characters in historical fiction speaking with a British accent just to make an impression of ancientness. The antiquity was not ancient back then -- it was modern for its contemporaries.<p>Rome was as much the dominant economic, cultural and military power of the ancient world as the US is of the present. I would actually prefer American accents being used in movies set in the Roman Empire.</p>
]]></description><pubDate>Fri, 26 Jul 2024 18:56:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=41081247</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=41081247</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41081247</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Properly testing concurrent data structures"]]></title><description><![CDATA[
<p>One downside of this approach is that the tested code itself has to be modified to accomodate the testing code.<p>I think the same could be achieved by launching two threads and single stepping them with ptrace to "randomly" interleave the execution of their instructions. Something like rr's chaos mode.<p>Some instructions may not be atomic though, so we would need a way to single step on "atomic microcodes" if that's even possible without emulation?</p>
]]></description><pubDate>Sun, 07 Jul 2024 08:26:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=40896044</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=40896044</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40896044</guid></item><item><title><![CDATA[Why the USA is windier than Europe [video]]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.youtube.com/watch?v=HJ2Wp8B8Uns">https://www.youtube.com/watch?v=HJ2Wp8B8Uns</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=39899994">https://news.ycombinator.com/item?id=39899994</a></p>
<p>Points: 2</p>
<p># Comments: 0</p>
]]></description><pubDate>Mon, 01 Apr 2024 22:09:20 +0000</pubDate><link>https://www.youtube.com/watch?v=HJ2Wp8B8Uns</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=39899994</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39899994</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "You've just inherited a legacy C++ codebase, now what?"]]></title><description><![CDATA[
<p>I would absolutely not recommend auto-formatting a legacy codebase. In my experience large C++ projects tend to have not only code generation scripts (python/perl/whatever) but also scripts that parse the code (usually to gather data for code generation). Auto formatting might break that. I have even seen some really cursed projects where the _users_ parsed public header files with rather fragile scripts.</p>
]]></description><pubDate>Thu, 29 Feb 2024 21:46:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=39555605</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=39555605</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39555605</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "The Star – Arthur C. Clarke (1967) [pdf]"]]></title><description><![CDATA[
<p>The Internet Speculative Fiction Database is a great resource for publication details of fiction stories. Here is the entry for The Star: <a href="https://www.isfdb.org/cgi-bin/title.cgi?40913" rel="nofollow noreferrer">https://www.isfdb.org/cgi-bin/title.cgi?40913</a></p>
]]></description><pubDate>Mon, 25 Dec 2023 09:58:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=38761283</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=38761283</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38761283</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "The Star – Arthur C. Clarke (1967) [pdf]"]]></title><description><![CDATA[
<p>I was about to comment that the correct plural form of nova is novae, but it looks like dictionaries say that both novae and novas are correct. The irregular case does seem to predominate according to google ngram viewer.</p>
]]></description><pubDate>Mon, 25 Dec 2023 09:52:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=38761252</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=38761252</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38761252</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "How to learn chess as an adult (2021)"]]></title><description><![CDATA[
<p>Despite absolutely loving chess as a child, I never studied it professionally, and I did not even play a single game after primary school.
A couple of years ago I stumbled upon a chess video recommendation here on Hacker News. It was the 27th entry of ChessNetwork's Beginner to Chess Master series and it rekindled my love for the game. I have been playing chess casually ever since.
I cannot recommend ChessNetwork's videos enough: I found them to be insightful, well-made, and very respectful of both the game and the audience.</p>
]]></description><pubDate>Tue, 19 Dec 2023 11:01:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=38694151</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=38694151</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38694151</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "Ask HN: How to handle Asian-style “Family name first” when designing interfaces?"]]></title><description><![CDATA[
<p>In Calibre (the ebook management software) there are two fields: "author name" and "author sort name", both free-form text. The latter serves as the sort key when the books are ordered by author. I have found this solution both elegant and practical.</p>
]]></description><pubDate>Thu, 31 Aug 2023 16:46:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=37340050</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=37340050</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37340050</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "C++ Cheat Sheets"]]></title><description><![CDATA[
<p>The sizeof(variant) example is wrong. An extra byte is needed to store the discriminator value, which in practice results in 8 extra bytes for these particular types because of alignment. <a href="https://godbolt.org/z/vno3v9rPK" rel="nofollow">https://godbolt.org/z/vno3v9rPK</a><p>The tuple drawing is also somewhat misleading, because the first box (int) should be the same size as the second one (double), due to alignment.</p>
]]></description><pubDate>Mon, 07 Mar 2022 22:17:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=30594087</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=30594087</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30594087</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "An Opinionated Guide to Xargs"]]></title><description><![CDATA[
<p>In Bash (not every shell supports this) functions can be exported, which enables this nice pattern with xargs:<p><pre><code>    myfunc() {
        printf " %s" "I got these arguments:" "$@" $'\n'
    }
    export -f myfunc
    seq 6 | xargs -n2 bash -c 'myfunc "$@"' "$0"</code></pre></p>
]]></description><pubDate>Sun, 22 Aug 2021 09:07:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=28263995</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=28263995</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28263995</guid></item><item><title><![CDATA[New comment by thrwyexecbrain in "“Computer science is not about computers”"]]></title><description><![CDATA[
<p>This wikipedia article is not very accurate. In Hungary "informatika" is usually used only for primary/secondary school subjects covering every-day IT tasks like document editing, typing, or sending email. The most commonly used names for CS courses are "számításelmélet" or "számítástudomány" which translate as "theory of computing" and "science of computing".</p>
]]></description><pubDate>Sun, 30 May 2021 11:29:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=27332475</link><dc:creator>thrwyexecbrain</dc:creator><comments>https://news.ycombinator.com/item?id=27332475</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27332475</guid></item></channel></rss>