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 - Clon Didier Verna's scientific blog: Lisp, Emacs, LaTeX and random stuff. 2024-01-31T17:45:28+00:00 Didier Verna urn:md5:a22c53786aff986a2da4c770c233a8f9 Dotclear Clon 1.0b25 is out urn:md5:d0eabd92747d0bb008c68a3314de082b Wednesday, March 24 2021 Wednesday, March 24 2021 Didier Verna Lisp Cloncommand-line optionsrelease <p>Today, I'm releasing the next beta version of Clon, my command-line options management library.</p> <p>The previous official release occurred 6 years ago. Since then, a number of changes had been quietly sleeping in the trunk but never made their way into Quicklisp. More recently, I have also applied a number of changes that are worth mentioning here.</p> <p>First of all, a large part of the infrastructure as been updated, following the evolution of the 8 supported compilers, and that of ASDF and CFFI as well. This should normally be transparent to the user though, provided that one uses reasonably recent compiler / ASDF version ("reasonably" intentionally left undefined). Other than that...</p> <ul> <li>The constraints on <code>termio</code> support auto-detection had become slightly too restrictive, so they have been relaxed.</li> <li>The <code>exit</code> function has been deprecated in favor of <code>uiop:quit</code>.</li> <li>The support for running in scripts rather than in dumped executables has been improved, notably by offering the possibility to provide an alternate program name when <code>argv<a href="https://www.didierverna.net/blog/index.php?post/2021/03/24/0">0</a></code> is not satisfactory.</li> <li>Clon is now compatible with executables dumped via ASDF's <code>program-op</code> operation, or dumped natively. The demonstration programs in the distribution have been updated to illustrate both dumping methods (ASDF, and Clon's <code>dump</code> function).</li> <li>The documentation on application delivery has been largely rewritten, and has become a full chapter rather than a thin appendix.</li> </ul> <p>There are also a few bug fixes in this release.</p> <ul> <li>Several custom readtable problems have been fixed for CCL, CLISP, and ECL (thanks to Thomas Fitzsimmons). Note that Clon depends on <code>named-readtables</code> now.</li> <li>Clon now compiles its <code>termio</code> support correclty with a C++ based ECL (thanks to Pritam Baral).</li> <li>One problem in the conversion protocol for path options has been corrected (thanks to Olivier Certner).</li> </ul> <p>All entrey points are on Clon's web <a href="https://www.lrde.epita.fr/~didier/software/lisp/clon.php" hreflang="en" title="Clon">page</a>.</p> <p>Enjoy!</p> https://www.didierverna.net/blog/index.php?post/2021/03/24/Clon-1.0b25-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/169 Clon 1.0b24 is released -- IMPORTANT urn:md5:efb97aca5f803ced4a026b87bec25b32 Thursday, June 25 2015 Thursday, June 25 2015 Didier Verna Lisp ASDFClonDecltrelease <p>Hello,</p> <p>I'm happy to announce the release of the next beta version of <a href="https://www.lrde.epita.fr/~didier/software/lisp/clon.php">Clon</a>, the Common Lisp / Command Line Options Nuker library. This release doesn't contain much change in terms of functionality, but it contains a lot of change in terms of infrastructure, plus very important and backward-incompatible modifications. So if you're a Clon user, please read on.</p> <p>First of all, a huge revamp of the library's infrastructure (package hierarchy, ASDF and Make implementations) occurred. A large portion of this work is actually not mine, but Fare's (big thanks to him, 'cause the level of ASDF expertise required just means that I couldn't have done that by myself). The purpose here was twofold: first, remove all logic from the ASDF files (so that other system managers could be used; not sure that's actually useful right now) and second, split the library in two: the core, basic functionality and the non-standard platform-dependent bells and whistles (read: termio support). The result is that Clon now comes with 4 different ASDF systems! A setup system allows you to configure some stuff prior to loading the library, a core system allows you to load only the basic functionality and the regular one loads everything, autodetecting platform-dependent features as before. The fourth system is auxiliary and not to be used by hand. All of this is properly documented. For a code maniac like me, this new infrastructure is much more satisfactory, and I've learned a lot about ASDF less known features.</p> <p>Next, I've moved the repository to <a href="https://github.com/didierverna/clon" hreflang="en">Github</a>. Please update your links! It seems that I've lost all my former tags in the process, but oh well...Only the Git repo has moved. The main Clon web page still contains the full history of tarballs, the preformatted documentation, and will continue to do so in the future.</p> <p>Finally (I've kept this to myself until the last possible minute because I'm scared like hell to tell): I've changed the systems and packages names... The <code>com.dvlsoft</code> prefix has been replaced with <code>net.didierverna</code>. All other libraries of mine will eventually endure the same surgery. It's for the best, I apologize for it and I swear I will never ever do that again, EVER (fingers crossed behind my back).</p> <p>So what's next? Before considering an official 1.0 release, there are two things that I want to do. First, cleanup some remaining Fixmes and some shaky error handling. Second, provide an even simpler way of using Clon than what the Quick Start chapter in the doc demonstrates. The idea is to just implement a <code>main</code> function with keyword arguments, and those argument magically become command-line options.</p> <p>A side-effect of this work is that <a href="https://www.lrde.epita.fr/~didier/software/lisp/misc.php#declt">Declt</a> now chokes on Clon, because some ASDF features that it doesn't understand are in use. So Declt has a couple of new challenges ahead, and you should expect a new release in the weeks to come.</p> https://www.didierverna.net/blog/index.php?post/2015/06/25/Clon-1.0b24-is-released-IMPORTANT#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/135 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 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 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 Clon 1.0b17 is out urn:md5:7b18038f8eeb6ed3a84f65570d0fd01d Monday, January 24 2011 Monday, January 24 2011 Didier Verna Lisp Clonreleasesoftware <p>I'm happy to announce the release of Clon version 1.0b17. This version notably introduces support for ABCL and expands the documentation in the portability section. 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/01/24/Clon-1.0b17-is-out#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/68 Clon v1.0b16 now supports CLISP urn:md5:99fb27a3d8ff7930eca886207827975f Tuesday, November 30 2010 Tuesday, November 30 2010 Didier Verna Lisp Clonreleasesoftware Hello,<br /><br />I'm happy to annouce the release of Clon version 1.0 beta 16.<br />Most notable news for this release is the support for CLISP, which comes at the expense on one dependency (over cffi).<br /><br />Grab it <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php" target="_blank">here</a>. https://www.didierverna.net/blog/index.php?post/2010/11/30/Clon-v1.0b16-now-supports-CLISP#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/9 Clon v1.0b15 now supports ECL urn:md5:0c0f5cac9e3a2f9fd391564499784828 Thursday, November 18 2010 Thursday, November 18 2010 Didier Verna Lisp Clonreleasesoftware Hello,<br /><br />I'm happy to annouce the release of Clon version 1.0 beta 15.<br />Most notable news for this release is the support for ECL.<br /><br />Grab it <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php" target="_blank">here</a> https://www.didierverna.net/blog/index.php?post/2010/11/18/Clon-v1.0b15-now-supports-ECL#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/10 Clon v1.0b12 now supports CCL urn:md5:e0414f4b8183fdf1686e1f5f3395fb9c Thursday, November 11 2010 Thursday, November 11 2010 Didier Verna Lisp Clonreleasesoftware Hello,<br /><br />I'm happy to annouce the release of Clon version 1.0 beta 12.<br />Most notable news for this release is the support for CCL.<br /><br />Grab it <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php" target="_blank">here</a>. https://www.didierverna.net/blog/index.php?post/2010/11/11/Clon-v1.0b12-now-supports-CCL#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/11 Clon 1.0b11 now supports CMU-CL urn:md5:3524ce85eb6c6c4f1e320ff75234cf70 Tuesday, November 9 2010 Tuesday, November 9 2010 Didier Verna Lisp Clonreleasesoftware Hello,<br /><br />I'm happy to annouce the release of Clon version 1.0 beta 11.<br />Most notable news for this release is the support for CMU-CL.<br /><br />Grab it <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php" target="_blank">here</a>. https://www.didierverna.net/blog/index.php?post/2010/11/09/Clon-1.0b11-now-supports-CMU-CL#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/12 Clon: the Command-Line Options Nuker library for Common Lisp urn:md5:1ebe4899b541db5f1ebdf5d049827ea7 Tuesday, August 31 2010 Tuesday, August 31 2010 Didier Verna Lisp Clonreleasesoftware I'm happy to announce the first public release of Clon, the Command-Line Options Nuker library for Common Lisp.<br /><br />Clon currently requires SBCL to work. If you want to help porting it to other implementations, 'grep PORTME **/*' in the sources.<br /><br />Get it <a href="http://www.lrde.epita.fr/~didier/software/lisp/clon.php" target="_blank">here</a>.<br /><br />Clon is a library for managing command-line options in standalone Common Lisp applications. It provides a unified option syntax with both short and long names, automatic completion of partial names and automatic retrieval/conversion of option arguments from the command-line, associated environment variables, fallback or default values. Clon comes with a set of extensible option types (switches, paths, strings etc.). Clon also provides automatic generation and formatting of help strings, with support for highlighting on tty's through ISO/IEC 6429 SGR. This formatting is customizable through "themes". https://www.didierverna.net/blog/index.php?post/2010/08/31/Clon%3A-the-Command-Line-Options-Nuker-library-for-Common-Lisp#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/16 ILC 2009 lightning talks urn:md5:e96796e88ae6d446c1da10464f94053e Monday, March 30 2009 Monday, March 30 2009 Didier Verna Lisp AïkidoClonELWJazzlightning talk As almost every participant I believe, my opinion is that the lightning talks were a great idea in the first place, and also a great success.<br /><br />At the very last minute, I changed my mind about the contents. I got a bit bored with too much Lisp technical stuff and decided I would talk about Lisp, Jazz and Aïkido for a change (see the corresponding <a href="http://www.didierverna.com/sciblog/index.php?post/2008/09/08/Lisp%2C-Jazz%2C-Aïkido" target="_blank">Sci-Blog entry</a>). Some people did like the idea and I got several very interesting conversations after that. It's always cool to meet other lispers that are musicians as well, and even martial arts practitioners !<br /><br />I'll keep the Clon stuff for the <a href="http://elw.bknr.net/2009" target="_blank">European Lisp Workshop</a> instead, and I think I will give a tutorial on it there. https://www.didierverna.net/blog/index.php?post/2009/03/30/ILC-2009-lightning-talks#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/38 ILC 2009 (if everything goes well) urn:md5:d822aabb7374480a9c63201a40ffaf66 Tuesday, March 17 2009 Tuesday, March 17 2009 Didier Verna Lisp ClonILCrant So I'm almost ready to fly to Cambridge, MA, for the International Lisp Conference, where I'm going to present my second paper on the behavior and performance of Lisp... well, that is, if my plane actually takes off. There's a general strike in France on thursday.<br /><br />Why am I not surprised ?<br /><br />This year, the conference will have lightening talks as well, so I figured I could take the opportunity to introduce my fellow lispers to Clon, the Command-Line Option Nuker. It's a library for managing command-line options in standalone lisp applications. It's not released yet (I still have some work to do in it) but it's close, so advertising it already is a nice way to sort of putting pressure onto myself...<br /><br />;-) https://www.didierverna.net/blog/index.php?post/2009/03/17/ILC-2009-%28if-everything-goes-well%29#comment-form https://www.didierverna.net/blog/index.php?feed/navlang:en/atom/comments/40