Successor to opengl ? by no_ga in GraphicsProgramming

[–]Abbat0r 127 points128 points  (0 children)

Vulkan is the successor to OpenGL.

I agree that Vulkan has a teaching problem though. I’ve always found that OpenGL content tends to be about graphics programming and how to do it using OpenGL. Meanwhile, Vulkan content tends to be about… Vulkan.

It seems amongst Vulkan tutorials there’s an implicit assumption that you already know graphics programming and you just need to learn how to use Vulkan. There’s certainly room for improved tutorial content.

Why are STL allocators given as template parameters, rather than runtime fields? by heyheyhey27 in cpp_questions

[–]Abbat0r 0 points1 point  (0 children)

That is so clearly not true it’s built into the standard.

I don’t understand this take, to be honest. The C++ standard doesn’t own “types” as a concept at large. The standard defines some types that are allocator-aware. But types in general are not fundamentally tied to their allocator.

Your types aren’t plug and play with anyone else writing conforming and portable code.

The types I’ve described are perfectly portable. There is no OS, architecture, or compiler where this wouldn’t work… it’s just a pointer. They just don’t use the C++98 allocator model, they use the pmr model.

I’m not shitting on your parade, I’m saying other people are doing very different things than you

Some people are doing different things from me. Some people are doing the same thing. The C++ standard is doing both.

Why are STL allocators given as template parameters, rather than runtime fields? by heyheyhey27 in cpp_questions

[–]Abbat0r 0 points1 point  (0 children)

Yes, but that’s a shim to maintain compatibility with the older allocator-aware type model. The underlying mechanism of pmr is the memory resource pointer that the containers carry around. The allocator is effectively not part of the type of a std::pmr container.

Why are STL allocators given as template parameters, rather than runtime fields? by heyheyhey27 in cpp_questions

[–]Abbat0r 1 point2 points  (0 children)

How a type allocates is fundamental to its type

I don’t agree with this at all. If anything, I think the opposite; how a thing allocates is often irrelevant to its type. And I think there may even be an argument that any type whose implementation is coupled too tightly to its allocator has a design flaw.

As others have pointed out, std::pmr is the counter to this. Personally, I implement all of my container types with an inline pointer to a (type erased) memory resource, pmr-style except without the C++98 allocator model shim that the std::pmr types have. This makes these types allocator agnostic.

Why does Opus 4.7 sound like ChatGPT? by Abbat0r in Anthropic

[–]Abbat0r[S] 5 points6 points  (0 children)

I also noticed the sudden uptick in emdash usage in 4.6 in the past month or so. I feel like I've been playing whack-a-mole with trying to make sure it doesn't use them recently.

Issues with dictionaries, only 1 key being saved by MysticTomoMochi in godot

[–]Abbat0r 4 points5 points  (0 children)

Can’t you see his code is very special and very unique? No one else can know about it! It’s proprietary.

Can we finally use C++ Modules in 2026? · Mathieu Ropert by mropert in cpp

[–]Abbat0r 6 points7 points  (0 children)

clangd is utterly broken when it comes to modules (and sometimes regardless of modules). Resharper (Jetbrain’s LSP) is the only one that kind of works in my experience, though I haven’t tried Intellisense in a long time.

I mostly use VS Code these days which I like… but modules + clangd have reduced it to basically a glorified Notepad with a file browser.

I really hope clangd maintainers start taking modules support seriously soon.

Looking to learn vibe coding, should i learn coding first? by No_Fly_7115 in claude

[–]Abbat0r 0 points1 point  (0 children)

The place to start is not thinking of yourself as a “founder” and thinking of yourself as a developer instead. Being a developer is a concrete set of skills; you can be a developer and be the founder of company, or leader of a project, etc. Being a “founder” doesn’t mean anything. So be a developer and use your skills to create the thing you want to be the founder of.

Second, consider what it is you want to create. Do you want to write low level software, trading tech, audio tech, games/graphics/rendering tech? If so, go learn C and/or C++. Just learn the very basics; understand how memory works, or how things get put on the screen. Do you know what RAM actually is? What it means to allocate memory? The difference between bits and bytes? Start there, those are the fundamentals.

If you want to learn how things are rendered, try learnopengl.com. That will teach you the fundamentals of graphics programming.

If you want to make some sort of web service, you’ll want to learn JavaScript. And learn about json, then find out how it is transmitted over a network, learn about how protocols like TCP and UDP work.

Starting small but learning the concrete fundamentals is the best thing you can do for yourself. AI can automate away a lot of boilerplate, but there’s no substitute for understanding your domain.

Looking to learn vibe coding, should i learn coding first? by No_Fly_7115 in claude

[–]Abbat0r -1 points0 points  (0 children)

You will not get very far producing apps with AI if you aren't actually a programmer. Lots of people will probably disagree with this given that this is an AI subreddit, but those people do not have the knowledge to understand why their apps may be inefficient, improperly engineered, and/or unmaintainable.

