Re: [MIT-Scheme-users] ref error
On Wed, 2017-11-01 at 23:59 +0200, David Gray wrote: > This is the scmutils generic ref. When I replace the generic ref with > vector-ref it works ok, I just thought this error was strange, the > only difference being loading the file or just using it from the > repl. There is this "gotcha" with the *scheme* buffer: After examining an error, whether or not you choose to enter the debugger, you should type "C-c C-c" to get back to the top level. This is important because if you don't the evaluations you subsequently perform may refer to the error state rather than to the state you intended. [scmutils/manual/beginner.txt] It sounds like the wrong environment was used somewhere. ___ MIT-Scheme-users mailing list MIT-Scheme-users@gnu.org https://lists.gnu.org/mailman/listinfo/mit-scheme-users
Re: [MIT-Scheme-users] ref error
This is the scmutils generic ref. When I replace the generic ref with vector-ref it works ok, I just thought this error was strange, the only difference being loading the file or just using it from the repl. Sent from my iPad On 1 Nov 2017, at 20:41, Taylor R Campbell wrote: >> Date: Wed, 1 Nov 2017 10:59:18 -0700 >> From: Chris Hanson >> >> What's ref? Do you mean vector-ref? > > Presumably this is the scmutils generic ref. ___ MIT-Scheme-users mailing list MIT-Scheme-users@gnu.org https://lists.gnu.org/mailman/listinfo/mit-scheme-users
Re: [MIT-Scheme-users] ref error
> Date: Wed, 1 Nov 2017 10:59:18 -0700 > From: Chris Hanson > > What's ref? Do you mean vector-ref? Presumably this is the scmutils generic ref. ___ MIT-Scheme-users mailing list MIT-Scheme-users@gnu.org https://lists.gnu.org/mailman/listinfo/mit-scheme-users
Re: [MIT-Scheme-users] ref error
What's ref? Do you mean vector-ref? On Nov 1, 2017 6:48 AM, "David Gray" wrote: > I’m using ScmUtils 2016 compiled to a band using version 9.2 on OSX, and > I’m running into a strange error. > The simplest case I can boil it down to is: > Using *scheme* I can do > (define (g2d x y v) > (* (ref v 0) (exp (- (+ (/ (square (- x (ref v 1))) (* 2 (square (ref v > 3)) )) (/ (square (- y (ref v 2))) (* 2 (square (ref v 4) > And then: > (g2d 1 2 ‘(1 2 3 4 5)) > #| .9500411305585278 |# > > However if I save this as a file eg ref-error.scm and then load the file > from *scheme* I get: > ;Unbound variable: ref > > Any ideas? > ___ > MIT-Scheme-users mailing list > MIT-Scheme-users@gnu.org > https://lists.gnu.org/mailman/listinfo/mit-scheme-users > ___ MIT-Scheme-users mailing list MIT-Scheme-users@gnu.org https://lists.gnu.org/mailman/listinfo/mit-scheme-users
[MIT-Scheme-users] ref error
I’m using ScmUtils 2016 compiled to a band using version 9.2 on OSX, and I’m running into a strange error. The simplest case I can boil it down to is: Using *scheme* I can do (define (g2d x y v) (* (ref v 0) (exp (- (+ (/ (square (- x (ref v 1))) (* 2 (square (ref v 3)) )) (/ (square (- y (ref v 2))) (* 2 (square (ref v 4) And then: (g2d 1 2 ‘(1 2 3 4 5)) #| .9500411305585278 |# However if I save this as a file eg ref-error.scm and then load the file from *scheme* I get: ;Unbound variable: ref Any ideas? ___ MIT-Scheme-users mailing list MIT-Scheme-users@gnu.org https://lists.gnu.org/mailman/listinfo/mit-scheme-users