Re: Proposed solution to the "predetermined states" problem
Wolfgang Corcoran-Mathe 24 May 2026 17:14 UTC
On 2026-05-23 12:28 -0400, Wolfgang Corcoran-Mathe wrote:
> On 2026-05-22 20:47 -0400, John Cowan wrote:
> > Make-constant-port is trivial in R6RS:
> >
> > (define (make-constant-port n)
> > (make-custom-binary-input-port
> > (lambda (bvec start count)
> > #| loop to fill part of bvec |#) #f #f #f)))
>
> Thanks. I had, in fact, completely forgotten about R6RS custom
> ports until now. I'll try to contribute a portable R6RS sample
> implementation with the next draft.
Unfortunately, the SRFI's claim that a portable implementation is
impossible remains true: most of SRFI 271 be implemented with
'make-custom-binary-input-port', but not the 'random-port-state'
accessor. So close!
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>