Evan Teran

127 posts

Evan Teran

Evan Teran

@evan_teran

Katılım Ekim 2010
394 Takip Edilen129 Takipçiler
Evan Teran
Evan Teran@evan_teran·
@Nekrolm @seanbax The results of new do not need to be checked. It will throw an exception if it somehow fails.
English
1
0
0
44
Evan Teran
Evan Teran@evan_teran·
@supahvee1234 I think @lefticus has an episode about this but can't remember the title. IIRC, there is a solution, but it's not pretty.
English
1
0
0
103
Evan Teran
Evan Teran@evan_teran·
@supahvee1234 It's on github in a private repo, DM me and we can talk giving you access :-)
English
0
0
0
100
Vittorio Romeo
Vittorio Romeo@supahvee1234·
Should I create a set of extremely lightweight single-header alternatives for common Standard Library utilities such as `std::unique_ptr`, `std::optional`, and `std::variant` maximizing compilation time and debug performance? #cpp #gamedev
English
15
0
19
6.2K
Evan Teran
Evan Teran@evan_teran·
@wakomeup @ericniebler Tuple is usually done with trickery like structs which contain a elem and a struct for the next elem, and so on. It could be much better with a builtin. I suppose a compiler could make it emit something compatible with existing practice, seems like less of a win though :shrug:
English
1
0
0
15
@jw@mastodon.social 🫖
@[email protected] 🫖@wakomeup·
@evan_teran @ericniebler Why would it be an ABI change? You'd just implement the built-in to be compatible. It would mean picking *which* library implementation to be compatible with, but there's an obvious choice for each compiler to implement its own tuple, i.e. gcc:libstdc++, clang:libc++, MSVC: MSVC.
English
1
0
1
35
@ericniebler.bsky.social
@ericniebler.bsky.social@ericniebler·
I am mystified why no mainstream C++ compiler has implemented a `__builtin_tuple` extension yet. `std::tuple` is a compile-time piggie. Oink.
English
11
1
71
10.1K
Evan Teran
Evan Teran@evan_teran·
@GoldonMarks @lefticus It absolutely CAN figure it out. The argument given is usually about if you see it, it's a promise from the writer that it WILL be constexpr, not that it can be if the compiler decides it can.
English
0
0
3
85
Goldon Marks
Goldon Marks@GoldonMarks·
@lefticus why can't the compilers figure the constexpr out themselves, it's not funny to type specifiers anymore.
English
3
0
8
1.3K
Jason Turner
Jason Turner@lefticus·
At my C++ meetup's social hour. Me: <looks up> 4 people looking at me. Me: umm... Them: this new guy just asked what the point of constexpr is
English
6
2
141
14.7K
Evan Teran
Evan Teran@evan_teran·
@seanbax Yeah, if the transform is aware of the f-string syntax, it could work for arbitrarily complex ones and "just work" hopefully.
English
0
0
0
12
Evan Teran
Evan Teran@evan_teran·
@seanbax If you're asking for a PR... I can take a look when I have some free time 😜. But yeah, I'm just thinking that "hello {var}" could be transformed into std::format("hello {}", var) 👍 at compile time
English
2
0
1
54
Sean Baxter
Sean Baxter@seanbax·
Do I want to work on fstrings/fmt or mutex next? On the one hand, fstrings makes a scary lambda. On the other hand, that UnsafeCell/Send/Sync stuff is quite confusing.
English
7
1
11
2.6K
Evan Teran
Evan Teran@evan_teran·
@cmuratori I see your point, but there is a reason. Having the fields separate means that when your CC gets renewed vendors who have your # on file and only stored the 16 digits + a token they got from the initial auth can continue to charge it without the needing to update the info.
English
0
0
0
227
Casey Muratori
Casey Muratori@cmuratori·
I like how credit cards are ostensibly 16 numbers, but we now use both expiration dates and CVV codes for authentication, so they're actually 23-digit numbers you have to enter in three different fields for no reason whatsoever.
English
40
41
1.1K
91.1K
Evan Teran
Evan Teran@evan_teran·
@janwilmans @lefticus @mattgodbolt Was about to chime in that it really shouldn't be a "law" as written, more of a "I should make sure that I didn't break anything" checkpoint. But you covered that in your follow up 👍
English
0
0
4
89
C++ Coach / @janwilmans.bsky.social
@lefticus @mattgodbolt Isn't this easily disproven by algorithmic changes? let's say you run through a picture y-first and you flip the inner and outer loop to go x-first. Suddenly your cache kicks into high gear and auto vectorization is triggered. I think I have seen 2-20x speedups this way?
English
2
0
5
1.3K
Evan Teran
Evan Teran@evan_teran·
@atorstling @awesomekling Interesting, I have a completely opposite take. To me "we" says, I think the team/you should do this, and I'm willing to support helping make it happen. Saying "you" is what I say to people subordinate to me when giving tasking.
English
1
0
0
61
Alexander Torstling
Alexander Torstling@atorstling·
@awesomekling This formulation is really common, but it's really getting on my nerves. People expressing opinions as questions isn't really helping IMO, they're not being transparent. I would vastly prefer: "My gut feeling is that this should be made reusable, did you already consider that?"
English
2
0
4
399
Evan Teran
Evan Teran@evan_teran·
@PMHomestead @NBCNews That's an excellent question. The answer is mostly because Bill Clinton didn't do the same thing at all. Clinton paid a settlement as a matter of public record. No business records were falsified in the process, no funds were misappropriated.
English
1
1
12
441
Pine Mountain Homestead
Pine Mountain Homestead@PMHomestead·
@NBCNews I was wondering why Bill Clinton hadn't been charged when he did the same thing but while in office.
English
16
0
29
17.2K
NBC News
NBC News@NBCNews·
BREAKING: NBC News Special Report: Manhattan District Attorney Alvin Bragg holds news conference following arraignment of former President Trump. x.com/i/broadcasts/1…
English
82
83
260
170.1K
https://mastodon.social/@vitaut
The best minds of our generation are thinking how to make std::decay compile faster in C++.
English
8
2
91
7.5K
Evan Teran
Evan Teran@evan_teran·
@meheleventyone @supahvee1234 @nicbarkeragain @cmuratori Also Casey's final code IMHO actually meets the criteria for most of the "clean code" principles he says he's avoiding. His final code: avoided ifs, was small, did one thing, and didn't repeat itself. Basically ALL of the non simd gains could have been seen with std::variant
English
1
0
2
35
Nic Barker
Nic Barker@nicbarkeragain·
I think the key thing people are missing about @cmuratori ‘s “clean code” video is that there is a _measurable_ performance loss for a _non measurable_ maintainability gain. All the assertions of increased maintainability of “clean code” are just based on ~vibes~
English
4
9
107
7.8K