<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mindstab.net &#187; Emacs</title>
	<atom:link href="http://www.mindstab.net/wordpress/archives/tag/emacs/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mindstab.net/wordpress</link>
	<description>Various projects and musings</description>
	<lastBuildDate>Wed, 28 Jul 2010 18:00:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Lisp (SBCL) on Hardened Gentoo</title>
		<link>http://www.mindstab.net/wordpress/archives/297</link>
		<comments>http://www.mindstab.net/wordpress/archives/297#comments</comments>
		<pubDate>Sat, 21 Jun 2008 07:07:16 +0000</pubDate>
		<dc:creator>Dan Ballard</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.mindstab.net/wordpress/?p=297</guid>
		<description><![CDATA[My server, mindstab.net, runs Hardened Gentoo.  I like it.  It provides nice features from grsecurity and PaX like memory randomization, non executable writable memory, etc. However, it really doesn't get along so well with Lisp.  Lisp in general seems to like executable and writable memory, and SBCL at least also doesn't like [...]]]></description>
			<content:encoded><![CDATA[<p>My server, mindstab.net, runs Hardened Gentoo.  I like it.  It provides nice features from grsecurity and PaX like memory randomization, non executable writable memory, etc. However, it really doesn't get along so well with Lisp.  Lisp in general seems to like executable and writable memory, and SBCL at least also doesn't like randomized memory.  So it took a bit of work to get Lisp onto my server.</p>
<p><b>Approach 1: Failure</b><br />
I spent a bunch of time trying to patch the build process in portage to coax SBCL into building.  First, of course, I used gcc-config to disable the hardened gcc profile, and just use the vanilla one.  Then I created a suid root shell script to call "<i>paxctl -m -p -r -e $1</i>" so that the sandboxed build process could disable PaX features on the SBCL binaries.  I added the command to the ebuild, and created a patch to insert the command into SBCL's build process.  The process goes like this, portage download's the SBCL source and a pre-compiled SBCL binary.  The patched ebuild then calls my suid root script which disables PaX on the pre-compiled binary so it actually runs (as opposed to crashing under PaX) and then a new SBCL binary is built from the source and the pre-compiled binary builds a core file from the SBCL lisp source.  The patched SBCL make.sh then again calls the suid root script on the new binary, so it will run.  Then it should load the new core and recompile the system for itself.  Sadly, while it runs at least, it chokes on the core file and hangs while using 100% cpu.  I couldn't get past this so I eventually gave up.  If anyone has any suggestions that'd be great.</p>
<p><b>Approach 2: Success</b><br />
So the actually solution was as follows:  Download the most recent precompiled SBCL binary from the website (1.0.15 for x86), run "<i>paxctl -p -e -m -r -x -s </i>" on src/runtime/sbcl (to cover all the bases). Then run  "<i>sh install.sh</i>" to install SBCL to /usr/local.  That's it. </p>
<p>The problem with this is you can't emerge lisp packages in portage, you have to install them by hand (unless maybe you want to fake inject the package into the portage database).</p>
<p>I downloaded a copy of slime, untarred it and popped it in my .emacs and I had a full lisp environment ready to go, and on my hardened machine no less.  Not so bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindstab.net/wordpress/archives/297/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Emacs and Slime highlight changes and how to control it</title>
		<link>http://www.mindstab.net/wordpress/archives/291</link>
		<comments>http://www.mindstab.net/wordpress/archives/291#comments</comments>
		<pubDate>Thu, 15 May 2008 02:23:26 +0000</pubDate>
		<dc:creator>Dan Ballard</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Lisp]]></category>

		<guid isPermaLink="false">http://www.mindstab.net/wordpress/archives/291</guid>
		<description><![CDATA[Massive thanks to durka on #lisp on irc.freenode.net.
New versions of slime for emacs have had enabled by default a new feature, essentially a light highlighting of uncompiled changes to a file.  At first I found it annoying but then I got used to it. It is kind of handy.  However I wouldn't find [...]]]></description>
			<content:encoded><![CDATA[<p>Massive thanks to durka on #lisp on irc.freenode.net.<br />
New versions of slime for emacs have had enabled by default a new feature, essentially a light highlighting of uncompiled changes to a file.  At first I found it annoying but then I got used to it. It is kind of handy.  However I wouldn't find out how to turn it on or off.  Oh well.</p>
<p>Then I went to use emacs on the console and the subtle light grey background highlight was suddenly grey text on a white background and completely unreadable.  Very annoying, suddenly this little feature rendered -nox emacs useless.  </p>
<p>Hours of google searching turned up nothing so finally I resorted to the irc channel.  In only 10 minutes we got the answer.</p>
<pre>
&lt;durka&gt; aha
 customize emacs - applications - slime - slime mode - slime mode faces
 change highlight edits face</pre>
<p>Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindstab.net/wordpress/archives/291/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
