Open shawnw opened 2 years ago
Currently on dev it doesn't even build:
chicken-csc -o rsc-chicken rsc.scm
Warning: Wrong number of arguments
In file `rsc.scm:2349',
In procedure `read-from-file',
In procedure call:
(read-line port)
Procedure `read-line' is called with 1 argument but 2 arguments are expected.
Procedure `read-line' has this type:
(procedure (* *) . *)
Error: cannot coerce inexact literal `4294967296' to fixnum
Error: shell command terminated with non-zero exit status 256: '/usr/bin/chicken' 'rsc.scm' -output-file 'rsc-chicken.c'
Don't you want to use (chicken io) instead of a self-defined version? http://api.call-cc.org/5/doc/chicken/io/read-line vs
(cond-expand
(gambit (begin))
(else
(define (read-line port sep) ;; <--- doesn't seem to be optional here
(let loop ((rev-chars '()))
(let ((c (read-char port)))
(if (or (eof-object? c) (eqv? c sep))
(list->string (reverse rev-chars))
(loop (cons c rev-chars))))))
Thanks for letting me know, I'll look into it ! I just added some CI to avoid those problems in the future (https://github.com/udem-dlteam/ribbit/pull/60). If we manage to make it work, we could add chicken to the CI pipeline
Issues is that chicken's
(command-line-arguments)
doesn't include the name of the program, and rsc ends up trying to take the cdr of an empty list. PR with a fix coming shortly.