Changeset 35324 in project


Ignore:
Timestamp:
03/22/18 22:08:31 (8 months ago)
Author:
felix
Message:

manual: first version of "Getting started"

File:
1 moved

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Getting started

    r35322 r35324  
    11[[tags: manual]]
    2 
    3 XXX
    4 * R7RS compliance?
    5 * Do we need to document units here?
    6 * Update example output
    7 XXX
    82
    93== Getting started
     
    5145less ambitious than R6RS and more minimal.
    5246
    53 CHICKEN fully complies with R5RS and mostly with the "R7RS small"
    54 language.
     47CHICKEN fully complies with R5RS and, by using a separately available
     48extension also with the "R7RS small" language.
    5549
    5650Even though Scheme is consciously minimalist, it is recognized that a
     
    8680CHICKEN includes
    8781
    88 * a Scheme interpreter that supports almost all of  R7RS Scheme, with
     82* a Scheme interpreter that supports all of R5(7)RS Scheme, with
    8983  only a few relatively minor omissions, and with many extensions
    9084* a compatible compiler whose target is C, thus making porting to new
     
    246240
    247241 $ csi
    248  
    249242 CHICKEN
    250  (c) 2008-2016, The CHICKEN Team
    251  (c) 2000-2007, Felix L. Winkelmann
    252  Version 4.11.0 (rev ce980c4)
    253  linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
    254  compiled 2016-05-28 on yves.more-magic.net (Linux)
    255  
     243(c) 2008-2018, The CHICKEN Team
     244(c) 2000-2007, Felix L. Winkelmann
     245Version 5.0.0 (rev 6653dce)
     246linux-unix-gnu-x86-64 [ 64bit dload ptables ]
     247
    256248 #;1>
    257249
     
    305297
    306298<enscript highlight=scheme>
    307 
    308299;; irregex, the regular expression library, is one of the
    309300;; libraries included with CHICKEN.
     
    386377
    387378<enscript highlight=scheme>
     379(import (chicken process-context)) ; for "command-line-arguments"
     380
    388381(define (palindrome? x)
    389382  (define (check left right)
     
    393386             (check (add1 left) (sub1 right)))))
    394387  (check 0 (sub1 (string-length x))))
     388
    395389(let ((arg (car (command-line-arguments))))
    396390  (display
     
    423417;;; Library pal-proc.scm
    424418(declare (unit pal-proc))
     419
    425420(define (palindrome? x)
    426421  (define (check left right)
     
    438433;;; Client pal-user.scm
    439434(declare (uses pal-proc))
     435
     436(import (chicken process-context))
     437
    440438(let ((arg (car (command-line-arguments))))
    441439  (display
     
    456454 level is a palindrome
    457455
     456The "unit" mechanism is relatively low-level and requires some
     457familiarity with underlying mechanism used to manage compilation
     458units. See [[Units and linking model]] for more information.
     459
    458460=== Installing an egg
    459461
     
    465467
    466468In this example, we install the {{uri-common}} egg, for parsing
    467 Uniform Resource Identifiers. The installation produces a lot of
    468 output, which we have edited for space.
     469Uniform Resource Identifiers.
    469470
    470471 $ chicken-install uri-common
    471472 
    472  retrieving ...
    473  resolving alias `kitten-technologies' to: http://chicken.kitten-technologies.co.uk/henrietta.cgi
    474  connecting to host "chicken.kitten-technologies.co.uk", port 80 ...
    475  requesting "/henrietta.cgi?name=uri-common&mode=default" ...
    476  reading response ...
    477  [...]
    478  /usr/bin/csc -feature compiling-extension -setup-mode    -s -O2 uri-common.scm -j uri-common
    479  /usr/bin/csc -feature compiling-extension -setup-mode    -s -O2 uri-common.import.scm
    480  cp -r uri-common.so /usr/lib/chicken/5/uri-common.so
    481  chmod a+r /usr/lib/chicken/5/uri-common.so
    482  cp -r uri-common.import.so /usr/lib/chicken/5/uri-common.import.so
    483  chmod a+r /usr/lib/chicken/5/uri-common.import.so
    484  chmod a+r /usr/lib/chicken/5/uri-common.setup-info
    485 
    486473{{chicken-install}} connects to a mirror of the egg repository and
    487474retrieves the egg contents.  If the egg has any uninstalled
     
    493480
    494481 #;1> (import uri-common)
    495  ; loading /usr/lib/chicken/5/uri-common.import.so ...
     482 ; loading /usr/lib/chicken/9/uri-common.import.so ...
    496483 ; [... other loaded files omitted for clarity ...]
    497484 
     
    529516
    530517 ;;; fib-user.scm
     518 (import (chicken format))
     519
    531520 #>
    532521   extern int fib(int n);
Note: See TracChangeset for help on using the changeset viewer.