Eric Bouchard

@ocitrev
22 Followers
101 Following
16 Posts
How do you pronounce it?
(pls boost for reach)
“GIF”
48.7%
‘’GIF’’
51.3%
Poll ended at .

Just realised that on Mastodon, boosting *is* the algorithm.

There's no code trying to cleverly show me stuff it reckons I'd be into, based on what my contacts are into, instead my contacts are saying "I like this, I bet my contacts would like it too" and that is way smarter than any algorithm.

Thank you, boosters!

The more you understand computers, the more you value systems without them.

The typical use case for the [[nodiscard]] attribute is marking functions whose return value shall not be ignored.

However, we can also apply the [[nodiscard]] attribute to constructors and even entire types.

At a minimum, constructors that acquire a resource and types that represent error states should be marked with [[nodiscard]].

Compiler Explorer link: https://compiler-explorer.com/z/KGracjxv7

#cpp #cplusplus #coding #programming #dailybiteofcpp

Compiler Explorer - C++

void acquire_resource() {} void release_resource() {} struct ResourceHandle { // Nodiscard constructor [[nodiscard]] ResourceHandle() { acquire_resource(); }; ~ResourceHandle() { release_resource(); } }; // Nodiscard type struct [[nodiscard]] Error {}; // nodiscard not needed, since Error is a nodiscard type Error function() { return {}; } int main() { // warning: ignoring return value // of 'ResourceHandle::ResourceHandle()', // declared with attribute 'nodiscard' ResourceHandle{}; // resource acquired and immediately released // warning: ignoring returned value of type 'Error', // declared with attribute 'nodiscard' function(); // ignoring Error }

I put together a meme

If someone gave you a music CD, do you have anything to listen to it on (not necessarily including ripping it)?

[Apparently "not necessarily" means different things to folks. I mean: devices capable of ripping but also devices not capable of it. Can you listen to a music CD?]

Please boost to reach a wide audience.

[Poll Over.]

Yes
81.5%
No
18.5%
Poll ended at .

try "curl pkmn.li"

(via @glow )

the gaps between floats

That kind of *is* my point. It feels frankly pretty gross to me to essentially say "wealthy homeowners can buy their way out of higher power bills" but the catch 22 is that if you don't offer at least some decent chunk of cash, nobody would do this.

It's, as I said many a time, thorny. And that's why I'm not gung-ho on it, which I imagine might surprise some folks.

I just have a hard time seeing how to make it not perpetuate inequality, and over-incentivizing could harm the grid.

I've completed "Rucksack Reorganization" - Day 3 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/3
Day 3 - Advent of Code 2022