[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Chicken Gazette issue #17

From: Christian Kellermann
Subject: [Chicken-users] Chicken Gazette issue #17
Date: Fri, 14 Jan 2011 10:56:26 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

     _/_/_/  _/        _/            _/
  _/        _/_/_/          _/_/_/  _/  _/      _/_/    _/_/_/
 _/        _/    _/  _/  _/        _/_/      _/_/_/_/  _/    _/
_/        _/    _/  _/  _/        _/  _/    _/        _/    _/
 _/_/_/  _/    _/  _/    _/_/_/  _/    _/    _/_/_/  _/    _/

--[ Issue 17 ]------------------------------------- G A Z E T T E
                               brought to you by the Chicken Team

== 0. Introduction

Dear reader,

The authors wish you all a happy, healthy and successful year 2011.
So welcome to the first issue of 2011, number 17 of the Chicken
Gazette.  Although it has been a while since the last issue so we
hope you will enjoy the lengthy period of coverage. After this short
hiatus we intend to pick up a bi-weekly release schedule.

== 1. The Hatching Farm

The following new egg releases have taken place:

  * Peter Bex                                                              
    * intarweb 0.6 (changed path parameters on cookies)                    
    * http-client 0.3 (fixes related to cookies)                           
    * sendfile 1.7.3 (update for removed foreign type in development       
    * md5 2.4, 2.5 (updates for dev. Chicken, made C functions static)     
    * sha1 2.2.2, 2.3 (same here)                                          
    * sha2 2.1.1 (same here)                                               
    * spiffy 4.11 (enhancements and modularization)                        
  * Mario Domenech Goulart                                                 
    * html-tags 0.9 (enhancements, correct test exit status code)          
    * accents-substitute 0.3 (Turkish support)                             
    * awful 0.28 (many enhancements)                                       
  * Moritz Heidkamp                                                        
    * uri-match 0.4 (cleanup)                                              
    * vandusen 0.7 (irregex support)                                       
  * Kon Lovett                                                             
    * uuid-ossp 1.22 (version numbering change)                            
  * Ivan Raikov                                                            
    * byte-blob 1.8 (bugfixes)                                             
    * mpd-client 1.13 (simplifications)                                    
    * interval-digraph 1.1, 1.2 (enhancements)                             
  * Jim Ursetto                                                            
    * chicken-doc-html 0.2.1, 0.2.2 (bugfixes, added missing dependency)   
    * atom 0.1.2 (fixed missing dependency on `regex` extension)           
    * svnwiki-sxml 0.2.10 (missing test-dependency)                        
    * vector-lib 1.2.1, 1.2.2 (missing test-dependency, tests exit with    
      status 1 on test -failure)                                           
    * base64 3.3.1 (test exit status)                                      
    * rfc3339 0.1.1 (missing test-dependency, test exit status)            
    * regex-literals 1.0.4 (missing `regex` dependency)                    
    * php-s11n 1.0.3 (same here)                                           
    * pdf 1.0.1 (guess)                                                    
    * chicken-doc 0.4.2 (indentation tweaks - he takes this stuff          
      seriously! missing `regex` dependency)                               
  * Alaric Blagrave Snell-Pym                                              
    * banterpixra 0.1 (enhancements)                                       
  * Felix Winkelmann                                                       
    * sequences 0.1 (dependency fixes)                                     
    * tinyclos 1.8.4 (removed use of `randomize`, which is broken in the   
      current Chicken release)                                             
    * coops 1.1 (bugfixes)                                                 
    * test (replaced use of `getenv`)                              
    * honu 1.6 (bugfixes)                                                  
    * easyffi 1.99.5 (generated code used now removed foreign type         
    * bind 0.92 (same issue, fixed test cases)                             
    * cairo 0.1.8 (removed `pointer` type)                                 
    * sdl 0.5.2 (the same)                                                 
    * ezxdisp 2.6 (same)                                                   
    * fast-generic 0.4 (bugfixes)                                          
    * fps 1.1.4 (used removed `getenv`)                                    
    * qt-light 0.96 (added support for changed include-directory in dev.   
    * unix-sockets 1.5 (missing import and removed `pointer`)              

Extensions that have been added:

  * Moritz Heidkamp is working heavily on an interface to PulseAudio       
    (, a Linux sound server and /mojo/, a simplified 
    ncurses API.                                                           
  * Peter Bex released crypt, which allows secure password hashing.        
  * Christian Kellermann released isbn, which allows parsing ISBN numbers  
    and querying and             
  * Ivan Raikov added flsim, a simple applicative language for numerical   

== 2. Core development

Quite a number of bugs have been fixed, namely `normalize-pathname`
(files unit) and `time->seconds` (srfi-18 unit), which returned
incorrect results (reported by Alan Post).

Single-char symbols were not correctly escaped by the printer.

Peter Bex discovered a bug in the handling of internal definitions
in bodies and kindly provided a fix.

Some bugs in the mingw/msys makefiles have been fixed.

Kon Lovett and Julian Altfas pointed out errors in the internal

`file-creation-mode` has been added to the `posix` unit, in response to
the accepted change-request #424.

The change request for special handling of procedures in
`equal?`/`equal=?` has been implemented.

`unsigned-integer64` was not available as a result-type (thanks to
Moritz Heidkamp for pointing this out).

The recently added `-picky` option has been removed again! It turned out
that the generated warnings were incorrect in many cases and
situations that ought to be covered where not handled.

The build options for `PROGRAM_PREFIX` and `PROGRAM_SUFFIX` are now
applied to all installed directories and files, so it is possible
to install multiple CHICKEN versions in the same `PREFIX`. The
header-files have moved into a subdirectory.

The last remnants of support for MS Visual C have been removed.
Thank god.

The names of toplevel-entry points for library units can now contain
arbitrary characters. Since the naming conversion is not backwards
compatible, bootstrapping may be a bit tricky. This means if you
get errors mentioning /C_foo_2d1_toplevel/ build your chicken, make
spotless and rebuild it again with the binary you got from the first

Some useless warnings have been removed.

The runtime system now uses ISO C number predicates for detecting NaN
and infinity - this change needed quite a number of changes in the
header files which hopefully don't break builds too much.

In an somewhat overeager cleaning-up spree many deprecated procedures
have been removed: `time->milliseconds`, `milliseconds->time`,
`project`, `global-ref` and friends, `left-section`, `right-section`,
`noop`, `getenv` and the `pointer`, `nonnull-pointer`, `byte-vector`
and `nonnull-byte-vector` foreign types. This broke a number of
eggs, but most have been fixed by now.

The binary version has been increased. This means all eggs have to be
reinstalled (which is advisable anyway, since a lot of things have
been changed that may affect binary compatibility).

== 3. Chicken Talk

The mailing lists have seen a lot of talk during the last few
weeks. David Dreisigmeyer started a few threads about problems he
encountered when compiling Chicken with LLVM's clang
and when trying to use SWIG for bindings
Felix noted that SWIG is not really maintained anymore so it is
probably better forget about it and use Chicken's FFI directly.

Christian Kellermann finally got a reply by the FOSDEM
( organizers. Unfortunately he had to tell us
that our application for a booth got rejected this time
However, we decided to attend FOSDEM from 5-6 February 2011 anyway,
so if you are interested in meeting some Chicken hackers save the
date! Although we didn't get a booth, Felix could manage to sneak
in a lightning talk about Chicken's implementation strategy (Cheney
on the MTA). If that's your kind of thing you should definitely
stop by!

Matt Welland had some issues
with tinyclos on Windows systems. One information may be of interest
for the broader Chicken public here: if you want to use a classical
object system in a new project you may want to choose coops over
Tiny-CLOS for it is actively worked on and implemented to be very

Joe Python posted a Christmas wish for parallel map
i.e. a way to apply `map` in parallel. Jörg F. Wittenberger replied
with some code which allows offloading arbitrary thunks to pthreads.
Very interesting hack!

Probably the nicest mail of the last few weeks was Nick
Gasson's announcement of his work on a SLIME backend for Chicken
Check out this issue's Omelette Recipes for details on how to use

== 4. Omelette Recipes

Today I would like to introduce a really promising work in
progress, that surely folks in the #chicken channel greatly
enjoy so far: Mr. Nick Gasson ( announced
( in
his (
blog (
that he has implemented a backend for SLIME
( The Superior Lisp Interaction
Mode for Emacs.

Slime has many things to offer for Emacs users: A REPL integrated into
your favorite editor, including debugger, help system and auto completion.
While other modes for Lisp and Chicken, such as the built in
scheme-mode, quack, cluck, and scheme-complete also offer a REPL
in a buffer, by executing the interpreter directly, slime offers a
client / server framework.

The architecture looks closely like this (taken from Tobias
Rittweiler's Presentation on SLIME via Bill Clementson's article

The dotted box on the right is the block Nick has implemented up to a
point it is usable for testing on a wider scale. Preparations are under
way to make his work available through the usual /chicken-install/
mechanism, but for now you need to pull it from Nick's github:

  git clone git://

Also you need to grab SLIME from cvs (this is recommended by its authors):

  cvs -d :pserver:anonymous:address@hidden:/project/slime/cvsroot co slime

Now add to your /.emacs/

  (setq slime-csi-path "/path/to/csi")
  (setq swank-chicken-path nil)
  (add-to-list 'load-path "~/lib/emacs/slime/")  ; your SLIME directory
  (require 'slime)
  (slime-setup '(slime-fancy slime-banner))
  (autoload 'chicken-slime "chicken-slime" "SWANK backend for Chicken" t)
  (add-hook 'scheme-mode-hook
           (lambda ()
             (slime-mode t)))

Now copy the file /chicken-slime.el/ from the /swank-chicken/
directory into slime's. Build the chicken-swank module with (sudo)
chicken-install in the /swank-chicken/ directory.

Reload your /.emacs/ and start a REPL with 'M-x chicken-slime'.

You will be presented with a CSI> prompt waiting for a nice chicken
expression to munch on. So what can you do now?

  * Pressing /,/ allows you to enter special slime commands, typing /help/ 
    will list them all. /sayoonara/ quits all of slime if you want to quit 
    Scheme hacking.                                                        
  * Start entering an sexpr calling a function, for example enter /(fold/. 
    Notice how the minibuffer will display the signature of the procedure  
    fold. No need to lookup the order of arguments again!                  
  * Also if you do have an index for egg:chicken-doc installed, typing     
    /C-c C-d d/ will open up the chicken-doc page for the procedure or     
    module under point (the name of the cursor in emacs).                  
  * In case you need to lookup a procedure but you only remember parts     
    of the name you can type /C-c C-d a/ and enter a (chicken) regexp      
    which will then produce a list of possible choices. To look up all     
    procedures with /string/ in their name you can type /C-c C-d a string  
    <return>/ and it will show a rather long list. Hitting return on any   
    of the results will open the chicken-doc section of this command. Try  
    /list->string / as an example.                                         
  * Loading of Scheme code can be done with files (/C-c C-l/) or           
    s-expressions (/C-c C-c/) in Scheme file buffers. /C-x C-e/ evaluates  
    the last expression before point, /C-x C-r/ evaluates marked regions   
    of code.                                                               
  * In case you have an error in your code or the code raises a condition  
    you will get thrown into the slime lisp debugger SLDB. This shows you  
    the recent call-chain leading to the error. Hitting /q/ will close the 
    window and will get you back wherever you have been before.            

The more curious can try Christian's experimental git repo, which includes
some bugfixes not (yet) present in Nick's code: Display of stack
frame contents as know by the CSI /,c/ and /,f/ commands. To get
the goodness you can pull from the repo like this:

  $ cd path/to/swank-chicken
  $ git pull

Restart slime and try the following expression:

  CSI> (let ((a 42) (b 'test)) (+ a b))

An SLDB window will open up showing a call chain, hit enter on the first
frame that says /[ more... ]/. You will see the values of /a/ and /b/.
Implementation for the inspector is on its way as well as inspection
of the raised condition.

Also note that because of the client server architecture, you can connect
to REPLs that are sitting on remote machines! The default port is 4005, so
you start csi on the remote machine:

  $ csi -R swank -e'(swank-server-start)'

And connect to it with /M-x slime-connect/. The default tries to connect
to localhost on port 4005, so you will need to adjust the hostname. And
off you go with your remote REPL!

Also note that SLIME does support different REPLs, even different backends
at the same time, so you can easily test code on different machines,
probably different architectures! Linux, Windows, Mac Schemes are all
bound into one interface one keystroke away. The short but fine
Slime manual (
explains all the possible customizations.

Beware that despite the admirable effort from Nick, not every function
is implemented. Some functionality cannot be implemented due to
Chicken being Scheme and not Lisp, some might have been forgotten
about or not understood fully yet, as the underlying SWANK protocol
is badly documented.

In any case I have been using this since Christmas and I already like it.
I hope you do too! Please share your criticism, suggestions and patches on
chicken-users with the fellow Chickenistas!

== 5. About the Chicken Gazette

The Gazette is produced bi-weekly by a volunteer from
the Chicken community. The latest issue can be found at or you can follow it in your feed reader at If you'd like to write an issue,
consult the wiki ( for the schedule and

[ --- End of this issue --- ]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]