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

chore(book): add simple calculator example #439

Merged

Conversation

your-diary
Copy link
Contributor

Related: #436

This PR adds a simple calculator example, which demonstrates how logos crate can be combined with a parser generator library to implement an interpreter for a DSL or a programimng language.

I also added a page to the book.

As I'm not a native English speaker, feel free to edit the language in the book.

Copy link
Collaborator

@jeertmans jeertmans left a comment

Choose a reason for hiding this comment

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

Hello @your-diary, it looks amazing! I don't have much to say, except a few rephrasing suggestions. The English looked very good, but I am myself not a native speaker.

You may note that I pushed a fix to another book page, as I just noticed it when reviewing yours, and I didn't want to create one PR just for that ^^'.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you make those image, or did you take them from somewhere else on the internet?

I think it is important to mention this, and include appropriate licensing information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created the images on my own, using Google Slides.

2024-11-16_20_38_01

I'm ok to contribute the images under the same license as Logos' (MIT and Apache 2.0).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perfect! If you want, please add some header at the top of the page (just after the title) mentioned this work (and images) were contributed by you. If you don't want, then that's ok for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your suggestion!
Added in e084cb2.

book/src/examples.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
book/src/examples/calculator.md Outdated Show resolved Hide resolved
@jeertmans jeertmans added the book Related to the book label Nov 16, 2024
@your-diary
Copy link
Contributor Author

@jeertmans
Thank you for the review!

I accepted most of the suggestions and replied to some of your comments.
In addition, I added git clone instruction to the example in 1ba3e07.

@jeertmans
Copy link
Collaborator

Thank you @your-diary!

@jeertmans jeertmans merged commit 727becf into maciejhirsz:master Nov 16, 2024
39 checks passed
jeertmans added a commit that referenced this pull request Dec 2, 2024
* chore(book): add simple calculator example

* fix(book): footnote

* Apply suggestions from code review

Co-authored-by: Jérome Eertmans <[email protected]>

* Partially apply a suggestion from code review

* fix(book): add clone instructions to the simple calculator example

* chore(book): add the contributor info to the simple calculator example

---------

Co-authored-by: ynn <[email protected]>
Co-authored-by: Jérome Eertmans <[email protected]>
jeertmans added a commit that referenced this pull request Dec 2, 2024
* Minor readme improvments (#442)

* chore: move the release process to its own file

* chore: remove extra whitespace in rust code block

* chore: better with a title :) !

* chore(book): add simple calculator example (#439)

* chore(book): add simple calculator example

* fix(book): footnote

* Apply suggestions from code review

Co-authored-by: Jérome Eertmans <[email protected]>

* Partially apply a suggestion from code review

* fix(book): add clone instructions to the simple calculator example

* chore(book): add the contributor info to the simple calculator example

---------

Co-authored-by: ynn <[email protected]>
Co-authored-by: Jérome Eertmans <[email protected]>

* chore(release): bump version

* chore(release): replace version in docs

* chore(lint): apply Clippy and Rustfmt

* chore(lint): allow needless lifetime

---------

Co-authored-by: tk <[email protected]>
Co-authored-by: ynn <[email protected]>
Co-authored-by: ynn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
book Related to the book
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants