<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: TuxSH</title><link>https://news.ycombinator.com/user?id=TuxSH</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 21 Jun 2026 13:13:32 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=TuxSH" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by TuxSH in "The beauty and simplicity of the good old C-style void* in C++"]]></title><description><![CDATA[
<p>Anything can be aliased by char, unsigned char, std::byte (as well as signed char in C), and usually uint8_t == unsigned char, thus by extension any valid void pointer can be cast to u8*.<p>Thus void*+size is usually the right type if ones only care for the memory representation of an object (cstring functions like memcpy, etc.)<p>Most likely one would have both overloads:<p><pre><code>    void Hexdump(const void *p, size_t size); // (1)
    
    template<typename T>  // (2)
    inline void Hexdump(const T &obj) {
         return Hexdump(&obj, sizeof(T));
    }
</code></pre>
With (2) being a wrapper to (1) that compilers will almost always inline, avoiding monomorphization costs (and (2) can also accept rvalues as argument).<p>(1) could also take std::span<const u8>, but (void*, size) is the more common idiom, more convenient to use and to read , as it is unambiguous which overload it is.</p>
]]></description><pubDate>Tue, 09 Jun 2026 19:56:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=48466768</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=48466768</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48466768</guid></item><item><title><![CDATA[New comment by TuxSH in "C constructs that still don't work in C++"]]></title><description><![CDATA[
<p>> It shouldn't require casting from and to specific pointer types<p>You don't need to explicitly cast T* <i>to</i> void* (guaranteed to be safe), you only need to cast when converting out of void*.<p>The rules are basically the same as casting between pointer-to-derived-class and pointer-to-base-class and they make sense.</p>
]]></description><pubDate>Mon, 25 May 2026 09:23:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=48264948</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=48264948</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48264948</guid></item><item><title><![CDATA[New comment by TuxSH in "Everything in C is undefined behavior"]]></title><description><![CDATA[
<p>You don't even need to use assembly for this, the wait for interrupt typically involves side effects.</p>
]]></description><pubDate>Wed, 20 May 2026 19:25:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=48212772</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=48212772</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48212772</guid></item><item><title><![CDATA[New comment by TuxSH in "We stopped AI bot spam in our GitHub repo using Git's –author flag"]]></title><description><![CDATA[
<p>> Unfortunately the PR and the PR author will forever be listed there<p>If they've been doing that to the other repo (and especially if they're just a spam account), there's a good chance using the "report" button and/or contacting  GH support directly can yield positive results, up to the spam account being deleted (and the PR is usually deleted).<p>Unfortunately this doesn't scale.</p>
]]></description><pubDate>Wed, 20 May 2026 15:16:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=48209204</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=48209204</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48209204</guid></item><item><title><![CDATA[New comment by TuxSH in "We stopped AI bot spam in our GitHub repo using Git's –author flag"]]></title><description><![CDATA[
<p>Closing a PR or issue still makes it discoverable in PR/issue search results, as opposed to deleting an issue.</p>
]]></description><pubDate>Mon, 18 May 2026 21:17:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=48185767</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=48185767</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48185767</guid></item><item><title><![CDATA[New comment by TuxSH in "Things C++26 define_static_array can't do"]]></title><description><![CDATA[
<p>The point of the article and of define_static_array is to convert stuff like constexpr std::vector to constexpr std::array.<p>New (and delete) can be used in constexpr functions, however memory "allocated" like that cannot leave the constexpr "sandbox" so to speak, therefore std::vector cannot be generated at compile-time, but std::array may.<p>If you are working with fixed-size data like LUTs, just use std::array [1]<p>[1] Make sure <i>not</i> to use std::to_array when embedding 200KB+ files, as it's a mere constexpr function and not a language construct and will exceed constexpr limits; either specify the size or use a C-style array in this case</p>
]]></description><pubDate>Tue, 28 Apr 2026 22:45:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=47941873</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47941873</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47941873</guid></item><item><title><![CDATA[New comment by TuxSH in "AI Is Tipping the Scales Toward Hackers After Mythos Release"]]></title><description><![CDATA[
<p>Maybe there is some astroturfing going on, as is usually the case, but it's already known that Codex/Claude Code and their ilk have been ruining CTFs for a while.<p>And well, one can always prompt "review my feature branch" or "review this file for bugs" with these tools; code analysis plays into the strengths of LLMs far more than code generation, since false positives/hallucinations aren't a problem with the former.</p>
]]></description><pubDate>Sat, 11 Apr 2026 23:26:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=47734854</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47734854</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47734854</guid></item><item><title><![CDATA[New comment by TuxSH in "Introduction to Nintendo DS Programming"]]></title><description><![CDATA[
<p>You're welcome!<p>By the way, I have something related rather large in the works, look forward for a "Show HN" ;) (hopefully this quarter!)<p>> better support than Nintendo does with all their trillion-Yen revenue available to them<p>Well, they had to develop the entire OS, all GUI applications and SDK (and docs, and tooling...). It would also be far from surprising if they moved significant headcount to developing the Switch after the 3DS launched (and considering the Wii U's apparent failure).<p>There have been traces of Switch 2 stuff in Switch 1 kernel 3 years (?) before the S2 launched, so, in terms of planning, this tracks.</p>
]]></description><pubDate>Fri, 10 Apr 2026 16:53:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=47720824</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47720824</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47720824</guid></item><item><title><![CDATA[New comment by TuxSH in "Introduction to Nintendo DS Programming"]]></title><description><![CDATA[
<p>You can of course run DS (and GBA) software on 3DS.<p>> My only hesitation is the firmware update<p>If you "hack" your 3DS you will not have to worry about sysupdates anymore. It is slightly more straightforward to do so if your system version is <= 11.14, and quite trivial if <= 11.3.<p>As for homebrew dev on 3DS, you have a lot more RAM and a "proper" CPU with somewhat modern CPU concepts (an actual OS, virtual memory, caches, multicore).<p>Unlike the DS and GBA, the 3DS has an actual GPU (well, kinda, it doesn't have programmable fragment shaders), which was designed around a custom flavor of OpenGL ES and it shows; citro3d is a shim, other than stateful state tracking  and mem allocation, it mostly exposes the GPU hw as-is.<p>Overall, I think it is easier for people to get started with 3DS homebrew development and that it provides more transferable skills (w/r/t OpenGL-like APIs).<p>Disclaimer: I'm the lead maintainer of Luma3DS, am a core maintainer of libctru, and wrote significant parts of the exploit chains the guide uses. Feel free to ask around.</p>
]]></description><pubDate>Thu, 09 Apr 2026 21:08:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=47710138</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47710138</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47710138</guid></item><item><title><![CDATA[New comment by TuxSH in "Introduction to Nintendo DS Programming"]]></title><description><![CDATA[
<p>The DS, more specifically the arm946e-s has an <i>MPU</i>, not a MMU (you're confusing it with the 3DS's Arm11). Not like it makes much of a difference anyway, you configure either once or twice then leave them be.<p>Honestly, I think why the GBA is more popular than the DS for that kind of thing is because it only has one screen (much less awkward to emulate), has high-quality emulators that are mostly free of bugs (mGBA most notably), and its aspect ratio is better than the DS anyway (3:2 upscales really well on 16:10 devices). That is to say, it's much easier to emulate GBA software on a phone or a Steam Deck than it is to emulate DS software.</p>
]]></description><pubDate>Thu, 09 Apr 2026 20:45:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=47709753</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47709753</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47709753</guid></item><item><title><![CDATA[New comment by TuxSH in "German men 18-45 need military permit for extended stays abroad"]]></title><description><![CDATA[
<p>> forbidding women to wear jeans<p>This police ordinance from 1800 was abolished in 2013<p>> requiring permission of the husband to work<p>Repealed in 1965</p>
]]></description><pubDate>Sun, 05 Apr 2026 01:10:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=47645190</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47645190</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47645190</guid></item><item><title><![CDATA[New comment by TuxSH in "Everything old is new again: memory optimization"]]></title><description><![CDATA[
<p>> optional<T&><p>This is a C++26 feature which will have pointer-like semantics, aren't you confusing it with optional<reference_wrapper<T>> ?</p>
]]></description><pubDate>Fri, 27 Mar 2026 23:36:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=47549795</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47549795</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47549795</guid></item><item><title><![CDATA[New comment by TuxSH in "Looking at Unity made me understand the point of C++ coroutines"]]></title><description><![CDATA[
<p>> every async "function call" heap allocates.<p>> require the STL<p>That it <i>has to</i> heap-allocate if non-inlined is a misconception. This is only the default behavior.<p>One can define:<p>void *operator new(size_t sz, Foo &foo)<p>in the coro's promise type, and this:<p>- removes the implicitly-defined operator new<p>- forces the coro's signature to be CoroType f(Foo &foo), and forwards arguments to the "operator new" one defined<p>Therefore, it's pretty trivial to support coroutines even when heap cannot be used, especially in the non-recursive case.<p>Yes, green threads ("stackful coroutines") are more straightforward to use, however:<p>- they can't be arbitrarily destroyed when suspended (this would require stack unwinding support and/or active support from the green thread runtime)<p>- they are very ABI dependent. Among the "few registers" one has to save FPU registers. Which, in the case of older Arm architectures, and codegen options similar to -mgeneral-regs-only (for code that runs "below" userspace). Said FPU registers also take a lot of space in the stack frame, too<p>Really, stackless coros are just FSM generators (which is obvious if one looks at disasm)</p>
]]></description><pubDate>Wed, 25 Mar 2026 17:41:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=47520696</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47520696</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47520696</guid></item><item><title><![CDATA[New comment by TuxSH in "An incoherent Rust"]]></title><description><![CDATA[
<p>>  But reinterpret_cast isn't valid in a constexpr scope.<p>std::bit_cast is</p>
]]></description><pubDate>Tue, 24 Mar 2026 09:45:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=47500396</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47500396</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47500396</guid></item><item><title><![CDATA[New comment by TuxSH in "My first patch to the Linux kernel"]]></title><description><![CDATA[
<p>Doesn't need to be UB, you can write expressions like: "some_s8_var < some_u32_var" and people will be had. Note that is not the same as "some_s8_var < some_u8_var".<p>-Wextra catches stuff like this, alas I know of a few people that think "-Wextra is evil" (even though annoying warnings can be selectively disabled)</p>
]]></description><pubDate>Sun, 22 Mar 2026 22:31:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=47482935</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47482935</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47482935</guid></item><item><title><![CDATA[New comment by TuxSH in "Coding after coders: The end of computer programming as we know it?"]]></title><description><![CDATA[
<p>I don't have as many years of professional experience as you do, but IMO code pissing is one of the areas LLMs and "agentic tools" shine the <i>least</i>.<p>In both personal projects and $dayjob tasks, the highest time-saving AI tasks were:<p>- "review this feature branch" (containing hand-written commits)<p>- "trace how this repo and repo located at ~/foobar use {stuff} and how they interact with each other, make a Mermaid diagram"<p>- "reverse engineer the attached 50MiB+ unstripped ELF program, trace all calls to filesystem functions; make a table with filepath, caller function, overview of what caller does" (the table is then copy-pasted to Confluence)<p>- basic YAML CRUD<p>Also while Anthropic has more market share in B2B, their model seems optimized for frontend, design, and literary work rather than rigorous work; I find it to be the opposite with their main competitor.<p>Claude writes code rife with safety issues/vulns all the time, or at least more than other models.</p>
]]></description><pubDate>Fri, 13 Mar 2026 20:50:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=47369689</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47369689</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47369689</guid></item><item><title><![CDATA[New comment by TuxSH in "We should revisit literate programming in the agent era"]]></title><description><![CDATA[
<p>You exaggerate, but in this situation, I think putting a link to a Jira ticket or Slack convo (or whatever) as comment is best</p>
]]></description><pubDate>Mon, 09 Mar 2026 11:48:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=47307805</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47307805</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47307805</guid></item><item><title><![CDATA[New comment by TuxSH in "Best performance of a C++ singleton"]]></title><description><![CDATA[
<p>In your case SetResolution could be a static method calling a private instance-method SetResolutionImpln, for example, similar to what other people said.<p>>  what's the point of globally visible singletons except "everything is an object" cargo-culting?<p>Having the singleton be an object becomes interesting when:<p>1) it contains attributes that themselves have non-trivial constructors and/or destructors. Order of initialization and destruction is <i>guaranteed</i> (init is in forward order of declaration, destruction in reverse order)<p>2) more rarely, inheritance (code reuse)<p>In the case of 1), you can just opt to construct the singleton on a sufficiently-aligned byte buffer in-place with `std::construct_at`. This gets rid of static-init order fiasco, __cxa bloat (if applicable), atexit bloat, and you can chose to just not call `std::destroy_at` if you don't need to.<p>In these two scenarios it's a lot more efficient to group many related objects into a bigger object.</p>
]]></description><pubDate>Sun, 08 Mar 2026 18:17:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=47299593</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47299593</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47299593</guid></item><item><title><![CDATA[New comment by TuxSH in "Block the “Upgrade to Tahoe” alerts"]]></title><description><![CDATA[
<p>Also Apple Music is much worse (harder to bring miniplayer, seek bar harder to use) and list of misfeatures goes on and on and on</p>
]]></description><pubDate>Sat, 28 Feb 2026 22:50:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=47201227</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47201227</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47201227</guid></item><item><title><![CDATA[New comment by TuxSH in "Get free Claude max 20x for open-source maintainers"]]></title><description><![CDATA[
<p>Yes, I agree.<p>It's just that I value the right to reveal my identity on my own terms a lot higher than $1200 (using my username and project name is fine). For the offer to become enticing they would need it to be 5~10y instead of 6mo, or to simply remove the $realname part of the "publicity" section</p>
]]></description><pubDate>Sat, 28 Feb 2026 20:03:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=47199589</link><dc:creator>TuxSH</dc:creator><comments>https://news.ycombinator.com/item?id=47199589</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47199589</guid></item></channel></rss>