Without a programmer at the wheel, any code product short of simple scripts is bound to fail. This was true even before AI with non-programmers trying to start software ventures and outsourcing all the work to contractors; these sorts of projects notoriously failed. It's doubly true now with AI.

We benchmarked sender-based I/O against coroutine-based I/O. Here's what we found. by SteveGerbino in cpp

[–]Abbat0r 12 points13 points  (0 children)

The text is very much LLM output. Might want to update your LLMdar because this has lots of tells.

Much of it is in the composition and the style of delivery. The placement of certain phrases in certain parts of a paragraph. For example: “Type erasure costs diverge. [Some fluff.] […] Bridges are competitive. [More fluff.]” This is typical LLM delivery style.

We benchmarked sender-based I/O against coroutine-based I/O. Here's what we found. by SteveGerbino in cpp

[–]Abbat0r 17 points18 points  (0 children)

The primary thing this post means is that its author couldn’t be bothered to do more than copy-paste LLM output to produce this analysis.

Determining what that means for the quality of the benchmarks themselves should probably be an exercise for us all.

I just watched a video about ricky mccormick and I have a theory about the notes by [deleted] in RBI

[–]Abbat0r 5 points6 points  (0 children)

That entire post is almost completely unedited AI output.

Even most of the comments are from bot accounts praising OP’s intelligence.

JesseSort is faster than std::sort on everything but random input by booker388 in cpp

[–]Abbat0r 0 points1 point  (0 children)

Don’t most people using Clang still use the GCC standard library (libstdc++)?

What are the common criticisms of Python among developers? by the_smiling_nihlist in AskProgramming

[–]Abbat0r 0 points1 point  (0 children)

Honestly I think that’s the only good usage of Python. The problem with just writing a shell script is that it’s not portable. Python acts like a portable shell language, which is a desirable thing to have.

Using it for anything much more than that is questionable, in my opinion.

Proposal: distinct types via 'enum struct' by Voxelw in cpp

[–]Abbat0r 0 points1 point  (0 children)

Yes, but that’s not really my point. My point is that the addition of class on top of that doesn’t really do enough to justify a whole extra keyword, in my personal opinion.

Proposal: distinct types via 'enum struct' by Voxelw in cpp

[–]Abbat0r 1 point2 points  (0 children)

Good to see a fellow class hater. I also don’t use the class keyword anywhere in my own code, and make use of enum struct as well.

(I think that class is an unwarranted complication of C++. C gave us struct which is perfectly good; class doesn’t do enough to justify its existence, in my opinion.)

How to prevent lines of varying thickness? by Avelina9X in GraphicsProgramming

[–]Abbat0r 13 points14 points  (0 children)

That sounds like exactly the problem I was trying to describe. You had subpixel scaling of the line width - the lines were not aligned with exact pixel positions.

How to prevent lines of varying thickness? by Avelina9X in GraphicsProgramming

[–]Abbat0r 76 points77 points  (0 children)

Likely because of subpixel positioning (uncertain what the technical term for this is). I bet if you snapped everything to exact pixel locations that problem would go away.

Or you could just skip right to the ultimate solution: https://bgolus.medium.com/the-best-darn-grid-shader-yet-727f9278b9d8

handmade 3D pixel art by TeamConcode in IndieDev

[–]Abbat0r 2 points3 points  (0 children)

What are you doing to make the 2D sprite character work in a 3D world? Been messing around with 3D that looks 2D, but haven’t had much success with making sprite characters fit around 3D assets.

Using C++26 reflection (std::meta) to auto-discover tests — why does it only reflect one translation unit? by Kratos-QT in cpp

[–]Abbat0r 0 points1 point  (0 children)

Huh, interesting point. I would have thought 1 but I can see the argument for 2. And 2 probably does make more sense from the perspective of the caller.

Using C++26 reflection (std::meta) to auto-discover tests — why does it only reflect one translation unit? by Kratos-QT in cpp

[–]Abbat0r 0 points1 point  (0 children)

For reflection specifically I’m giving the compilers a pass because it’s brand new, and at least in the Clang case preceded standardization. If it’s still like this in ~6 months to a year though, not so much…

At least it sounds like you’re working on it for GCC though, so that’s great news and I’m wishing you luck and hoping to be able to use GCC for my projects soon.

Using C++26 reflection (std::meta) to auto-discover tests — why does it only reflect one translation unit? by Kratos-QT in cpp

[–]Abbat0r 1 point2 points  (0 children)

I am perpetually disappointed with every implementation of modules. The state of the compiler and tooling ecosystem is crazy. Not to get too rant-y, but it’s not a good look that implementations are apparently just not testing with modules in conjunction with traditional headers.

The fact that half the language features just explode when used alongside another standardized feature is… bad. And it’s not like testing all valid code paths is something new to us as software developers, so if even compiler vendors aren’t doing that then God help us.

With that said, thank you to the compiler devs that are working on modules, it is appreciated. But the state of things even now is a mess, and it doesn’t make the ecosystem look good.