<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Getting started with CFFI</title>
	<atom:link href="http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/</link>
	<description>Leslie P. Polzer on code, music, literature, design and free software business.</description>
	<lastBuildDate>Sat, 27 Feb 2010 16:12:31 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Space Station Lambda &#187; Laying logging foundations</title>
		<link>http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/comment-page-1/#comment-78</link>
		<dc:creator>Space Station Lambda &#187; Laying logging foundations</dc:creator>
		<pubDate>Wed, 30 Jan 2008 11:44:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/#comment-78</guid>
		<description>[...] one for the load averages, so we can see whether an error might have occurred due to heavy load (maybe a race condition): [...]</description>
		<content:encoded><![CDATA[<p>[...] one for the load averages, so we can see whether an error might have occurred due to heavy load (maybe a race condition): [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leslie</title>
		<link>http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/comment-page-1/#comment-46</link>
		<dc:creator>Leslie</dc:creator>
		<pubDate>Fri, 25 Jan 2008 09:51:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/#comment-46</guid>
		<description>baleog, I recommend &lt;a href=&quot;http://www.cliki.net/ffa&quot; rel=&quot;nofollow&quot;&gt;ffa&lt;/a&gt; for arrays with more than one dimension.

If you don&#039;t want to use it, you need to keep track of N pointers, where N is your array&#039;s dimension. I don&#039;t think you can use Lisp arrays with CFFI (or UFFI, for that matter).</description>
		<content:encoded><![CDATA[<p>baleog, I recommend <a href="http://www.cliki.net/ffa" rel="nofollow">ffa</a> for arrays with more than one dimension.</p>
<p>If you don&#8217;t want to use it, you need to keep track of N pointers, where N is your array&#8217;s dimension. I don&#8217;t think you can use Lisp arrays with CFFI (or UFFI, for that matter).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramarren</title>
		<link>http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/comment-page-1/#comment-45</link>
		<dc:creator>Ramarren</dc:creator>
		<pubDate>Thu, 24 Jan 2008 21:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/#comment-45</guid>
		<description>When dealing with arrays something like http://www.cliki.net/ffa is helpful, I think.

Mikael, how exactly do you imagine dynamic loading of static libraries would work? I suppose you can use Embeddable Common-Lisp from http://ecls.sourceforge.net/ which generates C code, so one can link it with anything C compiler can.</description>
		<content:encoded><![CDATA[<p>When dealing with arrays something like <a href="http://www.cliki.net/ffa" rel="nofollow">http://www.cliki.net/ffa</a> is helpful, I think.</p>
<p>Mikael, how exactly do you imagine dynamic loading of static libraries would work? I suppose you can use Embeddable Common-Lisp from <a href="http://ecls.sourceforge.net/" rel="nofollow">http://ecls.sourceforge.net/</a> which generates C code, so one can link it with anything C compiler can.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikael Jansson</title>
		<link>http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/comment-page-1/#comment-44</link>
		<dc:creator>Mikael Jansson</dc:creator>
		<pubDate>Thu, 24 Jan 2008 20:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/#comment-44</guid>
		<description>Thanks for the snippet!  It was precisely was I was looking for. I&#039;m just beginning my Lisp journey, and right now I&#039;m thinking about working on a project that requires access to C bindings.

Is there an equivalent for static (.a) libraries?</description>
		<content:encoded><![CDATA[<p>Thanks for the snippet!  It was precisely was I was looking for. I&#8217;m just beginning my Lisp journey, and right now I&#8217;m thinking about working on a project that requires access to C bindings.</p>
<p>Is there an equivalent for static (.a) libraries?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: baleog</title>
		<link>http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/comment-page-1/#comment-43</link>
		<dc:creator>baleog</dc:creator>
		<pubDate>Thu, 24 Jan 2008 15:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/2008/01/24/getting-started-with-cffi/#comment-43</guid>
		<description>and what do i need to define if i want to call c-function with multi-dimensional lisp array?

something like this:

;;int some_c_function(double *, int dim1, int dim2);
(let ((ar (make-array (list *dim1* *dim2*) :element-type &#039;double-float)))
    (some-c-function ar *dim1* *dim2*))</description>
		<content:encoded><![CDATA[<p>and what do i need to define if i want to call c-function with multi-dimensional lisp array?</p>
<p>something like this:</p>
<p>;;int some_c_function(double *, int dim1, int dim2);<br />
(let ((ar (make-array (list *dim1* *dim2*) :element-type &#8216;double-float)))<br />
    (some-c-function ar *dim1* *dim2*))</p>
]]></content:encoded>
	</item>
</channel>
</rss>
