Closed jpellegrini closed 7 months ago
Hi @egallesio ! I have opened this issue so we can talk about SRFI-27 here.
I have put SRFI-27 back into a private branch of STklos here, and I see this:
stklos> (import (srfi 27)) stklos> (random-integer 100) **** Error: error: no applicable method for #[<generic> %random-source-state-ref (1)] in call (%random-source-state-ref #[<random-source-mt> 7f0d958c5870] 100)
But in lib/srfi/27.stk we have:
lib/srfi/27.stk
(define-class <random-source> () ((algorithm #:init-keyword #:algorithm) (state #:init-keyword #:state #:getter %random-source-state-ref #:setter %random-source-state-set!))) ... (define (random-integer n) (%random-integer-from-source-mt (%random-source-state-ref default-random-source n)))
Which seems correct and should work.
Maybe something changed when you changed the access to global variables in modules?
I'll keep digging.
Ah, I think I found the problem. Will update and make a PR later
Closing this issue, since your PR fixed the problem.
Hi @egallesio ! I have opened this issue so we can talk about SRFI-27 here.
I have put SRFI-27 back into a private branch of STklos here, and I see this:
But in
lib/srfi/27.stk
we have:Which seems correct and should work.
Maybe something changed when you changed the access to global variables in modules?
I'll keep digging.