Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port the questions to C++23 #293

Closed
24 of 25 tasks
knatten opened this issue Mar 19, 2023 · 15 comments
Closed
24 of 25 tasks

Port the questions to C++23 #293

knatten opened this issue Mar 19, 2023 · 15 comments

Comments

@knatten
Copy link
Owner

knatten commented Mar 19, 2023

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)

  1. 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 own README.md too, for convenience.
  2. 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.
  3. Finally we'll import everything back into the database.
  4. World domination!

Checklist:

Preparation

  • Test export/import scripts and update if needed
  • Test issue creation script and update if needed
  • Create pull request template
  • Write blog post
  • Create repo
  • Run export script
  • Run issue creation script
  • Publish blog post
  • Tweet about this, ask for RTs
  • 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

  • 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
  • python manage.py update_questions_from_repo
  • Update all occurrences of "C++17" in the source code to say "C++23"
  • 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 )
  • Update this link to std23
  • Publish blog post
  • Post about this on X, Mastodon, Bluesky and LinkedIn
  • Email the winners
  • Mail books to the winners
@tocic
Copy link
Contributor

tocic commented Mar 19, 2023

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.

@knatten
Copy link
Owner Author

knatten commented Mar 19, 2023

Fantastic, thanks! Yeah we'll have to wait a bit with starting on this until we have https://timsong-cpp.github.io/cppwp/std23.

@vsklamm
Copy link
Contributor

vsklamm commented May 14, 2023

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

@knatten
Copy link
Owner Author

knatten commented May 23, 2023

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.

@eoan-ermine
Copy link
Contributor

@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?

@tocic
Copy link
Contributor

tocic commented May 22, 2024

timsong-cpp/cppwp#9
(BTW, I'll have a vacation in early June and then I'll be happy to help with the port)

@knatten
Copy link
Owner Author

knatten commented May 25, 2024

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.

@knatten knatten mentioned this issue May 26, 2024
@knatten
Copy link
Owner Author

knatten commented May 30, 2024

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!

@Winux-Arch
Copy link

* 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

@tocic
Copy link
Contributor

tocic commented Jun 29, 2024

  • 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)

@knatten
Copy link
Owner Author

knatten commented Jun 30, 2024

  • 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

@knatten
Copy link
Owner Author

knatten commented Sep 19, 2024

The site has now been updated. We need to fix the godbolt link, I don't have time right now. Planning to do that and publish the blog post tonight (unless someone fixes the godbolt link in the meantime). Need to check whether msvc supports C++23 now before updating the link.

@tocic
Copy link
Contributor

tocic commented Sep 20, 2024

Shouldn't we also update this link to https://timsong-cpp.github.io/cppwp/std23?

@knatten
Copy link
Owner Author

knatten commented Sep 20, 2024

Yes, we should. Fixed in #360 and deployed now.

@knatten
Copy link
Owner Author

knatten commented Sep 20, 2024

Closing the issue now, handling the last bullet point offline.

@knatten knatten closed this as completed Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants