Changeset 37688 in project

06/11/19 10:36:58 (6 days ago)

Port guide to C5

1 edited


  • wiki/chicken-for-emacs-lisp-programmers

    r36801 r37688  
    1919be {{cl-lib}} and [[|dash.el]], to
    2020get a taste of what's possible with CHICKEN, check out the
    21 [[|egg
    22 index]], specifically the "Language extensions", "Logic programming"
    23 and "Object-oriented programming" sections.
     22index]], specifically the "Language extensions" and "Object-oriented
     23programming" sections.
    2525== Lisp-1 vs. Lisp-2
    9696you do need variables that behave as if dynamically bound, you can use
    9797the {{fluid-let}} macro or better, define
    98 [[|parameters]].
    100100== Truthiness
    139139the CHICKEN equivalent is {{begin}}.  If you ever feel like you need
    140140{{prog1}}, either use {{begin0}} from the
    141 [[|miscmacros]] egg or
     141[[|miscmacros]] egg or
    142142{{(let ((result (first-form))) ... result)}}.
    153153specified by the {{else}} keyword.  Furthermore, it's possible to
    154154transform the result of a test with the {{=>}} syntax, see
    155 [[|R5RS]] for
    156 further details.
     155[[|R5RS]] for further
    158158=== Specialized conditionals
    169169Emacs Lisp has {{pcase}} whereas CHICKEN has
    170 [[|matchable]].  Make sure to
     170[[|matchable]].  Make sure to
    171171check out
    212212Consult the following before rolling your own:
    214 * [[|The R5RS
     214* [[|The R5RS
    215215  standard]]
    216216* [[|SRFI-1]]
    217 * [[|Extensions and
    218   built-in units]], especially the data-structures unit
    219 * [[|The egg
     217* [[|Built-in modules]]
     218* [[|The egg
    220219  index]]
    240239instantiation.  It's possible to use extra qualifiers to selectively
    241240import or rename identifiers, see
    242 [[|the manual]] for
     241[[|the manual]] for
    271270task.  CHICKEN's closest thing to this is the ports abstraction used
    272271for I/O, be it with strings, files, sockets, whatever.  Refer to
    273 [[|The
    274273R5RS standard]] for details.
    284283  close to Emacs modules, but much nicer because you don't have to
    285284  write the whole thing in C.  You'll want to study
    286   [[|the
     285  [[|the
    287286  manual]] for this and check out the {{foreigners}} and {{bind}}
    288287  eggs.  The {{lazy-ffi}} egg is another option if you prefer runtime
    303302syntax-rules primer]] covers intermediate and advanced usage.
    304303Additionally to that CHICKEN comes with
    305 [[|explicit and implicit renaming
    306 macros]] that allow you to inject identifiers on an opt-out or opt-in
    307 basis.  [[|Here's
    308 another tutorial]].
     305and implicit renaming macros]] that allow you to inject identifiers on
     306an opt-out or opt-in basis.
     307[[|Here's another
    310310You might be wondering now whether to bother writing Scheme macros at
    325325* Basic REPL ({{csi}}), optionally with readline-style editing:
    326 ** [[]]
    327 ** [[]]
    328 ** [[]]
    329 ** [[]] (cleaner alternative to the previous one with better tab-completion)
     326** [[|parley]] (to be ported)
     327** [[|linenoise]]
     328** [[|breadline]]
    330329* [[|Two profilers]]
    331 * [[|Documentation look-up]]
     330* [[|chicken-doc]]
    332331* The {{feathers}} debugger: [[]]
    338337People seeking for a more IDE-like experience are encouraged to give
    339338[[|Geiser]] or the
    340 [[|slime egg]] a try.
     339[[|slime egg]] (to be ported) a
    342342== Application/library development
    347347especially if you need to reference resource files.  In this situation
    348348it can be of advantage to structure your application as an egg and use
    349 {{chicken-install}} to install it.  Deployment can be made to work,
    350 but is awkward, especially if it's of the static kind and external
    351 libraries are involved as every dependency needs to be built
    352 [[|the
    353 same way]].  This will hopefully be easier to do in the upcoming major
    354 release of CHICKEN.
     349{{chicken-install}} to install it.  Static linking got easier in
     350CHICKEN 5 as the entire system and eggs are built both in dynamic and
     351static versions.  The only issues you'll be running into is
     352bindings to external libraries.
    356354The vast majority of eggs consists of libraries pulled in from
    377375CHICKEN's community is considerably smaller, but more welcoming.
    378 [[|The egg
     376[[|The egg
    379377index]] serves as the central hub where one can install eggs from.  If
    380378you encounter an egg outside it or write your own, you can simply run
Note: See TracChangeset for help on using the changeset viewer.