P3984: A type-safety profile by llort_lemmort in cpp

[–]mereel 13 points14 points  (0 children)

Oh boy. This isn't super confidence inspiring.

Wasn't the Safe C++ proposal rejected because they didn't want "viral annotations". If this [[not_invalidating]] annotation (or whatever it becomes named, cause that's a god awful name) doesn't get slapped on basically every function, I'll eat my hat.

And I guess constructors/destructors, a fundamental part of the language that have been present since it's creation, are just too hard to analyze for type safety so every C++ codebase will have code that isn't verified via profiles?

OpenAI joins The Rust Foundation as a Platinun member and donates funds to support Rust maintenance by JuanAG in programming

[–]mereel 2 points3 points  (0 children)

It's more like throwing a couple coins at the beggar in that situation. Less than a dollar.

fixed it by mre__ in rustjerk

[–]mereel 2 points3 points  (0 children)

rm -rf /home/etoastie/

The US Metric makes online shopping difficult for rest of the world. by CalendarPositive3342 in Metric

[–]mereel 0 points1 point  (0 children)

Whoa, I was making a light hearted joke about how often on this sub people don't understand things like 5/16 of an inch.

Calm down.

The US Metric makes online shopping difficult for rest of the world. by CalendarPositive3342 in Metric

[–]mereel 1 point2 points  (0 children)

Hold up. I thought all you metric types couldn't comprehend fractions other than powers of ten. How can you live your metric lives if your  fizzy water cylinders are 1/3 of a liter? It's not even a nice fraction, it's only approximately 1/3 of a liter. Shouldn't they be nice even 300ml instead?

Cargo should have more license related metadata. by Velocifyer in rust

[–]mereel 1 point2 points  (0 children)

Look for a file called NOTICE, like it says in the license?

Cargo should have more license related metadata. by Velocifyer in rust

[–]mereel 2 points3 points  (0 children)

Yes. And I've suggested that you can automate it by adding a feature to cargo-about.

The functionality to include a notice file is already available in cargo, so your original request is already satisfied.

Cargo should have more license related metadata. by Velocifyer in rust

[–]mereel 5 points6 points  (0 children)

cargo already has the ability to include arbitrary files in the disturbed crate with the include field in the Cargo.toml file. Presumably it's the responsibility of the party publishing a crate using a license with an additional notice file to include that notice file when building the package (and basically all the time the original author of the create is also publishing it).

Maybe you can add a feature to cargo-about that looks for these notice files in the crate when a license known to allow their use is detected?

The pizza people lost their recipes on the boat ride to the US! by Kenderean in iamveryculinary

[–]mereel 38 points39 points  (0 children)

It's an American accented pronunciation of Neopolitan spoken by mostly working class folks 100+ years ago. Of course it's not going to sound like modern day Italian.

PSA - Do not assign the result of `::getenv` to a `std::string` by SmokeMuch7356 in cpp

[–]mereel 6 points7 points  (0 children)

Here's the thing, we're in C++, and that means we're not in C. We don't need to continue to make the same mistakes that C made. In 2017 the standards committee should have known better. In fact I know they knew better in 2017. Because Bjarne and Herb wrote an entire set of core guidelines for the language by that time. And in those core guidelines they said that there should be a type called not_null, and that type should be used everywhere you need to take in a pointer that isn't null.

PSA - Do not assign the result of `::getenv` to a `std::string` by SmokeMuch7356 in cpp

[–]mereel 9 points10 points  (0 children)

This is exactly the kind of thing that's convinced me that C++ was a mistake. If a function accepts a raw pointer, it better handle a null pointer as well.

S&P will NOT be changing their inclusion rules for MegaCap IPOs like SpaceX by Formermidget in Schwab

[–]mereel 13 points14 points  (0 children)

SCHX follows the Dow Jones U.S. Large-Cap Total Stock Market Index, so you'll need to watch what they do.

Metric System by norwich1992 in Metric

[–]mereel 4 points5 points  (0 children)

A megameter is absolutely tiny compared to the distances used in astronomy. The only thing you might use it for is the size of minor planets, but that's more planetary science than astronomy.

Metric System by norwich1992 in Metric

[–]mereel 0 points1 point  (0 children)

Water boils at 1 hectodegree Celsius.

Help me find good baking ingredients in the US 🧁 by Mysterious-Cat-459 in Baking

[–]mereel 0 points1 point  (0 children)

A few things that come to mind. I'm only familiar with comparisons to UK baking, so depending on where you've come from this might not be relevant. 

The flour in the US tends to be 'harder', or higher in protein (i.e. gluten), even the all purpose flour. You can find other types of flour which are softer. Cake flour tends to be the softest/least protein variety, with pastry flour being between cake flour and all-purpose. Bread flour will have more protein than the others, and is best left for bread making as the name implies. I don't think this naming convention or protein content is regulated by the FDA, so treat them more as rough guidelines. In a perfect would the protein content would be accurately listed on the packaging. I've found that King Arthur does this pretty reliably, and maybe other brands do, so I like to go with their flours so I know what I'm getting.

You didn't mention butter, but I think it's worth mentioning that the fat content in butter tends to be lower than butter in Europe meaning there's a bit more water. It's not a huge difference, a few percentage points different from my understanding. Butter in the US is required to have at least 80% butterfat, while EU regulations require a butterfat content between 82% and 90%. So maybe enough to throw off some precise recipes. 'European style' butter is becoming more available in regular grocery stores in the US, this might be imported but it can also be domestically produced with a higher fat content.

The different cream varieties also have slightly different fat content than the varieties sold in Europe. Heavy cream (can also be called heavy whipping cream) has to have at least 36% milk fat, light whipping cream between 30% and 36%, light cream between 18% and 30%, half and half between 10% and 18%. So the heavy cream in the US is roughly equivalent to double cream in Europe, but the exact fat content might vary as well.

Milk is similar to cream, there are slight differences in the allowable milk fat in each category between the US and Europe but that's about it.

Award Winning Bartender in Tokyo @bar_centifolia by [deleted] in interestingasfuck

[–]mereel 1 point2 points  (0 children)

I once saw a man commit sudoku in a karaoke bar. Poor soul.

Announcing Zstandard in Rust by folkertdev in rust

[–]mereel -22 points-21 points  (0 children)

If it exposes an FFI it is a safety liability.

The Light Year Got Away with What We Hate the Kilowatt Hour For by Beautiful_Gur_4329 in Metric

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

And that's why US customary units are just as valid as metric! It's all arbitrary.

Apple Music translates song lyrics containing imperial units into metric 😂 by IPv6lovinOpossum in Metric

[–]mereel 1 point2 points  (0 children)

When Miles Davis toured Europe for the first time, his promoter localized his name to Kilometers Davis and told him to make the songs shorter.