racket / racket/zuo

Request procedure: `fd-peek`

Open
#23 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
318
Forks
33
PR merge metrics
No merged PRs in 30d

Description

(fd-peek handle amount) → (or/c string? eof)
  handle : handle?
  amount : (or/c integer? eof 'avail)

I hope that the handle can also be peeked. Unlike fd-read, which consumes data, it retains the data and can be read/peek next time.

I don't know if this makes sense, if I got anything wrong, please correct me.
Thank you for your consideration!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing fd-read procedure and the handle behavior it uses; the issue does not name implementation files or tests. Determine whether fd-peek can retain data without changing fd-read semantics, then verify that repeated reads or peeks observe the retained data and that amount values, including eof and 'avail, behave as specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.