Matt Calabrese

3.4K posts

Matt Calabrese banner
Matt Calabrese

Matt Calabrese

@CppSage

C++ Standard Nerd; Boost evangelist; Xoogler; Argot (https://t.co/L0dolKK2yz); Poker junkie; Big and swole; Very cool/handsome.

Watertown, MA Katılım Mayıs 2014
381 Takip Edilen2.6K Takipçiler
Red Note Gaming
Red Note Gaming@RedNoteGaming·
(Card)Board at work. LOL!
Red Note Gaming tweet media
English
6
32
251
10.7K
Matt Calabrese retweetledi
Derek Dreyer
Derek Dreyer@HerrDreyer·
RIP Tony Hoare. 😢 I only met him a couple times many years ago at MSR and was not accomplished enough at the time to have much useful to say, but he sure cast a long shadow over the field...
English
17
62
336
33.8K
Matt Calabrese
Matt Calabrese@CppSage·
@yutongwu111140 Part of the motivation of generalized non-type-template-params was to avoid variadic chars for strings. You can instead do this with a char array member, a constructor, and ctad to allow for stuff like your_template<"hello">. No variadics required and less heavy for the compiler.
English
2
0
1
122
Matt Calabrese
Matt Calabrese@CppSage·
@nicbarkeragain What are you trying to "fix"? In C++ it's UB to read from the inactive member of a union (even if the inactive member is the same type as the active one). You can't read via the int if the bool is active (or neither) and you can't read via the bool if the int is (or neither).
English
0
0
4
191
Nic Barker
Nic Barker@nicbarkeragain·
The fix here is either to rearrange the union members so that the largest member is first (that way zero initting the largest member will implicitly zero the others), or just memset the union to zero using its sizeof (which will be the size of the largest member)
English
13
0
98
14K
Nic Barker
Nic Barker@nicbarkeragain·
just got bitten by an absolutely classic C/C++ bug, can you see what it is?
Nic Barker tweet media
English
73
5
363
82.7K
Matt Calabrese
Matt Calabrese@CppSage·
@Waffl3x @joseph_h_garvin @tsoding There are many advantages to making void a complete regular type. Much of the C++ standard itself needs special-cases right now because of how void is specified, as well as the standard library, user libraries, and user code.
English
0
0
1
38
Тsфdiиg
Тsфdiиg@tsoding·
The idea to name type Void as U0 in HolyC (the language of TempleOS) is kinda genius if you think about it. Its size is Zero, yes. And it is Unsigned because being Signed requires at least one bit. But the size is Zero. Checks out.
Тsфdiиg tweet media
English
94
184
4.9K
204.6K
Matt Calabrese
Matt Calabrese@CppSage·
@Waffl3x @tsoding The void type in C, C++ and other c-like languages is logically a monostate type, not an uninhabitable type. There are prvalues of type void, and functions that return void actually do return to the caller (unlike functions that have an uninhabitable return type).
English
0
0
1
190
Matt Calabrese retweetledi
ハンドパンoku
ハンドパンoku@okudrum·
時の回廊
日本語
87
3.2K
13.4K
644.4K
Tim Sweeney
Tim Sweeney@TimSweeneyEpic·
Can anyone explain soft tacos? It’s like they made a burrito except you’re supposed to pick it up, and when you do, all the stuff falls out? Am I doing it wrong?
English
729
21
1.4K
1.6M
Matt Calabrese
Matt Calabrese@CppSage·
@ofirg7 @TravisMWhitaker Callers statically prove the predicates. More generally there are properties an abstract machine can rely on and are provable but aren't checkable (even in tests) or aren't efficiently checkable. Widening a contract/doing runtime checking only superficially makes a function total
English
0
0
7
320
Travis Whitaker (hs/acc)
Travis Whitaker (hs/acc)@TravisMWhitaker·
“just pick anything not representable with types, e.g.” > something representable with types
Dragan Okanovic@abstractalgo

@kettanaito just pick anything that's not representable with types, e.g. `div` function whose divider param shouldn't be a zero. for everything that's representable with types, tests aren't needed per se.

English
6
8
333
26.8K
Jenny Nicholson
Jenny Nicholson@JennyENicholson·
I have an ongoing map of places that have animatronics, other than in theme parks - like ones in shops and restaurants and stuff. But it makes me sad because there aren't that many. Some very large dead zones
Jenny Nicholson tweet media
English
190
68
3.2K
146.8K
Matt Calabrese
Matt Calabrese@CppSage·
@ChShersh Yes, also phrases like "I'm just being pragmatic", which can be totally reasonable if correct, but is sometimes a way to rationalize an implementation that is buggy or broken yet is getting thrown into production anyway. An excuse to create technical debt while feeling justified.
English
0
0
0
59
Matt Calabrese
Matt Calabrese@CppSage·
@SonOfRostam @pikuma All of this becomes more clear if you consider a discrete universe that is not infinite, but even in a continuous one, it is not obvious that "real" numbers "exist" in the world rather than just being practical tools we use to model behaviors, much as we do with complex numbers.
English
0
0
1
68
Matt Calabrese
Matt Calabrese@CppSage·
@SonOfRostam @pikuma Where do you feel that your "square root of 2" is physically "in" the universe as opposed to just being an abstraction that you in practice will discretize at some point? Even if you stay purely inside of the mathematics, you don't need arbitrary reals to represent algebraics.
English
2
0
1
71
pikuma.com
pikuma.com@pikuma·
If your kids still believe in Santa or the Real numbers, just let them enjoy the fantasy for now...
pikuma.com tweet media
English
1
0
36
2.8K
Matt Calabrese
Matt Calabrese@CppSage·
@SonOfRostam @pikuma In other words, much of mathematics just consists of idealized abstractions that exist precisely because they can be used to accurately model systems we care about. The sets themselves are neither "real" nor "imaginary" with respect to the physical world, despite their names.
English
1
0
1
70
Matt Calabrese
Matt Calabrese@CppSage·
@SonOfRostam @pikuma Well, what makes you think that reals "exist in our world"? Arbitrary real numbers and complex numbers are practical tools used when modeling the physical world, but arbitrary reals also do not "exist" in our world in any meaningful sense whether reality is discrete or continuous
English
2
0
1
78
Matt Calabrese
Matt Calabrese@CppSage·
@TaliaRinger Same. The growing number of Round1s in the US did a lot for that, I think! Also StepManiaX! I remember when I first got into rhythm games, the arcade locator listed only 6 Pop'n Musics in the entire US. Now there are more Round1s here than states and all have several Bemani games
English
1
1
2
683
Talia Ringer 🕊
Talia Ringer 🕊@TaliaRinger·
It is amazing that in 2025 the US arcade rhythm game community is thriving. I sound ancient when I tell students I got into this in 2004, which is maybe like when some of the undergrads were born? But I am so happy this niche interest didn't fade into obscurity
English
2
1
18
843
Talia Ringer 🕊
Talia Ringer 🕊@TaliaRinger·
I want to make a formal proof rhythm game lol
English
4
1
31
1.3K