<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: fuhsnn</title><link>https://news.ycombinator.com/user?id=fuhsnn</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Tue, 30 Jun 2026 10:33:04 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=fuhsnn" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by fuhsnn in "C extensions, portability, and alternative compilers"]]></title><description><![CDATA[
<p>It did take many hours, but I learnt a lot in the process, found some bugs to report, and watched plenty of series concurrently. Overall it's a nice and worthwhile hobby!</p>
]]></description><pubDate>Tue, 26 May 2026 14:57:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=48280730</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=48280730</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48280730</guid></item><item><title><![CDATA[New comment by fuhsnn in "C extensions, portability, and alternative compilers"]]></title><description><![CDATA[
<p>For those who are making indie C compilers that don't pretend to be __GNUC__ but want to compile real world projects, slimcc's test script[1] and platform header hacks[2] might save you some time.
[1] <a href="https://github.com/fuhsnn/slimcc/blob/main/scripts/linux_thirdparty.bash" rel="nofollow">https://github.com/fuhsnn/slimcc/blob/main/scripts/linux_thi...</a><p>[2] <a href="https://github.com/fuhsnn/slimcc/blob/main/slimcc_headers/platform_fix/" rel="nofollow">https://github.com/fuhsnn/slimcc/blob/main/slimcc_headers/pl...</a><p>Some more fun stories:<p>- Game projects default to using SIMD so for example SDL and STB you always need to pass -DSDL_DISABLE_IMMINTRIN_H and -DSTB_NO_SIMD<p>- math.h's NAN usually fall back to (0.0f / 0.0f), which will print "-nan" with printf, some projects test suite fail because of it (they expected "nan").<p>- NetBSD's sys/cdefs.h straight up #error's if you don't pretend to be GCC or PCC.<p>- Some projects can't compile without __attribute__((always_inline)) because they use it on non-static functions.<p>- Many projects probe -fvisibility in the build system and pass -fvisibility=hidden to compile, but in the headers they gate __attribute__((visibility(default))) behind __GNUC__ checks, so you'll get missing symbols.<p>- Some projects use if(0) { undefined_function() } to fake static_assert(), there is even a bug report from QEMU to Clang because it failed to optimize in -O0 a certain `if` written this way.<p>- Even if you define __STDC_NO_VLA__, projects might fall back to alloca() code path that's untested and broken (python and jemalloc both had this problem, already reported)<p>- Valkey has broken __builtin_ctzll fallback nobody noticed (reported).<p>- Zig's C bootstrap path expects the compiler to have GCC/Clang-tier optimization and stack overflows if you don't (reported).<p>- I contributed stdatomic.h code path for Ruby just to compile it with slimcc, pretty sure it's still the only user of the code path.<p>- I implemented __has_extension in the hope that projects can use it to query gnu_asm; but SQLite broke because they use __has_extension(c_atomic) to query GNU atomics builtin, but c_atomic actually is meant for C11 _Atomic (IMO they should use __has_builtin)</p>
]]></description><pubDate>Mon, 25 May 2026 16:31:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=48268732</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=48268732</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48268732</guid></item><item><title><![CDATA[New comment by fuhsnn in "C constructs that still don't work in C++"]]></title><description><![CDATA[
<p>> IMHO this "schism" was completely unnecessary and only happened because of ignorance and hubris<p>Having attempted to implement it correctly in slimcc, there are indeed some edge cases[1][2] that justify not adapting it fully.<p>[1] Unordered side effects; evaluation of expressions with overlapped destination is implementation defined but not listed as such (the wording in standard is "can potentially not be evaluated").<p>[2] Both GCC and Clang still get this wrong in 2026: <a href="https://github.com/llvm/llvm-project/issues/190858" rel="nofollow">https://github.com/llvm/llvm-project/issues/190858</a></p>
]]></description><pubDate>Mon, 25 May 2026 11:16:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=48265565</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=48265565</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48265565</guid></item><item><title><![CDATA[New comment by fuhsnn in "Bug 1950764: Work Around Crash on Intel Raptor Lake CPU"]]></title><description><![CDATA[
<p>> The sad vicious cycle of compilers not exercising the hardware<p>There could theoretically be instruction selection passes that are biased toward rare instructions, specialized for fuzzing hardware, I'm surprised Intel doesn't already do that.</p>
]]></description><pubDate>Mon, 25 May 2026 07:33:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=48264372</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=48264372</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48264372</guid></item><item><title><![CDATA[New comment by fuhsnn in "QBE – Compiler Back End"]]></title><description><![CDATA[
<p>The page says "aims to provide 70%" though, funny how words spread.</p>
]]></description><pubDate>Fri, 08 May 2026 17:48:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=48066451</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=48066451</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48066451</guid></item><item><title><![CDATA[New comment by fuhsnn in "QBE – Compiler Back End"]]></title><description><![CDATA[
<p>There is a library conversion fork: <a href="https://github.com/sgraham/sqbe" rel="nofollow">https://github.com/sgraham/sqbe</a>.<p>IMO when the intended usage is AOT with an external assembler, which is another subprocess, text-based IO is actually the more natural approach.</p>
]]></description><pubDate>Fri, 08 May 2026 16:52:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=48065693</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=48065693</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48065693</guid></item><item><title><![CDATA[New comment by fuhsnn in "Nobody Reviews Compiler Output"]]></title><description><![CDATA[
<p>Some of us do spend hours on godbolt.org tweaking code like it was game character build.</p>
]]></description><pubDate>Thu, 07 May 2026 20:05:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=48054185</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=48054185</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48054185</guid></item><item><title><![CDATA[New comment by fuhsnn in "CJIT: C, Just in Time"]]></title><description><![CDATA[
<p>That read like a supply-chain attack gold mine if you ask me.</p>
]]></description><pubDate>Wed, 29 Apr 2026 04:12:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=47944096</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47944096</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47944096</guid></item><item><title><![CDATA[New comment by fuhsnn in "CJIT: C, Just in Time"]]></title><description><![CDATA[
<p>rcc[1] is another real-JIT C compiler. antcc[2] and xcc[3] are worth mentioning for being fast-enough to run C like scripting.<p>[1] <a href="https://github.com/dstogov/rcc" rel="nofollow">https://github.com/dstogov/rcc</a><p>[2] <a href="https://codeberg.org/lsof/antcc" rel="nofollow">https://codeberg.org/lsof/antcc</a><p>[3] <a href="https://github.com/tyfkda/xcc" rel="nofollow">https://github.com/tyfkda/xcc</a></p>
]]></description><pubDate>Wed, 29 Apr 2026 04:08:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=47944075</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47944075</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47944075</guid></item><item><title><![CDATA[New comment by fuhsnn in "Writing a C Compiler, in Zig (2025)"]]></title><description><![CDATA[
<p>Looking at the repo, the author seemed a little fed up [1] with the nature of lower level language and quitted.<p>[1] <a href="https://github.com/asibahi/paella/blob/main/writeup/c19.md#user-content-fn-month-f690d35c5c3bc8477be727677652c31f" rel="nofollow">https://github.com/asibahi/paella/blob/main/writeup/c19.md#u...</a></p>
]]></description><pubDate>Thu, 23 Apr 2026 11:25:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=47874425</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47874425</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47874425</guid></item><item><title><![CDATA[New comment by fuhsnn in "Kefir C17/C23 Compiler"]]></title><description><![CDATA[
<p>Yeah, to get arcane macro tricks right I probably spent more than a full month total fighting with linked lists, never want to touch that part again.</p>
]]></description><pubDate>Tue, 21 Apr 2026 18:14:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=47852356</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47852356</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47852356</guid></item><item><title><![CDATA[New comment by fuhsnn in "Kefir C17/C23 Compiler"]]></title><description><![CDATA[
<p>Can't speak for kefir; slimcc has been `make unittest`ing Neovim v0.10.4 with no source modification in a Debian VM (so it's pretty portable, thanks!)<p>On tcc, the most common dealbreaker is no thread local support, having independent assembler/linker is a wonderful feat but not being feature parity with binutils could lead to build failure, contributors generally less willing to support the correct behavior for ABI, C standards and GCC extensions.<p>I hope these don't sound like a diss, if I had been better at reading its coding style I would definitely try to contribute to mob branch.</p>
]]></description><pubDate>Tue, 21 Apr 2026 08:17:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=47846021</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47846021</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47846021</guid></item><item><title><![CDATA[New comment by fuhsnn in "Kefir C17/C23 Compiler"]]></title><description><![CDATA[
<p>c-testsuite itself was curated from simple-cc and tinycc's test files, the latter originated from picoc.</p>
]]></description><pubDate>Tue, 21 Apr 2026 06:03:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=47845133</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47845133</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47845133</guid></item><item><title><![CDATA[New comment by fuhsnn in "Kefir C17/C23 Compiler"]]></title><description><![CDATA[
<p>I have found portability bugs in many projects with slimcc just because it exposed different preprocessor defines, some gate critical __attribute__ behind __GNUC__ check, some have buggy fallback to __builtin functions or VLA that nobody noticed in years, these could have been avoided with just an automatic build job in the CI with kefir or slimcc, (tcc is awesome but less suited for being a drop-in).<p>It is also important to have more independent implementations of the C standard, not only to sort out dark corners in the specification (current WG14 have been doing great), but to prevent it turning into GCC-Clang power struggle.</p>
]]></description><pubDate>Tue, 21 Apr 2026 02:48:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=47843925</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47843925</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47843925</guid></item><item><title><![CDATA[New comment by fuhsnn in "Kefir C17/C23 Compiler"]]></title><description><![CDATA[
<p>Congrats for the new optimizing pipeline, and thanks for the acknowledgment! It's nice to have company in the non-__GNUC__ camp.</p>
]]></description><pubDate>Tue, 21 Apr 2026 01:47:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=47843574</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47843574</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47843574</guid></item><item><title><![CDATA[New comment by fuhsnn in "SDL bans AI-written commits"]]></title><description><![CDATA[
<p>TinyCC's mob branch on repo.or.cz just got trolled with AI commits today. Nowhere is safe it seems.</p>
]]></description><pubDate>Thu, 16 Apr 2026 11:17:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=47791444</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47791444</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47791444</guid></item><item><title><![CDATA[New comment by fuhsnn in "Retrofitting JIT Compilers into C Interpreters"]]></title><description><![CDATA[
<p>I don't fully grasp it either, the most appropriate analogy I can think of is like how OpenMP turns #pragma annotated loops into multi-threading, this work turns bytecode interpreting loops into JIT VM.</p>
]]></description><pubDate>Thu, 16 Apr 2026 00:27:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=47787189</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47787189</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47787189</guid></item><item><title><![CDATA[New comment by fuhsnn in "Retrofitting JIT Compilers into C Interpreters"]]></title><description><![CDATA[
<p>Took me a while to figure out whether it's interpreters for C programs or if there's a particular class of interpreters called "C". Turns out it's about interpreters implemented in C that they use modified LLVM to do the retrofitting, but couldn't it be applicable for other languages with LLVM IR, or other switch-in-a-loop patterns in C?</p>
]]></description><pubDate>Wed, 15 Apr 2026 23:35:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=47786781</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47786781</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47786781</guid></item><item><title><![CDATA[New comment by fuhsnn in "Just Enough Chimera Linux"]]></title><description><![CDATA[
<p>The website you linked says mallocng?</p>
]]></description><pubDate>Tue, 14 Apr 2026 03:57:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=47761062</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47761062</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47761062</guid></item><item><title><![CDATA[New comment by fuhsnn in "Just Enough Chimera Linux"]]></title><description><![CDATA[
<p>Don't get mimalloc and mallocng mixed up though, completely different animals.</p>
]]></description><pubDate>Tue, 14 Apr 2026 00:14:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=47759633</link><dc:creator>fuhsnn</dc:creator><comments>https://news.ycombinator.com/item?id=47759633</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47759633</guid></item></channel></rss>