cmeerw

joined 2 years ago
 

So today I wanted to talk about a very cool example that Dan put together on the flight home from Sofia, while I was unconscious a few seats over: the ability to, at compile time, ingest a JSON file and turn it into a C++ object.

 

Herb Sutter just announced that the verdict is in: C++26, the next version of C++, will include compile-time reflection.

Reflection in programming languages means that you have access the code’s own structure. For example, you can take a class, and enumerate its methods. For example, you could receive a class, check whether it contains a method that returns a string, call this method and get the string. Most programming languages have some form of reflection. For example, the good old Java does have complete reflection support.

 

Today marks a turning point in C++: A few minutes ago, the C++ committee voted the first seven (7) papers for compile-time reflection into draft C++26 to several sustained rounds of applause in the room.

 

Let’s take a problem that can only be solved with Reflection and compare what the solution would look like between:

  • the C++26 value-based model
  • the Reflection Technical Specification (TS)’s type-based model
 

In the agenda we will have reports from:

  • board (billc)
  • secteam (billc)
  • releng (martin)
  • core (riastradh)
  • finance-exec (riastradh)
  • membership-exec (martin, christos)
  • pkgsrc-pmc (wiz)
  • pkgsrc-security (tm, leot)
  • gnats (dh)
[–] cmeerw@programming.dev 1 points 1 month ago (1 children)

That leaves UCEPROTECTL3

Is anyone still using them?

 
  • Enhancing Support for NAT64 Protocol Translation in NetBSD - Dennis O.I
  • Asynchronous I/O Framework - Ethan Miller
  • Using bubblewrap to add sandboxing to NetBSD - Vasyl Lanko
 

Each year, the ISO C++ standards committee and the Standard C++ Foundation run this survey to stay in touch with the worldwide C++ community.

 

Released Apr 28, 2025. (58th OpenBSD release)

[–] cmeerw@programming.dev 2 points 3 months ago

I see a lot of spam coming from sendgrid, so I wonder how long they can continue operating that way until they get blocked completely by one of the larger mailbox providers.

 

The most important security benefit of software memory safety is easy to state: for C and C++ software, attackers can exploit most bugs and vulnerabilities to gain full, unfettered control of software behavior, whereas this is not true for most bugs in memory-safe software—just a few

[–] cmeerw@programming.dev 3 points 4 months ago (1 children)

see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3471r2.html#enabling-hardening

Much like a freestanding implementation, the way to request a hardened implementation is left for the implementation to define. For example, similarly to -ffreestanding, we expect that most toolchains would provide a compiler flag like -fhardened, but other alternatives like a -D_LIBCPP_HARDENING_MODE= macro would also be conforming.

[–] cmeerw@programming.dev 3 points 5 months ago

I wonder if it would be possible to build such a tool on top of tree-sitter (although not sure tree-sitter's C++ grammar can handle modules yet)

[–] cmeerw@programming.dev 9 points 6 months ago (1 children)

Isn't that mainly just torrent trackers that publish your IP address and then the ISP gets a request for who was using that particular IP address. I don't think an ISP would itself be interested in detecting whether their customers download illegal content - there is no business case for them to do that.

[–] cmeerw@programming.dev 15 points 11 months ago

at least you could keep their reviews so users could at least know if the app can be trusted.

You mean, don't trust a flatpak uploaded by a random person, but if there are enough fake reviews, it can be trusted?

[–] cmeerw@programming.dev 2 points 11 months ago

No mention of Reflection which was passed to the Core Working Group for wording review, or senders/receivers (on the library side) which was actually voted into the working paper.

[–] cmeerw@programming.dev 1 points 11 months ago

Huh? There is no such alternation between new features and feature freeze releases. In fact, C++26 will very likely get reflection as a major new feature. In comparison, the biggest core language feature in C++23 was probably "deducting this (explicit object member functions)".

The only thing that keeps Contracts out of C++26 is that they might not be finished in time (they'll need to be handed over from Evolution to Core by the February 2025 meeting, and then make it through Core review during the summer 2025 meeting).

[–] cmeerw@programming.dev 1 points 11 months ago

... except when ISO delays publication of the standard.

[–] cmeerw@programming.dev 1 points 1 year ago

Can anyone explain why there is such a huge difference in some of the benchmarks: Poll, Forking, CPU Cache, Semaphores, Socket Activity, Context Switching (all Stress-NG). Can we really trust these tests?

[–] cmeerw@programming.dev 2 points 1 year ago (1 children)

Depends on what semantic you want. Sure, if you use a unique_ptr member, you will get a deleted copy constructor/operator - I wouldn't consider that blowing up in my face.

[–] cmeerw@programming.dev 9 points 1 year ago (4 children)

And even the presented fix hurts my eyes. Should have used a unique_ptr or optional.

view more: next ›