In my country, high-schools that teach CS teach (a bastardization of) C++ during second grade.
I think it has to do with the fact that it’s close enough to C that starting with it teaches some of the same basic concepts, while having some QOL that a high-school teacher can’t be bothered to do without.
Of course they drop the language after teaching extremely basic algorithms, such as computing the maximum of an arbitrary set of numeric arguments. At that point, why deal with the hundreds of beginner pitfalls of C++ when C would be way less headache-inducing?
I saved this post hoping for a useful answer, alsa alas, there seems to be none.
I’m not an audiophile so I’m more or less spreading misinformation, but I think you’re looking to configure ALSA’s device gain rather than going through pipewire.
kusivittula
here mentioned alsamixer
, and I found a StackExchange answer saying that you can save its current state using alsactl store
(with sudo
or write access to /var/lib/alsa/asound.state
).
Alternatively, you can edit /var/lib/alsa/asound.state
yourself.
It doesn’t work if your problem involves audio streams (so *I* am SOL), but making changes through alsamixer seems to lower my headset’s volume so that I can comfortably set it to 100% through wireplumber - I imagine that would also apply to mic gain.
I think GNOME’s filechooser is the GTK one (never used it so I’m not sure), mine looks like this:
It’s entirely possible that Firefox changed and now uses XDG portals by default, I configured it like this a long time ago.
As for how to configure it, I honestly don’t know.
It was a combination of messing with widget.use-xdg-desktop-portal
on about:config, and changing XDG envvars and dotfiles; both by following several conflicting Reddit and bbs.archlinux.org posts.
XDG portal filechooser for Firefox: the KDE implementation uses Dolphin, which is full of features and I use most of them; the default GTK one is mildly infuriating to use and looks ugly too, but getting the browser to use the portal I want was a nightmare - especially since GTK discontinued the GTK_USE_PORTAL envvar.
The related Firefox config entries make no sense either.
I imagine reflections would make the process more straightforward, requires expressions are powerful but either somewhat verbose or possibly incomplete.
For instance, in your example foo
could have any of the following declarations in a class:
void foo();
int foo() const;
template <typename T> foo(T = { }) &&;
decltype([]() { }) foo;
Defining the return type that way can be used when dealing with template sorcery - there’s no use for it here though, not even for readability in any way.