Skip to content

Conversation

lukemaurer
Copy link
Contributor

@lukemaurer lukemaurer commented Apr 17, 2025

Basic introduction to data-race-free parallelism, focusing on fork/join parallelism and data parallelism provided by the parallel library as a way to introduce the portable and contended modes.

Currently pretty drafty:

  • Needs an introduction
  • Should probably be reorganized a bit—the section on portable and contended was supposed to be sort of an intermission but it's the biggest part
  • Possibly a bit too formal in places? I think having numbered rules for things is good but then I've written conference papers
  • Some of the example code could be more motivated: a Thing.t is just something with an immutable price and a mutable mood. (If nothing else, if my time at a trading firm has taught me anything, it's that prices are in fact mutable.)
  • Other not-quite-finished bits

@lukemaurer lukemaurer added the documentation Improvements or additions to documentation label Apr 17, 2025
@mshinwell mshinwell added the drf Data race freedom label Apr 17, 2025
Copy link
Collaborator

@goldfirere goldfirere left a comment

Choose a reason for hiding this comment

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

Nice tutorial. I enjoyed reading it.

I wondered in one of my inline comments about whether we want all the general portability/contention stuff in this tutorial. But after reflecting about this with @ccasin, I think it's good. We'll have general documentation for this stuff. But pointing readers to it in the middle of the tutorial is annoying, and the general documentation will inevitably have more detail than is needed at this point. So the stuff here might be duplicative, but I think on balance it's good duplication.

Happy to chat about anything here if you'd like.

Copy link
Collaborator

@goldfirere goldfirere left a comment

Choose a reason for hiding this comment

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

Really happy with where this is going!

Copy link

@jonludlam jonludlam left a comment

Choose a reason for hiding this comment

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

Generally really nice, I feel I've got a much better understanding of this now. I think mainly my comments are to ensure that anyone trying to follow along with a code editor doesn't get tripped up. In fact, if you want to encourage someone doing that, then a bit of detail at the start of how to set it up would be useful.

@lukemaurer lukemaurer marked this pull request as ready for review June 12, 2025 21:36
@lukemaurer lukemaurer enabled auto-merge (squash) June 12, 2025 21:40
@lukemaurer lukemaurer disabled auto-merge June 12, 2025 21:50
@lukemaurer lukemaurer enabled auto-merge (squash) June 12, 2025 21:56
@lukemaurer lukemaurer merged commit b55315e into oxcaml:main Jun 12, 2025
31 checks passed
Dreian pushed a commit to Dreian/oxcaml that referenced this pull request Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation drf Data race freedom
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants