You are looking at historical revision 33177 of this page. It may differ significantly from its current revision.

Proposed Structure

Here is a tentative but concrete structure from which to work. It's not yet exhaustive. If you see core procedures missing, please add them to a suitable library.

Note that queues, memory-mapped-files, binary-search and object-evict have already been evicted (heh) from core and into eggs (see #1142). Please don't add their procedures.

"Decided"

(chicken bitwise)
arithmetic-shift bit-set? bitwise-and bitwise-ior bitwise-not bitwise-xor integer-length
(chicken continuation)
continuation-capture continuation-graft continuation-return continuation?
(chicken errno)
errno errno/acces errno/again errno/badf errno/busy errno/child errno/exist errno/fault errno/intr errno/inval errno/io errno/isdir errno/mfile errno/noent errno/noexec errno/nomem errno/nospc errno/notdir errno/perm errno/pipe errno/rofs errno/spipe errno/srch errno/wouldblock
(chicken eval)
eval module-environment interaction-environment scheme-report-environment null-environment
(chicken file posix)
file-access-time file-change-time block-device? character-device? socket? duplicate-fileno fifo? set-file-position! perm/irgrp perm/iroth perm/irusr perm/irwxg perm/irwxo perm/irwxu perm/isgid perm/isuid perm/isvtx perm/iwgrp perm/iwoth perm/iwusr perm/ixgrp perm/ixoth perm/ixusr open/append open/binary open/creat open/excl open/fsync open/noctty open/nonblock open/rdonly open/rdwr open/read open/sync open/text open/trunc open/write open/wronly fcntl/dupfd fcntl/getfd fcntl/getfl fcntl/setfd fcntl/setfl file-close file-control file-creation-mode file-link file-lock file-lock/blocking file-mkstemp file-open file-owner file-permissions file-position file-read file-select file-size file-stat file-test-lock file-truncate file-type file-unlock file-write fileno/stderr fileno/stdin fileno/stdout open-input-file* open-output-file* seek/cur seek/set seek/end port->fileno
(chicken file)
file-copy file-move create-temporary-file create-temporary-directory delete-directory directory directory? find-files glob change-file-mode change-file-owner file-read-access? file-write-access? file-execute-access? regular-file? file-modification-time delete-file delete-file* rename-file file-exists? read-symbolic-link create-symbolic-link symbolic-link? create-directory create-fifo directory-exists?
(chicken fixnum)
fx+ fx- fx/ fx* fx< fx<= fx= fx> fx>= fxand fxeven? fxior fxmax fxmin fxmod fxrem fxgcd fxlen fxneg fxnot fxodd? fxshl fxshr fxxor fixnum-bits fixnum-precision most-positive-fixnum most-negative-fixnum fixnum-bits fixnum-precision fixnum?
(chicken flonum)
fp+ fp- fp/ fp* fp< fp<= fp= fp> fp>= fpgcd fpfloor fpceiling fptruncate fpround fpsin fpcos fptan fpasin fpacos fpatan fpatan2 fplog fpexp fpexpt fpsqrt fpabs fpinteger? maximum-flonum minimum-flonum flonum-radix flonum-epsilon flonum-precision flonum-decimal-precision flonum-maximum-exponent flonum-minimum-exponent flonum-maximum-decimal-exponent flonum-minimum-decimal-exponent flonum?
(chicken foreign)
location define-location let-location foreign-code foreign-value foreign-declare define-foreign-type define-foreign-variable foreign-primitive foreign-lambda foreign-lambda* foreign-safe-lambda foreign-safe-lambda* foreign-type-size
(chicken format)
format fprintf printf sprintf
(chicken gc)
set-finalizer! gc set-gc-report! current-gc-milliseconds memory-statistics
(chicken io)
read-buffered read-byte read* read-line read-lines read-string read-string! read-token write-byte write-line write-string print print*
(chicken keyword)
get-keyword keyword->string keyword? string->keyword
(chicken load)
load load-noisily load-relative load-library set-dynamic-load-mode! compile-file compile-file-options
(chicken locative)
locative->object locative-ref locative-set! locative? make-locative make-weak-locative
(chicken memory)
move-memory! allocate free align-to-word make-pointer-vector address->pointer object->pointer pointer+ pointer->address pointer->object pointer-f32-ref pointer-f32-set! pointer-f64-ref pointer-f64-set! pointer-like? pointer-s16-ref pointer-s16-set! pointer-s32-ref pointer-s32-set! pointer-s64-ref pointer-s64-set! pointer-s8-ref pointer-s8-set! pointer-tag pointer-u16-ref pointer-u16-set! pointer-u32-ref pointer-u32-set! pointer-u64-ref pointer-u64-set! pointer-u8-ref pointer-u8-set! pointer-vector pointer-vector-fill! pointer-vector-length pointer-vector-ref pointer-vector-set! pointer-vector? pointer=? pointer? tag-pointer tagged-pointer?
(chicken pathname)
absolute-pathname? decompose-pathname make-pathname make-absolute-pathname pathname-directory pathname-file pathname-extension pathname-replace-directory pathname-replace-file pathname-replace-extension pathname-strip-directory pathname-strip-extension normalize-pathname directory-null? decompose-directory
(chicken platform)
build-platform chicken-home chicken-version extension-information feature? features provide provided? repository-path software-type software-version register-feature! unregister-feature! machine-byte-order machine-type system-information get-host-name
(chicken port)
call-with-input-string call-with-output-string copy-port make-input-port make-output-port port-for-each port-map port-fold make-broadcast-port make-concatenated-port with-error-output-to-port with-input-from-port with-input-from-string with-output-to-port with-output-to-string port-closed? port-name port-position port? flush-output get-output-string open-input-string open-output-string set-port-name! terminal-port? terminal-name terminal-size set-buffering-mode!
(chicken pretty-print)
pp pretty-print pretty-print-width
(chicken process signal)
set-signal-handler! set-signal-mask! signal-handler signal-mask signal-mask! signal-masked? signal-unmask! signal/abrt signal/alrm signal/break signal/bus signal/chld signal/cont signal/fpe signal/hup signal/ill signal/int signal/io signal/kill signal/pipe signal/prof signal/quit signal/segv signal/stop signal/term signal/trap signal/tstp signal/urg signal/usr1 signal/usr2 signal/vtalrm signal/winch signal/xcpu signal/xfsz set-alarm!
(chicken process)
qs system system* process-execute process-fork process-run process-signal process-wait call-with-input-pipe call-with-output-pipe close-input-pipe close-output-pipe create-pipe open-input-pipe open-output-pipe with-input-from-pipe with-output-to-pipe process process* pipe/buf process-group-id create-session
(chicken process-context)
command-line-arguments argv get-environment-variable get-environment-variables set-environment-variable! unset-environment-variable! emergency-exit exit on-exit executable-pathname program-name current-directory set-root-directory! current-effective-group-id current-effective-user-id current-group-id current-process-id current-user-id parent-process-id current-user-name current-effective-user-name current-supplementary-group-ids set-current-supplementary-group-ids!
(chicken random)
random randomize
(chicken read-syntax)
set-read-syntax! set-sharp-read-syntax! set-parameterized-read-syntax! copy-read-table current-read-table define-reader-ctor?
(chicken repl)
repl quit reset
(chicken syntax)
er-macro-transformer ir-macro-transformer expand get-line-number strip-syntax syntax-error
(chicken tcp)
tcp-close tcp-listen tcp-connect tcp-accept tcp-accept-ready? ##sys#tcp-port->fileno tcp-listener? tcp-addresses tcp-abandon-port tcp-listener-port tcp-listener-fileno tcp-port-numbers tcp-buffer-size tcp-read-timeout tcp-write-timeout tcp-accept-timeout tcp-connect-timeout
(chicken time posix)
seconds->utc-time utc-time->seconds seconds->local-time seconds->string local-time->seconds string->time time->string local-timezone-abbreviation
(chicken time)
time cpu-time current-milliseconds current-seconds
Removals
_exit
rename to emergency-exit
change-directory
remove in favor of current-directory
change-directory*
remove in favor of current-directory
get-groups
rename to current-supplementary-group-ids
getenv
rename to get-environment-variable
group-information user-information
move to egg
initialize-groups
combine with set-current-supplementary-group-ids!
read-all
remove in favor of read-string
read-file
rename to read* (or perhaps read-all, now that that name is available?)
require
deprecate
scan-input-lines
move to egg
set-groups!
rename to set-current-supplementary-group-ids!
setenv
rename to set-environment-variable!
unsetenv
rename to unset-environment-variable!
yes-or-no?
keep, but don't expose to users
Changes
sleep
sleeps the process when scheduler is not loaded, sleeps the current thread when loaded (also, use a hook to implement this)
system*
no longer sprintfs
read-string
returns #!eof on #!eof

Undecided

(chicken condition)
abort condition->list condition-case condition-predicate condition-property-accessor condition? current-exception-handler get-condition-property handle-exceptions make-composite-condition make-property-condition signal with-exception-handler
(chicken alist)
alist-ref alist-update alist-update! rassoc
(chicken combinator)
any? constantly complement compose conjoin disjoin each flip identity o
(chicken list)
atom? butlast chop compress flatten intersperse join list-of? tail?
(chicken sort)
merge sort sorted? topological-sort
(chicken string)
->string conc string-chop string-chomp string-compare3 string-compare3-ci reverse-string-append string-intersperse string-split string-translate string-translate* substring=? substring-ci=? substring-index substring-index-ci reverse-list->string
(chicken module)
module import export reexport define-interface functor use
(chicken setup-api)
compile copy-file create-directory/parents extension-name-and-version find-header find-library host-extension install-extension install-program install-script installation-prefix move-file patch program-path remove-file* run setup-install-mode setup-root-directory standard-extension try-compile version>=?
(chicken base)
add1 sub1 call/cc current-error-port current-output-port error void gensym get put! remprop! promise? blob->string blob-size blob=? blob? char-name enable-warnings equal=? finite? foldl foldr get-call-chain get-properties getter-with-setter make-blob print-call-chain print-error-message procedure-information setter signum string->blob string->uninterned-symbol subvector symbol-append symbol-plist vector-copy! vector-resize warning
(chicken memory ???)
block-ref block-set! extend-procedure extended-procedure? make-record-instance mutate-procedure! number-of-bytes number-of-slots object-become! object-copy procedure-data record->vector record-instance-length record-instance-slot record-instance-slot-set! record-instance-type record-instance? set-procedure-data! vector-like?
(chicken ???)
: the assume define-type define-specialization compiler-typecase

Existing Structure

The following is a dump of the non-SRFI units as they currently exist. Annotate with ideas for new locations as you see fit.

data-structures

->string
string
alist-ref
alist
alist-update
alist
alist-update!
alist
any?
atom?
binary-search
butlast
list
chop
list
complement
compose
compress
list
conc
string
conjoin
constantly
disjoin
each
flatten
list
flip
identity
intersperse
list
join
list->queue
queue
list-of?
make-queue
queue
merge
list
merge!
list
o
queue->list
queue
queue-add!
queue
queue-empty?
queue
queue-first
queue
queue-last
queue
queue-length
queue
queue-push-back!
queue
queue-push-back-list!
queue
queue-remove!
queue
queue?
queue
random-seed
random
rassoc
alist
reverse-string-append
string
sort
sort
sort!
sort
sorted?
sort
string-chomp
string
string-chop
string
string-compare3
string
string-compare3-ci
string
string-intersperse
string
string-split
string
string-translate
string
string-translate*
string
substring-ci=?
string
substring-index
string
substring-index-ci
string
substring=?
string
tail?
topological-sort
sort

eval

chicken-home
platform
eval
extension-information
load
load
load-library
load
load-noisily
load
load-relative
load
provide
provided?
repl
repository-path
platform
require
set-dynamic-load-mode!

expand

er-macro-transformer
expand
get-line-number
ir-macro-transformer
syntax-error

extras

format
io, format
fprintf
io, format
pp
io, data, format
pretty-print
io, data, format
pretty-print-width
io, data, format
printf
io, format, format
random
random
randomize
random
read-byte
io, read
read-file
io, read
read-line
io, read
read-lines
io, read
read-string
io, read
read-string!
io, read
read-token
io, read
sprintf
io, format
write-byte
io, write
write-line
io, write
write-string
io, write

files

absolute-pathname?
path
create-temporary-directory
file
create-temporary-file
file
decompose-directory
path
decompose-pathname
path
delete-file*
file
directory-null?
file-copy
file
file-move
file
make-absolute-pathname
path
make-pathname
path
normalize-pathname
path
pathname-directory
path
pathname-extension
path
pathname-file
path
pathname-replace-directory
path
pathname-replace-extension
path
pathname-replace-file
path
pathname-strip-directory
path
pathname-strip-extension
path

library

add1
argv
arithmetic-shift
bitwise
bit-set?
bitwise
bitwise-and
bitwise
bitwise-ior
bitwise
bitwise-not
bitwise
bitwise-xor
bitwise
blob->string
blob-size
blob=?
blob?
build-platform
platform
call/cc
char-name
chicken-version
platform
continuation-capture
continuation-graft
continuation-return
continuation?
copy-read-table
reader
cplxnum?
cpu-time
current-error-port
current-gc-milliseconds
time
current-milliseconds
time
current-output-port
current-seconds
time
define-reader-ctor
reader
delete-file
file
directory-exists?
enable-warnings
platform
equal=?
errno
error
exact-integer?
exact-integer-nth-root
exact-integer-sqrt
exit
process, system
feature?
platform
features
platform
file-exists?
file
finite?
fixnum-bits
fixnum, platform, limits
fixnum-precision
fixnum, platform, limits
fixnum?
fixnum
flonum-decimal-precision
flonum
flonum-epsilon
flonum
flonum-maximum-decimal-exponent
flonum, platform, limits
flonum-maximum-exponent
flonum, platform, limits
flonum-minimum-decimal-exponent
flonum, platform, limits
flonum-minimum-exponent
flonum, platform, limits
flonum-precision
flonum
flonum-radix
flonum
flonum?
flonum
flush-output
io, port
foldl
foldr
fp*
flonum
fp+
flonum
fp-
flonum
fp/
flonum
fp<
flonum
fp<=
flonum
fp=
flonum
fp>
flonum
fp>=
flonum
fpabs
flonum
fpacos
flonum
fpasin
flonum
fpatan
flonum
fpatan2
flonum
fpceiling
flonum
fpcos
flonum
fpexp
flonum
fpexpt
flonum
fpfloor
flonum
fpgcd
flonum
fpinteger?
flonum
fplog
flonum
fpmax
flonum
fpmin
flonum
fpneg
flonum
fpround
flonum
fpsin
flonum
fpsqrt
flonum
fptan
flonum
fptruncate
flonum
fx*
fixnum
fx+
fixnum
fx-
fixnum
fx/
fixnum
fx<
fixnum
fx<=
fixnum
fx=
fixnum
fx>
fixnum
fx>=
fixnum
fxand
fixnum
fxeven?
fixnum
fxgcd
fixnum
fxior
fixnum
fxlen
fixnum
fxmax
fixnum
fxmin
fixnum
fxmod
fixnum
fxneg
fixnum
fxnot
fixnum
fxodd?
fixnum
fxrem
fixnum
fxshl
fixnum
fxshr
fixnum
fxxor
fixnum
gc
memory
gensym
get
get-call-chain
get-environment-variable
process, env
get-keyword
keyword
get-output-string
port
get-properties
getenv
process, env
getter-with-setter
infinite?
integer-length
bitwise
keyword->string
keyword
keyword?
keyword
machine-byte-order
platform
machine-type
platform
make-blob
memory
maximum-flonum
platform, limits
memory-statistics
platform, stats
minimum-flonum
platform, limits
most-negative-fixnum
platform, limits
most-positive-fixnum
platform, limits
nan?
on-exit
process, event
open-input-string
io, port
open-output-string
io, port
port-closed?
port
port-name
port
port-position
port
port?
port
print
io, write
print*
io, write
print-call-chain
print-error-message
procedure-information
promise?
put!
quit
process
quotient&modulo
quotient&remainder
ratnum?
register-feature!
platform
remprop!
rename-file
file
reset
event
reverse-list->string
set-finalizer!
set-gc-report!
platform
set-parameterized-read-syntax!
reader
set-port-name!
set-read-syntax!
reader
set-sharp-read-syntax!
reader
setter
signum
software-type
platform
software-version
platform
string->blob
string->keyword
keyword
string->uninterned-symbol
sub1
subvector
symbol-append
symbol-plist
system
process, system
unregister-feature!
platform
vector-copy!
vector-resize
void
warning

lolevel

address->pointer
align-to-word
allocate
memory
block-ref
block-set!
extend-procedure
extended-procedure?
free
memory
locative->object
locative-ref
locative-set!
locative?
make-locative
make-pointer-vector
make-record-instance
make-weak-locative
move-memory!
memory
mutate-procedure!
number-of-bytes
number-of-slots
object->pointer
object-become!
object-copy
object-evict
object-evict-to-location
object-evicted?
object-release
object-size
object-unevict
pointer+
pointer->address
pointer->object
pointer-f32-ref
pointer-f32-set!
pointer-f64-ref
pointer-f64-set!
pointer-like?
pointer-s16-ref
pointer-s16-set!
pointer-s32-ref
pointer-s32-set!
pointer-s64-ref
pointer-s64-set!
pointer-s8-ref
pointer-s8-set!
pointer-tag
pointer-u16-ref
pointer-u16-set!
pointer-u32-ref
pointer-u32-set!
pointer-u64-ref
pointer-u64-set!
pointer-u8-ref
pointer-u8-set!
pointer-vector
pointer-vector-ref
pointer-vector-set!
pointer-vector?
pointer=?
pointer?
procedure-data
record->vector
record-instance-length
record-instance-slot
record-instance-slot-set!
record-instance-type
record-instance?
set!
set-procedure-data!
tag-pointer
tagged-pointer?
vector-like?

ports

This unit is already pretty sane.

call-with-input-string
port
call-with-output-string
port
copy-port
port
make-broadcast-port
port
make-concatenated-port
port
make-input-port
port
make-output-port
port
port-fold
port
port-for-each
port
port-map
port
with-error-output-to-port
port
with-input-from-port
port
with-input-from-string
port
with-output-to-port
port
with-output-to-string
port

posix

_exit
process, system
block-device?
file
call-with-input-pipe
io, port
call-with-output-pipe
io, port
change-directory
change-directory*
change-file-mode
file
change-file-owner
file
character-device?
file
close-input-pipe
io, port
close-output-pipe
io, port
create-directory
create-fifo
file
create-pipe
io, fd
create-session
process
create-symbolic-link
current-directory
process
current-effective-group-id
process
current-effective-user-id
process
current-group-id
process
current-process-id
process
current-user-id
process
delete-directory
directory
directory?
duplicate-fileno
fd
errno/acces
errno/again
errno/badf
errno/busy
errno/child
errno/exist
errno/fault
errno/intr
errno/inval
errno/io
errno/isdir
errno/mfile
errno/noent
errno/noexec
errno/nomem
errno/nospc
errno/notdir
errno/perm
errno/pipe
errno/rofs
errno/spipe
errno/srch
errno/wouldblock
fcntl/dupfd
fd, file
fcntl/getfd
fd, file
fcntl/getfl
fd, file
fcntl/setfd
fd, file
fcntl/setfl
fd, file
fifo?
file
file-access-time
file
file-change-time
file
file-close
file
file-control
file
file-creation-mode
file
file-execute-access?
file
file-link
file
file-lock
file
file-lock/blocking
file
file-mkstemp
file
file-modification-time
file
file-open
file
file-owner
file
file-permissions
file
file-position
file
file-read
file
file-read-access?
file
file-select
file
file-size
file
file-stat
file
file-test-lock
file
file-truncate
file
file-type
file
file-unlock
file
file-write
file
file-write-access?
file
fileno/stderr
io, fd
fileno/stdin
io, fd
fileno/stdout
io, fd
find-files
get-environment-variables
process, env
get-groups
process
get-host-name
process, system
glob
group-information
process
initialize-groups
system
local-time->seconds
time
local-timezone-abbreviation
time
map-file-to-memory
memory
memory-mapped-file-pointer
memory
memory-mapped-file?
memory
open-input-file*
io, fd
open-input-pipe
io
open-output-file*
io, fd
open-output-pipe
io
open/append
open/binary
open/creat
open/excl
open/fsync
open/noctty
open/nonblock
open/rdonly
open/rdwr
open/read
open/sync
open/text
open/trunc
open/write
open/wronly
parent-process-id
process
perm/irgrp
perm/iroth
perm/irusr
perm/irwxg
perm/irwxo
perm/irwxu
perm/isgid
perm/isuid
perm/isvtx
perm/iwgrp
perm/iwoth
perm/iwusr
perm/ixgrp
perm/ixoth
perm/ixusr
port->fileno
io, port, fd
process
process
process*
process
process-execute
process
process-fork
process
process-group-id
process
process-run
process
process-signal
process, signal
process-spawn
process
process-wait
process
read-symbolic-link
file
regular-file?
file
seconds->local-time
time
seconds->string
time
seconds->utc-time
time
set!
set-alarm!
signal
set-buffering-mode!
port
set-file-position!
set-groups!
process
set-process-group-id!
process
set-root-directory!
process, system
set-signal-handler!
signal
set-signal-mask!
signal
setenv
process, env
signal-handler
signal
signal-mask
signal
signal-mask!
signal
signal-masked?
signal
signal-unmask!
signal
signal/abrt
signal
signal/alrm
signal
signal/chld
signal
signal/cont
signal
signal/fpe
signal
signal/hup
signal
signal/ill
signal
signal/int
signal
signal/io
signal
signal/kill
signal
signal/pipe
signal
signal/prof
signal
signal/quit
signal
signal/segv
signal
signal/stop
signal
signal/term
signal
signal/trap
signal
signal/tstp
signal
signal/urg
signal
signal/usr1
signal
signal/usr2
signal
signal/vtalrm
signal
signal/winch
signal
signal/xcpu
signal
signal/xfsz
signal
sleep
process
socket?
file
string->time
time
symbolic-link?
file
system-information
system, platform
terminal-name
terminal-port?
terminal-size
time->string
time
unmap-file-from-memory
memory
unsetenv
process, env
user-information
system
utc-time->seconds
time
with-input-from-pipe
io, port
with-output-to-pipe
io, port

utils

compile-file
compile-file-options
qs
system
read-all
io, read
scan-input-lines
io, read
system*
system, process
yes-or-no?
system

Other special things

To make CHICKEN fully modular, these have to find a home under one of the above namespaces.

##sys#slot, ##sys#setslot, ##sys#setislot
rename to
 {{unsafe-block-ref}}, {{unsafe-block-set!}} and {{unsafe-block-set-immediate!}} and move under {{(chicken memory ???)}} where {{block-ref}} and {{block-set!}} are?