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

<rss version="2.0" xml:base="https://etwof.com/">
<channel>
 <title>Lisp | End the War on Freedom</title>
 <link>https://etwof.com/categories/lisp.html</link>
 <description>Stories about the world&#039;s best computer language</description>
 <language>en</language>
 <managingEditor>Bill St. Clair</managingEditor>
 <generator>Lisplog</generator>
<item>
 <title>Fun with Lisp: Just Intonation and Microtonality</title>
 <link>https://etwof.com/fun_with_lisp_just_intonation_and_microtonality.html</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://ahefner.livejournal.com/19604.html&quot;&gt;Andy Hefner&lt;/a&gt; gives some examples of &lt;a href=&quot;http://en.wikipedia.org/wiki/Just_intonation&quot;&gt;just intonation&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Microtonality&quot;&gt;microtonality&lt;/a&gt; using his Lisp &lt;a href=&quot;http://vintage-digital.com/hefner/software/mixalot/mixalot.html&quot;&gt;Mixalot library&lt;/a&gt;. Cool.&lt;/p&gt;</description>
 <pubDate>Tue, 24 Jan 2012 14:33:32 GMT</pubDate>
</item>
<item>
 <title>KeyRemap4MacBook</title>
 <link>https://etwof.com/keyremap4macbook.html</link>
 <description>&lt;p&gt;I spend most of my days in Emacs, writing Lisp. So I use the &quot;control&quot; and &quot;meta&quot; keys all the time. I map meta to the Mac &quot;command&quot; key with a setting in my &quot;~/.emacs&quot; file:&lt;/p&gt;

&lt;pre&gt;
  (setq mac-command-modifier &#039;meta
        mac-option-modifier nil)
&lt;/pre&gt;

My new Apple wireless keyboard has a &quot;fn&quot; key in the lower left-hand corner of the keyboard, with the &quot;control&quot; key next to it. Most distressing, since my left pinky is accustomed to finding the &quot;control&quot; key in the lower left-hand corner. I knew this before I got this keyboard, and would have gotten the wired keyboard with the numeric keypad had I not had a solution in mind. Enter &lt;a href=&quot;http://pqrs.org/macosx/keyremap4macbook/&quot;&gt;KeyRemap4MacBook&lt;/a&gt;, a System Preferences panel that allows you to remap just about any key to just about any other key. It has a setting that maps &quot;fn&quot; to &quot;control&quot; only when a letter is pressed. This allows &quot;fn&quot; to be used normally on the top row of keys, but makes it function fine as emacs &quot;control&quot; when you need it. Almost.

The one problem with the built-in key mapping is that it doesn&#039;t map &amp;lt;fn&gt;-space to &amp;lt;control&gt;-space. I type that pretty often, and moving my pinky over to the &quot;control&quot; key to do so is a real pain. Fortunately, KeyRemap4MacBook is open source, and you can customize it by adding XML to &quot;~/Library/Application Support/KeyRemap4MacBook/private.xml&quot;. I found the &lt;a href=&quot;https://raw.github.com/tekezo/KeyRemap4MacBook/master/files/prefpane/checkbox.xml&quot;&gt;source&lt;/a&gt; for the built-in XML settings, looked through that for &quot;Fn+letter to Control_L+letter&quot;, add a setting to private.xml containing a single key mapping:&lt;/p&gt;

&lt;pre&gt;
          &lt;autogen&gt;--KeyToKey-- KeyCode::SPACE, ModifierFlag::FN, KeyCode::SPACE, ModifierFlag::CONTROL_L&lt;/autogen&gt;
&lt;/pre&gt;

&lt;p&gt;Presto, &amp;lt;fn&gt;-space sets the mark.&lt;/p&gt;

&lt;p&gt;Here&#039;s &lt;a href=&quot;images/private.xml&quot;&gt;my private.xml&lt;/a&gt;. To use it, install KeyRemap4MacBook, which requires a restart of your computer. save the file as &quot;~/Library/Application Support/KeyRemap4MacBook/private.xml&quot;, in the KeyRemap4MacBook preference pane, press the &quot;ReloadXML&quot; button, then check &quot;Fn+space+ to Control_L+space+&quot;.&lt;/p&gt;

