Changeset 9418 in project


Ignore:
Timestamp:
03/11/08 06:51:11 (12 years ago)
Author:
Ivan Raikov
Message:

Manual updated from the wiki.

Location:
chicken/trunk/manual
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/manual/Accessing external objects

    r6691 r9418  
    138138==== TYPENAME-SLOTNAME-set!
    139139 
    140  (TYPENAME-SLOTNAME-set! FOREIGN-RECORD-POINTER [INXDEX] VALUE)
     140 (TYPENAME-SLOTNAME-set! FOREIGN-RECORD-POINTER [INDEX] VALUE)
    141141
    142142A procedure of two arguments (a pointer to a C structure) and a value, that
  • chicken/trunk/manual/Acknowledgements

    r9087 r9418  
    1818itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William
    1919P. Heinemann, Bill Hoffman, Bruce Hoult, Hans Huebner, Markus
    20 Huelsmann, Goetz Isenmann, Andrei Ivushkin, Paulo Jabardo, David Janssens, Christian
     20Huelsmann, Goetz Isenmann, Paulo Jabardo, David Janssens, Christian
    2121Jaeger, Dale Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller,
    2222Brad Kind, Ron Kneusel, Matthias Koeppe, Krysztof Kowałczyk,
     
    6363; Andrew Wilcox : queues.
    6464; Andrew Wright : pattern matcher.
    65 ; [[Alex Shinn]] : {{scheme-complete.el}} emacs tab-completion
     65; [[http://chicken.wiki.br/Alex Shinn|Alex Shinn]] : {{scheme-complete.el}} emacs tab-completion
    6666
    6767Previous: [[FAQ]]
  • chicken/trunk/manual/The User's Manual

    r9351 r9418  
    33== The User's Manual
    44
    5 ''(This document describes version 3.0.5)''
     5This is the user's manual for the Chicken Scheme compiler, version 3.0.4.
    66
    7 '''CHICKEN is a compiler that translates Scheme source files into C''', which in
    8 turn can be fed to a C-compiler to generate a standalone executable.
    9 An interpreter is also available and can be used as
    10 a scripting environment or for testing programs before compilation.
    11 
    12 This package is distributed under the '''BSD license''' and as such is free
    13 to use and modify.
    14 
    15 The method of compilation and the design of the runtime-system follow
    16 closely Henry Baker's [[http://home.pipeline.com/~hbaker1/CheneyMTA.html|CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A.]] paper and expose a number of interesting
    17 properties:
    18 
    19 * Consing (creation of data on the heap) is relatively inexpensive, because a generational garbage collection scheme is used, in which short-lived data structures are reclaimed extremely quickly.
    20 
    21 * Moreover, {{call-with-current-continuation}} is practically for free and CHICKEN does not suffer under any performance penalties if first-class continuations are used in complex ways.
    22 
    23 The generated C code is fully tail-recursive.
    24 
    25 Some of the features supported by CHICKEN:
    26 
    27 * SRFIs 0, 1, 2, 4, 6-19, 23, 25-31, 37-40, 42, 43, 45, 47, 55, 57, 60-63, 66, 69, 72, 78, 85 and 95.
    28 * Lightweight threads based on first-class continuations
    29 * Pattern matching with Andrew Wright's {{match}} package
    30 * Record structures
    31 * Extended comment- and string-literal syntaxes
    32 * Libraries for regular expressions, string handling
    33 * UNIX system calls and extended data structures
    34 * Create interpreted or compiled shell scripts written in Scheme for UNIX or Windows
    35 * Compiled C files can be easily distributed
    36 * Allows the creation of fully self-contained statically linked executables
    37 * On systems that support it, compiled code can be loaded dynamically
    38 
    39 This manual is merely a reference for the CHICKEN system and assumes
    40 a working knowledge of Scheme.
    41 
    42 The manual is split in the following sections:
     7; [[Overview]] : What is Chicken?
    438
    449; [[Basic mode of operation]] : Compiling Scheme files.
  • chicken/trunk/manual/Unit extras

    r8410 r9418  
    44== Unit extras
    55
    6 This unit contains a collection of useful utility definitions.
     6This unit contains a collection of useful utility definitions. 
    77This unit is used by default, unless the program
    88is compiled with the {{-explicit-use}} option.
     
    228228
    229229
    230 === Hash Tables
    231 
    232 CHICKEN implements an extended SRFI-69. For more information,
    233 see [[http://srfi.schemers.org/srfi-69/srfi-69.html|SRFI-69]] and
    234 [[http://srfi.schemers.org/srfi-69/srfi-90.html|SRFI-90]].
     230=== Hash tables
     231
     232CHICKEN implements SRFI-69. For more information,
     233see [[http://srfi.schemers.org/srfi-69/srfi-69.html|SRFI-69]].
    235234
    236235A setter for {{hash-table-ref}} is defined, so
     
    246245</enscript>
    247246
    248 
    249 ==== make-hash-table
    250 
    251  [procedure] (make-hash-table [TEST [HASH [SIZE]]] [#:TEST #:HASH #:SIZE #:INITIAL #:MIN-LOAD #:MAX-LOAD #:WEAK-KEYS #:WEAK-VALUES])
    252 
    253 The SRFI-69 procedure is extended:
    254 
    255 Returns a new {{HASH-TABLE}}, parameterized as follows:
    256 
    257 {{TEST}} is a procedure of one argument, {{(object -> boolean)}}; an equality
    258 predicate. The first argument is a {{KEY}}.
    259 
    260 {{HASH}} is a procedure of two arguments, {{(object (fixnum positive) ->
    261 (fixnum (<= 0 _ _2)))}}; a bounded hash function, where the returned hash value
    262 is in {{[0 BOUND)}}. The first argument is a {{KEY}} and the second argument is
    263 the {{BOUND}}.
    264 
    265 {{SIZE}} is a {{fixnum}}; the initial size of the hash-table.
    266 
    267 {{INITIAL}} is an {{object}}; the default initial value for any {{KEY}}.
    268 
    269 {{MIN-LOAD}} is a {{flonum}} in {{(0.0 1.0)}}; the lower bound for resizing the table.
    270 
    271 {{MAX-LOAD}} is a {{flonum}} in {{(0.0 1.0)}}; the upper bound for resizing the table.
    272 
    273 {{WEAK-KEYS}} is a {{boolean}}; always {{#f}} (until further notice).
    274 
    275 {{WEAK-VALUES}} is a {{boolean}}; always {{#f}} (until further notice).
    276 
    277 Keyword arguments take precedence over optional arguments when both are specified.
    278 
    279 
    280 ==== hash-table-min-load
    281 
    282  [procedure] (hash-table-min-load HASH-TABLE)
    283 
    284 Returns the {{MIN-LOAD}} property of the {{HASH-TABLE}}.
    285 
    286 
    287 ==== hash-table-max-load
    288 
    289  [procedure] (hash-table-max-load HASH-TABLE)
    290 
    291 Returns the {{MAX-LOAD}} property of the {{HASH-TABLE}}.
    292 
    293 
    294 ==== hash-table-weak-keys
    295 
    296  [procedure] (hash-table-weak-keys HASH-TABLE)
    297 
    298 Returns the {{WEAK-KEYS}} property of the {{HASH-TABLE}}.
    299 
    300 
    301 ==== hash-table-weak-values
    302 
    303  [procedure] (hash-table-weak-values HASH-TABLE)
    304 
    305 Returns the {{WEAK-VALUES}} property of the {{HASH-TABLE}}.
    306 
    307 
    308 ==== hash-table-has-initial
    309 
    310  [procedure] (hash-table-has-initial HASH-TABLE)
    311 
    312 Does the {{HASH-TABLE}} have an {{INITIAL}} property.
    313 
    314 
    315 ==== hash-table-initial
    316 
    317  [procedure] (hash-table-initial HASH-TABLE)
    318 
    319 Returns the {{INITIAL}} property of the {{HASH-TABLE}}.
    320 
    321 
    322 ==== hash-table-update!
    323 
    324  [procedure] (hash-table-update! HASH-TABLE KEY [FUNCTION [THUNK]])
    325 
    326 The SRFI-69 procedure is extended:
    327 
    328 {{FUNCTION}} is optional. The default is {{identity}}.
    329 
    330 {{THUNK}} is optional. The default is {{(lambda () (hash-table-initial
    331 HASH-TABLE))}}; when the {{HASH-TABLE}} has no initial value an error is
    332 signaled.
    333 
    334 Returns the new value, after the update.
    335 
    336 
    337 ==== hash-table-update!/default
    338 
    339  [procedure] (hash-table-update!/default HASH-TABLE KEY FUNCTION DEFAULT)
    340 
    341 The SRFI-69 procedure is extended:
    342 
    343 Returns the new value, after the update.
    344 
     247As an extension to SRFI-69, {{hash-table-update!}} and {{hash-table-update!/default}} return
     248the new value (after applying the update procedure).
    345249
    346250==== hash-table-remove!
    347251
    348  [procedure] (hash-table-remove! HASH-TABLE PROC)
    349 
    350 Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each
     252 [procedure] (hash-table-remove! HASHTABLE PROC)
     253
     254Calls {{PROC}} for all entries in {{HASHTABLE}} with the key and value of each
    351255entry. If {{PROC}} returns true, then that entry is removed.
    352 
    353 
    354 ==== hash-table-merge
    355 
    356  [procedure] (hash-table-merge HASH-TABLE-1 HASH-TABLE-2)
    357 
    358 Returns a new {{hash-table}}, the merged result of {{HASH-TABLE-1}} &
    359 {{HASH-TABLE-2}}.
    360 
    361 
    362 ==== hash-table-map
    363 
    364  [procedure] (hash-table-map HASH-TABLE PROC)
    365 
    366 Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each
    367 entry.
    368 
    369 {{PROC}} is a procedure of 2 arguments, {{(object object -> object)}}; the
    370 first argument is the {{KEY}}, and the second argument is the {{VALUE}}. The
    371 return value is collected in a list.
    372 
    373 Returns the list collection.
    374 
    375 
    376 ==== hash-table-for-each
    377 
    378  [procedure] (hash-table-for-each HASH-TABLE PROC)
    379 
    380 Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each
    381 entry.
    382 
    383 {{PROC}} is a procedure of 2 arguments, {{(object object -> unspecified)}}; the first
    384 argument is the {{KEY}}, and the second argument is the {{VALUE}}.
    385 
    386 No return value.
    387 
    388 A synonym for {{hash-table-walk}}.
    389 
    390 
    391 ==== number-hash
    392 
    393  [procedure] (number-hash NUMBER [BOUND])
    394 
    395 Returns a hash value for the {{NUMBER}}, with optional {{BOUND}}.
    396 
    397 
    398 ==== object-uid-hash
    399 
    400  [procedure] (object-uid-hash OBJECT [BOUND])
    401 
    402 Returns a hash value for the {{OBJECT}}, with optional {{BOUND}}.
    403 
    404 Currently this is a synonym for {{equal?-hash}}.
    405 
    406 
    407 ==== symbol-hash
    408 
    409  [procedure] (symbol-hash SYMBOL [BOUND])
    410 
    411 Returns a hash value for the {{SYMBOL}}, with optional {{BOUND}}.
    412 
    413 
    414 ==== keyword-hash
    415 
    416  [procedure] (keyword-hash KEYWORD [BOUND])
    417 
    418 Returns a hash value for the {{KEYWORD}}, with optional {{BOUND}}.
    419 
    420 
    421 ==== eq?-hash
    422 
    423  [procedure] (eq?-hash OBJECT [BOUND])
    424 
    425 Returns a hash value for the {{OBJECT}}, with optional {{BOUND}}.
    426 
    427 For use with {{eq?}} as {{TEST}}.
    428 
    429 {{hash-by-identity}} is a synonym.
    430 
    431 Uses {{object-uid-hash}} for non-immediate, non-symbol objects.
    432 
    433 
    434 ==== eqv?-hash
    435 
    436  [procedure] (eqv?-hash OBJECT [BOUND])
    437 
    438 Returns a hash value for the {{OBJECT}}, with optional {{BOUND}}.
    439 
    440 For use with {{eqv?}} as {{TEST}}.
    441 
    442 Uses {{object-uid-hash}} for non-immediate, non-number, non-symbol objects.
    443 
    444 
    445 ==== equal?-hash
    446 
    447  [procedure] (equal?-hash OBJECT [BOUND])
    448 
    449 Returns a hash value for the {{OBJECT}}, with optional {{BOUND}}.
    450 
    451 For use with {{equal?}} as {{TEST}}.
    452 
    453 {{hash}} is a synonym.
    454256
    455257
     
    578380
    579381=== Random numbers
     382
     383
     384==== random-seed
     385
     386 [procedure] (random-seed [SEED])
     387
     388Seeds the random number generator with {{SEED}} (an exact integer) or
     389{{(current-seconds)}} if {{SEED}} is not given.
    580390
    581391
     
    660470input is read from the port that is the current value of {{(current-input-port)}}.
    661471After all expressions are read, and if the argument is a port, then the port will
    662 not be closed. The {{READER}} argument specifies the procedure used to read
     472not be closed. The {{READER}} argument specifies the procedure used to read 
    663473expressions from the given file or port and defaults to {{read}}. The reader
    664474procedure will be called with a single argument (an input port).
     
    697507
    698508Read or write {{NUM}} characters from/to {{PORT}}, which defaults to the
    699 value of {{(current-input-port)}} or {{(current-output-port)}}, respectively.
     509value of {{(current-input-port)}} or {{(current-output-port)}}, respectively. 
    700510If {{NUM}} is {{#f}} or not given, then all data
    701511up to the end-of-file is read, or, in the case of {{write-string}} the whole
     
    757567
    758568
     569
    759570==== ->string
    760571
     
    820631
    821632Split string into substrings separated by the given delimiters. If
    822 no delimiters are specified, a string comprising the tab, newline and space characters
     633no delimiters are specified, a string comprising the tab, newline and space characters 
    823634is assumed. If the
    824635parameter {{KEEPEMPTY}} is given and not {{#f}}, then empty
     
    857668  "<h1>this is a \"string\"</h1>"
    858669  '(("<" . "&lt;") (">" . "&gt;") ("\"" . "&quot;")) )
    859 =>  "&lt;h1&gt;this is a &quot;string&quot;&lt;/ht&gt;"
     670=>  "&lt;h1&gt;this is a &quot;string&quot;&lt;/h1&gt;"
    860671</enscript>
    861672
     
    895706
    896707
    897 ==== none?
    898 
    899  [procedure] (none? X)
    900 
    901 Ignores its argument and always returns {{#f}}. This is actually useful sometimes.
    902 
    903 
    904 ==== always?
    905 
    906  [procedure] (always? X ...)
    907 
    908 Ignores its arguments and always returns {{#t}}. This is actually useful sometimes.
    909 
    910 
    911 ==== never?
    912 
    913  [procedure] (never? X ...)
    914 
    915 Ignores its arguments and always returns {{#f}}. This is actually useful sometimes.
    916 
    917 
    918708==== constantly
    919709
     
    979769
    980770
     771
    981772==== each
    982773
     
    993784
    994785<enscript highlight=scheme>
    995 (lambda args
     786(lambda args 
    996787  (apply pp args)
    997788  (apply eval args) )
     
    1054845A single value version of {{compose}} (slightly faster). {{(o)}} is equivalent
    1055846to {{identity}}.
    1056 
    1057 
    1058 ==== left-section
    1059 
    1060  [procedure] (left-section PROC ARG ...)
    1061 
    1062 A left section partially applies arguments starting from the left.
    1063 
    1064 Returns a variadic procedure in which some prefix of its arguments,
    1065 {{ARG ...}}, are partially applied to {{PROC}}.
    1066 
    1067 
    1068 ==== right-section
    1069 
    1070  [procedure] (right-section PROC ARG ...)
    1071 
    1072 A right section partially applies arguments starting from the right.
    1073 
    1074 Returns a variadic procedure in which some reversed suffix of its arguments,
    1075 {{ARG ...}}, are partially applied to {{PROC}}.
    1076 
    1077 
    1078847
    1079848=== Binary searching
  • chicken/trunk/manual/Unit library

    r8641 r9418  
    9898; [procedure] (fp<= X Y)
    9999
    100 ==== flonum-print-precision
    101 
    102  [procedure] (flonum-print-precision [PRECISION])
    103 
    104 Gets and sets the number of significant digits printed for a floating-point
    105 number. {{PRECISION}} must be a positive {{fixnum}}. Always returns
    106 the setting in effect at the moment of invocation.
    107 
    108100==== signum
    109101
  • chicken/trunk/manual/Unit posix

    r8410 r9418  
    118118file-patterns (with {{*}} matching zero or more characters and
    119119{{?}} matching zero or one character).
     120
     121==== canonical-path
     122
     123 [procedure] (canonical-path NAME)
     124
     125Returns a canonical path for {{NAME}}, which should be a string
     126containing a path-or-filename.  The string returned by
     127{{canonical-path}} is OS dependent; it may be quoted and used in
     128a shell on the calling machine. (Quoting is suggested as shell
     129special characters, including space, are not escaped.)  However,
     130all path separators and prefixes are handled in an OS independent
     131fashion.  Any appearance of {{/}} below imply {{\\}} is also handled.
     132
     133The prefix for {{NAME}} determines what path to prepend.  If {{NAME}}
     134begins with a {{"~/"}}, this prefix is stripped and the user's
     135home directory is added.  If beginning with {{/}} or a DRIVE-LETTER:\\
     136combination, no additional path is added.  Otherwise, the current
     137directory and separator are added.  All relative path elements and
     138duplicate separators are processed and removed.  If {{NAME}} ends with
     139a {{/}} or is empty, the appropriate slash is appended to the tail.
     140
     141No directories or files are actually tested for existence; this
     142procedure only canonicalises path syntax.
    120143
    121144==== set-root-directory!
     
    426449These procedures return {{#t}} if the current user has read,
    427450write or execute permissions on the file named {{FILENAME}}.
     451
     452
     453==== stat-regular?
     454==== stat-directory?
     455==== stat-char-device?
     456==== stat-block-device?
     457==== stat-fifo?
     458==== stat-symlink?
     459==== stat-socket?
     460
     461 [procedure] (stat-regular? FILENAME)
     462 [procedure] (stat-directory? FILENAME)
     463 [procedure] (stat-char-device? FILENAME)
     464 [procedure] (stat-block-device? FILENAME)
     465 [procedure] (stat-fifo? FILENAME)
     466 [procedure] (stat-symlink? FILENAME)
     467 [procedure] (stat-socket? FILENAME)
     468
     469These procedures return {{#t}} if the {{FILENAME}} given is of the
     470appropriate type.
    428471
    429472
     
    9581001==== time->string
    9591002
    960  [procedure] (time->string VECTOR [FORMAT])
    961 
    962 Without a {{FORMAT}} string converts the broken out time represented in the 10
    963 element vector {{VECTOR}} into a string of the form {{"Tue May 21 13:46:22
     1003 [procedure] (time->string VECTOR)
     1004
     1005Converts the broken down time represented in the 10 element vector
     1006{{VECTOR}} into a string of the form {{"Tue May 21 13:46:22
    96410071991"}}.
    9651008
    966 Otherwise returns the time as a string formatted per the {{FORMAT}} string.
    967 
    968 See the {{strftime}} C procedure for a specification of the {{FORMAT}} string.
    969 
    970 ==== string->time
    971 
    972  [procedure] (string->time STRING [FORMAT])
    973 
    974 Returns the time string parsed per the {{FORMAT}} string as a broken out time
    975 10 element vector.
    976 
    977 The default {{FORMAT}} string is {{"%a %b %e %H:%M:%S %Z %Y"}}. (The default
    978 {{date}} command format.)
    979 
    980 See the {{strptime}} C procedure for a specification of the {{FORMAT}} string.
    9811009
    9821010=== Raw exit
     
    10871115{{#f}} otherwise.
    10881116
    1089 ==== terminal-size
    1090 
    1091  [procedure] (terminal-size PORT)
    1092 
    1093 Returns two values: The height and width of the terminal connected to {{PORT}}.
    10941117
    10951118=== How Scheme procedures relate to UNIX C functions
    10961119
    1097 <table>
    1098 <tr><td> change-directory
    1099 chdir
    1100 </td></tr><tr><td> change-file-mode
    1101 chmod
    1102 </td></tr><tr><td> change-file-owner
    1103 chown
    1104 </td></tr><tr><td> create-directory
    1105 mkdir
    1106 </td></tr><tr><td> create-fifo
    1107 mkfifo
    1108 </td></tr><tr><td> create-pipe
    1109 pipe
    1110 </td></tr><tr><td> create-session
    1111 setsid
    1112 </td></tr><tr><td> create-symbolic-link
    1113 link
    1114 </td></tr><tr><td> current-directory
    1115 curdir
    1116 </td></tr><tr><td> current-effective-groupd-id
    1117 getegid
    1118 </td></tr><tr><td> current-effective-user-id
    1119 geteuid
    1120 </td></tr><tr><td> current-group-id
    1121 getgid
    1122 </td></tr><tr><td> current-parent-id
    1123 getppid
    1124 </td></tr><tr><td> current-process-id
    1125 getpid
    1126 </td></tr><tr><td> current-user-id
    1127 getuid
    1128 </td></tr><tr><td> delete-directory
    1129 rmdir
    1130 </td></tr><tr><td> duplicate-fileno
    1131 dup/dup2
    1132 </td></tr><tr><td> _exit
    1133 _exit
    1134 </td></tr><tr><td> file-close
    1135 close
    1136 </td></tr><tr><td> file-access-time
    1137 stat
    1138 </td></tr><tr><td> file-change-time
    1139 stat
    1140 </td></tr><tr><td> file-modification-time
    1141 stat
    1142 </td></tr><tr><td> file-execute-access?
    1143 access
    1144 </td></tr><tr><td> file-open
    1145 open
    1146 </td></tr><tr><td> file-lock
    1147 fcntl
    1148 </td></tr><tr><td> file-position
    1149 ftell/lseek
    1150 </td></tr><tr><td> file-read
    1151 read
    1152 </td></tr><tr><td> file-read-access?
    1153 access
    1154 </td></tr><tr><td> file-select
    1155 select
    1156 </td></tr><tr><td> file-control
    1157 fcntl
    1158 </td></tr><tr><td> file-stat
    1159 stat
    1160 </td></tr><tr><td> file-test-lock
    1161 fcntl
    1162 </td></tr><tr><td> file-truncate
    1163 truncate/ftruncate
    1164 </td></tr><tr><td> file-unlock
    1165 fcntl
    1166 </td></tr><tr><td> file-write
    1167 write
    1168 </td></tr><tr><td> file-write-access?
    1169 access
    1170 </td></tr><tr><td> get-groups
    1171 getgroups
    1172 </td></tr><tr><td> get-host-name
    1173 gethostname
    1174 </td></tr><tr><td> initialize-groups
    1175 initgroups
    1176 </td></tr><tr><td> local-time->seconds
    1177 mktime
    1178 </td></tr><tr><td> local-timezone-abbreviation
    1179 localtime
    1180 </td></tr><tr><td> map-file-to-memory
    1181 mmap
    1182 </td></tr><tr><td> open-input-file*
    1183 fdopen
    1184 </td></tr><tr><td> open-output-file*
    1185 fdopen
    1186 </td></tr><tr><td> open-input-pipe
    1187 popen
    1188 </td></tr><tr><td> open-output-pipe
    1189 popen
    1190 </td></tr><tr><td> port->fileno
    1191 fileno
    1192 </td></tr><tr><td> process-execute
    1193 execvp
    1194 </td></tr><tr><td> process-fork
    1195 fork
    1196 </td></tr><tr><td> process-group-id
    1197 getpgid
    1198 </td></tr><tr><td> process-signal
    1199 kill
    1200 </td></tr><tr><td> process-wait
    1201 waitpid
    1202 </td></tr><tr><td> close-input-pipe
    1203 pclose
    1204 </td></tr><tr><td> close-output-pipe
    1205 pclose
    1206 </td></tr><tr><td> read-symbolic-link
    1207 readlink
    1208 </td></tr><tr><td> seconds->local-time
    1209 localtime
    1210 </td></tr><tr><td> seconds->string
    1211 ctime
    1212 </td></tr><tr><td> seconds->utc-time
    1213 gmtime
    1214 </td></tr><tr><td> set-alarm!
    1215 alarm
    1216 </td></tr><tr><td> set-buffering-mode!
    1217 setvbuf
    1218 </td></tr><tr><td> set-file-position!
    1219 fseek/seek
    1220 </td></tr><tr><td> set-groups!
    1221 setgroups
    1222 </td></tr><tr><td> set-signal-mask!
    1223 sigprocmask
    1224 </td></tr><tr><td> set-group-id!
    1225 setgid
    1226 </td></tr><tr><td> set-process-group-id!
    1227 setpgid
    1228 </td></tr><tr><td> set-user-id!
    1229 setuid
    1230 </td></tr><tr><td> set-root-directory!
    1231 chroot
    1232 </td></tr><tr><td> setenv
    1233 setenv/putenv
    1234 </td></tr><tr><td> sleep
    1235 sleep
    1236 </td></tr><tr><td> system-information
    1237 uname
    1238 </td></tr><tr><td> terminal-name
    1239 ttyname
    1240 </td></tr><tr><td> terminal-port?
    1241 isatty
    1242 </td></tr><tr><td> time->string
    1243 asctime
    1244 </td></tr><tr><td> unsetenv
    1245 putenv
    1246 </td></tr><tr><td> unmap-file-from-memory
    1247 munmap
    1248 </td></tr><tr><td> user-information
    1249 getpwnam/getpwuid
    1250 </td></tr><tr><td> utc-time->seconds
    1251 timegm
    1252 </td></tr></table>
     1120; {{change-directory}} : {{chdir}}
     1121; {{change-file-mode}} : {{chmod}}
     1122; {{change-file-owner}} : {{chown}}
     1123; {{create-directory}} : {{mkdir}}
     1124; {{create-fifo}} : {{mkfifo}}
     1125; {{create-pipe}} : {{pipe}}
     1126; {{create-session}} : {{setsid}}
     1127; {{create-symbolic-link}} : {{link}}
     1128; {{current-directory}} : {{curdir}}
     1129; {{current-effective-groupd-id}} : {{getegid}}
     1130; {{current-effective-user-id}} : {{geteuid}}
     1131; {{current-group-id}} : {{getgid}}
     1132; {{current-parent-id}} : {{getppid}}
     1133; {{current-process-id}} : {{getpid}}
     1134; {{current-user-id}} : {{getuid}}
     1135; {{delete-directory}} : {{rmdir}}
     1136; {{duplicate-fileno}} : {{dup/dup2}}
     1137; {{_exit}} : {{_exit}}
     1138; {{file-close}} : {{close}}
     1139; {{file-access-time}} : {{stat}}
     1140; {{file-change-time}} : {{stat}}
     1141; {{file-modification-time}} : {{stat}}
     1142; {{file-execute-access?}} : {{access}}
     1143; {{file-open}} : {{open}}
     1144; {{file-lock}} : {{fcntl}}
     1145; {{file-position}} : {{ftell/lseek}}
     1146; {{file-read}} : {{read}}
     1147; {{file-read-access?}} : {{access}}
     1148; {{file-select}} : {{select}}
     1149; {{file-control}} : {{fcntl}}
     1150; {{file-stat}} : {{stat}}
     1151; {{file-test-lock}} : {{fcntl}}
     1152; {{file-truncate}} : {{truncate/ftruncate}}
     1153; {{file-unlock}} : {{fcntl}}
     1154; {{file-write}} : {{write}}
     1155; {{file-write-access?}} : {{access}}
     1156; {{get-groups}} : {{getgroups}}
     1157; {{get-host-name}} : {{gethostname}}
     1158; {{initialize-groups}} : {{initgroups}}
     1159; {{local-time->seconds}} : {{mktime}}
     1160; {{local-timezone-abbreviation}} : {{localtime}}
     1161; {{map-file-to-memory}} : {{mmap}}
     1162; {{open-input-file*}} : {{fdopen}}
     1163; {{open-output-file*}} : {{fdopen}}
     1164; {{open-input-pipe}} : {{popen}}
     1165; {{open-output-pipe}} : {{popen}}
     1166; {{port->fileno}} : {{fileno}}
     1167; {{process-execute}} : {{execvp}}
     1168; {{process-fork}} : {{fork}}
     1169; {{process-group-id}} : {{getpgid}}
     1170; {{process-signal}} : {{kill}}
     1171; {{process-wait}} : {{waitpid}}
     1172; {{close-input-pipe}} : {{pclose}}
     1173; {{close-output-pipe}} : {{pclose}}
     1174; {{read-symbolic-link}} : {{readlink}}
     1175; {{seconds->local-time}} : {{localtime}}
     1176; {{seconds->string}} : {{ctime}}
     1177; {{seconds->utc-time}} : {{gmtime}}
     1178; {{set-alarm!}} : {{alarm}}
     1179; {{set-buffering-mode!}} : {{setvbuf}}
     1180; {{set-file-position!}} : {{fseek/seek}}
     1181; {{set-groups!}} : {{setgroups}}
     1182; {{set-signal-mask!}} : {{sigprocmask}}
     1183; {{set-group-id!}} : {{setgid}}
     1184; {{set-process-group-id!}} : {{setpgid}}
     1185; {{set-user-id!}} : {{setuid}}
     1186; {{set-root-directory!}} : {{chroot}}
     1187; {{setenv}} : {{setenv/putenv}}
     1188; {{sleep}} : {{sleep}}
     1189; {{system-information}} : {{uname}}
     1190; {{terminal-name}} : {{ttyname}}
     1191; {{terminal-port?}} : {{isatty}}
     1192; {{time->string}} : {{asctime}}
     1193; {{unsetenv}} : {{putenv}}
     1194; {{unmap-file-from-memory}} : {{munmap}}
     1195; {{user-information}} : {{getpwnam/getpwuid}}
     1196; {{utc-time->seconds}} : {{timegm}}
    12531197
    12541198
     
    13061250 map-file-to-memory  unmap-file-from-memory  memory-mapped-file-pointer  memory-mapped-file?
    13071251 set-alarm!
    1308  terminal-port?  terminal-name terminal-size
     1252 terminal-port?  terminal-name
    13091253 process-fork  process-signal
    13101254 parent-process-id
    13111255 set-root-directory!
    13121256 utc-time->seconds
    1313  string->time
    13141257
    13151258==== Additional Definitions
  • chicken/trunk/manual/Unit regex

    r8410 r9418  
    44== Unit regex
    55
    6 This library unit provides support for regular expressions. The regular
    7 expression package used is {{PCRE}} (''Perl Compatible Regular Expressions'')
     6This library unit provides support for regular expressions. The regular 
     7expression package used is {{PCRE}} (''Perl Compatible Regular Expressions'') 
    88written by Philip Hazel. See [[http://www.pcre.org]] for information about
    99the particular regexp flavor and extensions provided by this library.
     
    1313<enscript highlight=scheme>
    1414(require 'regex)
    15 (test-feature? 'pcre) => #t
     15(test-feature? 'pcre) => t
    1616</enscript>
    1717
     
    6060
    6161
    62 === regex-chardef-table?
    63 
    64  [procedure] (regex-chardef-table? OBJECT)
    65 
    66 Returns {{#t}} if the {{OBJECT}} is a {{character definitions table}}, and
    67 {{#f}} otherwise.
    68 
    69 
    70 === regex-chardef-table
    71 
    72  [procedure] (regex-chardef-table)
    73 
    74 Returns a new {{character definitions table}}.
    75 
    76 
    7762=== regexp
    7863
     
    8873=== regexp*
    8974
    90  [procedure] (regexp* STRING [OPTIONS [CHARDEFS-TABLE]])
     75 [procedure] (regexp* STRING [OPTIONS [TABLES]])
    9176
    9277Returns a precompiled regular expression object for {{string}}. The optional
    9378argument {{OPTIONS}} must be a list of option symbols. The optional argument
    94 {{CHARDEFS-TABLE}} must be a character definitions table.
    95 
    96 
    97 ==== Option Symbols:
     79{{TABLES}} must be a character definitions table (not defined here).
     80
     81
     82Option Symbols:
    9883
    9984; caseless : Character case insensitive match
     
    138123
    139124 [procedure] (regexp-optimize RX)
    140 
     125 
    141126Perform available optimizations for the precompiled regular expression {{RX}}.
    142127Returns {{#t}} when optimization performed, and {{#f}} otherwise.
     
    199184
    200185(string-split-fields "," s #:suffix)
    201 
     186 
    202187  => ("this is a string 1" " 2" " 3")
    203188</enscript>
     
    210195Searches substrings in {{STRING}} that match {{REGEXP}}
    211196and substitutes them with the string {{SUBST}}. The substitution
    212 can contain references to subexpressions in
     197can contain references to subexpressions in 
    213198{{REGEXP}} with the {{\NUM}} notation, where {{NUM}}
    214199refers to the NUMth parenthesized expression. The optional argument
  • chicken/trunk/manual/chicken-setup

    r7809 r9418  
    256256
    257257
     258==== chicken-prefix
     259
     260 [parameter] chicken-prefix
     261
     262The installation prefix specified when CHICKEN was built.
     263
    258264==== installation-prefix
    259265
    260266 [parameter] installation-prefix
    261267
    262 Holds the prefix under which CHICKEN executables and libraries have been installed (either
    263 the value of the environment variable {{CHICKEN_PREFIX}} or whatever prefix was
    264 specified at the time the system was built.
    265 
     268An alternative installation prefix that will be prepended to extension
     269installation paths if specified. It is set by the {{-install-prefix}}
     270option or environment variable {{CHICKEN_INSTALL_PREFIX}}.
    266271
    267272==== program-path
     
    543548; {{-revision REV}} : Specifies SVN revision to check out
    544549; {{-local PATHNAME}} : Fetch extension from local file
    545 ; {{-destdir PATHNAME}} : Specify alternative installation prefix (for packaging)
     550; {{-install-prefix PATHNAME}} : Specify alternative installation prefix (for packaging)
    546551; {{-host-extension}} : Compile extension in "host" mode (sets the parameter {{host-extension}} to {{#f}})
     552; {{-build-prefix PATHNAME}} : Location where chicken-setup will create egg build directories  (default: the value of environment variable CHICKEN_TMPDIR, or {{/tmp/chicken-{MAJOR-VERSION-build-{USER}}}})
     553; {{-download-path PATHNAME}} : Location where chicken-setup will save downloaded files  (default: {{build-prefix/downloads}})
    547554; {{--}} : Ignore all following arguments
    548555
  • chicken/trunk/manual/faq

    r8361 r9418  
    2727* As far as we know, CHICKEN is the first implementation of Scheme that uses Henry Baker's [[http://home.pipeline.com/~hbaker1/CheneyMTA.html|Cheney on the M.T.A]] concept.
    2828
     29==== Why call it 'Chicken'?
     30
     31According to [[http://chicken.wiki.br/felix winkelmann|felix]]:
     32
     33> Well, it's pretty boring, really: when I started the project and needed some
     34> name, the first thing that met my eyes was the "chicken" (actually a disguised penguin)
     35> from the Wallace + Gromit movie...
     36> And then there is of course the ever occurring chicken-and-egg problem
     37> with bootstrapped compilers.
     38
    2939==== What should I do if I find a bug?
    3040
    31 Send e-mail to chicken-janitors@nongnu.org (preferably using the {{chicken-bug(1)}} tool)
     41Send e-mail to felix@call-with-current-continuation.org
    3242with some hints about the problem, like
    3343version/build of the compiler, platform, system configuration, code that
     
    95105
    96106There is an extension based on the GNU Multiprecision Package that implements most of the full
    97 numeric tower, see [[numbers]].
     107numeric tower, see [[http://chicken.wiki.br/numbers|numbers]].
    98108
    99109
Note: See TracChangeset for help on using the changeset viewer.