Sign in

Jonathan Müller

@foonathan.fosstodon.org.ap.brid.gy
79 followers 0 following 61 posts

C++, compilers, and programming languages. Software engineer @ LSEG, chair for std::ranges @ C++ standardization committee. 🌉 bridged from ⁂ fosstodon.org/@foonathan, follow @ap.brid.gy to interact

PostsRepliesMedia
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 03/10/2026
@pervognsen Ahh, you put the tag in the middle! :D
100
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 03/10/2026
@pervognsen What do you mean exactly?
100
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/09/2026
@pervognsen @wingo I was talking about the shrinking situation on the Rust zulip, and another story we can use is that an uncommitted reservation doesn't create an allocation, only committing. You can therefore split a reservation, decommit it entirely, and then merge it back without shrinking […]
fosstodon.org
Original post on fosstodon.org
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/09/2026
@pervognsen @wingo I don't actually now about C++ specifically in this instance, only Rust :D And growing is fine.
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/09/2026
@pervognsen @wingo But that requires you to know all the pointers to the allocation, so you can launder their provenance.
100
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/09/2026
@wingo Depending on how you do it, you also can't do it in LLVM IR. They assume that allocations don't shrink, so once you've treated the first N pages as a single allocation, you can't unmap things at the end.
100
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 18/09/2026
@pervognsen And the C++23 change is actually nice, as it gives you the C++17 behavior back, but can make code ambiguous: eel.is/c++draft/diff.cpp20.dcl
eel.is
[diff.cpp20.dcl]
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 18/09/2026
@pervognsen Happens when you introduce UTF-8 string literals before introducing a UTF-8 character type. In theory, char8_t is nice as it's guaranteed to be unsigned and not allowed to alias things, but in practice almost nothing in the standard library supports it.
110
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 06/08/2026
If and hos would you simplify this #cpp code? The code duplication is bugging me. ``` if constexpr (foo<T>) { obj.disableX(); } else if (bar(t)) { obj.disableX(); } else { obj.setX(t.x); } ``` You need an `if constexpr` for the first one, because if `foo<T>` is true, `.x` doesn't exist […]
fosstodon.org
Original post on fosstodon.org
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 20/07/2026
@PeterSommerlad You can use ^^typename std::string if you want the reflection of the type in all cases.
101
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/07/2026
RE: mastodon.social/@cppnow/11694724083… This was a really good talk.
mastodon.social
001
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 29/06/2026
@PeterSommerlad They were dropped to get quicker consensus in the NB comment process and will presumably come back in 29: www.open-std.org/jtc1/sc22/wg21/doc…
100
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 18/06/2026
Current status: rsync'ing .git folders to a remote machine. Because that's how version control works, right?
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 26/05/2026
C++, the programming language where a hypothetical proposal titled "Make <meta> constexpr" would actually add support for runtime reflection.
011
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 12/05/2026
"The problem is that the docs system is writing in Sphinx, and I don't know any Sphinx" - "Yeah, the people who set it up left." - "You mean, they were left in the pyramids after completion."
010
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 11/05/2026
The state of tech 2026 is best amplified by "The company travel booking tool keeps randomly redirecting to Microsoft Copilot 365 because something in the SSO is broken."
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 14/04/2026
Time since the last timezone bug: -2 hours.
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 18/03/2026
RE: mastodon.social/@cppnow/11625083133… I'll be there, hope to see you too!
mastodon.social
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 14/03/2026
There's a reason that in German you don't check your bag, you do "Gepäck aufgeben", which literally means "give up your bag".
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 14/03/2026
Apparently, even though you are at an airport, your checked bags are somewhere on a conveyor belt at the airport, and you have a rebooked flight to your destination, there's nothing the baggage tracking office can do to ensure that your bag also makes it to the destination on that flight. You […]
fosstodon.org
Original post on fosstodon.org
100
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 13/03/2026
The big three US airlines are United, Delta, and American. Missed opportunity for Delta to call itself States.
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 11/03/2026
RE: mastodon.social/@Sdowney/1162102843… And I'll be talking about allternatives, contravariant functors, and lenses!
mastodon.social
000
Reposted by Jonathan Müller
Niki @nikitonsky.mastodon.online.ap.brid.gy · 03/03/2026
Gotta give it to Claude Code developers: they are exceptionally brave. I would’ve been straight up embarrassed to show stats like this. Reminder: Claude Code is a thin CLI client that reads input from your terminal, sends it to Antrhopic servers and prints back the response.
Tweet by @trq212 about Claude Code rendering scene graph in 11 ms and printing it to terminal in 5 msTweet by @jarredsumner about Claude Code memory usage growing from 10 Gb in January to 68 Gb to 1.7 Gb now
71740
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 16/02/2026
@pervognsen I watched a talk once where the speaker asked for questions and said "and remember: a question is when you want more information from me".
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/12/2025
Reddit blog post discussing a problem. Commenter A: Can't you just do X? Commenter B:: No, because Y. Commenter A: But if you do X, then Z happens, so Y shouldn't be an issue. I didn't read the blog post. Commenter B: As the blog post explains, Z does not happen!
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/11/2025
@vitaut Feels like -0°.
Screenshot of a weather app, the temperature is 4° but it feels like -0°.
010
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 08/11/2025
RE: fosstodon.org/@foonathan/1154968336… Thankfully not, after all.
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 08/11/2025
Achievement unlocked: if consteval { if constexpr (foo) { if (bar) { throw error; } } }
000
Reposted by Jonathan Müller
dgelessus @dgelessus.mastodon.social.ap.brid.gy · 05/11/2025
when compiling C code, enable the -fPIE option to compile to Proto-Indo-European, for maximum compatibility with all CPU architectures developed on the Eurasian continent
35034
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 05/11/2025
From the standardization committee that brought you keywords such as `co_return`, `decltype`, and `reinterpret_cast`, now for your consideration: `trivially_relocatable_if_eligible` and `replacable_if_eligible`! C++ - you're gonna need a bigger column limit.
121
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 22/10/2025
I'm hoping a cobus is enough like a bus in that it gets me to my destination.
Photo of a sign in a bus saying the name of the manufacturer/model:

