Changeset 35318 in project


Ignore:
Timestamp:
03/22/18 01:57:04 (5 weeks ago)
Author:
felix
Message:

manual: overhauled "Getting started" (incomplete), added some pages, fixed some links

Location:
wiki/man/5
Files:
3 added
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Acknowledgements

    r34052 r35318  
    2222Mario Domenech Goulart, Joshua Griffith, Johannes Groedem, Damian
    2323Gryski, Matt Gushee, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro
    24 itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William
    25 P. Heinemann, Bill Hoffman, Bruce Hoult, Hans HÃŒbner, Markus HÃŒlsmann,
     24itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, Moritz Heidkamp,
     25William P. Heinemann, Bill Hoffman, Bruce Hoult, Hans HÃŒbner, Markus HÃŒlsmann,
    2626Götz Isenmann, Paulo Jabardo, Wietse Jacobs, David Janssens, Christian
    2727JÀger, Matt Jones, Dale Jordan, Valentin Kamyshenko, Daishi Kato,
    28 Peter Keller, Christian Kellermann, Brad Kind, Ron Kneusel, Matthias
     28Peter Keller, Christian Kellermann, Brad Kind, Ron Kneusel, "Kooda", Matthias
    2929Köppe, Krysztof Kowalczyk, Andre KÌhne, Todd R. Kueny Sr, Goran
    3030Krampe, David Krentzlin, Ben Kurtz, Michele La Monaca, Micky
     
    4848Michele Simionato, Iruata Souza, Volker Stolz, Jon Strait, Dorai
    4949Sitaram, Robert Skeels, Jason Songhurst, Clifford Stein, David Steiner,
    50 Sunnan, Zbigniew Szadkowski, Rick Taube, Nathan Thern, Mike Thomas, Minh
     50"Sunnan", Zbigniew Szadkowski, Rick Taube, Nathan Thern, Mike Thomas, Minh
    5151Thu, Christian Tismer, Andre van Tonder, John Tobey, Henrik Tramberend,
    5252Vladimir Tsichevsky, James Ursetto, Neil van Dyke, Sam Varner,
     
    6161build issues.
    6262
    63 Thanks to [[http://www.bevuta.com|bevuta IT GmbH]] for providing serverspace
    64 and contributing patches and support.
     63Thanks to Pablo Beyen and [[http://www.bevuta.com|bevuta IT GmbH]] for
     64their awesome support.
    6565
    6666Also special thanks to Benedikt Rosenau for his constant encouragement.
    6767
    6868Felix especially wants to thank Dunja Winkelmann for putting up with all of this
    69 and for her awesome support.
     69and for her constant support.
    7070
    7171CHICKEN contains code from several people:
    7272
    7373; Marc Feeley : pretty-printer.
    74 ; Richard Kelsey, Jonathan Rees and Taylor Campbell : {{syntax-rules}} expander
    75 ; Mikael Djurfeldt : topological sort used by compiler.
    76 ; Aubrey Jaffer : implementation of {{dynamic-wind}}.
     74; Richard Kelsey, Jonathan Rees and Taylor Campbell : core of the {{syntax-rules}} expander
     75; Aubrey Jaffer : initial implementation of {{dynamic-wind}}.
    7776; Richard O'Keefe : sorting routines.
    7877; Alex Shinn : the [[http://synthcode.com/scheme/irregex/|irregex]] regular expression package.
    79 ; Olin Shivers : implementation of {{let-optionals[*]}} and reference implementations of SRFI-1, SRFI-13 and SRFI-14.
     78; Olin Shivers : implementation of {{let-optionals[*]}}.
    8079
    8180The documentation and examples for explicit renaming macros was taken from
  • wiki/man/5/Bugs and limitations

    r34191 r35318  
    99* {{port-position}} currently works only for input ports.
    1010
    11 * Leaf routine optimization can theoretically result in code that thrashes, if tight loops perform excessively many mutations.
     11* Leaf routine optimization can theoretically result in code that thrashes, if tight loops perform excessively many mutations. In practice this doesn't happen.
    1212
    1313* Due to the header representation of block objects, the maximum size
     
    2525
    2626---
    27 Previous: [[Data representation]]
     27Previous: [[Extensions]]
    2828
    2929Next: [[faq|FAQ]]
  • wiki/man/5/C interface

    r35316 r35318  
    16091609Previous: [[Locations]]
    16101610
    1611 Next: [[Extensions]]
     1611Next: [[Data representation]]
  • wiki/man/5/Data representation

    r34052 r35318  
    161161
    162162---
    163 Previous: [[Extensions]]
     163Previous: [[C interface]]
    164164
    165 Next: [[Bugs and limitations]]
     165Next: [[Extensions]]
  • wiki/man/5/Interface to external functions and variables

    r35316 r35318  
    55The macros in this section, such as {{define-foreign-type}} and {{define-external}}, are available in the {{foreign}} import library.  To access them:
    66
    7  (import foreign)
     7 (import (chicken foreign))
    88
    99Note: Using the foreign library directly from the interpreter or the REPL will not work.
     
    1414* [[Callbacks]]                   
    1515* [[Locations]]                   
    16 * [[C interface]]                 
     16* [[C interface]]       
     17* [[Data representation]]         
    1718
    1819---
  • wiki/man/5/TODO/Cross development

    r34052 r35318  
    244244
    245245----
    246 Previous: [[Extensions]]
    247 Next: [[Data representation]]
     246Previous: [[Units and linking model]]
     247Next: [[Supported language]]
  • wiki/man/5/TODO/Getting started

    r34716 r35318  
    11[[tags: manual]]
     2
     3XXX
     4* R7RS compliance?
     5* Do we need to document units here?
     6* Update example output
     7XXX
    28
    39== Getting started
     
    2026
    2127Scheme is a member of the Lisp family of languages, of which Common
    22 Lisp and Emacs Lisp are the other two widely-known members. As with
     28Lisp, Emacs Lisp and Clojure are other widely-known members. As with
    2329Lisp dialects, Scheme features
    2430
     
    3036include only those features absolutely necessary in programming. In
    3137contrast to Emacs Lisp, Scheme is not anchored into a single program
    32 (Emacs), and has a more modern language design.
     38(Emacs), and has a more modern and elegant language design. In contrast
     39to Clojure, Scheme provides only a very minimal set of concepts but allows
     40them to be used in very general ways with few restrictions.
    3341
    3442Scheme is defined in a document called ''The Revised^5 Report on the
     
    3846report, ''R6RS'', was
    3947released in 2007, but this report has attracted considerable
    40 controversy, and not all Scheme implementations will be made compliant
    41 with it. CHICKEN essentially complies with R5RS.
     48controversy, and a number of Scheme implementations have chosen
     49not to be compliant
     50with it. Yet another report was released in 2013 ("R7RS"), that was
     51less ambitious than R6RS and more minimal.
     52
     53CHICKEN fully complies with R5RS and mostly with the "R7RS small"
     54language.
    4255
    4356Even though Scheme is consciously minimalist, it is recognized that a
     
    5366FAQs, lists of useful books and other resources, and the SRFIs.
    5467
    55 The CHICKEN community is at present developing tutorials for
    56 programmers who are new to Scheme but experienced with Python, Ruby,
    57 or other languages. These can be found on the CHICKEN wiki.
    58 
    5968=== CHICKEN
    6069
    61 CHICKEN is an implementation of Scheme that has many advantages.
    62 
    6370CHICKEN Scheme combines an optimising compiler with a reasonably fast
    64 interpreter.  It supports almost all of R5RS and the important SRFIs.
     71interpreter.  It supports almost all of R7RS and the important SRFIs.
    6572The compiler generates portable C code that supports tail recursion,
    66 first-class continuations, and lightweight threads, and the interface to
     73first-class continuations and lightweight threads, and the interface to
    6774and from C libraries is flexible, efficient, and easy to use.  There are
    6875hundreds of contributed CHICKEN libraries that make the programmer's
     
    7986CHICKEN includes
    8087
    81 * a Scheme interpreter that supports almost all of  R5RS Scheme, with
     88* a Scheme interpreter that supports almost all of  R7RS Scheme, with
    8289  only a few relatively minor omissions, and with many extensions
    8390* a compatible compiler whose target is C, thus making porting to new
    8491  machines and architectures relatively straightforward
    8592** the C support allows Scheme code to include `embedded' C code,
    86   thus making it relatively easy to invoke host OS or library
     93  thus making it easyto invoke host OS or library
    8794  functions
    8895* a framework for language extensions, library modules that broaden
     
    9097
    9198This package is distributed under the '''BSD license''' and as such is free
    92 to use and modify.
     99to use and modify as long as the original authors are acknowledged.
    93100
    94101Scheme cognoscenti will appreciate the method of compilation and the
     
    99106
    100107* Consing (creation of data on the heap) is relatively inexpensive,
    101   because a generational garbage collection scheme is used, in which
     108  because a generational garbage collection scheme is used in which
    102109  short-lived data structures are reclaimed extremely quickly.
    103110
     
    106113  first-class continuations are used in complex ways.
    107114
    108 The generated C code is fully tail-recursive.
     115The generated C code fully supports tail-call optimization (TCO.)
    109116
    110117Some of the features supported by CHICKEN:
    111118
    112 * SRFIs 0, 1, 2, 4, 6, 8-18, 23, 26, 28, 30, 31, 39, 46, 55, 61, 62, 69, 85, 88 and 98.
    113119* Lightweight threads based on first-class continuations
    114120* Record structures
     
    116122* Libraries for regular expressions, string handling
    117123* UNIX system calls and extended data structures
    118 * Create interpreted or compiled shell scripts written in Scheme for
    119   UNIX or Windows
    120124* Compiled C files can be easily distributed
    121125* Allows the creation of fully self-contained statically linked executables
     
    125129CHICKEN has been used in many environments ranging from embedded
    126130systems through desktop machines to large-scale server deployments. 
    127 The number of language extensions, or '''eggs''', is constantly growing.
     131The number of language extensions, or '''eggs''', is constantly growing:
    128132
    129133* extended language features
     
    143147programs.
    144148
    145 === CHICKEN repositories, websites, and community
     149=== CHICKEN repositories, websites and community
    146150
    147151The master CHICKEN website is
    148152[[http://www.call-cc.org]]. Here you can find
    149 basic information about CHICKEN, downloads, and pointers to other key
     153basic information about CHICKEN, downloads and pointers to other key
    150154resources.
    151155
     
    155159[[http://wiki.call-cc.org/egg-index|http://wiki.call-cc.org/egg-index]].
    156160
    157 A very useful search facility for questions about CHICKEN is found at
     161A very useful search facility for questions about procedures and syntax
     162available for CHICKEN can be found at
    158163[[http://api.call-cc.org]]. The CHICKEN issue tracker is at
    159164[[http://bugs.call-cc.org]].
     
    223228using the interpreter and/or calling the compiler.  If you install one
    224229of the line editing extensions (e.g., [[/egg/readline|readline]],
    225 [[/egg/parley|parley]], [[/egg/linenoise|linenoise]], you have some
     230[[/egg/parley|parley]], [[/egg/linenoise|linenoise]]), you have some
    226231useful command line editing features in the interpreter (e.g., Emacs
    227232or vi-compatible line editing, customization).
    228233
    229 You will need a text editor that knows Scheme; it's just too painful
     234It will be helpful to use a text editor that knows Scheme; it can be painful
    230235with editors that don't do parenthesis matching and proper
    231 indentation. Some editors allow you to execute Scheme code directly in
    232 the editor. This makes programming very interactive: you can type in a
    233 function and then try it right away. This feature is very highly
    234 recommended.
    235 
    236 As programmers have very specific tastes about editors, the editors
    237 listed here are shown in alphabetic order. We aren't about to tell you
    238 which editor to use, and there may be editors not shown here that
    239 might satisfy your needs. We would be very interested in reports of
    240 other editors that have been used with CHICKEN, especially those that
    241 support interactive evaluation of forms during editing. Pointers to
    242 these (and to any editor customization files appropriate) should be
    243 put on the CHICKEN wiki, and will likely be added to future editions
    244 of this manual. (We have had a request for editors that support
    245 proportional fonts, in particular.)
    246 
    247 * Emacs ([[http://www.gnu.org/software/emacs]]) is an
    248 extensible, customizable, self-documenting editor available for
    249 Linux/Unix, Macintosh, and Windows systems; See
    250 [[http://wiki.call-cc.org/emacs|http://wiki.call-cc.org/emacs]]
    251 for more information about the available options.
    252 
    253 * SciTE ([[http://scintilla.sourceforge.net/SciTE.html]]),
    254 unlike Emacs or Vim, follows typical graphical UI design conventions
    255 and control-key mappings, and for simple tasks is as familiar and
    256 easy to use as Notepad, KEdit, TeachText etc.  However it has many
    257 programming features such as multiple open files, syntax
    258 highlighting for a large number of languages (including Lisps),
    259 matching of brackets, ability to fold sections of code based on the
    260 matched brackets, column selections, comment/uncomment, and the
    261 ability to run commands in the same directory as the current file
    262 (such as make, grep, etc.)  SciTE is written with the GTK toolkit
    263 and is portable to any GTK platform, including Windows, Linux and
    264 MacOS.  It uses the Scintilla text-editing component, which lends
    265 itself well to embedding within other IDEs and graphical toolkits.
    266 It does not have any other Scheme-specific features, but being
    267 open-source and modular, features like auto-formatting of
    268 S-expressions could be added.  The syntax highlighting can be
    269 configured to use different fonts for different types of syntax,
    270 including proportional fonts.
    271 
    272 * Vim ([[http://www.vim.org]]) is a highly configurable text
    273 editor built to enable efficient and fast text editing. It is an
    274 improved version of the vi editor distributed with most UNIX systems.
    275 Vim comes with generic Lisp (and therefore Scheme) editing capabilities
    276 out of the box. See [[/Vim]] for a few tips on using Vim with CHICKEN.
     236indentation.
    277237
    278238In the rest of this chapter, we'll assume that you are using an editor
     
    393353  users aren't expected to have CHICKEN installed: compiled
    394354  applications can be self-contained.
     355* Compiled code can access external libraries written in lower-level
     356  languages that follow the C calling convention.
    395357
    396358The CHICKEN compiler is provided as the command {{chicken}}, but in
     
    409371
    410372We can compile our factorial function, producing a file named
    411 {{fact.so}} (''shared object'' in Linux-ese, the same file type is
    412 used in OS X and Windows, rather than {{dylib}} or {{dll}},
    413 respectively).
    414 
    415  chicken$ csc -dynamic fact.scm
     373{{fact.so}} (''shared object'' in Linux-ese, the same file extension is
     374used in Windows, rather than {{dll}})
     375
     376 chicken$ csc -shared fact.scm
    416377 chicken$ csi -quiet
    417378 #;1> (load "fact.so")
     
    542503Because CHICKEN compiles to C, and because a foreign function
    543504interface is built into the compiler, interfacing to a C library is
    544 quite straightforward. This means that nearly any facility available
     505quite straightforward. This means that any facility available
    545506on the host system is accessible from CHICKEN, with more or less
    546507work.
  • wiki/man/5/TODO/Modules

    r34716 r35318  
    2626A module is initially empty (has no visible bindings). You must at least
    2727import the {{scheme}} module to do anything useful. To access any
    28 of the non-standard macros and procedures, import the {{chicken}}
     28of the non-standard macros and procedures, import the {{(chicken base)}}
    2929module.
    3030
     
    3535* Supports batch-compilation of separate compilation units
    3636* No separate "identifier" type is used, all identifiers appearing in code and processed in expansions are symbols
    37 * The module system is fully optional
    3837* Parameterized modules are supported
    3938
Note: See TracChangeset for help on using the changeset viewer.