Skip to content

Import Rewrote Set Tutorial from V2 PR #948

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

Merged
merged 6 commits into from
Jan 11, 2024
Merged

Import Rewrote Set Tutorial from V2 PR #948

merged 6 commits into from
Jan 11, 2024

Conversation

cuihtlauac
Copy link
Collaborator

@NebuPookins rewrote the set tutorial for V2 in 2021. The PR was neither merged nor rejected:

ocaml/v2.ocaml.org#1596

Copy link
Contributor

@christinerose christinerose left a comment

Choose a reason for hiding this comment

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

Minor grammar & syntax suggestions

@NebuPookins
Copy link

@christinerose 's suggestions look good to me. Is there a way to quickly approve/merge in all of them?

@cuihtlauac
Copy link
Collaborator Author

@christinerose 's suggestions look good to me. Is there a way to quickly approve/merge in all of them?

I've committed them.

@cuihtlauac
Copy link
Collaborator Author

@NebuPookins: Thanks for the time you spent rewriting this tutorial. On behalf of the ocaml.org maintenance team, I must apologise to you, your PR got lost when migrating from V2 to V3. I'm really sorry about that.

Despite those odd circumstances, it's a pleasure to see you reacting to the resurrection of your PR. I'd like to move forward with your PR. I believe the points raised by @Octachron in the initial discussion can be addressed, what is your feeling about that?

@christinerose
Copy link
Contributor

@christinerose 's suggestions look good to me. Is there a way to quickly approve/merge in all of them?

I've committed them.

There were a few that weren’t yet committed, so I refreshed them but still approved so it can be merged when you’re ready.

@cuihtlauac
Copy link
Collaborator Author

cuihtlauac commented Feb 24, 2023

I must have messed up something at some point. Firstly, files which shouldn't have been there were included, and then I accidentally closed the PR. Let's hope this text isn't bad luck :-)

As far as I can see the greyed suggestions, which continue to appear seem to be bogus. I see them in the text.

@NebuPookins
Copy link

Hi @cuihtlauac no need to apologize.

The unfortunate reality is I've moved on from OCaml for right now, so these topics are no longer fresh in my memory, so I don't think I would do a good job of updating the tutorial. In my (possibly biased) opinion, I think the version I submitted is still an improvement over the previous content, so my recommendation would be to merge it in as-is, and then have someone else (possibly @Octachron ) do another pass of it to address the concerns they raised.

@cuihtlauac
Copy link
Collaborator Author

Thanks @NebuPookins, for your kind answer. It is perfectly understandable you've moved on to other matters. I'm happy we have your permission to reuse that text and modify it. I'll probably do. Thanks again

which you can assign the name `SS` (short for "String Set"). Note: Be sure to
pay attention to the case; you need to type `Set.Make(String)` and not
`Set.Make(string)`. The reason behind this is explained in the
"Technical Details" section at the bottom.
Copy link

@gpetiot gpetiot May 3, 2023

Choose a reason for hiding this comment

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

This can be replaced by a link to the section, so we can remove "at the bottom".

signatures of many of the functions defined in this module.

For example, the `add` function has the signature `elt -> t -> t`, which means
that it expects an element (a String), and a set of strings, and will return to you
Copy link

Choose a reason for hiding this comment

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

a String.t

Also, I would just say "will return", I find it weird to add "to you" but maybe that's just me.

function which matches this signature: `cardinal : t -> int`. If you're
not familiar with the word "cardinal," you can look it up on Wikipedia
and notice that it basically refers to the size of sets, so this reinforces
the idea that this is exactly the function we want.
Copy link

Choose a reason for hiding this comment

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

I would just give the definition here without alluding to wikipedia, to make it more self-contained. Same for singletons and Purely Functional Data Structure.

It gives a very unformal tone to this page, which is also the case for "Data structures > Map", but not for the others. Related to #1154.

Cuihtlauac ALVARADO and others added 3 commits January 3, 2024 14:17
@NebuPookins rewrote the set tutorial for [V2](https://github.com/ocaml/v2.ocaml.org) in 2021. The PR was neither merged nor rejected:

ocaml/v2.ocaml.org#1596
As pointed by @Octachron
@christinerose
Copy link
Contributor

There are several examples meant for the toplevel, but they don't contain the prompt # at the front although they end with ;;. They also don't show the result. Should these be in a format where the reader can copy/paste in their toplevel to test themselves?

li: 28, 87, 95, 103, 152, 181, 191, and 208

@cuihtlauac cuihtlauac merged commit 8017229 into main Jan 11, 2024
@cuihtlauac cuihtlauac deleted the doc-set branch January 11, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants