<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for ingvar</title>
    <link>http://www.advogato.org/person/ingvar/</link>
    <description>Advogato blog for ingvar</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Sat, 20 Mar 2010 18:17:18 GMT</pubDate>
    <item>
      <pubDate>Fri, 19 Feb 2010 10:08:08 GMT</pubDate>
      <title>19 Feb 2010</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=308</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=308</guid>
      <description>This morning, I finished off and packaged up a library (CL, &#xD;
linux; other OSes with CL implementations and OS-provided &#xD;
random (or random-backed pseudorandom) devices can probably &#xD;
be grafted in, but would require volunteers to test) to &#xD;
extract random bits from &lt;tt&gt;/dev/urandom&lt;/tt&gt; and use &#xD;
those essentially unadorned to generate random numbers.&#xD;
&#xD;
&lt;p&gt; There's a single exported function from the package, &#xD;
RANDOMNESS:RND and takes an integer argument (I guess you &#xD;
could try feeding it a float, but it wouldn't do you that &#xD;
much good). That function then proceeds to extract &#xD;
log&lt;sub&gt;2&lt;/sub&gt; N bits and uses rejection smapling to find &#xD;
an integer in the 0..(N-1) span. As the bits sucked out of &#xD;
the internal  pool run out (each bit is used only the &#xD;
once), they're replenished from the OS-provided randomness &#xD;
source.&#xD;
&#xD;
&lt;p&gt; All very nice, with some interesting corner cases for the &#xD;
unwary and probably still bug-ridden. But, such is life.&#xD;
&#xD;
&lt;p&gt; Download &lt;a href="http://src.hexapodia.net/&#xD;
randomness.tar.gz" &gt;from here&lt;/a&gt;.</description>
    </item>
    <item>
      <pubDate>Thu, 3 Dec 2009 11:58:51 GMT</pubDate>
      <title>3 Dec 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=307</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=307</guid>
      <description>Neat(ish) hack...&#xD;
