source: project/gazette/src/issues/17.wiki @ 22372

Last change on this file since 22372 was 22372, checked in by syn, 9 years ago

gazette #17: add chicken talk

File size: 14.8 KB
Line 
1((title . "Issue 17")
2 (authors  "Moritz Heidkamp" "Christian Kellermann" "Felix Winkelmann")
3 (date . 1294687464))
4
5== 0. Introduction
6
7Dear reader,
8
9The authors wish you all a happy, healthy and successful year 2011. So
10welcome to the first issue of 2011, number 17 of the Chicken
11Gazette. Although it has been a while since the last issue so we hope
12you will enjoy the lengthy period of coverage. After this short hiatus
13we intend to pick up a bi-weekly release schedule.
14
15== 1. The Hatching Farm
16
17The following new egg releases have taken place:
18
19* [[user:peter-bex|Peter Bex]]
20** [[egg:intarweb|intarweb 0.6]] (changed path parameters on cookies)
21** [[egg:http-client|http-client 0.3]] (fixes related to cookies)
22** [[egg:sendfile|sendfile 1.7.3]] (update for removed foreign type in development chicken)
23** [[egg:md5|md5 2.4,]] 2.5 (updates for dev. chicken, made C functions static)
24** [[egg:sha1|sha1 2.2.2,]] 2.3 (same here)
25** [[egg:sha2|sha2 2.1.1]] (same here)
26** [[egg:spiffy|spiffy 4.11]] (enhancements and modularization)
27* [[user:mario-domenech-goulart|Mario Domenech Goulart]]
28** [[egg:html-tags|html-tags 0.9]] (enhancements, correct test exit status code)
29** [[egg:accents-substitute|accents-substitute 0.3]] (Turkish support)
30** [[egg:awful|awful 0.28]] (many enhancements)
31* [[user:moritz-heidkamp|Moritz Heidkamp]]
32** [[egg:uri-match|uri-match 0.4]] (cleanup)
33** [[egg:vandusen|vandusen 0.7]] (irregex support)
34* [[user:kon-lovett|Kon Lovett]]
35** [[egg:uuid-ossp|uuid-ossp 1.22]] (version numbering change)
36* [[user:ivan-raikov|Ivan Raikov]]
37** [[egg:byte-blob|byte-blob 1.8]] (bugfixes)
38** [[egg:mpd-client|mpd-client 1.13]] (simplifications)
39** [[egg:interval-digraph|interval-digraph 1.1,]] 1.2 (enhancements)
40* [[user:jim-ursetto|Jim Ursetto]]
41** [[egg:chicken-doc-html|chicken-doc-html 0.2.1,]] 0.2.2 (bugfixes, added missing dependency)
42** [[egg:atom|atom 0.1.2]] (fixed missing dependency on {{regex}} extension)
43** [[egg:svnwiki-sxml|svnwiki-sxml 0.2.10]] (missing test-dependency)
44** [[egg:vector-lib|vector-lib 1.2.1,]] 1.2.2 (missing test-dependency, tests exit with status 1 on test-failure)
45** [[egg:base64|base64 3.3.1]] (test exit status)
46** [[egg:rfc3339|rfc3339 0.1.1]] (missing test-dependency, test exit status)
47** [[egg:regex-literals|regex-literals 1.0.4]] (missing {{regex}} dependency)
48** [[egg:php-s11n|php-s11n 1.0.3]] (same here)
49** [[egg:pdf|pdf 1.0.1]] (guess)
50** [[egg:chicken-doc|chicken-doc 0.4.2]] (indentation tweaks - he takes this stuff seriously! missing {{regex}} dependency)
51* [[user:alaric-blagrave-snellpym|Alaric Blagrave Snell-Pym]]
52** [[egg:banterpixra|banterpixra 0.1]] (enhancements)
53* [[user:felix-winkelmann|Felix Winkelmann]]
54** [[egg:sequences|sequences 0.1]] (dependency fixes)
55** [[egg:tinyclos|tinyclos 1.8.4]] (removed use of {{randomize}}, which is broken in the current chicken release)
56** [[egg:coops|coops 1.1]] (bugfixes)
57** [[egg:test|test 0.9.9.1]] (replaced use of {{getenv}})
58** [[egg:honu|honu 1.6]] (bugfixes)
59** [[egg:easyffi|easyffi 1.99.5]] (generated code used now removed foreign type {{pointer}})
60** [[egg:bind|bind 0.92]] (same issue, fixed test cases)
61** [[egg:cairo|cairo 0.1.8]] (removed {{pointer}} type)
62** [[egg:sdl|sdl 0.5.2]] (the same)
63** [[egg:ezxdisp|ezxdisp 2.6]] (same)
64** [[egg:fast-generic|fast-generic 0.4]] (bugfixes)
65** [[egg:fps|fps 1.1.4]] (used removed {{getenv}})
66** [[egg:qt-light|qt-light 0.96]] (added support for changed include-directory in dev. chicken)
67** [[egg:unix-sockets|unix-sockets 1.5]] (missing import and removed {{pointer}})
68
69Extensions that have been added:
70
71* [[user:moritz-heidkamp|Moritz Heidkamp]] is working heavily on an interface to [[http://pulseaudio.org|PulseAudio]], a Linux sound server and ''mojo'', a simplified [[egg:ncurses|ncurses]] API.
72* [[user:peter-bex|Peter Bex]] released [[egg::crypt|crypt]], which allows secure password hashing.
73* [[user:christian-kellermann|Christian Kellermann]] released [[egg:isbn|isbn]], which allows parsing ISBN numbers and querying [[http://isbndb.com]] and [[http://openlibrary.org]].
74* [[user:ivan-raikov|Ivan Raikov]] added [[egg:flsim|flsim]], a simple applicative language for numerical simulation.
75
76== 2. Core development
77
78Quite a number of bugs have been fixed, namely {{normalize-pathname}} (files unit)
79and {{time->seconds}} (srfi-18 unit), which returned incorrect results (reported by
80[[user:alan-post|Alan Post]]).
81
82Single-char symbols were not correctly escaped by the printer.
83
84[[user:peter-bex|Peter Bex]] discovered a bug in the handling of internal
85definitions in bodies and kindly provided a fix.
86
87Some bugs in the mingw/msys makefiles have been fixed.
88
89[[user::kon-lovett|Kon Lovett]] and Julian Altfas pointed out errors in
90the internal type-database.
91
92{{file-creation-mode}} has been added to the {{posix}} unit, in
93response to the accepted [[ticket:424|change-request #424]].
94
95The [[ticket:441|change request]] for special handling of procedures
96in {{equal?}}/{{equal=?}} has been implemented.
97
98{{unsigned-integer64}} was not available as a result-type (thanks to
99[[user:moritz-heidkamp|Moritz Heidkamp]] for pointing this out).
100
101The recently added {{-picky}} option has been removed again! It turned out
102that the generated warnings were incorrect in many cases and situations that
103ought to be covered where not handled.
104
105The build options for {{PROGRAM_PREFIX}} and {{PROGRAM_SUFFIX}} are now
106applied to all installed directories and files, so it is possible to
107install multiple CHICKEN versions in the same {{PREFIX}}. The header-files
108have moved into a subdirectory.
109
110The last remnants of support for MS Visual C have been removed. Thank god.
111
112The names of toplevel-entry points for library units can now contain
113arbitrary characters. Since the naming conversion is not backwards
114compatible, bootstrapping may be a bit tricky.
115
116Some useless warnings have been removed.
117
118The runtime system now uses ISO C number predicates for detecting NaN
119and infinity - this change needed quite a number of changes in the
120header files which hopefully don't break builds too much.
121
122In an somewhat overeager cleaning-up spree many deprecated procedures have
123been removed: {{time->milliseconds}}, {{milliseconds->time}}, {{project}},
124{{global-ref}} and friends, {{left-section}}, {{right-section}}, {{noop}},
125{{getenv}} and the {{pointer}}, {{nonnull-pointer}}, {{byte-vector}} and
126{{nonnull-byte-vector}} foreign types. This broke a number of eggs, but
127most have been fixed by now.
128
129The binary version has been increased. This means all eggs have to be reinstalled
130(which is advisable anyway, since a lot of things have been changed that may
131affect binary compatibility).
132
133== 3. Chicken Talk
134
135The mailing lists have seen a lot of talk during the last few
136weeks. David Dreisigmeyer started a few threads about problems he
137encountered when
138[[http://lists.nongnu.org/archive/html/chicken-users/2010-12/msg00158.html|compiling Chicken with LLVM's clang]]
139and when
140[[http://lists.nongnu.org/archive/html/chicken-users/2010-12/msg00164.html|trying to use SWIG for bindings]]. Felix
141noted that SWIG is not really maintained anymore so it is probably
142better forget about it and use
143[[manual:Interface to external functions and variables|Chicken's FFI]]
144directly.
145
146[[user:christian-kellermann|Christian Kellermann]] finally got a reply
147by the [[http://fosdem.org/|FOSDEM]] organizers. Unfortunatley
148[[http://lists.nongnu.org/archive/html/chicken-users/2010-12/msg00186.html|he had to tell us that our application for a booth got rejected this time]]. However,
149we decided to attend FOSDEM from 5-6 February 2011 anyway, so if you
150are interested in meeting some Chicken hackers save the date! Although
151we didn't get a booth, Felix could manage to sneak in a lightning talk
152about Chicken's implementation strategy (Cheney on the MTA). If that's
153your kind of thing you should definitely stop by!
154
155[[http://lists.nongnu.org/archive/html/chicken-users/2010-12/msg00195.html|Matt Welland had some issues]]
156with [[egg:tinyclos|tinyclos]] on Windows systems. One information may
157be of interest for the broader Chicken public here: if you want to use
158a classical object system in a new project you may want to choose
159[[egg:coops|coops]] over Tiny-CLOS for it is actively worked on and
160implemented to be very efficient
161
162Joe Python posted a
163[[http://lists.nongnu.org/archive/html/chicken-users/2010-12/msg00213.html|Christmas wish for parallel map]],
164i.e. a way to apply `map` in parallel. Jörg F. Wittenberger replied
165with some code which allows offloading arbitrary thunks to
166pthreads. Very interesting hack!
167
168Probably the nicest mail of the last few weeks was Nick Gasson's
169[[http://lists.nongnu.org/archive/html/chicken-users/2011-01/msg00006.html|announcement of his work on a SLIME backend for Chicken]]. Check
170out this issue's Omelette Recipes for details on how to use it.
171
172
173== 4. Omelette Recipes
174
175Today I would like to introduce a really promising work in progress,
176that surely folks in the #chicken channel greatly enjoy so far: Mr. [[
177http://www.doof.me.uk/|Nick
178Gasson]] [[http://www.doof.me.uk/2010/12/12/using-slime-with-chicken-scheme/|announced]]
179in
180[[http://www.doof.me.uk/2011/01/01/update-to-chicken-swank-server/|his]]
181[[http://www.doof.me.uk/2011/01/02/chicken-slime-describe-and-apropos/|blog]]
182that he has implemented a backend for
183[[http://common-lisp.net/project/slime/|SLIME]]: The Superior Lisp
184Interaction Mode for Emacs.
185
186Slime has many things to offer for Emacs users: A REPL integrated into
187your favorite editor, including debugger, help system and
188auto completion. While other modes for lisp and chicken, such as the
189built in scheme support, quack, cluck, and scheme-complete also
190offer a REPL in a buffer, by executing the interpreter directly, slime offers a client / server framework.
191
192The architecture looks closely like this (taken from Tobias
193Rittweiler's Presentation on SLIME via
194[[http://bc.tech.coop/blog/081209.html|Bill Clementson's article]]):
195
196[[image:/img/17/slime-swank.jpg|Picture showing slimes client server architecture]]
197
198The dotted box on the right is the block Nick has implemented up to a
199point it is usable for testing on a wider scale. Preparations are
200under way to make his work available through the usual
201''chicken-install'' mechanism, but for now you need to pull it from Nick's github:
202
203 git clone git://github.com/nickg/swank-chicken.git
204
205Also you need to grab SLIME from cvs (this is recommended by its authors):
206
207 cvs -d :pserver:anonymous:anonymous@common-lisp.net:/project/slime/cvsroot co slime
208
209Now add to your ''.emacs''
210
211 (setq slime-csi-path "/path/to/csi")
212 (setq swank-chicken-path nil)
213 (add-to-list 'load-path "~/lib/emacs/slime/")  ; your SLIME directory
214 (require 'slime)
215 (slime-setup '(slime-fancy slime-banner))
216 (autoload 'chicken-slime "chicken-slime" "SWANK backend for Chicken" t)
217 (add-hook 'scheme-mode-hook
218          (lambda ()
219            (slime-mode t)))
220
221
222Now copy the file ''chicken-slime.el'' from the ''swank-chicken''
223directory into slime's. Build the chicken-swank module with (sudo)
224chicken-install in the ''swank-chicken'' directory.
225
226Reload your ''.emacs'' and start a repl with 'M-x chicken-slime'.
227
228You will be presented with a CSI> prompt waiting for a nice chicken
229expression to munch on. So what can you do now?
230
231
232* Pressing '','' allows you to enter special slime commands, typing
233  ''help'' will list them all. ''sayoonara'' quits all of slime if you
234  want to quit scheme hacking.
235
236* Start entering an sexpr calling a function, for example enter
237  ''(fold''. Notice how the minibuffer will display the signature of
238  the procedure fold. No need to lookup the order of arguments again!
239
240* Also if you do have an index for [[egg:chicken-doc]] installed,
241  typing ''C-c C-d d'' will open up the chicken-doc page for the
242  procedure or module under point (the name of the cursor in emacs).
243
244* In case you need to lookup a procedure but you only remember parts
245  of the name you can type ''C-c C-d a'' and enter a (chicken) regexp
246  which will then produce a list of possible choices. To look up all
247  procedures with ''string'' in their name you can type ''C-c C-d a
248  string <return>'' and it will show a rather long list. Hitting
249  return on any of the results will open the chicken-doc section of
250  this command. Try ''list->string '' as an example.
251
252* Loading of scheme code can be done with files (''C-c C-l'') or
253  s-expressions (''C-c C-c'') in scheme file buffers. ''C-x C-e''
254  evaluates the last expression before point, ''C-x C-r'' evaluates
255  marked regions of code.
256
257* In case you have an error in your code or the code raises a
258  condition you will get thrown into the slime lisp debugger
259  SLDB. This shows you the recent call-chain leading to the
260  error. Hitting ''q'' will close the window and will get you back
261  wherever you have been before.
262
263The more curious can try Christian's experimental git repo, which
264includes some bugfixes not (yet) present in Nick's code: Display of
265stack frame contents as know by the CSI '',c'' and '',f'' commands.
266To get the goodness you can pull from the repo like this:
267
268 $ cd path/to/swank-chicken
269 $ git pull http://pestilenz.org/~ckeen/repos/swank-chicken
270
271Restart slime and try the following expression:
272
273 CSI> (let ((a 42) (b 'test)) (+ a b))
274
275An SLDB window will open up showing a call chain, hit enter on the
276first frame that says ''[ more... ]''. You will see the values of
277''a'' and ''b''. Implementation for the inspector is on its way as
278well as inspection of the raised condition.
279
280Also note that because of the client server architecture, you can
281connect to repls that are sitting on remote machines! The default port
282is 4005, so you start csi on the remote machine:
283
284 $ csi -R swank -e'(swank-server-start)'
285
286And connect to it with ''M-x slime-connect''. The default tries to
287connect to localhost on port 4005, so you will need to adjust
288the hostname. And off you go with your remote repl!
289
290Also note that SLIME does support different repls, even different
291backends at the same time, so you can easily test code on different
292machines, probably different architectures! Linux, Windows, Mac
293schemes are all bound into one interface one keystroke away. The short
294but fine [[http://common-lisp.net/project/slime/doc/html/|Slime
295manual]] explains all the possible customizations.
296
297Beware that despite the admirable effort from Nick, not every
298function is implemented. Some functionality cannot be implemented due
299to chicken being scheme and not lisp, some might have been forgotten
300about or not understood fully yet, as the underlying SWANK protocol
301is badly documented.
302
303In any case I have been using this since Christmas and I already
304like it. I hope you do too! Please share your criticism, suggestions
305and patches on chicken-users with the fellow chickenistas!
306
307== 5. About the Chicken Gazette
308
309The Gazette is produced bi-weekly by a volunteer from the Chicken
310community. The latest issue can be found at
311[[http://gazette.call-cc.org]] or you can follow it in your feed
312reader at [[http://gazette.call-cc.org/feed.atom]]. If you'd like to
313write an issue, [[http://wiki.call-cc.org/gazette|consult the wiki]]
314for the schedule and instructions!
Note: See TracBrowser for help on using the repository browser.