larcenists / larceny

Larceny Scheme implementation
Other
202 stars 32 forks source link

add libraries for R7RS Red Edition #788

Closed WillClinger closed 7 years ago

WillClinger commented 7 years ago

R7RS Red Edition is an interim standard consisting of the R7RS Small standard plus 17 more standard libraries:

(scheme list)            ; SRFI 1
(scheme vector)          ; SRFI 133
(scheme sort)            ; SRFI 132
(scheme set)             ; SRFI 113
(scheme charset)         ; SRFI 14
(scheme hash-table)      ; SRFI 125
(scheme ilist)           ; SRFI 116
(scheme rlist)           ; SRFI 101 with systematic renamings
(scheme ideque)          ; SRFI 134
(scheme text)            ; SRFI 135
(scheme generator)       ; SRFI 121
(scheme lseq)            ; SRFI 127
(scheme stream)          ; SRFI 41
(scheme box)             ; SRFI 111
(scheme list-queue)      ; SRFI 117
(scheme ephemeron)       ; SRFI 124
(scheme comparator)      ; SRFI 128

Upgrading Larceny to R7RS Red Edition involves four related tasks:

  1. implement the libraries themselves
  2. where feasible, resolve naming conflicts between libraries
  3. add test/R7RS/Lib tests
  4. add R7RS benchmarks
WillClinger commented 7 years ago

Tasks 1 and 3 completed by changeset 19ad5f5102e08659e1e90fdc462ccc695782ea40

WillClinger commented 7 years ago

Task 2 completed by changeset 98e16c25f50f87398428a58330f4de5ada98fb43

WillClinger commented 7 years ago

Benchmarks to add for R7RS Red Edition:

dderiv
chudnovsky
bibfreq
bibfreq2
normalization (?)
listsort
vecsort
hashtable

R7RS Red Edition libraries whose performance would remain largely untested by those benchmarks:

(scheme list)            ; SRFI 1
(scheme vector)          ; SRFI 133
(scheme set)             ; SRFI 113
(scheme charset)         ; SRFI 14
(scheme ilist)           ; SRFI 116
(scheme rlist)           ; SRFI 101 with systematic renamings
(scheme ideque)          ; SRFI 134
(scheme text)            ; SRFI 135
(scheme generator)       ; SRFI 121
(scheme lseq)            ; SRFI 127
(scheme stream)          ; SRFI 41
(scheme box)             ; SRFI 111
(scheme list-queue)      ; SRFI 117
(scheme ephemeron)       ; SRFI 124

Aside from the (scheme box) and (scheme ephemeron) libraries, those libraries probably deserve new tests. Benchmarks of reasonable size would probably test only only a few of the basic procedures from each, but that's okay.

WillClinger commented 7 years ago

The only R7RS Red Edition libraries that remain untested by any benchmarks are

(scheme ideque)          ; SRFI 134
(scheme box)             ; SRFI 111
(scheme list-queue)      ; SRFI 117
(scheme ephemeron)       ; SRFI 124

The queue and deque libraries deserve benchmarks, but I'm inclined to let that wait for the next version of Larceny, so I'm closing this issue.