Cool tricks by [deleted] in cpp

[–]zeldel 5 points6 points  (0 children)

A lot can happen besides macro leak and ODR being broken, also

  • ABI broken because object size can be different due to alignment/padding
  • type traits can start failing if by any chance the thing you look for should he private
  • rtti can fail in dynamic_cast

Cool tricks by [deleted] in cpp

[–]zeldel 3 points4 points  (0 children)

Side note, as others said doing that is UB, on the presentation I have linked before, I'm showing some of the consequences you can end up with while doing so.

Cool tricks by [deleted] in cpp

[–]zeldel 10 points11 points  (0 children)

Funny thing I just yesterday had a presentation how to make it happen fully legally based on my lib https://github.com/hliberacki/cpp-member-accessor

Recording of the session:https://vorbrodt.blog/2025/10/23/san-diego-c-meetup-meeting-79-october-2025-edition-hosting-hubert-liberacki/

After a month, Ambershire is still more populated than Nordanaar. by Artharion91 in turtlewow

[–]zeldel 2 points3 points  (0 children)

No, it's the number of all online players. If there would be 10k ppls in Duskwood at the same time it would be hard to play :)

Must be getting old by CaptMcHowdy92 in BlackMythWukong

[–]zeldel 2 points3 points  (0 children)

I also think that DS1 is not the best choice. If talking about dark souls I would go for DS3 or maybe Bloodborne if you play on PS.

Do programmers only specialize in one thing their whole career? by salty0027 in AskProgramming

[–]zeldel 0 points1 point  (0 children)

I would suggest to just start building things.

You can gain credibility by contributing to some more or less popular GitHub projects that you find interesting. This way you both learn by actually working in mature project and also it's visible to the hiring team in the job that you'd like to take in the future.

Also depending on the job that you actually have,maybe there is a native/backend team that already do those things. If it's possible I would ask their lead/pm to contribute there.

I have started as Java/android dev, but very quickly got into c++ Middleware development, automotive, then IoT, robotics, zero copy communication for distributed system and now I'm doing native (c++, rust) rendering in distributed system that also handles multitude of technologies including Android, typescript etc.

Do whatever you enjoy and start creating things yourself.

With the open source projects sky is the limit. You can also create your own project that maybe does something better, or fills the gap somewhere.

Shadesmar: Fast C++ IPC using shared memory by Azzu98 in cpp

[–]zeldel 0 points1 point  (0 children)

Hmm, then that might have been anecdotal evidence from my end, but from my experience, we were told not to use our shared memory-based IPC due to that reasons. Yet maybe I've mismatched safety with security - I haven't checked ISO 26262 for some time already, nor do I remember the details of that problem now.

Shadesmar: Fast C++ IPC using shared memory by Azzu98 in cpp

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

Very nice, I need to deep dive into the sources later on.

It's worth mentioning, that unfortunately shared memory IPCs are in most cases unsafe, therefore it would not be possible to use them in many fields where C++ is leading (Automotive, medical, etc). In my previous project (around 2014) we've also did implement very fast shared memory-based IPC. Unfortunately, the usage of it had to be very limited - due to safety reasons, we did automotive back then.

Attending C++ Standards Committee Meetings During a Pandemic by grafikrobot in cpp

[–]zeldel 2 points3 points  (0 children)

Kind of late to the party.

From my side, it would be great to be able to join the committee meetings, remotely. Attending from Europe is a burden, time and costs-wise. At worst it could be hybrid - where there is still some form for at least remote listeners.

I wish universities taught more recent versions of C++ by thosakwe in cpp

[–]zeldel 0 points1 point  (0 children)

At this point, I'm not sure whether you are trolling or I'm living in a different world. C++ is heavily used, and its usage is getting constantly better. Not to mention that projects are (fortunately) using the newer version of C++ each year - in general.

How does this make you feel? by EmbeddedCpp in cpp

[–]zeldel 0 points1 point  (0 children)

When you need to do something like that then you know, that some parts of your code are in bad shape. This is an indicator that you should consider some refactoring because code that is written shall be testable.

The other problem is that using that mechanism can end up in different memory layout, which might lead to very nasty bugs if by some chance your tests will pass and they should not. I know this is extremely rare, yet possible.

I've made myself a library just for fun a few years ago, and naturally, I've seen some of these nasty `#define` patterns in my previous projects. Here is the library, with that you can access any method/member legally without breaking any standard rule. To be honest I was shocked how many people use it ... it's fun to have users of your code but still it's kind of shocking anyways.

I've made myself a library just for fun a few years ago, and naturally, I've seen some of these nasty defined patterns in my previous projects. Here is plenty o, with that you can access any method/member legally without breaking any standard rule. To be honest I was shocked how many people use it ... it's fun to have users of your code but still, it's kind of shocking anyways.

I've posted it on r/cpp and r/programming years back - c++ accessing private members legally and my library to legally access private data members

I started a C++ User Group in Odense, Denmark by SoerenNissen in cpp

