SRFI Skill
"SRFIs extend the Scheme programming language. You can help."
— srfi.schemers.org
Scheme Requests for Implementation: portable library specifications with GF(3) categorization.
Overview
SRFIs are community-driven specifications that extend Scheme beyond R5RS/R6RS/R7RS. Each SRFI has a unique number, status (draft/final/withdrawn), and reference implementation.
Core SRFIs by Category
Data Structures [MINUS: -1]
| SRFI |
Name |
Status |
Key Exports |
| 1 |
List Library |
Final |
fold, unfold, filter, partition |
| 4 |
Homogeneous Vectors |
Final |
u8vector, f64vector, typed arrays |
| 9 |
Defining Record Types |
Final |
define-record-type |
| 14 |
Character Sets |
Final |
char-set, char-set-contains? |
| 69 |
Basic Hash Tables |
Final |
make-hash-table, hash-table-ref |
| 113 |
Sets and Bags |
Final |
set, bag, set-contains? |
| 125 |
Intermediate Hash Tables |
Final |
hash-table-map, comparators |
| 128 |
Comparators (Reduced) |
Final |
make-comparator, comparator-hash |
| 133 |
Vector Library |
Final |
vector-map, vector-fold |
| 146 |
Mappings |
Final |
mapping, functional maps |
| 158 |
Generators and Accumulators |
Final |
make-coroutine-generator |
Control Flow [ERGODIC: 0]
| SRFI |
Name |
Status |
Key Exports |
| 2 |
AND-LET* |
Final |
and-let* short-circuit binding |
| 8 |
receive |
Final |
receive for multiple values |
| 11 |
let-values |
Final |
let-values, let*-values |
| 18 |
Multithreading |
Final |
make-thread, mutex, condition-variable |
| 34 |
Exception Handling |
Final |
guard, raise |
| 39 |
Parameter Objects |
Final |
make-parameter, parameterize |
| 45 |
Primitives for Lazy Eval |
Final |
delay, force, lazy |
| 124 |
Ephemerons |
Final |
make-ephemeron, weak references |
| 154 |
First-Class Dynamic Extents |
Final |
dynamic-extent, delimited continuations |
| 155 |
Promises |
Final |
delay-force, iterative lazy |
| 226 |
Control Features |
Final |
call/cc, values, dynamic-wind |
Syntax & Macros [PLUS: +1]
| SRFI |
Name |
Status |
Key Exports |
| 0 |
Feature-Based Conditionals |
Final |
cond-expand |
| 6 |
Basic String Ports |
Final |
open-input-string, get-output-string |
| 26 |
Cut/Cute |
Final |
cut, cute partial application |
| 42 |
Eager Comprehensions |
Final |
list-ec, sum-ec, do-ec |
| 46 |
Syntax for Multiple Values |
Final |
values->list, values->vector |
| 57 |
Records |
Withdrawn |
(superseded by 99, 136) |
| 72 |
Hygienic Macros |
Final |
syntax-case compatible |
| 139 |
Syntax Parameters |
Final |
define-syntax-parameter |
| 147 |
Custom Macro Transformers |
Final |
er-macro-transformer |
| 149 |
Basic Syntax-Rules Extensions |
Final |
_, ... patterns |
| 211 |
Scheme Macros for Definitions |
Final |
define-macro |
I/O & System [MINUS: -1]
| SRFI |
Name |
Status |
Key Exports |
| 6 |
Basic String Ports |
Final |
in-memory I/O |
| 28 |
Basic Format Strings |
Final |
format |
| 38 |
External Representation with Cycles |
Final |
write/ss, read/ss |
| 48 |
Intermediate Format Strings |
Final |
format with more directives |
| 106 |
Basic Socket Interface |
Final |
make-client-socket, socket-send |
| 170 |
POSIX API |
Final |
file-info, set-file-mode! |
| 180 |
JSON |
Final |
json-read, json-write |
| 192 |
Port Positioning |
Final |
port-position, set-port-position! |
| 193 |
Command Line |
Final |
command-line, option-processor |
Numeric [ERGODIC: 0]
| SRFI |
Name |
Status |
Key Exports |
| 27 |
Sources of Random Bits |
Final |
random-integer, random-real |
| 60 |
Integers as Bits |
Final |
bitwise-and, bit-set? |
| 94 |
Type-Restricted Numerics |
Final |
fx+, fl* |
| 141 |
Integer Division |
Final |
floor/, ceiling/, truncate/ |
| 143 |
Fixnums |
Final |
fx+, fxarithmetic-shift |
| 144 |
Flonums |
Final |
fl+, flsin, flexp |
| 151 |
Bitwise Ops on Arbitrary Integers |
Final |
bitwise-ior, integer-length |
| 166 |
Monadic Formatting |
Final |
format with monadic composition |
Testing & Debugging [PLUS: +1]
| SRFI |
Name |
Status |
Key Exports |
| 64 |
A Scheme API for Test Suites |
Final |
test-begin, test-equal, test-assert |
| 78 |
Lightweight Testing |
Final |
check, check-ec |
| 219 |
Define Higher-Order Lambda |
Final |
define with curry |
Pattern Matching [PLUS: +1]
| SRFI |
Name |
Status |
Key Exports |
| 204 |
Wright-Cartwright-Shinn Pattern Matcher |
Final |
match, match-lambda |
GF(3) Distribution
MINUS (-1): Data Structures, I/O & System
ERGODIC (0): Control Flow, Numeric
PLUS (+1): Syntax & Macros, Testing, Pattern Matching
Conservation: Σ(categories) ≡ 0 (mod 3) when balanced usage
R7RS-Large Libraries (Red/Tangerine Editions)
R7RS-Large incorporates SRFIs as standard libraries:
Red Edition (2019)
(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
(scheme ideque) ← SRFI 134
(scheme text) ← SRFI 135
(scheme generator) ← SRFI 158
(scheme lseq) ← SRFI 127
(scheme stream) ← SRFI 41
(scheme box) ← SRFI 111
(scheme list-queue) ← SRFI 117
(scheme comparator) ← SRFI 128
Tangerine Edition (2021)
(scheme bitwise) ← SRFI 151
(scheme fixnum) ← SRFI 143
(scheme flonum) ← SRFI 144
(scheme division) ← SRFI 141
(scheme bytevector) ← R6RS
(scheme mapping) ← SRFI 146
(scheme regex) ← SRFI 115
Implementation Support Matrix
| SRFI |
Chez |
Chicken |
Gauche |
Guile |
Racket |
| 1 |
✓ |
✓ |
✓ |
✓ |
✓ |
| 9 |
✓ |
✓ |
✓ |
✓ |
✓ |
| 18 |
✓ |
✓ |
✓ |
✓ |
✓ |
| 27 |
✓ |
✓ |
✓ |
✓ |
✓ |
| 64 |
✓ |
✓ |
✓ |
✓ |
✓ |
| 125 |
✓ |
✓ |
✓ |
✓ |
✓ |
| 158 |
✓ |
✓ |
✓ |
✓ |
✓ |
| 180 |
✓ |
✓ |
✓ |
✓ |
✓ |
SRFI-27: Random Sources (Key for Gay.jl Bridge)
;; SRFI-27 provides the abstraction layer for splittable RNG
(import (srfi 27))
;; Create a random source with specific seed
(define my-source (make-random-source))
(random-source-pseudo-randomize! my-source 1069 42)
;; Get integers and reals
(define rand-int (random-source-make-integers my-source))
(define rand-real (random-source-make-reals my-source))
;; GF(3) trit from random source
(define (random-trit source)
(- ((random-source-make-integers source) 3) 1))
SRFI-171: Transducers
;; Composable sequence transformations
(import (srfi 171))
;; Filter, map, take composed
(define xform
(compose
(tfilter even?)
(tmap (lambda (x) (* x x)))
(ttake 5)))
;; Apply to list
(list-transduce xform rcons '(1 2 3 4 5 6 7 8 9 10))
;; => (4 16 36 64 100)
SRFI-204: Pattern Matching
(import (srfi 204))
;; Destructuring with guards
(match '(1 2 3)
((x y z) (guard (< x y z)) (list z y x))
(_ 'no-match))
;; => (3 2 1)
;; Quasiquote patterns
(match '(lambda (x) (+ x 1))
(`(lambda (,var) (+ ,var 1)) var)
(_ #f))
;; => x
Integration with Little Schemer
| SRFI |
Little Schemer Concept |
| 1 |
member?, rember, firsts |
| 9 |
Atoms as records |
| 27 |
Y combinator with random exploration |
| 45 |
Lazy evaluation (Seasoned Ch. 16) |
| 154 |
Continuations (Seasoned Ch. 13) |
| 171 |
Collectors as transducers |
| 204 |
Pattern matching vs cond |
Commands
# Search SRFIs by keyword
srfi search "hash table"
# Show SRFI abstract
srfi show 125
# Clone SRFI implementation
srfi clone 171
# Open in browser
srfi open 204
# List all final SRFIs
srfi list --status final
References
REPL atlas
Part of: repl-commons. Family canonical: guile.
1---2name: srfi3description: SRFI Skill4---56# SRFI Skill78> *"SRFIs extend the Scheme programming language. You can help."*9> — srfi.schemers.org1011Scheme Requests for Implementation: portable library specifications with GF(3) categorization.1213## Overview1415SRFIs are community-driven specifications that extend Scheme beyond R5RS/R6RS/R7RS. Each SRFI has a unique number, status (draft/final/withdrawn), and reference implementation.1617## Core SRFIs by Category1819### Data Structures [MINUS: -1]2021| SRFI | Name | Status | Key Exports |22|------|------|--------|-------------|23| 1 | List Library | Final | `fold`, `unfold`, `filter`, `partition` |24| 4 | Homogeneous Vectors | Final | `u8vector`, `f64vector`, typed arrays |25| 9 | Defining Record Types | Final | `define-record-type` |26| 14 | Character Sets | Final | `char-set`, `char-set-contains?` |27| 69 | Basic Hash Tables | Final | `make-hash-table`, `hash-table-ref` |28| 113 | Sets and Bags | Final | `set`, `bag`, `set-contains?` |29| 125 | Intermediate Hash Tables | Final | `hash-table-map`, comparators |30| 128 | Comparators (Reduced) | Final | `make-comparator`, `comparator-hash` |31| 133 | Vector Library | Final | `vector-map`, `vector-fold` |32| 146 | Mappings | Final | `mapping`, functional maps |33| 158 | Generators and Accumulators | Final | `make-coroutine-generator` |3435### Control Flow [ERGODIC: 0]3637| SRFI | Name | Status | Key Exports |38|------|------|--------|-------------|39| 2 | AND-LET* | Final | `and-let*` short-circuit binding |40| 8 | receive | Final | `receive` for multiple values |41| 11 | let-values | Final | `let-values`, `let*-values` |42| 18 | Multithreading | Final | `make-thread`, `mutex`, `condition-variable` |43| 34 | Exception Handling | Final | `guard`, `raise` |44| 39 | Parameter Objects | Final | `make-parameter`, `parameterize` |45| 45 | Primitives for Lazy Eval | Final | `delay`, `force`, `lazy` |46| 124 | Ephemerons | Final | `make-ephemeron`, weak references |47| 154 | First-Class Dynamic Extents | Final | `dynamic-extent`, delimited continuations |48| 155 | Promises | Final | `delay-force`, iterative lazy |49| 226 | Control Features | Final | `call/cc`, `values`, `dynamic-wind` |5051### Syntax & Macros [PLUS: +1]5253| SRFI | Name | Status | Key Exports |54|------|------|--------|-------------|55| 0 | Feature-Based Conditionals | Final | `cond-expand` |56| 6 | Basic String Ports | Final | `open-input-string`, `get-output-string` |57| 26 | Cut/Cute | Final | `cut`, `cute` partial application |58| 42 | Eager Comprehensions | Final | `list-ec`, `sum-ec`, `do-ec` |59| 46 | Syntax for Multiple Values | Final | `values->list`, `values->vector` |60| 57 | Records | Withdrawn | (superseded by 99, 136) |61| 72 | Hygienic Macros | Final | `syntax-case` compatible |62| 139 | Syntax Parameters | Final | `define-syntax-parameter` |63| 147 | Custom Macro Transformers | Final | `er-macro-transformer` |64| 149 | Basic Syntax-Rules Extensions | Final | `_`, `...` patterns |65| 211 | Scheme Macros for Definitions | Final | `define-macro` |6667### I/O & System [MINUS: -1]6869| SRFI | Name | Status | Key Exports |70|------|------|--------|-------------|71| 6 | Basic String Ports | Final | in-memory I/O |72| 28 | Basic Format Strings | Final | `format` |73| 38 | External Representation with Cycles | Final | `write/ss`, `read/ss` |74| 48 | Intermediate Format Strings | Final | `format` with more directives |75| 106 | Basic Socket Interface | Final | `make-client-socket`, `socket-send` |76| 170 | POSIX API | Final | `file-info`, `set-file-mode!` |77| 180 | JSON | Final | `json-read`, `json-write` |78| 192 | Port Positioning | Final | `port-position`, `set-port-position!` |79| 193 | Command Line | Final | `command-line`, `option-processor` |8081### Numeric [ERGODIC: 0]8283| SRFI | Name | Status | Key Exports |84|------|------|--------|-------------|85| 27 | Sources of Random Bits | Final | `random-integer`, `random-real` |86| 60 | Integers as Bits | Final | `bitwise-and`, `bit-set?` |87| 94 | Type-Restricted Numerics | Final | `fx+`, `fl*` |88| 141 | Integer Division | Final | `floor/`, `ceiling/`, `truncate/` |89| 143 | Fixnums | Final | `fx+`, `fxarithmetic-shift` |90| 144 | Flonums | Final | `fl+`, `flsin`, `flexp` |91| 151 | Bitwise Ops on Arbitrary Integers | Final | `bitwise-ior`, `integer-length` |92| 166 | Monadic Formatting | Final | `format` with monadic composition |9394### Testing & Debugging [PLUS: +1]9596| SRFI | Name | Status | Key Exports |97|------|------|--------|-------------|98| 64 | A Scheme API for Test Suites | Final | `test-begin`, `test-equal`, `test-assert` |99| 78 | Lightweight Testing | Final | `check`, `check-ec` |100| 219 | Define Higher-Order Lambda | Final | `define` with curry |101102### Pattern Matching [PLUS: +1]103104| SRFI | Name | Status | Key Exports |105|------|------|--------|-------------|106| 204 | Wright-Cartwright-Shinn Pattern Matcher | Final | `match`, `match-lambda` |107108## GF(3) Distribution109110```111MINUS (-1): Data Structures, I/O & System112ERGODIC (0): Control Flow, Numeric113PLUS (+1): Syntax & Macros, Testing, Pattern Matching114115Conservation: Σ(categories) ≡ 0 (mod 3) when balanced usage116```117118## R7RS-Large Libraries (Red/Tangerine Editions)119120R7RS-Large incorporates SRFIs as standard libraries:121122### Red Edition (2019)123- `(scheme list)` ← SRFI 1124- `(scheme vector)` ← SRFI 133125- `(scheme sort)` ← SRFI 132126- `(scheme set)` ← SRFI 113127- `(scheme charset)` ← SRFI 14128- `(scheme hash-table)` ← SRFI 125129- `(scheme ilist)` ← SRFI 116130- `(scheme rlist)` ← SRFI 101131- `(scheme ideque)` ← SRFI 134132- `(scheme text)` ← SRFI 135133- `(scheme generator)` ← SRFI 158134- `(scheme lseq)` ← SRFI 127135- `(scheme stream)` ← SRFI 41136- `(scheme box)` ← SRFI 111137- `(scheme list-queue)` ← SRFI 117138- `(scheme comparator)` ← SRFI 128139140### Tangerine Edition (2021)141- `(scheme bitwise)` ← SRFI 151142- `(scheme fixnum)` ← SRFI 143143- `(scheme flonum)` ← SRFI 144144- `(scheme division)` ← SRFI 141145- `(scheme bytevector)` ← R6RS146- `(scheme mapping)` ← SRFI 146147- `(scheme regex)` ← SRFI 115148149## Implementation Support Matrix150151| SRFI | Chez | Chicken | Gauche | Guile | Racket |152|------|------|---------|--------|-------|--------|153| 1 | ✓ | ✓ | ✓ | ✓ | ✓ |154| 9 | ✓ | ✓ | ✓ | ✓ | ✓ |155| 18 | ✓ | ✓ | ✓ | ✓ | ✓ |156| 27 | ✓ | ✓ | ✓ | ✓ | ✓ |157| 64 | ✓ | ✓ | ✓ | ✓ | ✓ |158| 125 | ✓ | ✓ | ✓ | ✓ | ✓ |159| 158 | ✓ | ✓ | ✓ | ✓ | ✓ |160| 180 | ✓ | ✓ | ✓ | ✓ | ✓ |161162## SRFI-27: Random Sources (Key for Gay.jl Bridge)163164```scheme165;; SRFI-27 provides the abstraction layer for splittable RNG166(import (srfi 27))167168;; Create a random source with specific seed169(define my-source (make-random-source))170(random-source-pseudo-randomize! my-source 1069 42)171172;; Get integers and reals173(define rand-int (random-source-make-integers my-source))174(define rand-real (random-source-make-reals my-source))175176;; GF(3) trit from random source177(define (random-trit source)178 (- ((random-source-make-integers source) 3) 1))179```180181## SRFI-171: Transducers182183```scheme184;; Composable sequence transformations185(import (srfi 171))186187;; Filter, map, take composed188(define xform189 (compose190 (tfilter even?)191 (tmap (lambda (x) (* x x)))192 (ttake 5)))193194;; Apply to list195(list-transduce xform rcons '(1 2 3 4 5 6 7 8 9 10))196;; => (4 16 36 64 100)197```198199## SRFI-204: Pattern Matching200201```scheme202(import (srfi 204))203204;; Destructuring with guards205(match '(1 2 3)206 ((x y z) (guard (< x y z)) (list z y x))207 (_ 'no-match))208;; => (3 2 1)209210;; Quasiquote patterns211(match '(lambda (x) (+ x 1))212 (`(lambda (,var) (+ ,var 1)) var)213 (_ #f))214;; => x215```216217## Integration with Little Schemer218219| SRFI | Little Schemer Concept |220|------|------------------------|221| 1 | `member?`, `rember`, `firsts` |222| 9 | Atoms as records |223| 27 | Y combinator with random exploration |224| 45 | Lazy evaluation (Seasoned Ch. 16) |225| 154 | Continuations (Seasoned Ch. 13) |226| 171 | Collectors as transducers |227| 204 | Pattern matching vs cond |228229## Commands230231```bash232# Search SRFIs by keyword233srfi search "hash table"234235# Show SRFI abstract236srfi show 125237238# Clone SRFI implementation239srfi clone 171240241# Open in browser242srfi open 204243244# List all final SRFIs245srfi list --status final246```247248## References249250- [srfi.schemers.org](https://srfi.schemers.org/) - Official SRFI home251- [docs.scheme.org/srfi/support](https://docs.scheme.org/srfi/support/) - Implementation matrix252- [R7RS-Large](https://github.com/johnwcowan/r7rs-work/blob/master/R7RSHomePage.md) - Standard incorporation253- [Practical Scheme SRFI Cross-Reference](https://practical-scheme.net/wiliki/schemexref.cgi?SRFI)254255256## REPL atlas257258Part of: `repl-commons`. Family canonical: `guile`.