cobus 3000
100
Reposted by Jonathan Müller
Markus Werle @markuswerle.nrw.social.ap.brid.gy · 28/08/2025
As co-organizer of the C++ User Group #Aachen, I am thrilled to announce our program for next Wednesday, September 3, 2025. We will meet at SLB starting at 6:30 p.m., and the talks will begin at 7:00 p.m.. If possible, please pre-register at […] [Original post on nrw.social]
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 21/08/2025
However, a) the bitcode is bit-aligned, not byte aligned, so the slice is more awkward than necessary, and b) the first entry of the type block needs to specify the number of entries in the byte block. This is encoded as a variable length integer. So after you've encoded all the types and now […]
fosstodon.org
Original post on fosstodon.org
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 21/08/2025
LLVM bitcode is not good designed if you want to generate it efficiently. For example, you need to define all types that a module is using without duplicates. This is easily done with a hash table and ideally you could use the binary serialization as key: Serialize into a buffer, do lookup in […]
fosstodon.org
Original post on fosstodon.org
110
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 19/08/2025
Another day, another #if 0 ... #endif bisect to find the code that crashes MSVC.
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 17/08/2025
Got tired of linking with LLVM so I've written something to emit bitcode directly. The blocks and records are conveniently defined in a little X macro file which then is used to stamp out a fully type safe builder API.
X Macro definition file:

//=== identification block ===//
LLVM_BC_DEFINE_BLOCK (IDENTIFICATION, 13)

LLVM_BC_DEFINE_RECORD (IDENTIFICATION, STRING, 1, (String, str))
LLVM_BC_DEFINE_RECORD (IDENTIFICATION, EPOCH, 2, (llvm_BcEpoch, epoch))

//=== module block ===//
LLVM_BC_DEFINE_BLOCK(MODULE, 8)

LLVM_BC_DEFINE_RECORD (MODULE, VERSION, 1, (llvm_BcModuleVersion, version))
LLVM_BC_DEFINE_RECORD (MODULE, SOURCE_FILENAME, 16, (String, name))

Usage example of the API:

