On Fri, 2021-01-15 at 23:12 +0800, Lingyu Zhu wrote: > Hi, I was attempting setting up picture language. > I build a git tip version and applied the patch to > src/6001/pic-read.scm mentioned in [1]. I downloaded the source files > from [2] and modified some file paths according to my settings. > Loading psgo.scm seems no problem because three empty windows pop up. > But (paint g1 founder) fails. Debugger displays following message:
I missed your error message. Was it ";The object 65536/255, passed as the first argument to integer->flonum, is not the correct type."? That's my guess because that's where I left it a year ago: On Thu, 2020-01-02 at 01:27 -0700, Matt Birkholz wrote: > I fixed the "The procedure c-call has been called with 2 > arguments..." complaint. If you built Scheme from the master > branch as Taylor suggested, then you should > > git pull origin master > cd src/x11/ > make install > to update your x11 plugin. I did this and now: > > 1 ]=> (paint g1 fovnder) > ;The object 65536/255, passed as the first argument to integer- >flonum, is not the correct type. This makes me wonder about line 69 of arith.scm: (define-standard-unary exact->inexact (lambda (x) x) int:->flonum) It seems reasonable to apply exact->inexact to a rational number yet the procedure uses int:->flonum which, reasonably, objects to arguments that are not integers so... perhaps screw with (broaden the domain of) int:->flonum with the following hack? diff --git a/src/6001/arith.scm b/src/6001/arith.scm index 6945e4942..9d350cbac 100644 --- a/src/6001/arith.scm +++ b/src/6001/arith.scm @@ -29,8 +29,7 @@ USA. (declare (usual-integrations)) -(define-integrable (int:->flonum n) - ((ucode-primitive integer->flonum 2) n #b10)) +(define-integrable int:->flonum ->flonum) (define-integrable (flonum? object) (object-type? (ucode-type big-flonum) object))