Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 135

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 135

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 187

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 188

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 189

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 194

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 195

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 196

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 197

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 241

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 264

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 269

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 275

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 285

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 286

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 296

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 297

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 298

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 308

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 309

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 310

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 311

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 321

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 322

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 323

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 324

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 325

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 497

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 527

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 540

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 587

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 626

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 668

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 668

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 670

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 673

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 682

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 688

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 693

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php on line 699

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.http.php on line 410

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.http.php on line 410

Warning: Cannot modify header information - headers already sent by (output started at /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php:309) in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.http.php on line 272

Warning: Cannot modify header information - headers already sent by (output started at /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php:309) in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.http.php on line 274

Warning: Cannot modify header information - headers already sent by (output started at /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php:309) in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.http.php on line 274

Warning: Cannot modify header information - headers already sent by (output started at /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php:309) in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.http.php on line 274

Warning: Cannot modify header information - headers already sent by (output started at /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php:309) in /home/didierve/didierverna.net/blog/inc/public/lib.urlhandlers.php on line 110

Warning: Cannot modify header information - headers already sent by (output started at /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php:309) in /home/didierve/didierverna.net/blog/inc/public/lib.urlhandlers.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.json.php:309) in /home/didierve/didierverna.net/blog/inc/libs/clearbricks/common/lib.http.php on line 295
Didier Verna's Scientific Blog - Tag - software Didier Verna's scientific blog: Lisp, Emacs, LaTeX and random stuff. 2024-01-31T17:45:28+00:00 Didier Verna urn:md5:a22c53786aff986a2da4c770c233a8f9 Dotclear Declt 2.3 "Robert April" is out urn:md5:c62c272c8682fecab7cc014fb36bfbe1 Monday, October 16 2017 Monday, October 16 2017 Didier Verna Lisp Common LispDecltdocumentationreference manualsreleasesoftwareTexinfo <p>I'm happy to announce the release of Declt 2.3. Declt is my reference manual generator for Common Lisp libraries.</p> <p>The improvements and bug fixes in the last two releases are the result of running Declt against the whole Quicklisp world (around 3000 ASDF systems for 1500 libraries). See this <a href="https://www.didierverna.net/blog/index.php?post/2017/12/13/Announcing-Quickref%3A-a-global-documentation-project-for-Common-Lisp">post</a> for more information.</p> <p>New in this release:</p> <ul> <li>Advertise file extensions in references.</li> <li>Advertise the type of foreign definitions.</li> <li>More robust display and indexing of, and with, lambda-lists.</li> <li>Use UTF8 special characters to denote invisble ones.</li> <li>More robust support for Texinfo brace escaping.</li> <li>Handle modules sharing the same location.</li> <li>Ensure output is done with standard IO syntax.</li> <li>Fix potential duplication of some (non-lisp) files and document all static files.</li> <li>Fix potential duplication of packages documentation.</li> </ul> <p>From the 2.2 "Christopher Pike" release (not previously advertised):</p> <ul> <li>Require a UTF-8 environment.</li> <li>Understand ASDF's notion of inferred system, and also be more protective against ASDF extensions.</li> <li>Support for improper lambda lists (e.g. destructuring ones).</li> <li>Improve contact defaulting code.</li> <li>Update support for SBCL's setf expanders introspection.</li> <li>Accept ASDF system designators.</li> <li>Various bug fixes in the areas of method combinations, accessor definition merging and setf expanders.</li> </ul> <p>Find it at the usual <a href="https://www.lrde.epita.fr/~didier/software/lisp/misc.php#declt">place</a>...</p> https://www.didierverna.net/blog/index.php?post/2017/10/16/Declt-2.2-Christopher-Pike-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/152 el-rcfiles is released (first public version) urn:md5:141a5d419d1f7fd494a874bf74ea154d Tuesday, May 28 2013 Tuesday, May 28 2013 Didier Verna (X)Emacs el-rcfilesEmacsEmacs LispreleasesoftwareXEmacs <p>I've been using this for years, but never bothered to make it public until now.</p> <p>el-rcfiles is a very small and simple library which provides Unix-like RC files for Emacs Lisp libraries. It's compatible with GNU Emacs and XEmacs, available in ELPA form, as a tarball and from GitHub. More details (including download) available <a href="http://www.lrde.epita.fr/~didier/software/elisp/#el-rcfiles" hreflang="en">here</a>, but here is also the library's commentary section, for quick reference.</p> <pre> ;;; Commentary: ;; The purpose of el-rcfiles is to provide the equivalent of traditional ;; Unix rc files (i.e. configuration files) for Emacs Lisp ;; libraries. The advantages of using configuration files are the ;; following: ;; - your initialization file is less bloated, ;; - since configuration files are lazily loaded, your Emacs session ;; is (or begins) lighter. That is unless you already use lots of ;; EVAL-AFTER-LOAD forms... ;; Usage: ;; 1. Load the library, go to the rcfiles Custom group and tweak (or not). ;; 2. Put a call to (rcfiles-register-rc-files) in your initialization ;; file. This function can also be called interactively anytime you ;; add, remove or modify a configuration file. ;; 3. Put your configuration code for a library `foo' in a file called ;; `&lt;rcfiles-directory&gt;/foo&lt;rcfiles-pseudo-extension&gt;.el'. </pre> https://www.didierverna.net/blog/index.php?post/2013/05/28/el-rcfiles-is-released-%28first-public-version%29#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/118 FiXme 4.2 is out urn:md5:aff6c828edd876abeedea030fed0d67d Monday, January 28 2013 Monday, January 28 2013 Didier Verna LaTeX FiXmereleasesoftware <p>I'm pleased to announce that, after more than two years, I've managed to put up a very small release of FiXme (my collaborative annotations tool for LaTeX2e) in which I didn't even author the two included changes...</p> <p>Keep the faith. FiXme is still alive !</p> <p>New in this veresion (4.2):</p> <pre> ** Improve Danish translation thanks to Lars Madsen. ** Fix buglet in redefinition of \@wrindex reported by Norman Gray. </pre> <p>Get it at the <a href="http://www.lrde.epita.fr/~didier/software/latex.php#fixme">usual</a> place.</p> https://www.didierverna.net/blog/index.php?post/2013/01/28/FiXme-4.2-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/111 Declt 1.0b15 "Kyoto" is out urn:md5:6cff3803caf4b135de4419ca9fafaa1c Tuesday, October 23 2012 Tuesday, October 23 2012 Didier Verna Lisp Common LispDecltdocumentationreleasesoftware <p>This is Declt 1.0b15, the "Kyoto" release... Declt is a reference manual generator for Common Lisp libraries.</p> <p>This version underwent a major internals overhaul, required by some of the new features described below:</p> <ul> <li>Packages sections now advertise all definitions instead of just the symbols naming them. They also advertise their use-list and used-by-list, with cross-references.</li> <li>Conditions, structures and classes now advertise their sub- and super-classes, direct methods, initargs and slots, with cross-references.</li> <li>Slots documentation include docstring, type, initargs, initforms, readers and writers with cross-references.</li> <li>Declt now documents symbol macros and compiler macros.</li> <li>The <code>*LINK-FILES*</code> special is gone (<code>M-x all-hail-purely-functional-style</code>).</li> <li>All ASDF components now advertise their descriptions and long descriptions, if any.</li> <li>Docstrings are displayed in a more reader-friendly fashion.</li> <li>Documentation entries for methods are nested within the corresponding generic function entry.</li> </ul> <p>Grab it at the usual <a href="http://www.lrde.epita.fr/~didier/software/lisp/misc.php#declt">place</a>.</p> https://www.didierverna.net/blog/index.php?post/2012/10/23/Declt-1.0b15-Kyoto-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/109 Clon 1.0b23 is out urn:md5:0a03fbc0e1d29a2d9b9daf92cc382165 Wednesday, September 26 2012 Wednesday, September 26 2012 Didier Verna Lisp ClonCommon Lispreleasesoftware <p>A new version of Clon, the Command-Line Options Nuker is out.</p> <p>Amongst other things, the following improvements have been made:</p> <ul> <li>Support for ABCL has been updated, now that it provides a full MOP.</li> <li>A workaround for SBCL's CC environment variable problem has been implemented. If the variable is not set (required for sb-grovel), Clon now switches to restricted mode instead of aborting.</li> <li>The <code>DUMP</code> macro has been extend to accept a <code>&amp;rest</code> argument that will be passed on to the underlying, implementation-specific, dumping facility.</li> <li>A <code>contrib</code> directory has been added, for storing unapplied patches, suggestions etc.</li> </ul> <p>Grab it at the usual <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php">place</a>.</p> https://www.didierverna.net/blog/index.php?post/2012/09/26/Clon-1.0b23-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/107 Declt 1.0b14 is out urn:md5:d77f9ac7e5b772b6ce0eed42fb1ab6a9 Tuesday, September 25 2012 Tuesday, September 25 2012 Didier Verna Lisp Common LispDecltdocumentationreleasesoftware <p>I've just released a new version of Declt, my reference manual generator for ASDF systems.</p> <p>This release containts some improvements based on Sabra Crolleton's feedback. The most notable improvements are support for two new license types (MIT and LGPL), a new <code>:DECLT-NOTICE</code> keyword argument that gives you control on the "automatically generated by Declt" notice that appears in the reference manuals, and a bug fix (missing support for empty lists in lambda-lists).</p> <p>Grab it at the usual <a href="http://www.lrde.epita.fr/~didier/software/lisp/misc.php#declt">place</a>.</p> https://www.didierverna.net/blog/index.php?post/2012/09/25/Declt-1.0b14-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/106 Language wars urn:md5:c259990b394d3d3cd44f1884d8d1a38f Thursday, July 12 2012 Thursday, July 12 2012 Didier Verna Lisp ArtCommon LispProgramming Languagessoftware <p>Programming languages are tools. Just like hammers. There's nothing personal about them. They just help you build stuff. Yet, there are many religious wars about programming languages out there. Wars which despite being all about science, are much more related to emotions, beliefs and personal aggressions than about objective arguments.</p> <p>This is funny because do you know of any religious wars about hammers? So what's the difference?</p> <p>Here's a recent personal example. A guy explaining how the static typing of Common Lisp works (type declarations) and what kind of performance-oriented optimization can be achieved with it (C-like, static but weak typing in SBCL for instance). And then, there's inevitably the troll (whom I <em>know</em> knows better) in the audience who goes:</p> <blockquote><p>So, yeah, what you're doing is just C code, and you have to type manually, and it's <strong>ugly</strong>. So if it's just for writing C code, I don't see the point in using another language.</p></blockquote> <p>Hmmm. Let's see. So, yes indeed, static typing in Common Lisp is ugly. And yes, it's not even strong typing. And yes, it would be nicer to have run-time hotspot detection and automatic type-dependant optimization like what's found in some other languages or virtual machines, rather than having to do it by hand (BTW, that would make for a nice Ph.D. I think). But what does that <em>really</em> tell you? That no language is perfect? Wow, thank you very much, that's new. For as much as I think that Lisp The Idea™ is perfect, I don't think anyone ever pretended that Common Lisp (or any Lisp for that matter) was. But is that a reason for not using it <em>at all</em> and sticking to C? Any sane computer scientist knows that the choice of a language doesn't boil down to only one parameter. Any computer scientist who tells otherwise is a troll.</p> <p>In spite of all its defects, I still have a gazillon reasons to prefer Common Lisp over C, C++, or any language that I know of currently (and this may very well change in the future). The flexibility of lambda lists, the macros, the MOP or more generally its structural and behavioral reflexivity. Its run-time compilation, debugging, introspection and intersession capabilities. These are just a few examples. Still, I don't deny anyone the right to prefer another language for whatever purpose and whatever reasons they may feel legitimate.</p> <p>So, I normally just ignore those purposedly trollesque and completely idiotic remarks. Yet, sometimes like yesterday, I snap. It gets on my nerves and I become all upset and angry. Why? I never get angry when someone tells me that my hammer is a piece of crap (it's not). I do enough <a href="https://www.didierverna.net/sciblog/index.php?post/2008/09/08/Lisp%2C-Jazz%2C-Aikido">Aikido</a> to know how to control my temper, but for some reason, it doesn't always work when it comes to programming languages. So what is it about them that in spite of all your efforts, you can't help from getting personally and emotionally involved once in a while?</p> <p>I think the answer becomes apparent when you consider the artistic aspect in programming. When an artist creates a piece (music, theater, dance, painting, architecture, whatever you like), (s)he exposes a very intimate part of himself through his creation. The art "is" the artist, and the artist "is" his art. In doing so, he puts himself in danger. It's like yelling out to the whole world <q>Hey, look, I'm vulnerable right here!!</q>. It's a well know fact that many artists are very fragile, in the sense that they suffer from their creation not being liked. Because a piece of art is intrinsically a piece of the artist himself, when you say <q>I don't like this piece of art</q>, you're actually saying <q>I don't like the artist</q>. Then, it's up to artist to handle the fact of not being liked.</p> <p>And that's the whole problem, which, as a <a href="http://www.didierverna.com">musician</a>, I know all too well. Where does the artistic fiber come from? It's an urge to express yourself. To express something that you can't express in any other way. A very deep and perpetual wound of some sort, a feeling of not really belonging. More importantly, it's a calling. Sometimes, the simple fact of creating is enough to heal you a bit, but more often, you create in order for your creation to be seen or heard. So yes, it's a calling to the Others. You expect them to answer your call by telling you that they like you (your art, but that is the same). Artists often have this urge to be liked by the Others. So when you dislike some artwork, you're also not liking the artist himself (the part of him that lives in his creation) and you're actually giving him the exact opposite of what he was looking for. And that hurts.</p> <p>Back to programming languages. Why do we get all emotional about them, and not about hammers? The answer is in fact quite simple. Look at an architectural masterpiece. Do you see the hammer that was used to build it? Now look at a software masterpiece. Do you see the language that was used to write it? That's the crucial difference. You cannot decouple the language from the software, even once it has been written (the art is not in the executable; it's in the source code). The language itself will always be here for you to contemplate.</p> <p>All in all, I think that's why there will always be language wars. Languages are not just tools, actually. They're not just like hammers. As soon as you care about the code you write, your software becomes artwork, you become an artist, and you start to be personally and emotionally involved. Your software becomes part of <strong>you</strong>. And contrary to the hammer, your sticky programming language, being intrinsically bound to the artwork, also becomes part of <strong>you</strong>. That's when the battle for objectivity is lost. By criticizing the language, the troll also criticizes your artwork, and in doing so, he tells you that he doesn't like you. That may hurt.</p> <p>It's good to consider programming as art. Unfortunately, this also means that there will always be language wars.</p> https://www.didierverna.net/blog/index.php?post/2012/07/12/Language-Wars#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/105 Declt 1.0b13 is out urn:md5:75565e9e8fc0846abe5cbc6d222d0c1e Monday, June 4 2012 Monday, June 4 2012 Didier Verna Lisp Common LispDecltdocumentationreleasesoftware <p>I've just released a new version of Declt, my reference manual generator for ASDF systems. This release includes some uninteresting internals update, plus an important bug fix: there were two calls to <code>FIND-METHOD</code> missing an <code>ERRORP</code> flag set to nil, leading to Declt throwing an error where it shouldn't have.</p> <p>Grab it at the usual <a href="http://www.lrde.epita.fr/~didier/software/lisp/misc.php#declt">place</a>.</p> https://www.didierverna.net/blog/index.php?post/2012/06/04/Declt-1.0b13-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/104 Clon 1.0b22 is out urn:md5:36061a3e76c3dbc6edbc686b8b63d811 Tuesday, May 22 2012 Tuesday, May 22 2012 Didier Verna Lisp ClonCommon Lispreleasesoftware <p>A new version of Clon, the Command-Line Options Nuker is out.</p> <p>The most important change in this release is the support for LispWorks, which brings the number of supported implementations to 8. One left to go, and I may eventually switch to RC status. Thanks to Martin Simmons for providing a fully functionnal version of LW 6.1. As for CLISP and Allegro, there is an optional dependency on CFFI for LispWorks.</p> <p>Two backward incompatible changes that may affect you:</p> <ul> <li>Variables renamings: <code>*current-context*</code> has been renamed <code>*context*</code>, and <code>*default-synopsis*</code> has been renamed <code>*synopsis*</code>. This should remain transparent unless you're using Clon in a somewhat advanced way.</li> <li><code>clon:exit</code> has been upgraded to SBCL's new quitting protocol. If you use this function (or if you want to compile the demo programs), please upgrade to SBCL 1.0.57.</li> </ul> <p>Finally, support for terminal autodetection and stream handling in general has been improved for all implementations. <br /></p> <p>Grab it at the usual <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php">place</a>.</p> https://www.didierverna.net/blog/index.php?post/2012/05/22/Clon-1.0b22-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/103 Clon 1.0b21 is out urn:md5:fc2e32d32dc0546bbe96146139e9a05a Monday, March 12 2012 Monday, March 12 2012 Didier Verna Lisp ClonCommon Lispreleasesoftware <p>One year between b19 and b20. 4 days between b20 and b21...</p> <p>This new version of Clon introduces support for a new compiler, Allegro Common Lisp, in both standard and modern form. Support for dumping is only rudimentary for ACL (although it's only a marginal feature of the library). The <code>dump</code> macro uses Allegro's dumplisp mechanism to dump a lisp image which is not directly executable (full application delivery is complicated and only available in the Enterprise edition). Apart from that, the rest should work fine. As in the case of CLISP, Allegro may benefit from the presence of CFFI in order to provide terminal autodetection. This is an optional dependency only.</p> <p>Grab it at the usual <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php">place</a>.</p> https://www.didierverna.net/blog/index.php?post/2012/03/12/Clon-1.0b21-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/99 Clon 1.0b20 is out urn:md5:45309b9b684de5e49773ec05199d6575 Thursday, March 8 2012 Thursday, March 8 2012 Didier Verna Lisp ClonCommon Lispreleasesoftware <p>I'm happy to announce a new release of Clon, the Command-Line Options Nuker for standalone Common Lisp executables. In addition to a lot of uninteresting code and infrastructure changes, this new release comes with several important improvements and new features.</p> <h2>At the end-user level</h2> <ul> <li>there is a new error handler available via the <code>--clon-error-handler</code> option, called "interactive". This error handler provides the same restarts as the one called "none" (which actually triggers the Lisp debugger), but in a less frightening way for end-users not knowing about Lisp at all. In particular, the error and restart messages are more readable and you don't see a Lisp stack anywhere. See the <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon/enduser/Error-Management.html#Error-Management" hreflang="en">end-user manual </a> and the <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon/user/Error-Management.html#Error-Management" hreflang="en">user manual</a> for more information.</li> <li>there is a new option called <code>--clon-lisp-information</code> which, as its name suggests, provides information about the underlying Lisp (implementation type and version). This will in fact be more useful for developers than for end-users, but it's still and end-user level feature. See the <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon/enduser/Clonification.html#Clonification" hreflang="en">end-user manual</a> for not much more information.</li> </ul> <h2>At the user-level</h2> <ul> <li>Clon now provides a command-line polling API through the functions <code>cmdline-options-p</code> and <code>cmdline-p</code>. See the <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon/user/Command_002dLine-Polling.html#Command_002dLine-Polling" hreflang="en">user manual</a> for more information.</li> <li>Support for using Clon interactively, that is, <em>without</em> dumping executables has been improved. This is mostly useful for debugging purposes. See the <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon/user/Not-Dumping-Executables.html#Not-Dumping-Executables" hreflang="en">user manual</a> for more information.</li> <li>Clon now provides a compile-time / run-time unified configuration facility thanks to a variable named <code>cl-user::com.dvlsoft.clon.configuration</code> that is handled before the ASDF system is loaded. Thanks to this, Clon is now able to communicate its own indentation information to (X)Emacs directly (thanks to a process that I've previously described <a href="https://www.didierverna.net/sciblog/index.php?post/2011/07/20/One-more-indentation-hack">here</a>), and also handles portability problems in a smoother way (see below).</li> <li>One of the available configuration options is called <code>:restricted</code> mode. In this mode, Clon never attempts to communicate with ttys via ioctl calls, at the expense of terminal autodetection (size and highlighting). This is implemented by making a <code>termio</code> ASDF module conditionally loaded in the system definition. There are cases where Clon will switch to restricted mode automatically (e.g. when using CLISP compiled without FFI support). However, some other situations are more problematic, for instance when using SBCL under MinGW, in which case the SB-GROVEL module is available but doesn't work. In such situations, it is necessary to configure Clon explicitely for restricted mode before loading the system. See the <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon/user/Configuration.html#Configuration" hreflang="en">user manual</a> for more information.</li> </ul> <p><br /></p> <p>That's it. Grab it at the usual <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php">place</a>. Yesterday, I realized that it's been slightly more than a year since the b19 release. Gee, time flies like the wind...</p> https://www.didierverna.net/blog/index.php?post/2012/03/08/Clon-1.0b20-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/98 JSPP: Morphing C++ into JavaScript urn:md5:741576760db6c8f42deffff0ff1de886 Tuesday, January 31 2012 Tuesday, January 31 2012 Didier Verna Miscellaneous CJavaScriptProgramming Languagespublicationsoftware <p>I'm happy to announce the publication of a new technical report entitled <a href="https://www.didierverna.net/sciblog/public/chedeau.12.tr.pdf">JSPP: Morphing C++ into JavaScript</a>. The abstract is given below.</p> <blockquote><p>In a time where the differences between static and dynamic languages are starting to fade away, this report brings one more element to the "convergence" picture by showing that thanks to the novelties from its recent 0x standard, it is relatively easy to implement a JavaScript layer on top of C++. By that, we not only mean to implement the language features, but also to preserve as much of its original notation as possible. In doing so, we provide the programmer with a means to freely incorporate highly dynamic JavaScript-like code into a regular C++ program.</p> </blockquote> https://www.didierverna.net/blog/index.php?post/2012/01/31/JSPP%3A-Morphing-C-into-JavaScript#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/96 Patcher 4.0 is released urn:md5:af294cfe6b5678e3dac34c0f157d3f47 Tuesday, January 17 2012 Tuesday, January 17 2012 Didier Verna (X)Emacs Emacs LispPatcherreleasesoftwareXEmacs <p>I'm happy to announce the release of <a href="http://www.lrde.epita.fr/~didier/software/elisp/misc.php#patcher">Patcher</a> version 4.0. This is a major release introducing many new features and enhancements.</p> <p>Patcher is a tool designed to automate and ease the maintenance of archive-based projects. It provides assistance in building, reporting and committing patches, as well as in handling the corresponding ChangeLog entries, for example by creating skeletons. Patcher is the official tool for XEmacs development.</p> <h3>NEW FEATURES</h3> <ul> <li>Support floating projects and temporary relocation allowing to use the same project descriptor for various directories.</li> <li>Support for automatic detection of submodules via the :submodule-detection-function project option and the patcher-detect-submodules function. Currently supported RCS submodules are Mercurial and Git via the functions 'patcher-<a href="https://www.didierverna.net/blog/index.php?post/2012/01/17/git">hg</a>-detect-submodules.</li> <li>Support ephemeral ChangeLogs thanks to a new :change-logs-status project option. Ephemeral ChangeLogs are not stored in ChangeLog files, but exist only temporarily for mail or log message insertion (See ChangeLogs Status in the documentation).</li> <li>ChangeLog minor mode providing easy navigation through the mail/ChangeLog buffers cycle via C-c C-p n, C-c C-p p, C-c C-p N, C-c C-p P and C-c C-p m (See ChangeLogs Navigation in the documentation).</li> <li>Support for switching to mail buffer and inserting ChangeLogs at once via C-c C-p l from ChangeLog buffers.</li> <li>patcher-mail-insert-change-logs gets a prefix argument allowing to temporarily change the ChangeLogs appearance. It also supports inserting ChangeLogs even when the project is set not to.</li> <li>Additional binding for patcher-logmsg-commit: C-c C-p c</li> <li>Commit command buffer is now editable Commit is done via C-c C-p c or C-c C-c (patcher-cmtcmd-commit).</li> <li>Fontification of commit command and log message buffers with comment syntax and initial informative help. See new Patcher faces.</li> <li>Support for commit or log message canceling via C-c C-z.</li> <li>Support for project abortion via C-c C-p k or C-c C-k in all relevant buffers, including ChangeLogs.</li> <li>Support Subject: header modification in mail adaptation routines via a new project option :subject-rewrite-format.</li> <li>Support project-wide dynamic subject modification via C-c C-p S in both mail and log message buffers.</li> <li>Implement :kill-source-files-after-sending project option</li> <li>Support for source file saving</li> <li>Support for CVS diff's broken exit code policy via a new project option: :ignore-diff-status.</li> </ul> <h3>FIXES AND IMPROVEMENTS</h3> <ul> <li>Improved support for temporary subprojects making them behave like permanent ones (with a specific subdirectory and set of files).</li> <li>Much better error handling including exit code checking for external processes.</li> <li>Improved support for overlapping Patcher instances through buffer and file referencing for both ChangeLog and source files.</li> <li>Documentation rewrite and sections organization cleanup</li> <li>More checks for project consistency including missing or spurious ChangeLog entries, source diffs, undiffable and uncommittable projects etc.</li> <li>Improved project rediffing including support for partially generated ChangeLog skeletons, and interactive prompting for skeleton un/re-generation.</li> </ul> <h3>BACKWARD INCOMPATIBLE CHANGES</h3> <ul> <li>Mercurial themes renamed from 'mercurial to 'hg in order to remain consistent with the other RCS theme names.</li> <li>ChangeLogs insertion in mail buffers rebound to C-c C-p l</li> <li>Compressed ChangeLogs insertion in logmsg buffers rebound to C-c C-p L</li> <li>Removed directory-sep-char hacks until the need for it raises again. Probably better implemented via project options anyway.</li> <li>Diff commands can no longer be changed from patcher-mail-<a href="https://www.didierverna.net/blog/index.php?post/2012/01/17/adapt" title="adapt">adapt</a> but instead, the prefix argument allows for temporary subproject specification.</li> <li>patcher-*-subproject entry points removed since they are no longer needed (see above).</li> <li>Removed :kill-source-file-after-diffing option</li> <li>:kill-source-files-after-sending renamed to :kill-sources-after-sending</li> <li>patcher-mail-check-change-logs-insertion is now a project option named :check-change-logs-insertion.</li> <li>patcher-mail-check-commit-action is now a project option named :check-commit.</li> <li>:change-logs-diff-command option now understands nil instead of 'diff</li> <li>The 'packed ChangeLogs appearance has been renamed to 'pack</li> </ul> https://www.didierverna.net/blog/index.php?post/2012/01/17/Patcher-4.0-is-released#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/95 CL-RCFiles 2.0 urn:md5:fb0ed267f0f03172171b5297bbd7c61f Monday, November 28 2011 Monday, November 28 2011 Didier Verna Lisp CL-RCFilesCommon Lispreleasesoftware <p>Just a quick note to mention the release of CL-RCFiles 2.0. This version adds pre-loading initialization files. From the README file:</p> <blockquote><p>This very small Common Lisp library provides a way to add initialization files to ASDF systems. Every time ASDF loads &lt;system&gt;, one or several corresponding &lt;system&gt;.lisp files are loaded automatically afterwards. This lets you conditionally plug in additional behavior on a per-system basis without cluttering up any global Common Lisp init file.</p> <p> By default, these initialization files are expected to be found in: - ~/share/common-lisp/rc/pre/ for pre-loading initialization, - ~/share/common-lisp/rc/post/ for post-loading initialization.</p> <p> For backward-compatibility, files found directly in the rc/ directory are considered to be post-loading initialization files.</p> <p> You can modify the rc-files location by changing the values of the global variables *directory*, *pre-directory*, and *post-directory*.</p></blockquote> <p>Get it <a href="http://www.lrde.epita.fr/~didier/software/lisp/misc.php#cl-rcfiles">here</a>.</p> https://www.didierverna.net/blog/index.php?post/2011/11/28/CL-RCFiles-2.0#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/91 Declt 1.0b12 is out urn:md5:f84bd63cbacdbf6ae2f09763f8bca49b Wednesday, June 29 2011 Wednesday, June 29 2011 Didier Verna Lisp ASDFCommon LispDecltdocumentationreleasesoftwareTexinfo <p>I've just released the next version of Declt, my reference manual generator for ASDF systems.</p> <p>This release includes some fixes for the Info format target but most notably, support for documenting (generic) writer functions and methods. When it makes sense, the documentations for <code>func</code> and <code>(setf func)</code> are grouped together. Getting closer to an official 1.0 stable version...</p> <p>Grab it <a href="http://www.lrde.epita.fr/~didier/software/lisp/misc.php#declt">here</a>, and enjoy!</p> https://www.didierverna.net/blog/index.php?post/2011/06/29/Declt-1.0b12-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/86 Declt 1.0b11 is out urn:md5:67f641ec65f442cf39670f9c41520eb0 Tuesday, May 31 2011 Tuesday, May 31 2011 Didier Verna Lisp ASDFCommon LispDecltdocumentationreleasesoftwareTexinfo <p>I've just released a new version of Declt, my Texinfo reference manual generator for ASDF systems. This release contains only one bugfix: when trying to create links to source files, Declt now checks whether the files actually exist or not.</p> <p>Tracking this bug down had the side-effect of exhibiting a misfeature of SBCL's introspection facility: the <code>COPY-&lt;struct&gt;</code> functions (automatically generated by <code>defstruct</code> calls) have their definition source set to <code>target-defstruct.lisp</code> which is an SBCL source file. It would make more sense to set it to the file containing the <code>defstruct</code> call instead, as is already the case for constructors, predicates and accessor functions. Patch sent to the SBCL developers.</p> https://www.didierverna.net/blog/index.php?post/2011/05/31/Declt-1.0b11-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/84 XEmacs 21.5.30 "garlic" is released urn:md5:c0d12ed9ba6c371ceea3a66ba1e7c316 Wednesday, April 27 2011 Wednesday, April 27 2011 xemacs (X)Emacs Common LispEmacs Lisplicensereleasesoftware <p>At long last, there is a new release of <a href="http://www.xemacs.org">XEmacs</a> 21.5. A lot of stuff has happened in this release, but the most important thing is that this is the last GPLv2 version of XEmacs. Future versions (including the current trunk) will be licensed GPLv3 or later. In fact, the first GPLv3 release, 21.5.31, is expected to follow this one by a couple of days. Thanks mostly to Aidan Kehoe, I'm also quite happy that XEmacs Lisp is more Common Lisp'y than ever.</p> https://www.didierverna.net/blog/index.php?post/2011/04/27/XEmacs-21.5.30-garlic-is-released.#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/79 Declt 1.0b9 is out urn:md5:5bad2cdcc1c042082ec567eeba294f6f Wednesday, February 23 2011 Wednesday, February 23 2011 Didier Verna Lisp Decltreleasesoftware <p>The next edition of Declt, the Documentation Extractor from Common Lisp to Texinfo, is out. In this release:</p> <ul> <li>Bugfix: rendering the documentation for methods with EQL specializers didn't work.</li> <li>Feature: licensing and copyrighting the reference manual is now optional. Licenses currently supported are BSD and GPL.</li> <li>Declt now generates its own reference manual by default.</li> <li>Some package infrastructure changes that should remain transparent.</li> </ul> <p>Grab it <a href="http://www.lrde.epita.fr/~didier/software/lisp/misc.php#declt">here</a></p> <p>Happy documenting!</p> https://www.didierverna.net/blog/index.php?post/2011/02/23/Declt-1.0b9-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/74 Clon 1.0b19 is out urn:md5:1420cc73c2ac7f9b7c2535b3e64be5d7 Wednesday, February 9 2011 Wednesday, February 9 2011 Didier Verna Lisp Clonreleasesoftware <p>Clon version 1.0b19 has just been released. This version comes with a couple of fixes related to error handling and a switch from the GPL to the BSD license. Grab it <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php">here</a>.</p> https://www.didierverna.net/blog/index.php?post/2011/02/09/Clon-1.0b19-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/71 Optional ASDF system dependencies (Clon v1.0b18) urn:md5:5b7d7e58f9f06b1ad72bbcd8ca04d576 Tuesday, January 25 2011 Tuesday, January 25 2011 Didier Verna Lisp ASDFClonreleasesoftware <p><a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php">Clon</a> v1.0b18 is now out. Compared to the previous version, the only small bit of change is the fact that the CLISP implementation now depends only <em>optionally</em> on cffi, whereas that dependency was mandatory before. Doing this is actually quite simple but raised the question of optional ASDF system dependencies, a topic on which there's quite a bit to be said.</p> <p>A bit of context first. Clon has a terminal autodetection feature which allows it to automatically highlight its output on a tty (see <code>--clon-highlight=auto</code>) and also compute the output line width in case the COLUNMS environment variable is not set. This feature requires an <code>ioctl</code> call which is beyond Lisp. Since one of my goals is to have as few dependencies as possible (zero being the ideal number), I looked at compiler-specific solutions to this problem. The result is that SBCL, CMU-CL, CCL and ECL provide solutions almost out-of-the-box: SBCL has a grovel contributed module, CMU-CL and CCL already have system bindings and ECL has its own <code>ffi</code> interface. The ABCL port doesn't support terminal autodetection yet, but that's another (Java) story. The only black sheep in the picture is CLISP which, as far as I can tell, neither has a native binding for <code>ioctl</code>, nore any built-in grovel facility, hence the need for <code>cffi</code>.</p> <p>Previously, my system definition file was like that:</p> <pre class="lisp lisp" style="font-family:inherit">#+clisp <span style="color: #66cc66;">&#40;</span>asdf<span style="color: #66cc66;">:</span><span style="color: #555;">operate</span> 'asdf<span style="color: #66cc66;">:</span><span style="color: #555;">load-op</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cffi-grovel</span><span style="color: #66cc66;">&#41;</span> &nbsp; <span style="color: #66cc66;">&#40;</span>asdf<span style="color: #66cc66;">:</span><span style="color: #555;">defsystem</span> <span style="color: #66cc66;">:</span><span style="color: #555;">com</span><span style="color: #66cc66;">.</span>dvlsoft<span style="color: #66cc66;">.</span>clon #<span style="color: #66cc66;">|</span> <span style="color: #66cc66;">...</span> <span style="color: #66cc66;">|</span># <span style="color: #66cc66;">:</span><span style="color: #555;">depends-on</span> <span style="color: #66cc66;">&#40;</span>#+clisp <span style="color: #66cc66;">:</span><span style="color: #555;">cffi</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">components</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">file</span> <span style="color: #ff0000;">&quot;package&quot;</span><span style="color: #66cc66;">&#41;</span> #+clisp <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">module</span> <span style="color: #ff0000;">&quot;clisp&quot;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">depends-on</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;package&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">components</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>cffi-grovel<span style="color: #66cc66;">:</span><span style="color: #555;">grovel-file</span> <span style="color: #ff0000;">&quot;constants&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>module <span style="color: #ff0000;">&quot;src&quot;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">depends-on</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;package&quot;</span> #+clisp <span style="color: #ff0000;">&quot;clisp&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">components</span> #<span style="color: #66cc66;">|</span> <span style="color: #66cc66;">...</span> <span style="color: #66cc66;">|</span>#<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre> <p>And then later, I had a file with the concerned utility function:</p> <pre class="lisp lisp" style="font-family:inherit"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> stream-line-width <span style="color: #66cc66;">&#40;</span>stream<span style="color: #66cc66;">&#41;</span> #+clisp <span style="color: #66cc66;">&#40;</span>#<span style="color: #66cc66;">|</span> CLISP implementation <span style="color: #66cc66;">|</span>#<span style="color: #66cc66;">&#41;</span> #<span style="color: #66cc66;">|</span> etc<span style="color: #66cc66;">.</span> <span style="color: #66cc66;">|</span>#<span style="color: #66cc66;">&#41;</span></pre> <p>After that, I started looking at ways to make the dependency on cffi optional. After all, it makes sense to avoid that dependency at the cost of not being able to autodetect terminals.</p> <p>One thing I fell on almost by accident is ASDF's <code>:weakly-depends-on</code> keyword. Here is an interesting <a href="http://www.mail-archive.com/asdf-devel@common-lisp.net/msg01405.html">thread</a> about it. It was an accident because that feature is <a href="https://bugs.launchpad.net/asdf/+bug/665110">not documented</a> :-( People, however, have very mitigated feelings about it, as shown in <a href="http://www.mail-archive.com/asdf-devel@common-lisp.net/msg00095.html">this</a> other thread (syntax and semantics both appear somewhat shaky and underspecified). Besides, the aparent behavior is that if A weakly depends on B and B is not present, then A is operated anyway. So I could probably have my "src" module weakly depend on the "clisp" one, but that doesn't change the fact the "clisp" module should <strong>not</strong> be included at all if cffi is not there.</p> <p>In the same thread, somebody proposes another kind of dependency called <code>:contigent-on</code> which looks closer to what I would need for the "clisp" module: a module the contingency of which is not present will <strong>not</strong> be processed. This new kind of dependency doesn't seem to be implemented yet, however.</p> <p>So, all of this seems a bit frightening. Too borderline for my taste. Fortunately, my solution is much simpler, although probably not universal.</p> <p>This first thing to do is <em>only</em> attempt to load cffi-grovel:</p> <pre class="lisp lisp" style="font-family:inherit"><span style="color: #66cc66;">&#40;</span>eval-<span style="color: #b1b100;">when</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">load-toplevel</span> <span style="color: #66cc66;">:</span><span style="color: #555;">execute</span><span style="color: #66cc66;">&#41;</span> #+clisp <span style="color: #66cc66;">&#40;</span>handler-<span style="color: #b1b100;">case</span> <span style="color: #66cc66;">&#40;</span>asdf<span style="color: #66cc66;">:</span><span style="color: #555;">operate</span> 'asdf<span style="color: #66cc66;">:</span><span style="color: #555;">load-op</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cffi-grovel</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>asdf<span style="color: #66cc66;">:</span><span style="color: #555;">missing-component</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>format *error-output* <span style="color: #ff0000;">&quot;~ ********************************************************************* * WARNING: ASDF component CFFI-GROVEL not found. * Clon will be loaded without support for terminal autodetection. * See section A.1 of the user manual for more information. *********************************************************************&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre> <p>After that, if loading it were successful, we end up with <code>cffi</code> as a feature, so we can just conditionalize on that:</p> <pre class="lisp lisp" style="font-family:inherit"><span style="color: #66cc66;">&#40;</span>asdf<span style="color: #66cc66;">:</span><span style="color: #555;">defsystem</span> <span style="color: #66cc66;">:</span><span style="color: #555;">com</span><span style="color: #66cc66;">.</span>dvlsoft<span style="color: #66cc66;">.</span>clon #<span style="color: #66cc66;">|</span> <span style="color: #66cc66;">...</span> <span style="color: #66cc66;">|</span># <span style="color: #66cc66;">:</span><span style="color: #555;">depends-on</span> <span style="color: #66cc66;">&#40;</span>#+<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> clisp cffi<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cffi</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">components</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">file</span> <span style="color: #ff0000;">&quot;package&quot;</span><span style="color: #66cc66;">&#41;</span> #+<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> clisp cffi<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">module</span> <span style="color: #ff0000;">&quot;clisp&quot;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">depends-on</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;package&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">serial</span> t <span style="color: #66cc66;">:</span><span style="color: #555;">components</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>cffi-grovel<span style="color: #66cc66;">:</span><span style="color: #555;">grovel-file</span> <span style="color: #ff0000;">&quot;constants&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>module <span style="color: #ff0000;">&quot;src&quot;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">depends-on</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;package&quot;</span> #+<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> clisp cffi<span style="color: #66cc66;">&#41;</span> <span style="color: #ff0000;">&quot;clisp&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">components</span> #<span style="color: #66cc66;">|</span> <span style="color: #66cc66;">...</span> <span style="color: #66cc66;">|</span>#<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre> <p>One last problem remains however: what to do in the source code, for the feature-dependent parts. Conditionalizing an ASDF system may indeed lead to trouble: for instance, what would happen if the function <code>stream-line-width</code> was compiled with cffi around, and later used in a context where it is not? To be on the safe side, what you really need is to <em>dynamically</em> check for the feature. One possible solution is this:</p> <ol> <li>move all feature-dependent code to the "clisp" module and make that a protocol,</li> <li>everytime you need to access the feature, dynamically check whether the protocol functions are <code>fbound</code>.</li> </ol> <p>In my specific case, what I did was to implement a CLISP-specific version of <code>stream-line-width</code>, called <code>clisp/stream-line-width</code> and put it in a new file in the "clisp" module, now defined as follows:</p> <pre class="lisp lisp" style="font-family:inherit">#+<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> clisp cffi<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">module</span> <span style="color: #ff0000;">&quot;clisp&quot;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">depends-on</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;package&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span><span style="color: #555;">serial</span> t <span style="color: #66cc66;">:</span><span style="color: #555;">components</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>cffi-grovel<span style="color: #66cc66;">:</span><span style="color: #555;">grovel-file</span> <span style="color: #ff0000;">&quot;constants&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">file</span> <span style="color: #ff0000;">&quot;util&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre> <p>Then, the original function is rewritten like this:</p> <pre class="lisp lisp" style="font-family:inherit"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> stream-line-width <span style="color: #66cc66;">&#40;</span>stream<span style="color: #66cc66;">&#41;</span> #+clisp <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">when</span> <span style="color: #66cc66;">&#40;</span>fboundp 'clisp/stream-line-width<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>clisp/stream-line-width stream<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> #<span style="color: #66cc66;">|</span> etc<span style="color: #66cc66;">.</span> <span style="color: #66cc66;">|</span>#<span style="color: #66cc66;">&#41;</span></pre> <p>So now I think I'm on the safe side, and Clon has zero mandatory dependency again...</p> https://www.didierverna.net/blog/index.php?post/2011/01/25/Optional-system-dependencies-%28Clon-v1.0b18%29#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/69