cppquiz
cppquiz copied to clipboard
Port the questions to C++23
All the questions on the site are currently describing the behaviour as of C++17, and also quoting the C++17 standard. We need to get with the times. Let's just skip 20 and go straight to C++23.
The plan will be very similar to what we did in #77, where I got some great help from the community. If you're interested in maybe helping, please make a comment in this thread, and I'll tag you when we start porting. I don't take those comments as commitments, so it's perfectly fine to just ignore it when I tag you in the future.
Plan (mostly copied from #77)
- We'll export all published/accepted questions to a directory structure, and check that into a separate repo. People can then fix one question at a time and make PRs. There will be a
README.md
at the root, and then each question has a separate directory named as the number of the question. Each question gets it's ownREADME.md
too, for convenience. - We'll also create one issue for each question, to make it easy to assign questions to people, and to see remaining work. We should put clear instructions directly into each issue instead of referring to an external document. This should be scriptable using the GitHub api. The issue might just be a copy of the
README.md
for that question. - Finally we'll import everything back into the database.
- World domination!
Checklist:
Preparation
- [x] Test export/import scripts and update if needed
- [x] Test issue creation script and update if needed
- [x] Create pull request template
- [x] Write blog post
- [x] Create repo
- [x] Run export script
- [x] Run issue creation script
- [x] Publish blog post
- [x] Tweet about this, ask for RTs
- [x] Put a big note on the site, linking to the blog post
- [ ] Put an even bigger note on the contribution page, asking to help port questions instead
Porting
- [x] Remind people on Twitter to help
- [ ] Finish all the issues
Import
- [ ] Write short blog post
- [ ] Create "CppQuiz is offline for $reason" page
- [ ] Put warning about planned maintenance in header
- [ ] Tweet about planned maintenance
- [ ] Follow the instructions in the gist
- [ ] Update these lines to use the latest available x64 msvc v19.38 VS17.8 and
/std:c++latest
(unfortunately,/std:c++23
is still not recognized) (thanks @tocic ) - [ ] Publish blog post
- [ ] Tweet about this
I'm ready to help. But which links to use? There is https://timsong-cpp.github.io/cppwp/std20 now, but no https://timsong-cpp.github.io/cppwp/std23 yet.
Fantastic, thanks! Yeah we'll have to wait a bit with starting on this until we have https://timsong-cpp.github.io/cppwp/std23.
I vote for porting cppquiz to C++20 first. The main reason - target audience:
- JetBrains blog says that by the end of 2022y only 23% of C++ developers use C++20 and from the charts, we can clearly see that the peak for C++20 will be in the next 3-4 years so I don't think we will have to port to C++23 too soon.
- Not all popular compilers fully support C++20 standard features which stops some companies from moving to C++20.
- I'm pretty sure that universities (decent part of seasonal users, I believe) teach the most popular standard at the moment or cover only C++11 due to time constraints.
So it would be really cool to have bleeding-edge questions in cppquiz but this will probably reduce the target audience for some years. I understand the time trade-off but I have plenty of free time for help with porting questions and here are scripts to generate an improved version of the GitHub repository for porting questions based on the 11->17 one: https://github.com/vsklamm/cpp20quiz
I would really appreciate your help in porting the questions!
Good point about the target audience. But just to clarify: Porting the questions to C++23 is only about updating the references to and quotes from the standard. I don't think we have any questions on the site that change behaviour from 20 to 23, and probably not from 17 to 20 either. So porting to 20 or 23 will not invalidate any of the current questions for people still stuck at 17.
We could, of course, avoid publishing new questions that are only valid in 23, if we want all questions to be relevant to most people. On the other hand, maybe it could also be refreshing for people to see some new stuff even if they can't use it yet? In my experience, talks about new language features are well received at conferences even if many in the audience probably can't use them in prod at work yet.
Even with several people helping, it's a lot of work to update 160 questions and figure out where everything moved in the new standard. I think it would be nice to avoid doing that work twice. And in any case I still won't have time to start the porting effort for some months. In the meantime, let's figure out when https://timsong-cpp.github.io/cppwp/std23 will be ready.
@knatten
I think we can move forward with https://timsong-cpp.github.io/cppwp/n4950
It seems to be the last draft of C++23, according to https://github.com/timsong-cpp/cppwp , https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4951.html , and https://w.wiki/9Dj9 (which refers to n4951). What do you think about it?
https://github.com/timsong-cpp/cppwp/pull/9 (BTW, I'll have a vacation in early June and then I'll be happy to help with the port)
Hah, there we go! https://timsong-cpp.github.io/cppwp/std23/
Nice, then we can start. I've been very busy finishing my book lately, but some time is about to free up again. I'll make sure to set everything up shortly so we can get this going.
The porting repo is now ready, and we can start! https://github.com/knatten/cppquiz23
I haven't written a blog post about this or really gotten started yet, since I don't have time for a little while more. But if anyone wants to test out the process, or just start porting, I'd really appreciate it!
* I'm pretty sure that universities (decent part of seasonal users, I believe) teach the most popular standard at the moment or cover only C++11 due to time constraints.
Do not think that this the case nor a problem because from my view in Germany people either stick to the recent standard or stay with older tools than C++17 e.g. C++03
- [ ] We should also update these lines to use the latest available x64 msvc v19.38 VS17.8 and
/std:c++latest
(unfortunately,/std:c++23
is still not recognized)
- [ ] We should also update these lines to use the latest available x64 msvc v19.38 VS17.8 and
/std:c++latest
(unfortunately,/std:c++23
is still not recognized)
Thanks! Updated the check list in the issue