<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Thomas Letan's Blog - lisp</title>
    <link>https://soap.coffee/~lthms/tags/lisp.html</link>
    <description>Posts tagged "lisp"</description>
    <atom:link href="https://soap.coffee/~lthms/tags/lisp.xml" rel="self"
               type="application/rss+xml" />
    
    
    <item>
      <title>Discovering Common Lisp with trivial-gamekit</title>
      <link>https://soap.coffee/~lthms/posts/DiscoveringCommonLisp.html</link>
      <guid>https://soap.coffee/~lthms/posts/DiscoveringCommonLisp.html</guid>
      <pubDate>June 17, 2018</pubDate>
      <description>
        
        &lt;h1&gt;Discovering Common Lisp with &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;&lt;/h1&gt;&lt;div id=&quot;tags-list&quot;&gt;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#tag&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;&lt;a href=&quot;/~lthms/tags/lisp.html&quot; class=&quot;tag hover-mint&quot; marked=&quot;&quot;&gt;lisp&lt;/a&gt; &lt;/div&gt;
&lt;p&gt;I always wanted to learn some Lisp dialect. In the meantime,
&lt;a href=&quot;https://github.com/lkn-org/lykan&quot; class=&quot;hover-coral&quot; marked=&quot;&quot;&gt;lykan&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; —my Slayers Online clone— begins to
take shape. So, of course, my brain got an idea: &lt;em&gt;why not writing a client for
lykan in some Lisp dialect?&lt;/em&gt;&lt;label for=&quot;fn1&quot; class=&quot;sidenote-number margin-toggle&quot;&gt;&lt;/label&gt;&lt;input id=&quot;fn1&quot; type=&quot;checkbox&quot; class=&quot;margin-toggle&quot;&gt;&lt;span class=&quot;note-right sidenote note&quot;&gt;&lt;span class=&quot;footnote-p&quot;&gt;Spoiler alert: this wasn’t the most efficient approach for the lykan
project. But it was fun. &lt;/span&gt;
&lt;/span&gt; I asked on
&lt;a href=&quot;https://mastodon.social/@lthms/100135240390747697&quot; class=&quot;hover-lavender&quot; marked=&quot;&quot;&gt;Mastodon&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#external-link&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; if there were
good game engines for Lisp, and someone told me about
&lt;a href=&quot;https://github.com/borodust/trivial-gamekit&quot; class=&quot;hover-rose&quot; marked=&quot;&quot;&gt;&lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I have no idea if I will manage to implement a decent client using
trivial-gamekit, but why not trying? This article is the first of a series
about my experiments, discoveries and difficulties. The complete project
detailed in this article is available &lt;a href=&quot;https://gist.github.com/lthms/9833f4851843119c966917775b4c4180&quot; class=&quot;hover-mint&quot; marked=&quot;&quot;&gt;as a
gist&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#external-link&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Common Lisp, Quicklisp and &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The trivial-gamekit
&lt;a href=&quot;https://borodust.github.io/projects/trivial-gamekit/&quot; class=&quot;hover-lemon&quot; marked=&quot;&quot;&gt;website&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; lists several
requirements. Two are related to Lisp:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Quicklisp&lt;/li&gt;
&lt;li&gt;SBCL or CCL&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://quicklisp.org/beta&quot; class=&quot;hover-lavender&quot; marked=&quot;&quot;&gt;Quicklisp&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#external-link&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; is an experimental package manager for
Lisp projects, while SBCL and CCL are two Lisp implementations. I had already
installed &lt;a href=&quot;https://www.archlinux.org/packages/?name=clisp&quot; class=&quot;hover-mint&quot; marked=&quot;&quot;&gt;Clisp&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#external-link&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;, and it took
me quite some time to understand my mistake. Fortunately,
&lt;a href=&quot;https://www.archlinux.org/packages/?name=sbcl&quot; class=&quot;hover-periwinkle&quot; marked=&quot;&quot;&gt;SBCL&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#external-link&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; is also packaged in
ArchLinux.&lt;/p&gt;
&lt;p&gt;With a compatible Lisp implementation, installing Quicklisp as a user is
straightforward. Following the website instructions is enough. At the end of
the process, you will have a new directory &lt;code class=&quot;hljs language-bash&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;${HOME}&lt;/span&gt;/quicklisp&lt;/code&gt;&lt;label for=&quot;fn2&quot; class=&quot;sidenote-number margin-toggle&quot;&gt;&lt;/label&gt;&lt;input id=&quot;fn2&quot; type=&quot;checkbox&quot; class=&quot;margin-toggle&quot;&gt;&lt;span class=&quot;note-left sidenote note&quot;&gt;&lt;span class=&quot;footnote-p&quot;&gt;The purpose of this directory is similar to the &lt;a href=&quot;https://github.com/golang/go/wiki/SettingGOPATH&quot; class=&quot;hover-coral&quot; marked=&quot;&quot;&gt;Go
workspace&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;. &lt;/span&gt;
&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Quicklisp is not a native feature of SBCL, and requires a small bit of
configurations to be made available automatically. You have to create a file
&lt;code class=&quot;hljs language-bash&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;${HOME}&lt;/span&gt;/.sbclrc&lt;/code&gt;, with the following content:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;(&lt;span class=&quot;hljs-name&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;~/quicklisp/setup&quot;&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There is one final step to be able to use &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-bash&quot;&gt;sbcl --&lt;span class=&quot;hljs-built_in&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&apos;(ql-dist:install-dist &quot;http://bodge.borodust.org/dist/org.borodust.bodge.txt&quot;)&apos;&lt;/span&gt; \
     --quit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As of June 2018, Quicklisp &lt;a href=&quot;https://github.com/quicklisp/quicklisp-client/issues/167&quot; class=&quot;hover-periwinkle&quot; marked=&quot;&quot;&gt;does not support
HTTPS&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Introducing Lysk&lt;/h2&gt;
&lt;h3&gt;Packaging&lt;/h3&gt;
&lt;p&gt;The first thing I search for when I learn a new language is how projects are
organized. From this perspective, &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt; pointed me directly to
Quicklisp&lt;/p&gt;
&lt;p&gt;Creating a new Quicklisp project is straightforward. From my understanding, new
Quicklisp projects have to be located inside
&lt;code class=&quot;hljs language-bash&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;${HOME}&lt;/span&gt;/quicklisp/local-projects&lt;/code&gt;. I am not particularly happy with
this, but it is not really important.&lt;/p&gt;
&lt;p&gt;The current code name of my Lisp game client is lysk.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-bash&quot;&gt;&lt;span class=&quot;hljs-built_in&quot;&gt;mkdir&lt;/span&gt; ~/quicklisp/local-projects/lysk
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Quicklisp packages (systems?) are defined through &lt;code class=&quot;hljs&quot;&gt;asd&lt;/code&gt; files.
I have firstly created &lt;code class=&quot;hljs&quot;&gt;lysk.asd&lt;/code&gt; as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;(&lt;span class=&quot;hljs-name&quot;&gt;asdf&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:defsystem&lt;/span&gt; lysk
  &lt;span class=&quot;hljs-symbol&quot;&gt;:description&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Lykan Game Client&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:author&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;lthms&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:license&lt;/span&gt;  &lt;span class=&quot;hljs-string&quot;&gt;&quot;GPLv3&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:version&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;0.0.1&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:serial&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:depends-on&lt;/span&gt; (&lt;span class=&quot;hljs-name&quot;&gt;trivial-gamekit&lt;/span&gt;)
  &lt;span class=&quot;hljs-symbol&quot;&gt;:components&lt;/span&gt; ((&lt;span class=&quot;hljs-symbol&quot;&gt;:file&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;package&quot;&lt;/span&gt;)
               (&lt;span class=&quot;hljs-symbol&quot;&gt;:file&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;lysk&quot;&lt;/span&gt;)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;:serial &lt;span class=&quot;hljs-literal&quot;&gt;t&lt;/span&gt;&lt;/code&gt; means that the files detailed in the &lt;code class=&quot;hljs language-lisp&quot;&gt;components&lt;/code&gt;
field depends on the previous ones. That is, &lt;code class=&quot;hljs&quot;&gt;lysk.lisp&lt;/code&gt; depends on
&lt;code class=&quot;hljs&quot;&gt;package.lisp&lt;/code&gt; in this case. It is possible to manage files dependencies
manually, with the following syntax:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;(&lt;span class=&quot;hljs-symbol&quot;&gt;:file&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;seconds&quot;&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:depends-on&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;first&quot;&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have declared only one dependency: &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;. That way, Quicklisp
will load it for us.&lt;/p&gt;
&lt;p&gt;The first “true” Lisp file we define in our skeleton is &lt;code class=&quot;hljs&quot;&gt;package.lisp&lt;/code&gt;.
Here is its content:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;(&lt;span class=&quot;hljs-name&quot;&gt;defpackage&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:lysk&lt;/span&gt;
  (&lt;span class=&quot;hljs-symbol&quot;&gt;:use&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:cl&lt;/span&gt;)
  (&lt;span class=&quot;hljs-symbol&quot;&gt;:export&lt;/span&gt; run app))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Basically, this means we use two symbols, &lt;code class=&quot;hljs language-lisp&quot;&gt;run&lt;/code&gt; and &lt;code class=&quot;hljs language-lisp&quot;&gt;app&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;A Game Client&lt;/h3&gt;
&lt;p&gt;The &lt;code class=&quot;hljs&quot;&gt;lysk.lisp&lt;/code&gt; file contains the program in itself. My first goal was to
obtain the following program: at startup, it shall create a new window in
fullscreen, and exit when users release the left button of their mouse. It is
worth mentioning that I had to report &lt;a href=&quot;https://github.com/borodust/trivial-gamekit/issues/30&quot; class=&quot;hover-sky&quot; marked=&quot;&quot;&gt;an issue to the &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;
upstream&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; in order to
make my program work as expected.&lt;/p&gt;
&lt;p&gt;While it may sound scary —it suggests &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt; is a relatively young
project— the author has implemented a fix in less than an hour! He also took
the time to answer many questions I had when I joined the &lt;code class=&quot;hljs&quot;&gt;#lispgames&lt;/code&gt; Freenode
channel.&lt;/p&gt;
&lt;p&gt;Before going any further, let’s have a look at the complete file.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;(&lt;span class=&quot;hljs-name&quot;&gt;cl&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:in-package&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:lysk&lt;/span&gt;)

(&lt;span class=&quot;hljs-name&quot;&gt;gamekit&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:defgame&lt;/span&gt; app () ()
                 (&lt;span class=&quot;hljs-symbol&quot;&gt;:fullscreen-p&lt;/span&gt; &apos;t))

(&lt;span class=&quot;hljs-name&quot;&gt;defmethod&lt;/span&gt; gamekit&lt;span class=&quot;hljs-symbol&quot;&gt;:post-initialize&lt;/span&gt; ((&lt;span class=&quot;hljs-name&quot;&gt;app&lt;/span&gt; app))
  (&lt;span class=&quot;hljs-name&quot;&gt;gamekit&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:bind-button&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:mouse-left&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:released&lt;/span&gt;
                       (&lt;span class=&quot;hljs-name&quot;&gt;lambda&lt;/span&gt; () (&lt;span class=&quot;hljs-name&quot;&gt;gamekit&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:stop&lt;/span&gt;))))

(&lt;span class=&quot;hljs-name&quot;&gt;defun&lt;/span&gt; run ()
  (&lt;span class=&quot;hljs-name&quot;&gt;gamekit&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:start&lt;/span&gt; &apos;app))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first line is some kind of header, to tell Lisp the owner of the file.&lt;/p&gt;
&lt;p&gt;The &lt;code class=&quot;hljs language-lisp&quot;&gt;gamekit:defgame&lt;/code&gt; function allows for creating a new game
application (called &lt;code class=&quot;hljs language-lisp&quot;&gt;app&lt;/code&gt; in our case). I ask for a fullscreen window
with &lt;code class=&quot;hljs language-lisp&quot;&gt;:fullscreen-p&lt;/code&gt;. Then, we use the &lt;code class=&quot;hljs language-lisp&quot;&gt;gamekit:post-initialize&lt;/code&gt;
hook to bind a handler to the release of the left button of our mouse. This
handler is a simple call to &lt;code class=&quot;hljs language-lisp&quot;&gt;gamekit:stop&lt;/code&gt;. Finally, we define a new
function &lt;code class=&quot;hljs language-lisp&quot;&gt;run&lt;/code&gt; which only starts our application.&lt;/p&gt;
&lt;p&gt;Pretty straightforward!&lt;/p&gt;
&lt;h3&gt;Running our Program&lt;/h3&gt;
&lt;p&gt;To “play” our game, we can start the SBCL REPL.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-bash&quot;&gt;sbcl --&lt;span class=&quot;hljs-built_in&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&apos;(ql:quickload :lysk)&apos;&lt;/span&gt; --&lt;span class=&quot;hljs-built_in&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&apos;(lysk:run)&apos;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;A Standalone Executable&lt;/h3&gt;
&lt;p&gt;It looks like empower a REPL-driven development. That being said, once the
development is finished, I don&apos;t think I will have a lot of success if I ask my
future players to start SBCL to enjoy my game. Fortunately, &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;
provides a dedicated function to bundle the game as a standalone executable.&lt;/p&gt;
&lt;p&gt;Following the advice of the &lt;a href=&quot;https://github.com/borodust&quot; class=&quot;hover-periwinkle&quot; marked=&quot;&quot;&gt;&lt;strong&gt;@borodust&lt;/strong&gt;&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; —the
&lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt; author— I created a second package to that end. First, we
need to edit the &lt;code class=&quot;hljs&quot;&gt;lysk.asd&lt;/code&gt; file to detail a second package:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;(&lt;span class=&quot;hljs-name&quot;&gt;asdf&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:defsystem&lt;/span&gt; lysk/bundle
  &lt;span class=&quot;hljs-symbol&quot;&gt;:description&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Bundle the Lykan Game Client&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:author&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;lthms&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:license&lt;/span&gt;  &lt;span class=&quot;hljs-string&quot;&gt;&quot;GPLv3&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:version&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;0.0.1&quot;&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:serial&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;hljs-symbol&quot;&gt;:depends-on&lt;/span&gt; (&lt;span class=&quot;hljs-name&quot;&gt;trivial-gamekit/distribution&lt;/span&gt; lysk)
  &lt;span class=&quot;hljs-symbol&quot;&gt;:components&lt;/span&gt; ((&lt;span class=&quot;hljs-symbol&quot;&gt;:file&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;bundle&quot;&lt;/span&gt;)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This second package depends on lysk (our game client) and
trivial-gamekit/distribution. The latter provides the &lt;code class=&quot;hljs language-lisp&quot;&gt;deliver&lt;/code&gt;
function, and we use it in the &lt;code class=&quot;hljs&quot;&gt;bundle.lisp&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-lisp&quot;&gt;(&lt;span class=&quot;hljs-name&quot;&gt;cl&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:defpackage&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:lysk&lt;/span&gt;.bundle
  (&lt;span class=&quot;hljs-symbol&quot;&gt;:use&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:cl&lt;/span&gt;)
  (&lt;span class=&quot;hljs-symbol&quot;&gt;:export&lt;/span&gt; deliver))

(&lt;span class=&quot;hljs-name&quot;&gt;cl&lt;/span&gt;&lt;span class=&quot;hljs-symbol&quot;&gt;:in-package&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:lysk&lt;/span&gt;.bundle)

(&lt;span class=&quot;hljs-name&quot;&gt;defun&lt;/span&gt; deliver ()
  (&lt;span class=&quot;hljs-name&quot;&gt;gamekit&lt;/span&gt;.distribution&lt;span class=&quot;hljs-symbol&quot;&gt;:deliver&lt;/span&gt; &lt;span class=&quot;hljs-symbol&quot;&gt;:lysk&lt;/span&gt; &apos;lysk&lt;span class=&quot;hljs-symbol&quot;&gt;:app&lt;/span&gt;))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To bundle the game, we can use SBCL from our command line interface.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-bash&quot;&gt;sbcl --&lt;span class=&quot;hljs-built_in&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;(ql:quickload :lysk/bundle)&quot;&lt;/span&gt; \
     --&lt;span class=&quot;hljs-built_in&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;(lysk.bundle:deliver)&quot;&lt;/span&gt; \
     --quit
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Objectively, there is not much in this article. However, because I am totally
new to Lisp, it took me quite some time to get these few lines of code to work
together. All being told I think this constitutes a good &lt;code class=&quot;hljs&quot;&gt;trivial-gamekit&lt;/code&gt;
skeleton. Do not hesitate to use it this way.&lt;/p&gt;
&lt;p&gt;Thanks again to &lt;a href=&quot;https://github.com/borodust&quot; class=&quot;hover-coral&quot; marked=&quot;&quot;&gt;&lt;strong&gt;@borodust&lt;/strong&gt;&amp;nbsp;&lt;span class=&quot;icon&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/~lthms/img/icons.svg#github&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;, for your time and
all your answers!&lt;/p&gt;
&lt;h2&gt;Appendix: a Makefile&lt;/h2&gt;
&lt;p&gt;I like Makefile, so here is one to &lt;code class=&quot;hljs language-lisp&quot;&gt;run&lt;/code&gt; the game directly, or
&lt;code class=&quot;hljs language-lisp&quot;&gt;bundle&lt;/code&gt; it.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-makefile&quot;&gt;&lt;span class=&quot;hljs-section&quot;&gt;run:&lt;/span&gt;
        @sbcl --eval &lt;span class=&quot;hljs-string&quot;&gt;&quot;(ql:quickload :lysk)&quot;&lt;/span&gt; \
              --eval &lt;span class=&quot;hljs-string&quot;&gt;&quot;(lysk:run)&quot;&lt;/span&gt;

&lt;span class=&quot;hljs-section&quot;&gt;bundle:&lt;/span&gt;
        @echo -en &lt;span class=&quot;hljs-string&quot;&gt;&quot;[ ] Remove old build&quot;&lt;/span&gt;
        @rm -rf build/
        @echo -e &lt;span class=&quot;hljs-string&quot;&gt;&quot;\r[*] Remove old build&quot;&lt;/span&gt;
        @echo &lt;span class=&quot;hljs-string&quot;&gt;&quot;[ ] Building&quot;&lt;/span&gt;
        @sbcl --eval &lt;span class=&quot;hljs-string&quot;&gt;&quot;(ql:quickload :lysk/bundle)&quot;&lt;/span&gt; \
              --eval &lt;span class=&quot;hljs-string&quot;&gt;&quot;(lysk.bundle:deliver)&quot;&lt;/span&gt; \
              --quit
        @echo &lt;span class=&quot;hljs-string&quot;&gt;&quot;[*] Building&quot;&lt;/span&gt;

&lt;span class=&quot;hljs-meta&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;.PHONY&lt;/span&gt;: bundle run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
        
      </description>
    </item>
    
    
  </channel>
</rss>