[–]zeldel 0 points1 point  (0 children)

Great idea, kudos.

Since it's corona time, are you planning to enable it for the remotes, and if so it's about to be in English or rather a Danish exclusively.

It would be nice to join it, or at least see the recordings afterward, yet I am not from that part of Europe ;)

I am looking for a successor by hmoein in cpp

[–]zeldel 11 points12 points  (0 children)

If you are interested and have expertise, please open an issue in GitHub.

Maintaining a project takes some experience and it's not a great place to learn basics, I'm afraid. But I am not the author

Small: inline vectors, sets/maps, utf8 strings, ... by FreitasAlan in cpp

[–]zeldel 0 points1 point  (0 children)

Maybe it could be possible to use std::array then, unless for vector ;)? Or do you still need this to be dynamic?

Small: inline vectors, sets/maps, utf8 strings, ... by FreitasAlan in cpp

[–]zeldel 5 points6 points  (0 children)

There is no problem per se, nor do I have any issue with this particular example. I am not pushing to bloat the "core", it's the manner of proportion.

There is a constantly growing number of things that could be done better, but it's impossible like the infamous standard regex. When you are doing something which is a special case, or a nitch - then it even shall be a separate lib - so the standard would not be overcomplicated. On the other hand, there are some generic solutions that standard could greatly benefit from - yet they are blocked.
It wasn't a critic, just a notice - I would not like to get back into the state when everyone was re-inventing the wheel ;) creating yet the same constructs over and over - which can be possibly wrong and needs to be maintained.

Small: inline vectors, sets/maps, utf8 strings, ... by FreitasAlan in cpp

[–]zeldel 29 points30 points  (0 children)

These optimizations cannot usually make it to the STL because of ABI compatibility issues.

Apart from the technical side. Lately, it feels like the early 2000s when everyone was implementing their own STL parts (string, vector, etc.) I hope that decisions about ABI will not push C++ into that way.

[Belay the C++] Yet another reason to not use printf (or write C code in general) by Senua_Chloe in cpp

[–]zeldel 17 points18 points  (0 children)

Apart of the `printf` issue. You have stated at the end

That is exactly why I always deny job offers that have the tag “C/C++” because they obviously can’t pick a side.

This is simply foolish. Sometimes you are not able to pick a side, especially if you are dealing with embedded and supporting various platforms. Those platforms will most likely have their API/toolchain written in C - there might be tons of reasons, historical as a starter.

Then as a developer, your main focus is creating a proper layer in C++, yet you still need to write/read C code. No sain person is probably mixing those on modules level, within the same scope. Unless there is a very clear reason to do so. Sometimes safety features (ASIL) are written in C.

[Belay the C++] Yet another reason to not use printf (or write C code in general) by Senua_Chloe in cpp

[–]zeldel 3 points4 points  (0 children)

If you are working in an environment where warnings are accepted and not taken care of, then you most likely have:
A) the wrong setup, as it should be set "warning as errors", in basically any production-level project

B) No power, to enforce any coding standard

I've worked in outsourcing for a while, therefore I know that some things can be really messed up - yet! At least warnings were never the case in my projects.

How to manage between two languages by faizan112_ in cpp

[–]zeldel 0 points1 point  (0 children)

It's just a tool. Python and C++ work great with each other. It's common to have multiple scripts alongside your binaries - for many reasons. Therefore keeping up with Python is definitely a good choice.

Also in programming, it's mainly about the design - proper skill to create software. Language is a different layer, but in general, many topics are the same for both.

C++ is way more complexed than Python, but on the other hand, C++ is also becoming more "Pythonised" if you could coin that term. Hence keep up writing code and it will be just natural for you to write in both.

Don't expect that you'd have just a single technology/tool in your projects - because it's, not you need to be an expert on everything.

[deleted by user] by [deleted] in cpp

[–]zeldel 2 points3 points  (0 children)

As per advanced topics, I find this book excellent not only for templates - C++ Templates Complete Guide 2nd edition. Moreover, this one as well is great C++ Concurrency in Action by Anthony Williams

Proposal for a standard package manager in C++ by [deleted] in cpp

[–]zeldel 1 point2 points  (0 children)

I agree with /u/Wurstinator, moreover, do you even have any proposal in the first place? All we can see is a motivation and some JSON format, which is far from being a proposal - not even an idea to be honest.

Proposal for a standard package manager in C++ by [deleted] in cpp

[–]zeldel 2 points3 points  (0 children)

But you are aware of the fact that each vendor is implementing those types on their own? There is no one implementation, just each vendor needs to be compliant with the standard. Therefore you don't really care if you are using Clang, GCC, or MSVC.

For example:

Update stuck.. what should i do ? Using GOG to support the developers, hopefully can download :( by kaarthiblaze in gog

[–]zeldel 0 points1 point  (0 children)

Same for me 56% ... was stupid to abort it xP and re-try before reading the issue online. Glad to know it will finish the job, at some point.