Skip to content

FS perms and IO Tasks, Interrupts and more - #45

Merged
AnirudhG07 merged 9 commits into
leanprover-cookbook:mainfrom
AnirudhG07:inter
Apr 10, 2026
Merged

AnirudhG07 merged 9 commits into
leanprover-cookbook:mainfrom
AnirudhG07:inter

Conversation

@AnirudhG07

@AnirudhG07 AnirudhG07 commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR refactors IO and FS a lot and improve the overall arrangement

  1. FS now has file permissions recipe and some cleaning
  2. IO has spawning Tasks, spawning child processes, which was distributed here and there, now properly set
  3. Interrupts and deadlocking is added
  4. Miscellaneous is now more miscellaneous

things are much better.

Checklist

  • My code builds locally with lake build lean-cookbook && lake exe lean-cookbook and checked how it looks locally.
  • I have followed the methodology of cooking my recipe using COOKBOOK_GUIDELINES.md.
  • I have added my new recipe at appropriate index position(check it if not applicable).

Any other remarks

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR reorganizes the cookbook’s IO and filesystem documentation by splitting previously mixed topics into more focused recipes and adding new coverage for file permissions, task concurrency patterns, process spawning, sleeping, and interrupts.

Changes:

  • Replaces older IO recipes with new dedicated pages for spawning tasks, running tasks in parallel, sleeping/async sleep, child processes, and interruption patterns.
  • Adds a new filesystem recipe for setting/reading file permissions, and relocates some filesystem snippets (e.g., rename) to more appropriate pages.
  • Updates chapter aggregation files (Cookbook/IO.lean, Cookbook/FileSystem.lean) to reflect the new structure and removes obsolete example/config files.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
service_config.toml Removes a previously committed sample TOML config file.
README.md Updates the repository positioning/intro note.
Cookbook/IO/TasksAndConcurrency.lean Deletes the old combined tasks/concurrency recipe.
Cookbook/IO/SpawningTasks.lean Adds a new recipe covering Task spawning, status, and thread IDs.
Cookbook/IO/SpawningChildProcess.lean Adds a new recipe for IO.Process.run/output/spawn and env vars.
Cookbook/IO/SleepingProcess.lean Adds a new recipe explaining IO.sleep vs async sleep and .block.
Cookbook/IO/RunningTasksInParallel.lean Adds a new recipe demonstrating concurrent IO tasks.
Cookbook/IO/ProcessInterrupt.lean Adds a new recipe on interruptible sleep, promises, and idle waiting.
Cookbook/IO/Miscellaneous.lean Expands miscellaneous IO content (process exit, compression, deadlocks).
Cookbook/IO/EnvironmentVars.lean Removes the old environment variables recipe (content moved elsewhere).
Cookbook/IO.lean Updates IO chapter imports/includes to the new recipe set/order.
Cookbook/Infoview/DisplayingInTheInfoView.lean Small documentation/formatting edits to the Infoview recipe.
Cookbook/FileSystem/WritingToFile.lean Adds file rename snippet to the writing-to-file recipe.
Cookbook/FileSystem/RunningAnExternalProgram.lean Removes the old external program recipe (content moved to IO).
Cookbook/FileSystem/Miscellaneous.lean Removes the rename snippet from filesystem miscellaneous.
Cookbook/FileSystem/FilePermissions.lean Adds a new recipe for setting and reading file permissions.
Cookbook/FileSystem.lean Updates filesystem chapter imports/includes (adds permissions recipe).
Cookbook/DataStructures/TOML/ReadWriteTomlFile.lean Comments out the round-trip #eval example.
Cookbook/BuildingRecipe.lean Updates documentation guidance around formatting/errors and html splitting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread Cookbook/IO/SpawningTasks.lean Outdated
Comment thread Cookbook/IO/SpawningTasks.lean
Comment thread Cookbook/IO/SpawningTasks.lean
Comment thread Cookbook/IO/SpawningChildProcess.lean
Comment thread Cookbook/FileSystem/FilePermissions.lean
Comment thread Cookbook/FileSystem/FilePermissions.lean
Comment thread Cookbook/FileSystem/FilePermissions.lean Outdated
Comment thread Cookbook/FileSystem/FilePermissions.lean Outdated
Comment thread Cookbook/BuildingRecipe.lean
@AnirudhG07
AnirudhG07 merged commit b5c6060 into leanprover-cookbook:main Apr 10, 2026
1 check passed
@AnirudhG07
AnirudhG07 deleted the inter branch April 10, 2026 11:44
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.

2 participants