HNHacker News
TopNewBestAskShowJobs

TuxSH

325 karma · joined February 28, 2020

submissionscomments
TuxSH··on DeepSeek v4.1 Flash
> My favourite benchmark for this is to ask it to download a rom for an old game

Even easier: just have them review a large codebase of yours that accidentally has a OOB access bug. Even with no consequences and even if the codebase is truly yours you get blocked.

And of course "find vulnerabilities in..." prompts are out of the question, whereas Chinese models happily oblige.

TuxSH··on Codex on GPT6 Astra Low launched a rocket into space in Factorio Space Age 2.1
Ultra is max reasoning level that splits the work and spawn subagents. Good for whole-project reviews (well, as long as the cybersecurity refusal doesn't appear for whatever reason), but unusable on the $20/mo tier
TuxSH··on Tell HN: OpenAI brings back 5 hour limit for plus and business standard users
It was obvious indeed, but damn does it feel good to have ridden the May 25 - Aug. 26 gravy train.

Now, let's see how the Anthropic IPO goes.

TuxSH··on Show HN: Kadō – open-source habit tracker, with non-binary habit score, for iOS
A README is one of the most important pieces of a project, if one can't even advertise their own project with their own words, it signals low effort.

After all, the people visiting one's repo on GH likely have access to the same AI tools, too.

TuxSH··on Sony makes bold claim about game ownership
On consoles in general, backing up digital media (if even possible) requires full-system exploits, thus bypassing DRM, and decrypting them also requires breaking DRM
TuxSH··on Claude Fable 5.1 and Claude Mythos 5.1
It used to be true up to 2w ago, but with the new/reinstated 5h limits I wouldn't be so sure anymore...
TuxSH··on Claude Fable 5.1 and Claude Mythos 5.1
Unfortunately isn't included in subscriptions and requires usage credits...
TuxSH··on Decompiling a Nintendo 64 game in 84 days
IMO it's fine if you use it to review hand-written code. Vibe-coding (and especially 100% slop projects) on the other hand, is indeed cognitive surrender as it's identical to cheating on homework back then.
TuxSH··on OpenAI: GPT 5.6 Sol price reduction (until at least Nov 21)
Which is not that great for people using less than 50% every week, because the next reset date moves forward too. In essence, it is redistributing compute from people who haven't used their quota much to those who have.

Though I think they gave a banked reset this time.

TuxSH··on The beauty and simplicity of the good old C-style void* in C++
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*.

Thus void*+size is usually the right type if ones only care for the memory representation of an object (cstring functions like memcpy, etc.)

Most likely one would have both overloads:

    void Hexdump(const void *p, size_t size); // (1)
    
    template<typename T>  // (2)
    inline void Hexdump(const T &obj) {
         return Hexdump(&obj, sizeof(T));
    }
With (2) being a wrapper to (1) that compilers will almost always inline, avoiding monomorphization costs (and (2) can also accept rvalues as argument).

(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.

TuxSH··on C constructs that still don't work in C++
> It shouldn't require casting from and to specific pointer types

You don't need to explicitly cast T* to void* (guaranteed to be safe), you only need to cast when converting out of void*.

The rules are basically the same as casting between pointer-to-derived-class and pointer-to-base-class and they make sense.

TuxSH··on Everything in C is undefined behavior
You don't even need to use assembly for this, the wait for interrupt typically involves side effects.
TuxSH··on We stopped AI bot spam in our GitHub repo using Git's –author flag
> Unfortunately the PR and the PR author will forever be listed there

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).

Unfortunately this doesn't scale.

TuxSH··on We stopped AI bot spam in our GitHub repo using Git's –author flag
Closing a PR or issue still makes it discoverable in PR/issue search results, as opposed to deleting an issue.
TuxSH··on Things C++26 define_static_array can't do
The point of the article and of define_static_array is to convert stuff like constexpr std::vector to constexpr std::array.

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.

If you are working with fixed-size data like LUTs, just use std::array [1]

[1] Make sure not 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

TuxSH··on AI Is Tipping the Scales Toward Hackers After Mythos Release
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.

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.

TuxSH··on Introduction to Nintendo DS Programming
You're welcome!

By the way, I have something related rather large in the works, look forward for a "Show HN" ;) (hopefully this quarter!)

> better support than Nintendo does with all their trillion-Yen revenue available to them

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).

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.

TuxSH··on Introduction to Nintendo DS Programming
You can of course run DS (and GBA) software on 3DS.

> My only hesitation is the firmware update

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.

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).

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.

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).

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.

TuxSH··on Introduction to Nintendo DS Programming
The DS, more specifically the arm946e-s has an MPU, 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.

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.

TuxSH··on German men 18-45 need military permit for extended stays abroad
> forbidding women to wear jeans

This police ordinance from 1800 was abolished in 2013

> requiring permission of the husband to work

Repealed in 1965

TuxSH··on Everything old is new again: memory optimization
> optional<T&>

This is a C++26 feature which will have pointer-like semantics, aren't you confusing it with optional<reference_wrapper<T>> ?

TuxSH··on Looking at Unity made me understand the point of C++ coroutines
> every async "function call" heap allocates.

> require the STL

That it has to heap-allocate if non-inlined is a misconception. This is only the default behavior.

One can define:

void *operator new(size_t sz, Foo &foo)

in the coro's promise type, and this:

- removes the implicitly-defined operator new

- forces the coro's signature to be CoroType f(Foo &foo), and forwards arguments to the "operator new" one defined

Therefore, it's pretty trivial to support coroutines even when heap cannot be used, especially in the non-recursive case.

Yes, green threads ("stackful coroutines") are more straightforward to use, however:

- they can't be arbitrarily destroyed when suspended (this would require stack unwinding support and/or active support from the green thread runtime)

- 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

Really, stackless coros are just FSM generators (which is obvious if one looks at disasm)

TuxSH··on An incoherent Rust
> But reinterpret_cast isn't valid in a constexpr scope.

std::bit_cast is

TuxSH··on My first patch to the Linux kernel
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".

-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)

TuxSH··on Coding after coders: The end of computer programming as we know it?
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 least.

In both personal projects and $dayjob tasks, the highest time-saving AI tasks were:

- "review this feature branch" (containing hand-written commits)

- "trace how this repo and repo located at ~/foobar use {stuff} and how they interact with each other, make a Mermaid diagram"

- "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)

- basic YAML CRUD

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.

Claude writes code rife with safety issues/vulns all the time, or at least more than other models.

TuxSH··on We should revisit literate programming in the agent era
You exaggerate, but in this situation, I think putting a link to a Jira ticket or Slack convo (or whatever) as comment is best
TuxSH··on Best performance of a C++ singleton
In your case SetResolution could be a static method calling a private instance-method SetResolutionImpln, for example, similar to what other people said.

> what's the point of globally visible singletons except "everything is an object" cargo-culting?

Having the singleton be an object becomes interesting when:

1) it contains attributes that themselves have non-trivial constructors and/or destructors. Order of initialization and destruction is guaranteed (init is in forward order of declaration, destruction in reverse order)

2) more rarely, inheritance (code reuse)

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.

In these two scenarios it's a lot more efficient to group many related objects into a bigger object.

TuxSH··on Block the “Upgrade to Tahoe” alerts
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
TuxSH··on Get free Claude max 20x for open-source maintainers
Yes, I agree.

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

TuxSH··on Get free Claude max 20x for open-source maintainers
Sure, but what I'm slightly worried about is people easily resolving my username to my real name. Maybe I worry too much, dunno
← PreviousPage 2 of 8Next →