auto identification = llvm_bc_block(IDENTIFICATION, ctx, memory.task);
{
    llvm_bc_record(
        IDENTIFICATION_STRING, ctx, identification, memory.task, .str = zstring("my-producer")
    );
    llvm_bc_record(
        IDENTIFICATION_EPOCH, ctx, identification, memory.task, .epoch = LLVM_BC_EPOCH
    );
}

auto module = llvm_bc_block(MODULE, ctx, memory.task);
{
    llvm_bc_record(MODULE_VERSION, ctx, module, memory.task, .version = LLVM_BC_MODULE_VERSION);
    llvm_bc_record(MODULE_SOURCE_FILENAME, ctx, module, memory.task, .name = zstring("input"));
}

llvm_bitcode(ctx, memory.task, identification, module, out);
010
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 18/07/2025
@vitaut I've got a good chuckle when I saw that I contributed to the "hello world foundation" algora.io/profile/foonathan
algora.io
foonathan | Algora
Algora connects companies and engineers for full-time and contract work
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 11/07/2025
@maybeanerd Thanks! You can find the slides of an extended version here: www.jonathanmueller.dev/talk/functi…
jonathanmueller.dev
Jonathan Müller
000
Reposted by Jonathan Müller
maybeanerd @maybeanerd.bumscode.com.ap.brid.gy · 11/07/2025
Enjoyed the talk by @foonathan at #weAreDevelopers on how to do functional programming in C++ a lot I don't even use C++, but it was so well presented that I felt I still understood
Jonathan on stage answering questions from the aduience
111
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 02/07/2025
Today I rebased my stuff after spending two weeks on conferences only to discover that we've introduced an `use_iter_move_on_xvalue_dereference_index` customization point.
010
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 23/06/2025
Can anybody I know invite me to lobste.rs?
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 04/06/2025
I've used the `*---*x` operator today.
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 29/05/2025
I've tagged a new release of lexy, my C++ parser library. The last release was December 2022, so this was long overdue: github.com/foonathan/lexy #cpp #cplusplus
github.com
GitHub - foonathan/lexy: C++ parsing DSL
C++ parsing DSL. Contribute to foonathan/lexy development by creating an account on GitHub.
001
Reposted by Jonathan Müller
Christian Lawson-Perfect @christianp.mathstodon.xyz.ap.brid.gy · 29/05/2025
When you finish writing your parser
A sign saying "end of token section"
1510
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 24/04/2025
I love how fixing audio issues on various linux devices has become as simple as `pacman -S pipewire-pulse` or `pacman -S pipewire-alsa`.
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 24/04/2025
Next week, I'm going to be attending C++Now, and I'm going to be giving my two favorite talks of all time: First, a repeat of my "Overenginering max(a, b)" talk, which is just a bunch of fun metaprogramming to solve a safety problem. Then, a new talk "Missing (and future?) range concepts" […]
fosstodon.org
Original post on fosstodon.org
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 12/03/2025
I'm going to be speaking about missing and potentially future C++ range concepts at C++Now: schedule.cppnow.org/session/2025/mi… #cpp #cplusplus
schedule.cppnow.org
Missing (and Future?) C++ Range Concepts – C++Now Schedule
010
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 09/03/2025
For example, I have an X macro file containing stuff like DATA(Foo, (int, a), (float, f)) which generates both struct definitions and JSON serialization code of the form: json_object_begin(out); json_object_key(out, "a"); json_int(out, foo.a); json_object_key(out, "b"); json_float(out, foo […]
fosstodon.org
Original post on fosstodon.org
000
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 09/03/2025
And of course, I'm utterly abusing X macros, preprocessor tricks, and _Generic. Because a good C++ programmer, can write C++ in any language.
100
Jonathan Müller @foonathan.fosstodon.org.ap.brid.gy · 09/03/2025
I've been programming in C for a small project, a couple of thoughts: * -Wimplicit-fallthrough isn't enabled by -Wall -Wextra in clang, which has bitten me. * I got tired of `Foo foo = (foo)x`, so I'm using C23 and auto, sorry, not sorry. * I spend a lot less time thinking about interface […]
fosstodon.org
Original post on fosstodon.org
100