@vitaut I've got a good chuckle when I saw that I contributed to the "hello world foundation"
https://algora.io/profile/foonathan
@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/ ]
@vitaut I've got a good chuckle when I saw that I contributed to the "hello world foundation"
https://algora.io/profile/foonathan
@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 📌 0Jonathan 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
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 📌 0Can anybody I know invite me to lobste.rs?
23.06.2025 08:33 — 👍 0 🔁 0 💬 0 📌 0I've used the `*---*x` operator today.
04.06.2025 19:54 — 👍 0 🔁 0 💬 0 📌 0I'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
A sign saying "end of token section"
When you finish writing your parser
29.05.2025 11:59 — 👍 5 🔁 10 💬 1 📌 0I 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 📌 0Next 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" […]
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
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 […]
And of course, I'm utterly abusing X macros, preprocessor tricks, and _Generic.
Because a good C++ programmer, can write C++ in any language.
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 […]
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 […]
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
@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 📌 0I will be giving a keynote about functional programming at @cpponline!
https://cpponline.uk/keynote-spotlight-functional-programming-in-cpp/
#cpp #cplusplus
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
I will be giving a keynote about functional programming in C++ @ @cpponline:
https://cpponline.uk/session/2025/functional-programming-in-cpp/
#cpp #cplusplus #functional
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 […]
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 📌 0Current status: Wishing the C preprocessor had lambdas to pass to a PP_FOR_EACH macro.
Reflection can't get here soon enough.
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
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 📌 0Days since the last clang stack overflow due to high nesting of range adaptors: 0
10.12.2024 14:09 — 👍 0 🔁 0 💬 0 📌 0Company 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.
"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 📌 0I'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
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 […]