This shouldn't need to be a macro in a library. I'm glad that the Wine folks wrote it, but it shouldn't have to be up to library authors to make sure that a for-each loop works correctly.
Conversation
Notices
-
Embed this notice
Cassandra Granade 🏳️⚧️ (xgranade@wandering.shop)'s status on Thursday, 19-Dec-2024 03:35:33 JST Cassandra Granade 🏳️⚧️
-
Embed this notice
Cassandra Granade 🏳️⚧️ (xgranade@wandering.shop)'s status on Thursday, 19-Dec-2024 03:37:04 JST Cassandra Granade 🏳️⚧️
At the *very* least, it should be the case that correct for-each functionality can be a library itself that other programs and libraries can depend on, instead of each individual library having to reimplement basic language features.
-
Embed this notice
Cassandra Granade 🏳️⚧️ (xgranade@wandering.shop)'s status on Thursday, 19-Dec-2024 04:13:54 JST Cassandra Granade 🏳️⚧️
This is the kind of shit I mean when I say that C/C++ is a kind of hazing ritual: yes, for a project at the scale of Wine, you can make it safe by writing all the right macros, turning on all the right lints, and vendoring all the right libraries, but it takes a lot of work to get there.
If you don't put in the work, things will seem to compile and run OK, but with a lot higher risk of surprising and difficult bugs.
C and C++ don't work correctly *by default*, and that creates a barrier.
-
Embed this notice
Cassandra Granade 🏳️⚧️ (xgranade@wandering.shop)'s status on Thursday, 19-Dec-2024 04:16:08 JST Cassandra Granade 🏳️⚧️
One could argue the same is true of other languages as well. The whole Python `def f(x = []): x.append("foo")` problem is absolutely the language not being safe by default, and in a surprising way. Yes, the logic makes perfect sense once you're used to how Python works, but it is a hell of a footgun.
So there's absolutely an aspect of the above being a matter of degree. That's a pretty extreme degree, though, and I think is worth calling out.
-
Embed this notice
Cassandra Granade 🏳️⚧️ (xgranade@wandering.shop)'s status on Thursday, 19-Dec-2024 04:18:36 JST Cassandra Granade 🏳️⚧️
Anyway, please enjoy my stray thoughts as I compile and run a bleeding-edge version of Wine so that I can add context to my bug report.
It took ten or so minutes to figure out the right way to invoke `./configure` for the project and to get the right system-level development libraries in place, so now it's just the waiting game. How long am I waiting on a pretty high-end desktop? Who knows!
-
Embed this notice
Cassandra Granade 🏳️⚧️ (xgranade@wandering.shop)'s status on Thursday, 19-Dec-2024 04:28:04 JST Cassandra Granade 🏳️⚧️
@whitequark It took about half an hour for me on a 16-core with 128 GB RAM. And yeah, other than the docs for ./configure being out of date (the --options flag seems to have been removed, but docs say it's still there), that was one of the smoother `./configure; make` processes I've seen.
-
Embed this notice
✧✦✶✷Catherine✷✶✦✧ (whitequark@mastodon.social)'s status on Thursday, 19-Dec-2024 04:28:05 JST ✧✦✶✷Catherine✷✶✦✧
@xgranade wine builds pretty quickly (and the build system is shockingly good)
-
Embed this notice
✧✦✶✷Catherine✷✶✦✧ (whitequark@mastodon.social)'s status on Thursday, 19-Dec-2024 04:31:22 JST ✧✦✶✷Catherine✷✶✦✧
@xgranade you can even run wine from the build directory, which most unix projects don't bother with
-
Embed this notice
Cassandra Granade 🏳️⚧️ (xgranade@wandering.shop)'s status on Thursday, 19-Dec-2024 04:31:22 JST Cassandra Granade 🏳️⚧️
@whitequark That is very nice (and indeed, is how I'm currently collecting stack traces for this bug report). Wine prefixes are also very very nice.
-
Embed this notice