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
[–] cmeerw@programming.dev 1 points 1 month ago (1 children)

That leaves UCEPROTECTL3

Is anyone still using them?

 

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

[–] 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

 

This is a status update on improvements currently in progress for hardening and securing our C++ software.

 

For the big brain 10,000 meter view, defer ⸺ and the forthcoming TS 25755 ⸺ is a general-purpose block/scope-based “undo” mechanism that allows you to ensure that no matter what happens a set of behavior (statements) are run.

 

Bjarne Stroustrup, creator of C++, has issued a call for the C++ community to defend the programming language, which has been shunned by cybersecurity agencies and technical experts in recent years for its memory safety shortcomings.

 

There's no perhaps about the FBI and CISA getting snippy at buffer overflows. These people worry about exploits that threaten car-crash incidents in enterprise IT, and they've seen enough to get angry. It's not that making mistakes is a crime when writing code. No human endeavor worth doing is without error. It's more that this class of bug is avoidable, and has been for decades, yet it pours out of big tech like woodworm from a church pew. Enough already, they say. They are right.

[–] 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.

 

On Saturday, the ISO C++ committee completed the second-last design meeting of C++26, held in Hagenberg, Austria. There is just one meeting left before the C++26 feature set is finalized in June 2025 and draft C++26 is sent out for its international comment ballot (aka “Committee Draft” or “CD”), and C++26 is on track to be technically finalized two more meetings after that in early 2026.

[–] 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 8 points 1 year ago

Also the location of known Wifi networks.

[–] cmeerw@programming.dev 10 points 2 years ago

Embracing the GC

I never actually liked the GC in D as it didn't seem to fit in with the general direction of the language, and Walter Bright in D at 20: Hits and Misses says:

Miss: Emphasis on GC

[–] cmeerw@programming.dev 1 points 2 years ago

There is also lowendspirit, but in both cases you have to be very careful what you buy - not everything that is advertised there will work as advertised or will work long-term

[–] cmeerw@programming.dev 1 points 2 years ago

where they will double your monthly data limit for free when you comment your order number.

where they use you to spam the forum thread (for giving away something rarely anyone has any use for)

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

So they actually rewrote The Hurd in Rust.

[–] cmeerw@programming.dev 3 points 2 years ago (4 children)

There is no reason to “hate” Ubuntu but there are better choices.

What are those better choices then (for those who currently use the non-LTS Ubuntu releases and don't want to move to rolling releases or LTS-only releases)?

view more: next ›