Jonathan Müller's Avatar

Jonathan Müller

@foonathan.fosstodon.org.ap.brid.gy

C++, compilers, and programming languages. Library developer @ think-cell, chair for std::ranges @ C++ standardization committee. [bridged from https://fosstodon.org/@foonathan on the fediverse by https://fed.brid.gy/ ]

66 Followers  |  0 Following  |  28 Posts  |  Joined: 25.11.2024  |  1.3595

Latest posts by foonathan.fosstodon.org.ap.brid.gy on Bluesky

Preview
foonathan | Algora Algora connects companies and engineers for full-time and contract work

@vitaut I've got a good chuckle when I saw that I contributed to the "hello world foundation"

https://algora.io/profile/foonathan

18.07.2025 08:23 — 👍 0    🔁 0    💬 0    📌 0
Jonathan Müller

@maybeanerd Thanks! You can find the slides of an extended version here: https://www.jonathanmueller.dev/talk/functional/

11.07.2025 09:43 — 👍 0    🔁 0    💬 0    📌 0
Jonathan on stage answering questions from the aduience

Jonathan on stage answering questions from the aduience

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

11.07.2025 09:39 — 👍 1    🔁 1    💬 1    📌 0

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.

02.07.2025 10:21 — 👍 1    🔁 0    💬 0    📌 0

Can anybody I know invite me to lobste.rs?

23.06.2025 08:33 — 👍 0    🔁 0    💬 0    📌 0

I've used the `*---*x` operator today.

04.06.2025 19:54 — 👍 0    🔁 0    💬 0    📌 0
Preview
GitHub - foonathan/lexy: C++ parsing DSL C++ parsing DSL. Contribute to foonathan/lexy development by creating an account on GitHub.

I've tagged a new release of lexy, my C++ parser library. The last release was December 2022, so this was long overdue:

https://github.com/foonathan/lexy

#cpp #cplusplus

29.05.2025 18:29 — 👍 0    🔁 1    💬 0    📌 0
A sign saying "end of token section"

A sign saying "end of token section"

When you finish writing your parser

29.05.2025 11:59 — 👍 5    🔁 10    💬 1    📌 0

I love how fixing audio issues on various linux devices has become as simple as `pacman -S pipewire-pulse` or `pacman -S pipewire-alsa`.

24.04.2025 19:28 — 👍 0    🔁 0    💬 0    📌 0
Original post on fosstodon.org

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" […]

24.04.2025 15:55 — 👍 0    🔁 0    💬 0    📌 0
Missing (and Future?) C++ Range Concepts – C++Now Schedule

I'm going to be speaking about missing and potentially future C++ range concepts at C++Now:

https://schedule.cppnow.org/session/2025/missing-and-future-c-range-concepts/

#cpp #cplusplus

12.03.2025 10:33 — 👍 1    🔁 0    💬 0    📌 0
Original post on fosstodon.org

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 […]

09.03.2025 15:44 — 👍 0    🔁 0    💬 0    📌 0

And of course, I'm utterly abusing X macros, preprocessor tricks, and _Generic.

Because a good C++ programmer, can write C++ in any language.

09.03.2025 15:35 — 👍 0    🔁 0    💬 1    📌 0
Original post on fosstodon.org

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 […]

09.03.2025 15:34 — 👍 0    🔁 0    💬 1    📌 0
Original post on fosstodon.org

I published my trip report about the Hagenberg meeting last week: https://www.think-cell.com/en/career/devblog/trip-report-winter-iso-cpp-meeting-in-hagenberg-austria

It was pointed out to me that I was wrong about the potential for dangerous optimizations with contracts and ODR. It is in fact […]

28.02.2025 10:07 — 👍 1    🔁 0    💬 0    📌 0
Preview
Trip Report: Winter ISO C++ Meeting in Hagenberg, Austria | think-cell

I've written a trip report about last week's C++ committee meeting in Hagenberg, Austria

https://www.think-cell.com/en/career/devblog/trip-report-winter-iso-cpp-meeting-in-hagenberg-austria

#cpp #cplusplus

21.02.2025 09:31 — 👍 2    🔁 0    💬 0    📌 0

@dascandy I'd remove references. Add parameter passing mode, and some sort of variant for Hylos subscripts to handle operator[] and operator* and the language would become significantly simpler.

17.02.2025 13:03 — 👍 0    🔁 0    💬 0    📌 0
Preview
Keynote Spotlight - Functional Programming in C++ By Jonathan Müller - C++Online

I will be giving a keynote about functional programming at @cpponline!

https://cpponline.uk/keynote-spotlight-functional-programming-in-cpp/

#cpp #cplusplus

13.02.2025 14:15 — 👍 1    🔁 0    💬 0    📌 0
Meetup #10
Tuesday 4 February 2024 Maijansali, Oodi Helsinki Central Library Doors: 17:00 Talks start: 18:00
Sponsored by: think-cell

Main talk:Jonathan Müller “Overengineering max (a, b) Mixed comparison functions, X common references, and Rust's lifetime annotations”

Meetup #10 Tuesday 4 February 2024 Maijansali, Oodi Helsinki Central Library Doors: 17:00 Talks start: 18:00 Sponsored by: think-cell Main talk:Jonathan Müller “Overengineering max (a, b) Mixed comparison functions, X common references, and Rust's lifetime annotations”

I'm going to be speaking at the C++ meetup in Helsinki on February 4th!

Overengineering `max(a, b)`: Mixed Comparison Functions, Common References, and Rust's Lifetime Annotations

https://www.meetup.com/cpphelsinki/events/305683323/?eventOrigin=group_upcoming_events

#cpp #cplusplus

24.01.2025 09:24 — 👍 2    🔁 0    💬 0    📌 0
Keynote: Functional Programming in C++ - C++Online Functional programming is a declarative way of writing programs by composing functions. In many situations, this can lead to code that is easier to write and understand and less error-prone. However, it requires a shift to a more functional mindset. This talk gives an introduction to functional programming in C++ using the modern standard library. […]

I will be giving a keynote about functional programming in C++ @ @cpponline:

https://cpponline.uk/session/2025/functional-programming-in-cpp/

#cpp #cplusplus #functional

15.01.2025 16:16 — 👍 1    🔁 1    💬 0    📌 0
Original post on fosstodon.org

I've also liked the complete lack of self-awareness in this exchange:

A: You can't write an OS in Rust.
B: Sure, you can. [...]
A: No you can't, I hate being lectured by clueless Rust fanboys.
B: You could have googled and found redox.
A: [moving the goal post]. Post your fake projects over at […]

09.01.2025 10:27 — 👍 0    🔁 0    💬 0    📌 0

FYI: "advertisement for other languages" isn't a valid reason to report a post on r/cpp.

09.01.2025 10:26 — 👍 0    🔁 0    💬 1    📌 0

Current status: Wishing the C preprocessor had lambdas to pass to a PP_FOR_EACH macro.

Reflection can't get here soon enough.

18.12.2024 17:58 — 👍 0    🔁 0    💬 0    📌 0
Picture of the code from the godbolt link

Picture of the code from the godbolt link

I've found a cool idiom for tagged unions of aggregates: Give each aggregate member a tag defaulted to the correct kind. That way, when you use designated initializers to construct the object, it will be automatically initialized correctly.

https://godbolt.org/z/MYE91hGY6

#cpp #cplusplus

18.12.2024 17:22 — 👍 1    🔁 0    💬 0    📌 0

Go is a programming language with a strange property: The more I learn about it over the years, the less I like it.

12.12.2024 21:23 — 👍 0    🔁 1    💬 0    📌 0

Days since the last clang stack overflow due to high nesting of range adaptors: 0

10.12.2024 14:09 — 👍 0    🔁 0    💬 0    📌 0

Company Christmas party, CEO is giving a retrospective of the year: "We have gained X new customers, closed Y tickets, and reported 25 compiler bugs!"

Shoutout to MSVC, couldn't do it without you.

05.12.2024 10:23 — 👍 1    🔁 0    💬 0    📌 0
Original post on fosstodon.org

"profiles are very easy to sell. They reassure people who don’t care about safety that they don’t have to, and they reassure everyone else that there is a path forward. And we can blame users or implementers when it ultimately fails to have a meaningful impact" […]

02.12.2024 19:11 — 👍 1    🔁 0    💬 1    📌 0

I've written a trip report about the recent ISO C++ committee meeting: https://www.think-cell.com/en/career/devblog/trip-report-fall-iso-cpp-meeting-in-wroclaw-poland

#cpp #cplusplus

29.11.2024 11:41 — 👍 7    🔁 2    💬 0    📌 0
Original post on fosstodon.org

We've got a new copy editor at work and he's great:

> I expected this rejection: LEWG, the group responsible for designing the standard library, is historically not really sympathetic to people who don't want to use the standard library, but I am still disappointed.{{#Copy editor: That sucks […]

29.11.2024 08:50 — 👍 1    🔁 0    💬 0    📌 0