Skip to content

Conversation

@ChrisRackauckas
Copy link
Member

Summary

  • Adds comprehensive documentation for implementing the IO interface
  • Includes tables of required and optional methods with descriptions
  • Provides a complete example with IORecorder implementation
  • This is a rebased version of PR added docs for IO interface #41291

Background

This PR adds missing documentation for Julia's IO interface, helping developers understand how to implement custom IO types. The documentation covers the essential methods needed and provides practical examples.

Changes

  • Added IO Stream interface documentation to manual/interfaces.md
  • Includes required methods: unsafe_read, unsafe_write, eof
  • Includes optional methods: read, write, close, seek, position, etc.
  • Provides IORecorder example implementation

🤖 Generated with Claude Code

- Change required methods to read/write/eof (basic byte operations)
- Move unsafe_read/unsafe_write to optional methods for performance
- Add comprehensive list of optional IO methods
- Update description to clarify that byte read/write are fundamental
- Explain unsafe methods are for high-performance scenarios
- Clarify eof behavior and state query methods

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@KristofferC
Copy link
Member

#59070 (comment)

These rules allow broadcasting to keep the sparse representation for operations that result
in one or two dimensional outputs, but produce an `Array` for any other dimensionality.

<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look right?

@Seelengrab
Copy link
Contributor

How does this relate to #58024?

@nsajko nsajko added docs This change adds or pertains to documentation io Involving the I/O subsystem: libuv, read, write, etc. labels Jul 24, 2025
| `isopen(io)` | Whether the IO stream is usable. |
| `isreadable(io)` | Whether the IO stream supports reading. |
| `iswritable(io)` | Whether the IO stream supports writing. |
| `shutdown(io)` | Close the stream for writing. |
Copy link
Member

@nhz2 nhz2 Jul 27, 2025

Choose a reason for hiding this comment

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

shutdown doesn't exist.

@ChrisRackauckas
Copy link
Member Author

Not necessarily related? This was just doing the forget me not's with Jameson, but without being able to rebase in the original it won't be able to complete it.

@ChrisRackauckas ChrisRackauckas deleted the io-docs-rebase branch July 27, 2025 15:08
nsajko added a commit to nsajko/julia that referenced this pull request Sep 21, 2025
The intention is to add just a minimal doc string. Other PRs attempt to
document the interface, such as:

* JuliaLang#41291

* JuliaLang#58024

* JuliaLang#59069
oscardssmith pushed a commit that referenced this pull request Sep 23, 2025
The intention is to add just a minimal doc string. Other PRs attempt to
document the interface, such as:

* #41291

* #58024

* #59069

---------

Co-authored-by: Jakob Nybo Nissen <[email protected]>
xal-0 pushed a commit to xal-0/julia that referenced this pull request Sep 30, 2025
The intention is to add just a minimal doc string. Other PRs attempt to
document the interface, such as:

* JuliaLang#41291

* JuliaLang#58024

* JuliaLang#59069

---------

Co-authored-by: Jakob Nybo Nissen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs This change adds or pertains to documentation io Involving the I/O subsystem: libuv, read, write, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants