shen-sources icon indicating copy to clipboard operation
shen-sources copied to clipboard

Set and get stream position

Open tizoc opened this issue 9 years ago • 4 comments

Stream position manipulation and query functions

There are no stream positions in Shen. Desired functionality:

  • go to the beginning of the stream
  • go to the end of the stream
  • go to an arbitrary position in the stream (relative to beginning, end or current position in stream)
  • query the current position in the stream

Current implementations

  • https://github.com/tizoc/shen-scheme#stream-position-operations

TODO: add others

tizoc avatar Oct 10 '16 21:10 tizoc

@tizoc While we're clearing out the backlog, this and the other kernel-extension issues seem to be off-limits based on responses we've received before. I don't think they can be realized without changing kernel functionality (where the stuff under library/ is fine because it's in addition to the existing kernel)

rkoeninger avatar Sep 08 '19 23:09 rkoeninger

At this point these are more about finding the common patterns across ports and provide a common API, either as a library (using cond-expand to decide what to do) or ports implementing a defined API. Not much to do for these for now other than wait.

tizoc avatar Sep 08 '19 23:09 tizoc

Would ports offer such functionality under a common name? Usually, port- or platform-specific behavior has a port-prefix like shen-jvm.set-position or jvm.set-position.

rkoeninger avatar Sep 08 '19 23:09 rkoeninger

Yes. Once a common api is figured, ports can provide a version of the library using their own primitives. Alternatively, a standard-library normalizes what ports already provide under a common api using cond-expand. At this point it doesn't matter much because most port don't provide these things, there is no rush to pre-define anything.

tizoc avatar Sep 09 '19 00:09 tizoc