Changeset 20238 in project

09/10/10 19:02:46 (10 years ago)
Alaric Snell-Pym

gazette: Issue 3

2 edited


  • gazette/README.txt

    r20130 r20238  
    22                    --== The Chicken Gazette ==--
    3                      --== Guide for Authoers ==--
     3                     --== Guide for Authors ==--
  • gazette/src/issues/

    r20130 r20238  
    66== 0. Introduction
    8 FIXME: Pick out some interesting news
     8Welcome to issue 3 of the Chicken Gazette!
    10 == 1. New Infrastructure
     10There is work afoot to improve the build system, so we would very much
     11like testing and feedback on the Cygwin, Solaris and Haiku ports. If
     12you have access to any of these operating systems, please check out
     13the latest chicken-core (from git or our new bzr mirror) and tell us
     14if it works well for you.
     16== 1. Infrastructure
     18Salmonella is now running on Chicken 4.6.0rc1, and a drive to attract
     19attention to broken eggs has brought our current failing egg count
     20down to a mere FOUR, which may well be the lowest it's ever been
     21(since we only ''had'' four eggs, at least).
     23For those who find git is not to their taste, there is now a regularly-updated bzr mirror of the chicken core
     24at [[]]. Now you
     25have no excuse not to track the development releases!
    1227== 2. The Hatching Farm - New Eggs & The Egg Repository
     29There have been no new eggs this week, but many commits - most notably, Ivan Raikov
     30has done a great job of moving egg documentation to the wiki from
     31various legacy formats, so they'll all appear in [[|chicken-doc]] and [[|chickadee]].
    1433== 3. The Core - Bleeding Edge Development
     35The week started with Felix [[;a=commit;h=62c3114476103f50def569c707ecf068afcaf68c|fixing a bug reported by Sven Hartrumpf]],
     36where -optimize-level 2 was causing chicken to die with "Error: (=)
     37bad argument type - not a number: #f". Not to be outdone, Felix then
     38went and [[;a=commit;h=6d6430909883370577b1fa37ae7eacc23d8ae979|fixed the Cygwin build system]], so even those of us
     39unfortunate enough to be shackled to Windows can enjoy tasty Chicken
     40goodness without needing to ssh into a real computer.
     42There's been non-stop fun out on the branches, too, with Peter Bex
     43instigating a massive refactoring of the build system on the
     44make-refactoring branch, and Felix doing optimizer and arithmetic work on the
     45experimental branch and overflow-detection branches.
    1647== 4. Chicken Talk
     49The Chicken Users list has been fairly busy this week, starting with
     50the aforementioned optimizer bug report. An issue was raised with the
     51tinyclos egg using the {{-no-procedure-checks-for-toplevel-bindings}}
     52flag to csc, only introduced in version 4.5.2, while 4.5.0 is the
     53latest stable release. It was pointed out that chicken-install will
     54gladly install older versions of eggs with the following syntax:
     56 chicken-install tinyclos:<version>
     58However, in future, it would probably be a good idea if egg authors
     59held off of releasing versions of their eggs that use features from
     60development builds of Chicken!
     62Alaric Snell-Pym (your faithful Gazette editor this week) suggested
     63adding links to browse the source code and to discuss each egg on the
     65index]] page; there was a positive response to the idea of the source
     66code links as long as it doesn't clutter things, but it was felt that
     67users should be encouraged to raise egg suggestions and questions on
     68the mailing list. A patch is in the pipeline to add the source browser
     69links, so we can decide if it's a good idea in practice.
    1871== 5. Omelette Recipes - Tips and Tricks
    20 FIXME: Talk about the fmt egg, as it's wicked cool.
     73One of my favourite eggs is
     74[[|fmt]]. There are two reasons
     75for this. One is that I like what it does; neat text formatting is
     76difficult, and is usually a distraction from the core problem your
     77application is trying to solve; the fmt egg makes things like columns
     78and justification easy. The second is that I like how it works.
     80Common Lisp has the
     82function, which works much like C's printf function: a format string
     83is provided containing static text with special control sequences
     84where values should be inserted at run time. Naturally, format far
     85exceeds printf in power; it being ''Common Lisp'', they of course had
     86to include such features as Roman numerals alongside more immediately
     87useful features such as formatting lists neatly. However, format
     88is not extensible; it has a fixed library of control sequences that
     89tell it how to format things like lists, numbers, and strings; and
     90various formatting operations such as left or right alignment, padding
     91to fixed widths, and so on. People who wish to have different
     92formatting modes for arbitrary objects (such as user-defined types),
     93or specific formatting operations (such as flowing text into a
     94circular frame), had to abandon format and write their own from
     97And that's no fun.
     99fmt abandons the "format string" approach, and is instead based ona
     100library of formatting combinators. Thanks to this architecture, new
     101combinators can be defined in terms of the existing combinators. It
     102comes with a rich library of combinators, supporting such things as
     103[[|SRFI-38]] compliant
     104pretty-printing of sexprs with shared structure, the full range of
     105number formats (from customisable decimal points, thousand separators
     106and scientific notation through to - you guessed it - Roman numerals
     107(in two flavours!)), list formatting, decimal alignment for tables of
     108numbers, trimming and padding to align columns (with configurable
     109behaviour for values that won't fit in their columns, including using
     110an ellipsis to warn the reader of omitted content), and support for
     111wrapped columns of multi-line values (including justification).
     113Perhaps my favourite example from
     114[[|the manual]] is:
     116 (define func
     117   '(define (fold kons knil ls)
     118      (let lp ((ls ls) (acc knil))
     119        (if (null? ls) acc (lp (cdr ls) (kons (car ls) acc))))))
     121 (define doc
     122   (string-append
     123    "The fundamental list iterator.  Applies KONS to each element "
     124    "of LS and the result of the previous application, beginning "
     125    "with KNIL.  With KONS as CONS and KNIL as '(), equivalent to REVERSE."))
     127 (fmt #t (columnar (pretty func) " ; " (justify doc)))
     129The glorious output of this is:
     131 (define (fold kons knil ls)           ; The    fundamental   list   iterator.
     132   (let lp ((ls ls) (acc knil))        ; Applies   KONS  to  each  element  of
     133     (if (null? ls)                    ; LS  and  the  result  of the previous
     134         acc                           ; application,   beginning  with  KNIL.
     135         (lp (cdr ls)                  ; With  KONS  as  CONS and KNIL as '(),
     136             (kons (car ls) acc)))))   ; equivalent to REVERSE.
     138The fmt egg makes beautifully-formatted text output from your applications easy. Give it a try!
    22140== 6. About the Chicken Gazette
Note: See TracChangeset for help on using the changeset viewer.