~ chicken-core (chicken-5) 82d7bc117b993bcbae39db54dd7598d0c7f2f10f
commit 82d7bc117b993bcbae39db54dd7598d0c7f2f10f Author: Peter Bex <peter@more-magic.net> AuthorDate: Wed Oct 6 09:59:28 2021 +0200 Commit: Peter Bex <peter@more-magic.net> CommitDate: Wed Oct 6 09:59:42 2021 +0200 Sync manual from wiki diff --git a/manual/Declarations b/manual/Declarations index 04132afc..430a92af 100644 --- a/manual/Declarations +++ b/manual/Declarations @@ -12,7 +12,7 @@ declarations override command-line options. When multiple declarations conflict, the one appearing textually last overrides any previous one. Declarations can be used to improve performance and to give entities -like procedures are variables special properties that can result in +like procedures and variables special properties that can result in better performing code. Most of these declarations subtly change the semantics of standard Scheme code with respect to the declared entities, so care must be taken when using them. diff --git a/manual/Extensions b/manual/Extensions index babee17d..9ce47869 100644 --- a/manual/Extensions +++ b/manual/Extensions @@ -204,7 +204,7 @@ that exports one macro ({{prog1}}) and one procedure ({{my-sum}}): (module my-lib * - (import scheme chicken) + (import scheme (chicken base)) (define-syntax prog1 (syntax-rules () diff --git a/manual/Getting started b/manual/Getting started index b8dba801..f32214a0 100644 --- a/manual/Getting started +++ b/manual/Getting started @@ -238,11 +238,11 @@ To invoke the CHICKEN interpreter, you use the {{csi}} command. CHICKEN (c) 2008-2021, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann - Version 5.0.0 (rev 6653dce) + Version 5.2.0 (rev 317468e4) linux-unix-gnu-x86-64 [ 64bit dload ptables ] - + Type ,? for help. - #;1> + #;1> This brings up a brief banner, and then the prompt. You can use this pretty much like any other Scheme system, e.g., diff --git a/manual/Module (chicken base) b/manual/Module (chicken base) index 3f9c3543..8abc07e7 100644 --- a/manual/Module (chicken base) +++ b/manual/Module (chicken base) @@ -308,10 +308,11 @@ Returns an s-expression with debug information for the procedure ==== warning -<procedure>(warning STRING EXP ...)</procedure> +<procedure>(warning MESSAGE [EXP ...])</procedure> -Displays a warning message (if warnings are enabled with -{{enable-warnings}}) and continues execution. +Displays a warning message (if warnings are enabled with {{enable-warnings}}), +from the {{MESSAGE}}, and optional {{EXP}} arguments, then continues execution. +{{MESSAGE}}, and {{EXP}}, may be {{any}} object. === Lists @@ -1095,12 +1096,6 @@ interpreted. === Conditional forms -==== select - -<macro>(select EXP ((KEY ...) EXP1 ...) ... [(else EXPn ...)])</macro> - -This is similar to {{case}}, but the keys are evaluated. - ==== unless <macro>(unless TEST EXP1 EXP2 ...)</macro> diff --git a/manual/Module (chicken irregex) b/manual/Module (chicken irregex) index e1e77a47..a5914a95 100644 --- a/manual/Module (chicken irregex) +++ b/manual/Module (chicken irregex) @@ -16,7 +16,7 @@ On systems that support dynamic loading, the {{irregex}} module can be made available in the CHICKEN interpreter ({{csi}}) by entering <enscript highlight=scheme> -(import irregex) +(import (chicken irregex)) </enscript> === Procedures @@ -222,7 +222,7 @@ Examples: (irregex-replace/all "[aeiou]" "hello world" "*") => "h*ll* w*rld" -(irregex-replace/all '(* "poo ") "poo poo platter" "*") => "**p*l*a*t*t*e*r" +(irregex-replace/all '(* "foo ") "foo foo platter" "*") => "**p*l*a*t*t*e*r" (irregex-replace "(.)(.)" "ab" 2 1 "*") => "ba*" diff --git a/manual/Module (chicken process-context posix) b/manual/Module (chicken process-context posix) index 171aeb4b..0b4e9426 100644 --- a/manual/Module (chicken process-context posix) +++ b/manual/Module (chicken process-context posix) @@ -38,7 +38,7 @@ procedure is unimplemented and will raise an error. ==== current-user-id <procedure>(current-user-id)</procedure> - [setter] (set! (current-user-id) UID) +<setter>(set! (current-user-id) UID)</setter> Get or set the real user-id of the current process. The procedure corresponds to the getuid and setuid C functions. @@ -60,7 +60,7 @@ associated with the current process, so it is safe to use. ==== current-effective-user-id <procedure>(current-effective-user-id)</procedure> - [setter] (set! (current-effective-user-id) UID) +<setter>(set! (current-effective-user-id) UID)</setter> Get or set the effective user-id of the current process. @@ -80,7 +80,7 @@ procedure is unimplemented and will raise an error. ==== current-group-id <procedure>(current-group-id)</procedure> - [setter] (set! (current-group-id) GID) +<setter>(set! (current-group-id) GID)</setter> Get or set the real group-id of the current process. @@ -90,7 +90,7 @@ procedure is unimplemented and will raise an error. ==== current-effective-group-id <procedure>(current-effective-group-id)</procedure> - [setter] (set! (current-effective-group-id) GID) +<setter>(set! (current-effective-group-id) GID)</setter> Get or set the effective group-id of the current process. ID can be found, then {{#f}} is returned. @@ -119,7 +119,7 @@ procedure is unimplemented and will raise an error. ==== process-group-id <procedure>(process-group-id PID)</procedure> - [setter] (set! (process-group-id PID) PGID) +<setter>(set! (process-group-id PID) PGID)</setter> Get or set the process group ID of the process specified by {{PID}}. diff --git a/manual/Module (chicken tcp) b/manual/Module (chicken tcp) index 064ce638..60c993ca 100644 --- a/manual/Module (chicken tcp) +++ b/manual/Module (chicken tcp) @@ -186,22 +186,22 @@ A very simple example follows. Say we have the two files {{client.scm}} and {{server.scm}}: <enscript highlight=scheme> - ; client.scm - (declare (uses tcp)) - (define-values (i o) (tcp-connect "localhost" 4242)) - (write-line "Good Bye!" o) - (print (read-line i)) +; client.scm +(import (chicken io) (chicken tcp)) +(define-values (i o) (tcp-connect "localhost" 4242)) +(write-line "Good Bye!" o) +(print (read-line i)) </enscript> <enscript highlight=scheme> - ; server.scm - (declare (uses tcp)) - (define l (tcp-listen 4242)) - (define-values (i o) (tcp-accept l)) - (write-line "Hello!" o) - (print (read-line i)) - (close-input-port i) - (close-output-port o) +; server.scm +(import (chicken io) (chicken tcp)) +(define l (tcp-listen 4242)) +(define-values (i o) (tcp-accept l)) +(write-line "Hello!" o) +(print (read-line i)) +(close-input-port i) +(close-output-port o) </enscript> % csc server.scm diff --git a/manual/Module (chicken time posix) b/manual/Module (chicken time posix) index 1df01177..e5aff182 100644 --- a/manual/Module (chicken time posix) +++ b/manual/Module (chicken time posix) @@ -78,7 +78,7 @@ Converts the broken down time represented in the 10 element vector {{VECTOR}} into a string of the form represented by the {{FORMAT}} string. The default time form produces something like {{"Tue May 21 13:46:22 1991"}}. -The {{FORMAT}} string follows the rules for the C library procedure {{strftime}}. The default {{FORMAT}} string is "%a %b %e %H:%M:%S %Z %Y". +The {{FORMAT}} string follows the rules for the C library procedure {{strftime}}. The default {{FORMAT}} string is {{"%a %b %e %H:%M:%S %Z %Y"}}. === string->time @@ -88,7 +88,7 @@ Converts a string of the form represented by the {{FORMAT}} string into the broken down time represented in a 10 element vector. The default time form understands something like {{"Tue May 21 13:46:22 1991"}}. -The {{FORMAT}} string follows the rules for the C library procedure {{strptime}}. The default {{FORMAT}} string is "%a %b %e %H:%M:%S %Z %Y". +The {{FORMAT}} string follows the rules for the C library procedure {{strptime}}. The default {{FORMAT}} string is {{"%a %b %e %H:%M:%S %Z %Y"}}. --- diff --git a/manual/Module scheme b/manual/Module scheme index ef8c5e41..2f8c51e6 100644 --- a/manual/Module scheme +++ b/manual/Module scheme @@ -3301,7 +3301,7 @@ if you need a different behavior. <procedure>(with-input-from-file string thunk [mode ...])</procedure><br> <procedure>(with-output-to-file string thunk [mode ...])</procedure><br> -String should be a string naming a file, and proc should be a procedure +String should be a string naming a file, and thunk should be a procedure of no arguments. For with-input-from-file, the file should already exist; for with-output-to-file, the effect is unspecified if the file already exists. The file is opened for input or output, an input orTrap