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

problem_format: add C++ templates #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Riolku
Copy link
Contributor

@Riolku Riolku commented Jan 8, 2024

Many templates have been floating around in the DMOJ community for validation and input handling in checkers. This commit aims to consolidate them. It has two main goals:

  • Correct. Duh.

  • Simple. Other templates that circulate, including the ones I have published, are too complex. People naively try and write their own. I am sick and tired of reading over incorrect validators.

    These templates forgo some principles of good design (such as object-oriented programming) in favour of pure simplicity. They should be simple enough that they are understandable by the broader community, and are not a black box. Hopefully this also dissuades re-writing.

@quantum5
Copy link
Member

quantum5 commented Jan 8, 2024

Can we make sure the templates pass clang-format?

@Riolku
Copy link
Contributor Author

Riolku commented Jan 8, 2024

Yes, I'd be happy to add CI for that. Would you also like me to add some tests for the methods using ctest?

@quantum5
Copy link
Member

quantum5 commented Jan 8, 2024

Would you also like me to add some tests for the methods using ctest?

Sure, but at least make sure they build or something.

@Riolku Riolku force-pushed the cpp-templates branch 2 times, most recently from 03b9a4b to 76ec663 Compare January 9, 2024 16:01
@Riolku Riolku force-pushed the cpp-templates branch 10 times, most recently from 24cee83 to efffd68 Compare September 7, 2024 21:20
@kiritofeng kiritofeng requested a review from Xyene September 8, 2024 14:56
Copy link
Member

@kiritofeng kiritofeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

@Riolku Riolku force-pushed the cpp-templates branch 2 times, most recently from 8fcb74a to 62f93d3 Compare September 9, 2024 01:06
Many templates have been floating around in the DMOJ community for
validation and input handling in checkers. This commit aims to
consolidate them. It has two main goals:

- Correct. Duh.
- Simple. Other templates that circulate, including the ones I have
  published, are too complex. People naively try and write their own. I
  am sick and tired of reading over incorrect validators.

  These templates forgo some principles of good design (such as
  object-oriented programming) in favour of pure simplicity. They should
  be simple enough that they are understandable by the broader
  community, and are not a black box. Hopefully this also dissuades
  re-writing.
Copy link
Member

@kiritofeng kiritofeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM

Copy link
Member

@kiritofeng kiritofeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

3 participants