Skip to content

Clarify Core usage in garbage collector tutorial - #3682

Open
adithn875 wants to merge 1 commit into
ocaml:mainfrom
adithn875:fix-core-gc-docs
Open

Clarify Core usage in garbage collector tutorial#3682
adithn875 wants to merge 1 commit into
ocaml:mainfrom
adithn875:fix-core-gc-docs

Conversation

@adithn875

Copy link
Copy Markdown

Fixes #3664

Add a note clarifying that examples using Gc.tune rely on Jane Street's Core library.

This helps readers who are using only the OCaml standard library understand that Gc.tune is not part of Stdlib and that similar functionality can be achieved using Gc.get and Gc.set.

@adithn875

Copy link
Copy Markdown
Author

Hi! Just checking whether there are any changes needed from my side. Happy to update the PR if required. Thanks!

@cuihtlauac

cuihtlauac commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Hi @adithn875. Thanks for your PR. I concur with you, we should work around the Core dependency, which isn't required to use OCaml and is used in this tutorial because RWO content is among the best on this matter, and the authors kindly let us reproduce it here. I'd like to keep @avsm and @yminsky text unchanged. What we could do is the following.

  • Add text in the preamble (the part that explains where this comes from). That would state this chapter's examples use Core and include a list of the concerned examples with their Stdlib relation status: (a) has equivalent; (b) easy to rewrite; (c) complex to rewrite.
  • In an appendix, the Stdlib versions for classes (a) and (b) would be provided
  • In the core text, we'd only add link to the appendix, which would allow navigating to the Stdlib version without changing the text

What's your opinion on this?

@adithn875

Copy link
Copy Markdown
Author

Thanks for the detailed feedback! I think that approach makes a lot of sense.

Keeping the original text unchanged while providing a clear Stdlib alternative through a preamble and appendix seems like a good balance. It preserves the source material and also helps readers who aren't using Core.

I'll work on restructuring the PR accordingly:

  • add a note in the preamble explaining that this chapter uses Core,
  • include the list of examples with their Stdlib relation status,
  • add an appendix with the Stdlib equivalents for the applicable examples,
  • and replace the inline note with a link to the appendix.

Thanks for the guidance!

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.

Usage of Core in the docs

2 participants