Changeset 33354 in project


Ignore:
Timestamp:
05/28/16 15:09:24 (4 years ago)
Author:
sjamaan
Message:

Synch wiki manual with 4.11.0 release manual (some small updates, plus a new Debugging chapter)

Location:
wiki/man/4
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/4/Accessing external objects

    r33130 r33354  
    173173inside this form may allocate Scheme data on the C stack (the
    174174''nursery'') with {{C_alloc}} (see below). You can return multiple
    175 values inside the body of the {{foreign-primitive}} form by calling this
    176 C function:
    177 
    178 <enscript highlight=scheme>
    179 C_values(N + 2, C_SCHEME_UNDEFINED, C_k, X1, ...)
    180 </enscript>
    181 
    182 where {{N}} is the number of values to be returned, and {{X1, ...}} are the
    183 results, which should be Scheme data objects. When returning multiple values, the
    184 return-type should be omitted.
     175values inside the body of the {{foreign-primitive}} form by using
     176the following C code:
     177
     178<enscript highlight=scheme>
     179C_word av[N + 2] = { C_SCHEME_UNDEFINED, C_k, X1, ... };
     180C_values(N + 2, av);
     181</enscript>
     182
     183where {{N}} is the number of values to be returned, and {{X1, ...}}
     184are the results, which should be Scheme data objects. When returning
     185multiple values, the return-type should be omitted.  Of course, if you
     186have to dynamically compute the values, you do not have to use C's
     187array initialization syntax, but you can just assign them one by one.
    185188
    186189Returning just a single value can still be done via the {{C_return(...)}} macro.
  • wiki/man/4/Acknowledgements

    r33130 r33354  
    4343Rustemeier, Daniel Sadilek, Otavio Salvador, Burton Samograd,
    4444"Sandro", "satori", Aleksej Saushev, Oskar Schirmer, Reed Sheridan,
    45 Ronald Schröder, Spencer Schumann, Ivan Shcheklein, Alex Shinn, Ivan
    46 Shmakov, "Shmul", Tony Sidaway, Jeffrey B. Siegal, Andrey Sidorenko,
    47 Michele Simionato, Iruata Souza, Volker Stolz, Jon Strait, Dorai
    48 Sitaram, Robert Skeels, Jason Songhurst, Clifford Stein, David
    49 Steiner, Sunnan, Zbigniew Szadkowski, Rick Taube, Nathan Thern, Mike
    50 Thomas, Minh Thu, Christian Tismer, Andre van Tonder, John Tobey,
     45Ronald Schröder, Spencer Schumann, Ivan Shcheklein, Alexander Shendi,
     46Alex Shinn, Ivan Shmakov, "Shmul", Tony Sidaway, Jeffrey B. Siegal,
     47Andrey Sidorenko, Michele Simionato, Iruata Souza, Volker Stolz, Jon
     48Strait, Dorai Sitaram, Robert Skeels, Jason Songhurst, Clifford Stein,
     49David Steiner, Sunnan, Zbigniew Szadkowski, Rick Taube, Nathan Thern,
     50Mike Thomas, Minh Thu, Christian Tismer, Andre van Tonder, John Tobey,
    5151Henrik Tramberend, Vladimir Tsichevsky, James Ursetto, Neil van Dyke,
    5252Sam Varner, Taylor Venable, Sander Vesik, Jaques Vidrine, Panagiotis
  • wiki/man/4/Cross development

    r29452 r33354  
    4343as a temporary place to store the target files. A few things to note:
    4444
    45 * {{ARCH}} is empty, since we don't want the build process to detect the architecture (since the target-architecture is likely to be different) and there is no {{apply-hack.<ARCH>.S}} file corresponding to arm at the moment.  If you know the right string to represent target architecture (see {{C_PLATFORM_TYPE}} in {{chicken.h}} for the supported options), you can set {{ARCH}} with that value.  Notice, however, that the apply-hack is not supported for all those architectures (at the moment, only for {{ppc.darwin}}, {{ppc.sysv}}, {{x86}} and {{x86-64}}).
     45* {{ARCH}} is empty, since we don't want the build process to detect the architecture (since the target-architecture is likely to be different).  If you know the right string to represent target architecture (see {{C_PLATFORM_TYPE}} in {{chicken.h}} for the supported options), you can set {{ARCH}} with that value.
    4646* {{PREFIX}} gives the prefix ''on the target system'', under which the
    4747libraries will finally be installed. In this case it will be {{/usr/lib}}.
     
    9494 |-- lib
    9595 |   |-- chicken
    96  |   |   `-- 6
     96 |   |   `-- 8
    9797 |   |       :
    9898 |   |
    9999 |   |-- libchicken.a
    100  |   |-- libchicken.so -> libchicken.so.6
    101  |   `-- libchicken.so.6
     100 |   |-- libchicken.so -> libchicken.so.8
     101 |   `-- libchicken.so.8
    102102 `-- share
    103103     |-- chicken
     
    167167 |-- lib
    168168 |   |-- chicken
    169  |   |   `-- 6
     169 |   |   `-- 8
    170170 |   |       :
    171171 |   |
    172172 |   |-- libchicken.a
    173  |   |-- libchicken.so -> libchicken.so.6
    174  |   `-- libchicken.so.6
     173 |   |-- libchicken.so -> libchicken.so.8
     174 |   `-- libchicken.so.8
    175175 `-- share
    176176     |-- chicken
  • wiki/man/4/Deviations from the standard

    r28571 r33354  
    88
    99The maximal number of arguments that may be passed to a
    10 compiled procedure or macro is limited to 120 (1000 on some
    11 common hardware platforms like x86).
     10compiled procedure or macro is limited to around 1000.
    1211Likewise, the maximum number of values that can be passed
    1312to continuations captured using {{call-with-current-continuation}}
    14 is 120.  This is an implementation restriction that is unlikely
     13is 1000.  This is an implementation restriction that is unlikely
    1514to be lifted.
    1615
  • wiki/man/4/Embedding

    r32739 r33354  
    55== Embedding
    66
    7 Compiled Scheme files can be linked with C code, provided the Scheme code was compiled
    8 in ''embedded'' mode by passing {{-DC_EMBEDDED}} to the C compiler (this will
    9 disable generation of a {{main()}} function). {{csc}} will do this, when given
    10 the {{-embedded}} option.
     7Compiled Scheme files can be linked with C code, provided the Scheme
     8code was compiled in ''embedded'' mode by passing {{-DC_EMBEDDED}} to
     9the C compiler (this will disable generation of a {{main()}}
     10function). {{csc}} will do this, when given the {{-embedded}} option.
    1111
    1212The following C API is available:
  • wiki/man/4/Extensions

    r33130 r33354  
    172172   'ID
    173173   '("ID.so" "ID.import.so")
    174    '((version 0.1)
     174   '((version VERSION)
    175175     ... `INFO' ...
    176176     ))
     
    558558; {{-list}} : list extensions available
    559559; {{-proxy HOST[:PORT]}} : connect via HTTP proxy
    560 ; {{-s   -sudo}} : use {{sudo(1)}} for installing or removing files
     560; {{-s   -sudo}} : use external command to elevate privileges when installing or removing files
    561561; {{-r   -retrieve}} : only retrieve egg into current directory, don't install
    562562; {{-n   -no-install}} : do not install, just build (implies {{-keep}})
     
    581581; {{-csi FILENAME}} : when invoking {{csi}}, the CHICKEN interpreter for executing installation scripts, use this program instead.
    582582
    583 {{chicken-install}} recognizes the {{http_proxy}} and {{proxy_auth}} environment variables, if set.
     583{{chicken-install}} recognizes the {{SUDO}}, {{http_proxy}} and {{proxy_auth}} environment variables, if set.
    584584
    585585
     
    589589; {{-version}} : show version and exit
    590590; {{-force}} : don't ask, delete whatever matches
    591 ; {{-s   -sudo}} : use {{sudo(1)}} for deleting files
     591; {{-s   -sudo}} : use external command to elevate privileges for deleting files
     592; {{-p   -prefix PREFIX}} : change installation prefix to {{PREFIX}}
     593; {{-deploy}} : uninstall extension from the application directory for a deployed application (see [[Deployment]] for more information)
    592594; {{-host}} : when cross-compiling, remove extensions for host system only
    593595; {{-target}} : when cross-compiling, remove extensions for target system only
     
    601603; {{-host}} : when cross-compiling, show extensions for host system only
    602604; {{-target}} : when cross-compiling, show extensions for target system only
     605; {{-p   -prefix PREFIX}} : change installation prefix to {{PREFIX}}
     606; {{-deploy}} : look for extensions in the application directory for a deployed application (see [[Deployment]] for more information)
    603607; {{-exact}} : match extension-name exactly (do not match as pattern)
    604608; {{-list}} : list installed egg version in format suitable for {{chicken-install -override}}
  • wiki/man/4/Getting started

    r33157 r33354  
    11[[tags: manual]]
    22
    3 == Getting started
     3== Getting started 
    44
    55CHICKEN is a compiler that translates Scheme source files into
     
    2929In contrast to Common Lisp, Scheme is very minimal, and tries to
    3030include only those features absolutely necessary in programming. In
    31 contrast to Emacs Lisp, Scheme is not anchored into any one program
    32 (Emacs), and has a somewhat more modern language design.
     31contrast to Emacs Lisp, Scheme is not anchored into a single program
     32(Emacs), and has a more modern language design.
    3333
    3434Scheme is defined in a document called ''The Revised^5 Report on the
     
    153153current version of the User's manual, along with various tutorials and
    154154other useful documents. The list of eggs is at
    155 [[/egg-index]].
     155[[http://wiki.call-cc.org/egg-index|http://wiki.call-cc.org/egg-index]].
    156156
    157157A very useful search facility for questions about CHICKEN is found at
     
    169169[[http://wiki.call-cc.org/discussion-groups|http://wiki.call-cc.org/discussion-groups]].
    170170
    171 There is also an IRC channel ({{#chicken}}) on [[http://freenode.net|Freenode]].
     171There is also an IRC channel ({{#chicken}}) on
     172[[http://freenode.net|Freenode]].
    172173
    173174=== Installing CHICKEN
     
    247248extensible, customizable, self-documenting editor available for
    248249Linux/Unix, Macintosh, and Windows systems; See
    249 [[/emacs]] for more information about the available options.
     250[[http://wiki.call-cc.org/emacs|http://wiki.call-cc.org/emacs]]
     251for more information about the available options.
    250252
    251253* SciTE ([[http://scintilla.sourceforge.net/SciTE.html]]),
     
    286288 
    287289 CHICKEN
    288  (c) 2008-2015, The CHICKEN Team
     290 (c) 2008-2016, The CHICKEN Team
    289291 (c) 2000-2007, Felix L. Winkelmann
    290292 Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b)
     
    403405Compiled code can be intermixed with interpreted code on systems that
    404406support dynamic loading, which includes modern versions of *BSD,
    405 Linux, Mac OS X, Solaris, and Windows. 
     407Linux, Mac OS X, Solaris, and Windows.
    406408
    407409We can compile our factorial function, producing a file named
  • wiki/man/4/Interface to external functions and variables

    r23138 r33354  
    1818
    1919---
    20 Previous: [[Supported language]]
     20Previous: [[Debugging]]
    2121
    2222Next: [[Extensions]]
  • wiki/man/4/Supported language

    r27461 r33354  
    3636Previous: [[Using the interpreter]]
    3737
    38 Next: [[Interface to external functions and variables]]
     38Next: [[Debugging]]
  • wiki/man/4/The User's Manual

    r33130 r33354  
    77</nowiki>
    88
    9 This is the manual for CHICKEN Scheme, version 4.10.0
     9This is the manual for CHICKEN Scheme, version 4.11.0
    1010
    1111; [[Getting started]] : What is CHICKEN and how do I use it?
     
    1818
    1919; [[Supported language]] : The language implemented by CHICKEN (deviations from the standard and extensions).
     20
     21; [[Debugging]] : Using "Feathers", the CHICKEN debugger.
    2022
    2123; [[Interface to external functions and variables]] : Accessing C and C++ code and data.
     
    3638
    3739; [[Bibliography]] : Links to documents that may be of interest.
    38 
  • wiki/man/4/Types

    r33130 r33354  
    273273<syntax>(define-specialization (NAME ARGUMENT ...) [RESULTS] BODY)</syntax>
    274274
    275 {{NAME}} should have a declared type (for example by using {{:}})
    276 (this is currently not checked).  Declares the calls to the globally
    277 defined procedure {{NAME}} with arguments matching the types given in
    278 {{ARGUMENTS}} should be replaced by {{BODY}} (a single expression). If
    279 given, {{RESULTS}} (which follows the syntax given above under "Type
    280 Syntax") narrows the result type(s) if it differs from the result
    281 types previously declared for {{NAME}}.  {{ARGUMENT}} should be an
    282 identifier naming the formal parameter or a list of the form
    283 {{(IDENTIFIER TYPE)}}. In the former case, this argument specializes
    284 on the {{*}} type. User-defined specializations are always local to
    285 the compilation unit in which they occur and can not be exported. When
    286 encountered in the interpreter, {{define-specialization}} does nothing
    287 and returns an unspecified result.
    288 
    289 Note that the exact order of specialization application is not
    290 specified and nested specializations may result in not narrowing down
    291 the result types to the most specific type, due to the way the
    292 flow-analysis is implemented. It is recommended to not define "chains"
    293 of specializations where one variant of a procedure call is
    294 specialized to another one that is intended to specialize further.
    295 This can not always be avoided, but should be kept in mind.
    296 
    297 Note that the matching of argument types is done "exactly". This
    298 means, for example, that an argument type specialized for {{list}}
    299 will not match {{null}}: even though {{null}} is a subtype of {{list}}
    300 and will match during normal flow-analysis, we want to be able to
    301 control what happens when a procedure is called with exactly with a
    302 list argument. To handle the case when it is called with a {{null}}
    303 argument, define another specialization for exactly that type or
    304 use an {{(or ...)}} type-specifier.
     275Declares that calls to the globally defined procedure {{NAME}} with
     276arguments matching the types given by {{ARGUMENT}}s should be replaced
     277by {{BODY}} (a single expression). Each {{ARGUMENT}} should be an
     278identifier naming a formal parameter, or a list of the form
     279{{(IDENTIFIER TYPE)}}. In the former case, this argument specializes on
     280the {{*}} type. If given, {{RESULTS}} (which follows the syntax given
     281above under "Type Syntax") adjusts the result types from those
     282previously declared for {{NAME}}.
     283
     284{{NAME}} must have a declared type (for example by using {{:}}). If it
     285doesn't, the specialization is ignored.
     286
     287User-defined specializations are always local to the compilation unit in
     288which they occur and cannot be exported. When encountered in the
     289interpreter, {{define-specialization}} does nothing and returns an
     290unspecified result.
     291
     292When multiple specializations may apply to a given call, they are
     293prioritized by the order in which they were defined, with earlier
     294specializations taking precedence over later ones.
    305295
    306296There is currently no way of ensuring specializations take place.  You
  • wiki/man/4/Unit files

    r20589 r33354  
    8282and removed.  If {{NAME}} ends with
    8383a {{/}} or is empty, the appropriate slash is appended to the tail.
    84 Tilde {{~}} and variable {{$<name>/...}} expansion is also done.
    8584
    8685No directories or files are actually tested for existence; this
  • wiki/man/4/Unit posix

    r33130 r33354  
    3232<constant>fileno/stderr</constant>
    3333
    34 Standard I/O file descriptor numbers, used with procedures 
     34Standard I/O file descriptor numbers, used with procedures
    3535such as {{open-input-file*}} which take file descriptors.
    3636
     
    5353<constant>open/text</constant>
    5454
    55 Open flags used with the {{file-open}} procedure.  {{open/read}} is a 
    56 convenience synonym for {{open/rdonly}}, as is {{open/write}} 
     55Open flags used with the {{file-open}} procedure.  {{open/read}} is a
     56convenience synonym for {{open/rdonly}}, as is {{open/write}}
    5757for {{open/wronly}}.
    5858
     
    132132
    133133Returns {{#t}} if {{FILE}} designates directory. Otherwise, it returns {{#f}}.
    134 {{FILE}} may be a pathname or a file-descriptor.
     134{{FILE}} may be a pathname, a file-descriptor or a port object.
    135135
    136136==== glob
     
    254254<procedure>(fifo? FILE)</procedure>
    255255
    256 Returns {{#t}} if {{FILE}} names a FIFO. {{FILE}} may be a filename
    257 or a file-descriptor.
     256Returns {{#t}} if {{FILE}} names a FIFO. {{FILE}} may be a filename,
     257a port or a file-descriptor.
    258258
    259259
     
    390390Returns time (in seconds) of the last access, modification or change of {{FILE}}. {{FILE}}
    391391may be a filename or a file-descriptor. If the file does not exist,
    392 an error is signaled.
     392an error is signaled.
     393
     394{{file-access-time}}, {{file-change-time}} and {{file-modification-time}} also accept a port object as their argument.
    393395
    394396{{(set! (file-modification-time FILE) SECONDS)}} sets the access- and modification
     
    467469not {{#f}}, the status of the link itself is returned.
    468470
     471{{FILE}} may be a filename, port or file-descriptor.
     472
    469473Note that for very large files, the {{file-size}} value may be an
    470474inexact integer.
     
    482486
    483487Returns the size of the file designated by {{FILE}}.  {{FILE}}
    484 may be a filename or a file-descriptor.  If the file does not exist,
     488may be a filename, a file-descriptor or a port object.  If the file does not exist,
    485489an error is signaled. Note that for very large files, {{file-size}} may
    486490return an inexact integer.
     
    488492==== regular-file?
    489493
    490 <procedure>(regular-file? FILENAME)</procedure>
    491 
    492 Returns true, if {{FILENAME}} names a regular file (not a directory, socket, etc.)  This operation follows symbolic links; use either {{symbolic-link?}} or {{file-type}} if you need to test for symlinks.
     494<procedure>(regular-file? FILE)</procedure>
     495
     496Returns true, if {{FILE}} names a regular file (not a directory, socket, etc.)  This operation follows symbolic links; use either {{symbolic-link?}} or {{file-type}} if you need to test for symlinks. {{FILE}} may refer to a filename, file descriptor or ports object.
    493497
    494498==== file-owner
     
    496500<procedure>(file-owner FILE)</procedure>
    497501
    498 Returns the user-id of {{FILE}}.  {{FILE}} may be a filename
    499 or a file-descriptor.
     502Returns the user-id of {{FILE}}.  {{FILE}} may be a filename, a file-descriptor
     503or a port object.
    500504
    501505==== file-permissions
     
    505509Returns the permission bits for {{FILE}}. You can test this value
    506510by performing bitwise operations on the result and the {{perm/...}}
    507 values.  {{FILE}} may be a filename or a file-descriptor.
     511values.  {{FILE}} may be a filename, a file-descriptor or a port object.
    508512
    509513==== file-read-access?
     
    523527<procedure>(file-type FILE [LINK [ERROR]])</procedure>
    524528
    525 Returns the file-type for {{FILE}}, which should be a filename or
    526 file-descriptor. If {{LINK}} is given and true, symbolic-links are
     529Returns the file-type for {{FILE}}, which should be a filename, a file-descriptor
     530or a port object. If {{LINK}} is given and true, symbolic-links are
    527531not followed:
    528532
     
    535539  block-device
    536540
    537 Note that not all types are supported on every platform. 
     541Note that not all types are supported on every platform.
    538542If {{ERROR}} is given and true, {{file-type}} signals an
    539543error if the file does not exist.
     
    548552<procedure>(socket? FILE)</procedure>
    549553
    550 These procedures return {{#t}} if {{FILE}} given is of the 
    551 appropriate type. {{FILE}} may be a filename or a file-descriptor.
     554These procedures return {{#t}} if {{FILE}} given is of the
     555appropriate type. {{FILE}} may be a filename, a file-descriptor or a port object.
    552556Note that these operations follow symbolic links. If the file does
    553557not exist, {{#f}} is returned.
     
    642646Replaces the running process with a new process image from the program
    643647stored at {{PATHNAME}}, using the C library function {{execvp(3)}}.
    644 If the optional argument {{ARGUMENT-LIST}} is given, then it should 
     648If the optional argument {{ARGUMENT-LIST}} is given, then it should
    645649contain a list of strings which are passed as arguments to the subprocess.
    646 If the optional argument {{ENVIRONMENT-LIST}} is supplied, then the library 
     650If the optional argument {{ENVIRONMENT-LIST}} is supplied, then the library
    647651function {{execve(2)}} is used, and the environment passed in
    648652{{ENVIRONMENT-LIST}} (which should be of the form {{("<NAME>=<VALUE>" ...)}}
    649653is given to the invoked process. Note that {{execvp(3)}} respects the
    650654current setting of the {{PATH}} environment variable while {{execve(3)}} does not.
    651  
     655
    652656This procedure never returns; it either replaces the process with a new one
    653657or it raises an exception in case something went wrong executing the program.
     
    761765==== symbolic-link?
    762766
    763 <procedure>(symbolic-link? FILENAME)</procedure>
    764 
    765 Returns true, if {{FILENAME}} names a symbolic link. If no such file exists, {{#f}}
     767<procedure>(symbolic-link? FILE)</procedure>
     768
     769Returns true, if {{FILE}} names a symbolic link. If no such file exists, {{#f}}
    766770is returned.  This operation does not follow symbolic links itself.
     771{{FILE}} could be a filename, file descriptor or port object.
    767772
    768773==== create-symbolic-link
     
    10341039
    10351040Memory mapped I/O takes the contents of a file descriptor and places them in memory.
    1036  
     1041
    10371042==== memory-mapped-file?
    10381043
     
    12461251Recursively traverses the contents of {{DIRECTORY}} (which should be a
    12471252string) and invokes the procedure {{action}} for all files in which
    1248 the procedure {{test}} is true.  {{test}} may be a procedure of one
    1249 argument or an irregex object, regex string or SRE expression that
    1250 will be matched with a full pathname using {{irregex-match}}.
     1253the procedure {{test}} is true.
     1254
     1255{{test}} may be a procedure of one argument or an irregex object,
     1256regex string or SRE expression that will be matched with a full
     1257pathname using {{irregex-match}}. {{test}} defaults to {{(constantly
     1258#t)}}.
     1259
     1260
    12511261{{action}} should be a procedure of two arguments: the currently
    12521262encountered file and the result of the previous invocation of
    12531263{{action}}, or, if this is the first invocation, the value of
    1254 {{seed}}. {{test}} defaults to {{(constantly #t)}}, {{action}}
    1255 defaults to {{cons}}, {{seed}} defaults to {{()}}.  {{limit}} should
    1256 be a procedure of one argument that is called for each nested
    1257 directory and which should return true, if that directory is to be
    1258 traversed recursively. {{limit}} may also be an exact integer that
    1259 gives the maximum recursion depth. For example, a depth of {{0}} means
    1260 that only files in the top-level, specified directory are to be
     1264{{seed}}. {{action}} defaults to {{cons}}, {{seed}} defaults to {{()}}.
     1265
     1266{{limit}} should be a procedure of one argument that is called for
     1267each nested directory and which should return true, if that directory
     1268is to be traversed recursively. {{limit}} may also be an exact integer
     1269that gives the maximum recursion depth. For example, a depth of {{0}}
     1270means that only files in the top-level, specified directory are to be
    12611271traversed. In this case, all nested directories are ignored.
    12621272{{limit}} may also be {{#f}} (the default), which is equivalent to
     
    12791289
    12801290The old signature was supported until CHICKEN 4.7.3 for compatibility reasons,
    1281 at which point it became invalid.  The optional arguments are ignored 
     1291at which point it became invalid.  The optional arguments are ignored
    12821292and use their default values, and no warning is issued.  One symptom is
    12831293that your {{TEST}} does not work, returning every file.
  • wiki/man/4/Using the compiler

    r33130 r33354  
    138138
    139139; -profile :
    140 ; -accumulate-profile : Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit {{exit}} or implicitly), profiling statistics are written to a file named {{PROFILE.<randomnumber>}}. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the {{chicken-profile}} program to display the profiling information in a more user-friendly form. Enter {{chicken-profile -help}} at the command line to get a list of available options. The {{-accumulate-profile}} option is similar to {{-profile}}, but the resulting profile information will be appended to any existing {{PROFILE}} file. {{chicken-profile}} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist. Only profiling information for global procedures will be collected.
     140; -accumulate-profile : Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit {{exit}} or implicitly), profiling statistics are written to a file named {{PROFILE.<randomnumber>}}. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the {{chicken-profile}} program to display the profiling information in a more user-friendly form. Enter {{chicken-profile -help}} at the command line to get a list of available options. The {{-accumulate-profile}} option is similar to {{-profile}}, but the resulting profile information will be appended to any existing {{PROFILE}} file. {{chicken-profile}} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist. Only profiling information for global procedures will be collected.  See the {{-:p}} option under [[#runtime-options|"Runtime options"]] below for statistical profiling support.
    141141
    142142; -profile-name FILENAME : Specifies name of the generated profile information (which defaults to {{PROFILE.<randomnumber>}}. Implies {{-profile}}.
     
    225225; {{-:o}} : Disables detection of stack overflows at run-time.
    226226
     227; {{-:p}} : Enable collection of statistics for profiling purposes and write to PROFILE.{{pid}} on exit.  This functions at a granularity defined by the trace information in the binary and libraries: each traced function will show up in the output.  See the {{-profile}} compiler option for instrumentation-based profiling.  The {{PROFILE.pid}} format is compatible with the format generated by instrumentation-based profiling.
     228
     229; {{-:PFREQUENCY}} : Same as {{-:p}} but set the sampling frequency in microseconds (default is 10000 microseconds or every 10 milliseconds).
     230
    227231; {{-:r}} : Writes trace output to stderr. This option has no effect with in files compiled with the {{-no-trace}} options.
    228232
     
    235239; {{-:x}} : Raises uncaught exceptions of separately spawned threads in primordial thread. By default uncaught exceptions in separate threads are not handled, unless the primordial one explicitly joins them. When warnings are enabled (the default) and {{-:x}} is not given, a warning will be shown, though.
    236240
    237 The argument values may be given in bytes, in kilobytes (suffixed with
    238 {{K}} or {{k}}), in megabytes (suffixed with {{M}}
    239 or {{m}}), or in gigabytes (suffixed with {{G}}
    240 or {{g}}). Runtime options may be combined, like {{-:dc}},
    241 but everything following a {{NUMBER}} argument is ignored. So
    242 {{-:wh64m}} is OK, but {{-:h64mw}} will not enable GC of
    243 unused symbols.
     241Runtime argument values should be given as integers, optionally followed
     242by a unit modifier for kilobytes (suffixed with {{K}} or {{k}}),
     243megabytes (suffixed with {{M}} or {{m}}), or gigabytes (suffixed with
     244{{G}} or {{g}}).
     245
     246Runtime options may be combined, like {{-:dc}}, but everything following
     247an argument is ignored. So {{-:wh64m}} is OK, but {{-:h64mw}} will not
     248enable GC of unused symbols.
     249
    244250=== Examples
    245251
  • wiki/man/4/faq

    r33130 r33354  
    9595then become much more complex and inefficient, since the location of
    9696every object has to be accessed via a thread synchronization
    97 protocol. Such a design would make native threads in Chicken
     97protocol. Such a design would make native threads in CHICKEN
    9898essentially equivalent to Unix processes and shared memory.
    9999
     
    783783
    784784CSI doesn't support it natively but it can be activated with one of the
    785 [[/egg/readline|readline]], [[/egg/linenoise|linenoise]] or
    786 [[/egg/parley|parley]] eggs. Out of these three, the parley egg is
     785[[http://wiki.call-cc.org/egg/readline|readline]], [[http://wiki.call-cc.org/egg/linenoise|linenoise]] or
     786[[http://wiki.call-cc.org/egg/parley|parley]] eggs. Out of these three, the parley egg is
    787787recommended. After installing parley, add the following to your
    788788{{~/.csirc}} or equivalent file:
Note: See TracChangeset for help on using the changeset viewer.