&lt;p style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;images/keyremap-settings-602x271.jpg&quot; alt=&quot;KeyRemap4MacBook settings&quot; width=&quot;602&quot; height=&quot;271&quot;/&gt;&lt;/p&gt;
</description>
 <pubDate>Tue, 16 Aug 2011 03:50:01 GMT</pubDate>
</item>
<item>
 <title>cl-autorepo</title>
 <link>https://etwof.com/clautorepo.html</link>
 <description>&lt;p&gt;&lt;a href=&quot;https://github.com/billstclair/cl-autorepo&quot;&gt;github.com/billstclair/cl-autorepo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have a few libraries that are not yet in Quicklisp, either because they&#039;re in development or I doubt they&#039;ll be useful to others. I&#039;ve been adding them to my projects as git submodules, but I find submodules a pain to maintain. I invented cl-autorepo to make it easier, e.g.:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(cl-autorepo:add-system &quot;fsdb&quot; &quot;https://github.com/billstclair/fsdb&quot; :git)&lt;br/&gt;
(ql:quickload &quot;fsdb&quot;)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;More in the README at the link.&lt;/p&gt;</description>
 <pubDate>Thu, 11 Aug 2011 20:45:31 GMT</pubDate>
</item>
<item>
 <title>ASDF2-compatible delfasls</title>
 <link>https://etwof.com/delfasls.html</link>
 <description>&lt;p&gt;I use &lt;a href=&quot;http://common-lisp.net/project/asdf/&quot;&gt;ASDF2&lt;/a&gt; via &lt;a href=&quot;http://www.quicklisp.org/&quot;&gt;Quicklisp&lt;/a&gt; for a lot of my Lisp work these days (Quicklisp rocks!). I like to keep my systems warning-free, so I recompile often. In order to do that, I&#039;ve always used a script named &lt;code&gt;delfasls&lt;/code&gt;. It was simple when my fasls were stored in the same directory as my code:&lt;/p&gt;

&lt;div style=&quot;margin-left: 20px;&quot;&gt;
&lt;pre&gt;find . -name &quot;*.fasl&quot; -delete
&lt;/div&gt;

&lt;p&gt;ASDF2 stores the fasls in a separate directory, however, so I needed &lt;code&gt;delfasls&lt;/code&gt; to be smart about that. Just did that today:&lt;/p&gt;

&lt;div style=&quot;margin-left: 20px;&quot;&gt;
&lt;pre&gt;#!/bin/bash

find . -name &quot;*.*fsl&quot; -delete
find . -name &quot;*.fasl&quot; -delete

# Delete the asdf2 cached fasl files for the current directory
DIR=`pwd`
if cd ~/.cache/common-lisp 2&gt;/dev/null; then
  CACHE=`pwd`
  for D in `ls`; do
    FASLDIR=&quot;$CACHE/$D$DIR&quot;
    #echo $FASLDIR
    if cd $FASLDIR 2&gt;/dev/null; then
        find . -name &quot;*.*fsl&quot; -delete
        find . -name &quot;*.fasl&quot; -delete
    fi
  done
fi
&lt;/pre&gt;
&lt;/div&gt;</description>
 <pubDate>Wed, 15 Jun 2011 15:22:47 GMT</pubDate>
</item>
<item>
 <title>Cocoa/Lisp Tutorial</title>
 <link>https://etwof.com/cocoa_lisp_tutorial.html</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://tclispers.org/news/cocoalisp-tutorial&quot;&gt;plkrueger at TC Lispers&lt;/a&gt; - a 70-page tutorial on writing Macintosh Cocoa apps in &lt;a href=&quot;http://trac.clozure.com/ccl&quot;&gt;Clozure Common Lisp&lt;/a&gt; (CCL). I write lisp in CCL for a living, but I have only played with Cocoa a few times. This may well be a good place to start should I need to write a Mac GUI app.&lt;/p&gt;</description>
 <pubDate>Sun, 17 Jan 2010 12:32:42 GMT</pubDate>
</item>
</channel>
</rss>