&#xD;
&lt;p&gt; Sometimes, I find myself writing anonymous functions, to &#xD;
fill out keyword arguments for functions or adapting the &#xD;
argument order. So, I thought, how hard would it be to &#xD;
write a macro to write the code for me? Turns out, not very &#xD;
complex, at all. The formatting is not QUITE what I started &#xD;
out with, as the Advogato edit box is a bit on the short &#xD;
end, but, hey...&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
(defmacro _ (form)&#xD;
 (flet ((is-arg (sym)&#xD;
	  (ignore-errors&#xD;
	   (and (char= (char (symbol-name sym) 0) #\_)&#xD;
		(cons&#xD;
		 (parse-integer (symbol-name sym)&#xD;
				:start 1)&#xD;
		 sym)))))&#xD;
   (let ((syms (loop for arg in form&#xD;
		  for temp = (is-arg arg)&#xD;
		  if temp collect temp)))&#xD;
    `(lambda&#xD;
	 ,(mapcar #'cdr (sort syms #'&amp;lt; :key #'car))&#xD;
       ,form))))&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; With this in hand, you can, for example, easily make an &#xD;
adapter to parse C-style hex constants:&#xD;
&lt;pre&gt;&#xD;
  (_ (parse-integer _1 :radix 16 :start 2))&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; Not that the lambda-wrapping of this would've been much &#xD;
more complex and I am not entirely sure this wins as far as &#xD;
readability is concerned, but that is as it may be. It's if &#xD;
nothing else a neat macro that would be more than a little &#xD;
tricky to pull off with a less capable macro facility.</description>
    </item>
    <item>
      <pubDate>Fri, 27 Nov 2009 08:19:54 GMT</pubDate>
      <title>27 Nov 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=306</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=306</guid>
      <description>So, one of the users of my &lt;a href="http://&#xD;
src.hexapodia.net/image.tar,gz" &gt;Image library&lt;/a&gt; asked if &#xD;
there wasn't any way of using a font other than the rather &#xD;
ugly, built-in one. I said, roughly, "you can define a new &#xD;
one, in an analogous fashion to how the built-in oine is &#xD;
done?"&#xD;
&#xD;
&lt;p&gt; Apparently, that was not the wished-for answer and I &#xD;
started thinking. Bit-mapped fonts are (relatively) easy to &#xD;
deal with. There's a helluva lot of bitmapped fonts for &#xD;
X11. So, I set forth to code up a reader for PCF fonts, &#xD;
converting the bitmaps to internal format and some multi-&#xD;
font support in Image. All done, now.&#xD;
&#xD;
&lt;p&gt; Common Lisp is still very pleasant when dealing with binary &#xD;
file I/O, even if I wished that there was an easy way of &#xD;
changing the binaryness of a file on the fly.</description>
    </item>
    <item>
      <pubDate>Wed, 18 Nov 2009 09:53:52 GMT</pubDate>
      <title>18 Nov 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=305</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=305</guid>
      <description>Currently tooling away at asked-for functionality for my &#xD;
IMAGE library (specifically, a request was made to see if I &#xD;
can scare up another font or three, so I am currently &#xD;
noodling on a PCF font-file reader, as you do).&#xD;
&#xD;
&lt;p&gt; Common Lisp continues to be amazingly convenient for &#xD;
"binary I/O", although it does require a certain mind-set &#xD;
to consider it convenient, I guess.</description>
    </item>
    <item>
      <pubDate>Fri, 13 Nov 2009 10:06:20 GMT</pubDate>
      <title>13 Nov 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=304</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=304</guid>
      <description>I've just packaged up a new release of my &lt;a href="http://&#xD;
src.hexapodia.net/image.tar.gz" &gt;IMAGE library&lt;/a&gt;, with &#xD;
some new functionality in place. It now supports copying &#xD;
(parts of) an image into another image (with either the &#xD;
same alpha across the whole copied section or with a &#xD;
provided alpha map, so one can do Clever Stuff that way).&#xD;
&#xD;
&lt;p&gt; I suppose I should write documentation for the image &#xD;
library at some point, but...</description>
    </item>
    <item>
      <pubDate>Tue, 6 Oct 2009 15:15:11 GMT</pubDate>
      <title>6 Oct 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=303</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=303</guid>
      <description>Idleness is the source of many bugs. I suppose. It's &#xD;
certainly the cause for a lot of code I write.&#xD;
&#xD;
&lt;p&gt; Lately, I have been pondering hashing of octet vectors. &#xD;
Well, actually, I've been pondering the hashing of strings, &#xD;
but these days strings need mangling to octet vectors &#xD;
before one can reasonably reason about them as numbers (in &#xD;
my case, turning a vector of characters into a possibly-&#xD;
longer (well, possibly-more-elemented) vector of (UNSIGNED-&#xD;
BYTE 8), containing a UTF-8 encoding of the character &#xD;
string).&#xD;
&#xD;
&lt;p&gt; But, what's a hash without an idea how well it performs? &#xD;
So, with a pluggable (or at least semi-pluggable) hash &#xD;
algo, what I now do is run it across a dictionary (in my &#xD;
case it is /usr/dict/words, containing a British word list) &#xD;
and see how many collisions one gets.&#xD;
&#xD;
&lt;p&gt; The next step is, of course, to try to figurte out what is &#xD;
and isn't bad, as far as collissions go. From memory, the &#xD;
last attempt say something like 600 collisions out of just &#xD;
under 70k words. I'd have to run a simulation to say if &#xD;
it's well above, well below or around what I'd &#xD;
statistically expect.&#xD;
&#xD;
&lt;p&gt; Next after that will have to be concatenations of words, &#xD;
though that MAY take a bit longer to test-run.</description>
    </item>
    <item>
      <pubDate>Tue, 22 Sep 2009 16:24:23 GMT</pubDate>
      <title>22 Sep 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=302</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=302</guid>
      <description>Interesting (but rather pointless) self-replicating shell-&#xD;
script:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
#! /bin/cat&#xD;
Self-replicating!&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; Make sure it's executable, then you can replicate the whole &#xD;
script by running it... But, maybe, there's some usefulness &#xD;
to it? Doubt it, though.</description>
    </item>
    <item>
      <pubDate>Fri, 4 Sep 2009 14:23:49 GMT</pubDate>
      <title>4 Sep 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=301</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=301</guid>
      <description>IN slightly less whingeing news, since the latest (well, &#xD;
second) installment of the annual &#xD;
&lt;a href="http://www.hexapodia.net/snooper/&#xD;
snooper-2008.pdf" &gt;Snooper Report&lt;/a&gt; has been turned down, &#xD;
I'll let it loose on an unsuspecting public (and, of &#xD;
course, the URL is too wide for the Advogato editing &#xD;
window, so now I'll get bots come and look for URLs with &#xD;
%0A in them, grr).&#xD;
&#xD;
&lt;p&gt; In almost as exciting news, I cobbled up a proof-of-concept &#xD;
of a &lt;a href="http://src.hexapodia.net/blackhole/" &gt;blackhole &#xD;
maintenance library&lt;/a&gt; (CLI client, web client, libarry &#xD;
code, DB backend and a reaper suitable to stick in cron, to &#xD;
remove blackholes once they expire).</description>
    </item>
    <item>
      <pubDate>Fri, 4 Sep 2009 13:10:32 GMT</pubDate>
      <title>4 Sep 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=300</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=300</guid>
      <description>One of the little web toys I knocked together and &#xD;
occasionally use for pontificating is my &lt;a href="http://&#xD;
essays.hexapodia.net/" &gt;Essays site&lt;/a&gt;. Since its initial &#xD;
creation, I've added a comment functionality, but due to &#xD;
the prevalence of spam, everything requires manual &#xD;
verification.&#xD;
&#xD;
&lt;p&gt; Not, in and of itself, a major problem, but I've noticed &#xD;
something quite disturbing in the spam comments (most, &#xD;
alas). The latest is that they're pointing to the &#xD;
SourceForge forum (with URLs that start http://&#xD;
cmr.sourceforge.net/forum/) and I am in two minds about &#xD;
that.&#xD;
&#xD;
&lt;p&gt; One mind says I shouldn't bother complaining, because they &#xD;
should already have noticed. The other mind says I should, &#xD;
indeed, point it out to them (with a slight risk that the &#xD;
forum is zapped; this happened last time I pointed the &#xD;
issue out).&#xD;
&#xD;
&lt;p&gt; Instead, I decided that thee Right and Proper thing to do &#xD;
is to have a semi-public whinge. Don't know that it makes &#xD;
me feel any betetr, but at least I am not feeling any worse.</description>
    </item>
    <item>
      <pubDate>Sun, 9 Aug 2009 10:47:56 GMT</pubDate>
      <title>9 Aug 2009</title>
      <link>http://www.advogato.org/person/ingvar/diary.html?start=299</link>
      <guid>http://www.advogato.org/person/ingvar/diary.html?start=299</guid>
      <description>I have previously written &lt;a href="http://&#xD;
essays.hexapodia.net/versions/" &gt;a short essay, or possibly &#xD;
a rant&lt;/a&gt; on "develop and release straight out of version &#xD;
control" or "release in versioned lumps of code, with the &#xD;
development being separate".&#xD;
&#xD;
&lt;p&gt; That whole thing just jumped to the fore-front of my mind, &#xD;
as it seems that SLIME has changed under my feet again (no, &#xD;
I didn't intentionally upgrade SLIME, but it seems as if I &#xD;
need to stop getting SLIME via Debian and instead pull it &#xD;
myself, so it stops changing when the rest of the system &#xD;
upgrade; I also need to downgrade the SLIME I have &#xD;
installed as whatever I run now is less functional (for me) &#xD;
than what I ran prior to the last upgrade).&#xD;
&#xD;
&lt;p&gt; I don't know if things would be better or worse if "package &#xD;
and release" was the dominant paradigm, though. It'd &#xD;
probably cause less friction with an auto-update system &#xD;
that is tailored to packaged and versioned releases.</description>
    </item>
  </channel>
</rss>
