okuoku / rapid-gambit

Gambit R4RS port of rapid-scheme
Other
3 stars 0 forks source link

case folding is unimplemented #2

Open okuoku opened 8 years ago

okuoku commented 8 years ago

On https://github.com/okuoku/rapid-gambit/commit/d494bab93096d7aad2a53b039f68592182b09193 the last unexpected test failures are both on case folding which is unimplemented.

oku@spring ~/repos2/rapid-gambit/rapid-scheme
$ ~/rapid-gambit/entrypoint.scm -I ~/repos2/rapid-gambit/rapid-scheme -I ~/repos2/rapid-gambit/rapid-scheme/share tests.scm
FAIL Case-folded identifiers
 actual-value: SCHEME

 expected-value: scheme

stdin: 1.20-21: error: invalid sharp syntax ‘#T’
FAIL Booleans
 actual-value: #f

 expected-value: (#t #f #t #f #t #f #t #f #t #f)

# of expected passes      191
# of expected failures    2
# of unexpected failures  2
okuoku commented 8 years ago

Added make test at https://github.com/okuoku/rapid-gambit/commit/70c16bd713cf136d8fc75cb08fc595088203b5f4

$ make test
Running tests...
Test project /home/oku/rapid-gambit
    Start 1: trivial
1/2 Test #1: trivial ..........................   Passed    0.69 sec
    Start 2: rapid-scheme-test
2/2 Test #2: rapid-scheme-test ................   Passed  172.32 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) = 173.02 sec

It seems something wrong in SRFI-64.

mnieper commented 8 years ago

Upstream master branch Rapid Scheme is now using its own (scheme read) implementation in the base library. The backend doesn't need to support read anymore. Maybe this helps.

(Caveat: Rapid's read still makes use of the backend's string->number. Eventually, it will provide its own.)

okuoku commented 8 years ago

Upstream master branch Rapid Scheme is now using its own (scheme read) implementation

Hmm, the change caused read from string port not working;

(import (scheme base) (scheme write) (scheme read))

(define (port->sexp p)
  (define (itr cur)
    (let ((r (read p)))
     (if (eof-object? r)
       (reverse cur)
       (itr (cons r cur))) ))
  (itr '()))

(write (port->sexp (open-input-string "a")))
*** ERROR IN #<procedure #2> -- not a record #f

It seems (read-syntax source-port #f) on (scheme read) returned #f.

mnieper commented 8 years ago

Thanks for detecting this. Fixed upstream.