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

Adding exercises #85

Merged
merged 24 commits into from
Jan 12, 2023

Conversation

lakesare
Copy link
Contributor

@lakesare lakesare commented Jan 3, 2023

[Based on #84]

This PR adds exercises to the Expressions and MetaM chapters.

TODOs

  • Add the Solutions section to the Readme.md
  • I think we should add the sourceOfTruth folder that will contain all exercises and solutions. Later, we might want to make "this goes to the end of the chapter", "this goes to the end of the book in the solutions section" thing automatic.
  • Add links to .mds [in this PR description] for comfortable reviewing

Notes

I added the "source of truth" folder lean/exercises with both exercises and solutions. While you're developing the exercises it's best to have both the text of the exercise and the solution in front of you. After that, you copypaste exercises into the end of the chapter; and abridged exercises + solution into the end of the book (manually!).
Probably possible (and would be nice!) to automate.
If we automate this, we still need a source of truth.
If we don't automate this, this still seems to be the best workflow (change source of truth as you like; see the changes in git; adjust exercises and solutions).

We decided to remove the source of truth files, these can remain on the developer's machine.

@lakesare lakesare changed the title Ch. Expressions: add exercises Adding exercises Jan 3, 2023
@lakesare
Copy link
Contributor Author

lakesare commented Jan 3, 2023

@arthurpaulino, what's a good strategy for checking out the pdf outputs, do you do it locally/just push to master and hope for the best?
Should we maybe enable a pdf build on each pull request https://github.com/arthurpaulino/lean4-metaprogramming-book/blob/master/.github/workflows/book.yml?

@arthurpaulino
Copy link
Collaborator

@arthurpaulino, what's a good strategy for checking out the pdf outputs, do you do it locally/just push to master and hope for the best? Should we maybe enable a pdf build on each pull request https://github.com/arthurpaulino/lean4-metaprogramming-book/blob/master/.github/workflows/book.yml?

Sure, feel free to do it. But I was not the one who wrote it. If you need help, please ping Julian Berman on Zulip

@lakesare
Copy link
Contributor Author

lakesare commented Jan 3, 2023

But what strategy do you use yourself though?

@arthurpaulino
Copy link
Collaborator

I do as you said: I hope it will work. When we started this book, there was no pdf. We just cared mostly about the resulting markdown files. The pdf came after.

@lakesare lakesare force-pushed the lakesare_exercises branch from 2d0edc0 to 66c48a5 Compare January 5, 2023 08:46
@lakesare
Copy link
Contributor Author

lakesare commented Jan 5, 2023

Aha, then I'll just rely on .md files for now & check out the .pdf when it's merged.

Should we review/merge now, with exercises for 1 chapter and 1 subchapter, or would it be better to add some more chapters before merging?

@lakesare lakesare force-pushed the lakesare_exercises branch from 66c48a5 to 1fc410c Compare January 5, 2023 09:30
@arthurpaulino
Copy link
Collaborator

I believe it's a good time to ask for review from people who are up to date with Lean 4 metaprogramming API. I will review, but it's also good to ask the community to do it

@arthurpaulino
Copy link
Collaborator

@lakesare How do you think the solutions should be accessible via the repo's README?

@lakesare
Copy link
Contributor Author

lakesare commented Jan 5, 2023

@arthurpaulino, I thought about it, I think the following should be good for now:

@lakesare
Copy link
Contributor Author

lakesare commented Jan 5, 2023

I believe it's a good time to ask for review from people who are up to date with Lean 4 metaprogramming API. I will review, but it's also good to ask the community to do it

Sounds good. Would be nice to have some preliminary comments from you, and then I'll commit another subchapter tomorrow & call someone to review it.


Update:: decided to finish up the MetaM chapter before requesting a review.

Copy link
Member

@EdAyers EdAyers left a comment

Choose a reason for hiding this comment

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

this is great work!

lean/exercises/metam.lean Outdated Show resolved Hide resolved
lean/exercises/metam.lean Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@lakesare lakesare requested review from arthurpaulino and EdAyers and removed request for arthurpaulino and EdAyers January 11, 2023 17:21
.gitignore Outdated Show resolved Hide resolved
lean/exercises/expressions.lean Outdated Show resolved Hide resolved
lean/main/expressions.lean Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lakefile.lean Show resolved Hide resolved
@arthurpaulino arthurpaulino merged commit c0ed4ab into leanprover-community:master Jan 12, 2023
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.

4 participants