Eric Niebler's Avatar

Eric Niebler

@ericniebler.com

C++ core compute libraries tech lead at @nvidia, husband, father, @isocpp member, former nomad, and sometimes artist wannabe. opinions are my own he/him

1,128
Followers
82
Following
207
Posts
11.05.2023
Joined
Posts Following

Latest posts by Eric Niebler @ericniebler.com

Refreshing your .clang-format feels a bit like rearranging the furniture in your living room. It's the same old stuff in the same old room, but somehow it feels new.

20.02.2026 23:59 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

Same. I like the cut of JB Pritzker's jib.

14.02.2026 17:05 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

THIS

30.01.2026 22:56 ๐Ÿ‘ 10 ๐Ÿ” 2 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

I was a regular at a pho place on Capitol Hill. I would walk in, the guy would nod and mumble "pho ga", and the bowl would be in front of me before I could find my place in my book.

15.01.2026 06:06 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

yes, gcc and clang will both get it "wrong" in situations. there's something fishy going it. it *may* have something to do with recursive template instantiations, but that's a shot in the dark.

10.01.2026 03:19 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
An implementation of std::conditional_t that only instantiates two class templates.

An implementation of std::conditional_t that only instantiates two class templates.

I have my own version of std::conditional_t, implemented to instantiate fewer class templates (attached).

The weird thing is, I have encountered scenarios where my conditional_t picks the wrong branch, whereas std::conditional_t picks the right one. This baffles me.

Am I crazy?

09.01.2026 23:10 ๐Ÿ‘ 3 ๐Ÿ” 1 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0
C++ Standard Adventure - cppevo Explore the C++ standard as an interactive text adventure game. Navigate between C++ eras, collect knowledge, and learn the language.

I've built a text adventure game engine on top of the C++ Standard. Why? I have no idea. But it's a learning tool with quests and time travel and artifacts and NPC's and XP and ... well, you just have to check it out!

cppevo.dev/adventure

12.12.2025 00:22 ๐Ÿ‘ 45 ๐Ÿ” 14 ๐Ÿ’ฌ 3 ๐Ÿ“Œ 0

I've put this little type-erasure library on github for safe-keeping. github.com/ericniebler/...

28.12.2025 18:41 ๐Ÿ‘ 9 ๐Ÿ” 2 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

godbolt.org/z/avMYaTor8

I love how clang just optimizes the whole thing away.

24.12.2025 02:21 ๐Ÿ‘ 6 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

The trick is that any::interface<ifoo, Model> inherits from Model. any::any<ifoo> builds a clever model, instantiates ifoo with it, and inherits from the result.

24.12.2025 02:19 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
a screenshot of an editor showing a snippet of code that defines an interface, and a type that models the interface non-intrusively, and a type named `any` that is parameterized on the interface and that stores the model while erasing its type.

a screenshot of an editor showing a snippet of code that defines an interface, and a type that models the interface non-intrusively, and a type named `any` that is parameterized on the interface and that stores the model while erasing its type.

No Advent of Code for me. Instead, I've used the break to write the type-erasure library I have always wanted.

C++ doesn't make it easy to have both dynamic polymorphism *and* value semantics, but this little utility does!

Interfaces can extend other interfaces, and it works in consteval, too. ๐Ÿคฉ

24.12.2025 01:25 ๐Ÿ‘ 20 ๐Ÿ” 6 ๐Ÿ’ฌ 4 ๐Ÿ“Œ 1

... tuned to a "golden oldies" AM radio station

23.12.2025 21:18 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

He uses double-check locking.

21.12.2025 17:53 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

That was the first movie where I realized Brad Pitt could actually act.

01.12.2025 02:25 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

it was a graduate level class in the english department. we were two undergraduate engineering students and a pre-med. as it turns out, english post-docs are not actually better at learning Old Icelandic than STEM undergraduates.

25.11.2025 21:47 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

yes, c++26 will not come with a dedicated standard algorithm for splits, but the same effect can be achieved with a let_value where the lambda returns a when_all.

25.11.2025 21:39 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I took a semester of Old Icelandic in college with a couple of friends. We had no idea what we were committing to.

25.11.2025 21:32 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

split is tricky to use correctly, which is why it was removed from C++26. this part of the design needs more bake time.

23.11.2025 19:48 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Also, don't put a schedule operation in a split. split runs an operation once and caches the results. All paths besides the first will just get the results, not the side-effect of changing execution contexts.

23.11.2025 18:03 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

If you want, you can try the fix-alg-customization branch in my fork. I'd like to know if it would have avoided the problem.

23.11.2025 17:55 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Best I've found is to break the problem up into parts that can be tested independently. Start with a very simple sender expression, static_assert everything you can, and grow the expression until the problem appears. Hopefully that gives enough context to understand the issue.

22.11.2025 23:55 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

The difference this time is that the bubble is taking longer to pop than he is able to stay solvent.

20.11.2025 21:24 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Fix or Remove Sender Algorithm Customization

Are you using stdexec? I'm currently implementing the proposed resolution of P3826, which should fix a lot of algorithm dispatch woes.

ericniebler.github.io/wg21/P3826.h...

20.11.2025 21:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Great, so who do we buy this awesome, affordable insurance from? Bus drivers?

09.11.2025 07:10 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Mr Incredible and his boss

Mr Incredible and his boss

Also

02.11.2025 22:58 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Video thumbnail
02.11.2025 17:42 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Film poster for Short Circuit (1986)

Film poster for Short Circuit (1986)

31.10.2025 19:55 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
12s - Wikipedia

en.wikipedia.org/wiki/12s

25.10.2025 01:11 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Twiki and Dr Theopolis from Buck Rogers

Twiki and Dr Theopolis from Buck Rogers

23.10.2025 01:49 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Crazy theory meme

Crazy theory meme

21.10.2025 23:47 ๐Ÿ‘ 6 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0