Lacking Natural Simplicity (Posts about abcl)https://tkurtbond.github.io/categories/abcl.atom2024-01-23T18:49:39ZT. Kurt BondNikolaDistributing ASDF systems with ABCL, sortahttps://tkurtbond.github.io/posts/2020/06/29/distributing-asdf-systems-with-abcl-sorta/2020-06-29T16:30:21-04:002020-06-29T16:30:21-04:00T. Kurt Bond<p>The Reddit thread <a class="reference external" href="https://www.reddit.com/r/lisp/comments/2u7m4k/how_do_you_compile_a_runnable_deployable_jar_with/">How do you compile a runnable, deployable JAR with
ABCL?</a> doesn't offer a solution, unfortunately. <a class="footnote-reference brackets" href="https://tkurtbond.github.io/posts/2020/06/29/distributing-asdf-systems-with-abcl-sorta/#footnote-1" id="footnote-reference-1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> But it leads to
an <a class="reference external" href="https://abcl.org/">Armed Bear Common Lisp (ABCL)</a> TRAC ticket (<a class="reference external" href="https://abcl.org/trac/ticket/383">T1</a>) which leads to
another (<a class="reference external" href="https://abcl.org/trac/ticket/442">T2</a>) which leads some documentation on package ABCL for
distribution (<a class="reference external" href="https://github.com/armedbear/abcl/blob/master/doc/packaging-abcl.org">D1</a>) which talks about how the <a class="reference external" href="https://github.com/armedbear/abcl/blob/master/doc/packaging-abcl.org#abcl-aio">abcl-aio.jar</a> target is
used to package <span class="file">abcl.jar</span> and <span class="file">abcl-contrib.jar</span> for
distribution, then describes a way it might be done in the section
<a class="reference external" href="https://github.com/armedbear/abcl/blob/master/doc/packaging-abcl.org#current-hack">Current Hack</a>.</p>
<p>Basically, it says:</p>
<blockquote>
<p><strong>Current hack</strong></p>
<p>Ideally, we would like allow the AIO mechanism to include
additional ASDF systems in the single jar artifact.</p>
<p>Currently one can hack this together by:</p>
<ol class="arabic simple">
<li><p>Manually extracting the abcl-aio.jar artifact to a file-system.</p></li>
<li><p>Placing the necessary ASDF systems in the resulting “contrib”
directory.</p></li>
<li><p>Recreating the single archive from the file-system
contents.</p></li>
</ol>
</blockquote>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="footnote-1" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="https://tkurtbond.github.io/posts/2020/06/29/distributing-asdf-systems-with-abcl-sorta/#footnote-reference-1">1</a><span class="fn-bracket">]</span></span>
<p>Though it does talking about distributing an ABCL application
as a servlet and WAR file.</p>
</aside>
</aside>Binding a symbol defined with DEFCONSTANT with LET is not portable in Common Lisphttps://tkurtbond.github.io/posts/2020/04/24/binding-a-symbol-defined-with-defconstant-with-let-is-not-portable-in-common-lisp/2020-04-24T23:46:39-04:002020-04-24T23:46:39-04:00T. Kurt Bond<p><a class="reference external" href="http://www.sbcl.org/">SBCL</a> and <a class="reference external" href="https://ccl.clozure.com/">CCL</a> and <a class="reference external" href="https://clisp.sourceforge.io/">CLISP</a> think binding a symbol defined with <code class="docutils literal">defconstant</code>
is an error, so if you do</p>
<div class="code"><pre class="code common-lisp"><a id="rest_code_8e48947427f24518b74888df869a0ffa-1" name="rest_code_8e48947427f24518b74888df869a0ffa-1" href="https://tkurtbond.github.io/posts/2020/04/24/binding-a-symbol-defined-with-defconstant-with-let-is-not-portable-in-common-lisp/#rest_code_8e48947427f24518b74888df869a0ffa-1"></a><span class="p">(</span><span class="nb">defconstant</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="s">"foo"</span><span class="p">)</span>
<a id="rest_code_8e48947427f24518b74888df869a0ffa-2" name="rest_code_8e48947427f24518b74888df869a0ffa-2" href="https://tkurtbond.github.io/posts/2020/04/24/binding-a-symbol-defined-with-defconstant-with-let-is-not-portable-in-common-lisp/#rest_code_8e48947427f24518b74888df869a0ffa-2"></a><span class="p">(</span><span class="k">let</span><span class="w"> </span><span class="p">((</span><span class="nv">foo</span><span class="w"> </span><span class="s">"bar"</span><span class="p">))</span><span class="w"> </span><span class="nv">foo</span><span class="p">)</span>
</pre></div>
<p>you get an error. But in <a class="reference external" href="https://abcl.org/">ABCL</a> and <a class="reference external" href="https://common-lisp.net/project/ecl/">ECL</a> you don’t.</p>
<p>If you try</p>
<div class="code"><pre class="code common-lisp"><a id="rest_code_a5b097423fa74088a9cb60803e60e2e7-1" name="rest_code_a5b097423fa74088a9cb60803e60e2e7-1" href="https://tkurtbond.github.io/posts/2020/04/24/binding-a-symbol-defined-with-defconstant-with-let-is-not-portable-in-common-lisp/#rest_code_a5b097423fa74088a9cb60803e60e2e7-1"></a><span class="p">(</span><span class="nb">defun</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="p">(</span><span class="k">let</span><span class="w"> </span><span class="p">((</span><span class="nv">foo</span><span class="w"> </span><span class="s">"bar"</span><span class="p">))</span><span class="w"> </span><span class="nv">foo</span><span class="p">))</span>
</pre></div>
<p>in SBCL and CCL you get an error when the function is compiled.
In SBCL the function is defined, but always gives an error when run.
In CCL the function does not get defined.</p>