<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>MzScheme bindings for Allegro</title>
		<link>http://www.allegro.cc/forums/view/586125</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 03 Jul 2006 17:46:41 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Im sure there are extremely few people who use Mzscheme/Drscheme here but I just thought I would announce my first official release of scheme bindings to Allegro. Mzscheme has its own package format called Planet so assuming you had mzscheme installed you could type this on the command line:</p><p>$ planet -i kazzmir allegro.plt 1 0</p><p>And it would be installed. Links to things:<br /><a href="http://www.mzscheme.org">Mzscheme</a><br /><a href="http://www.drscheme.org">DrScheme</a><br /><a href="http://planet.plt-scheme.org/#allegro.plt1.0">Allegro planet package</a></p><p>Just a little background in case anyone wants it, mzscheme is the command line interpreter/implementation of scheme. Drscheme is an IDE built on top of mzscheme which is highly scheme centric.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kazzmir)</author>
		<pubDate>Tue, 27 Jun 2006 05:37:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Looks nice.  I only looked at the documentation though.</p><p>Possible bug: the documentation has:</p><div class="source-code snippet"><div class="inner"><pre>
<span class="k3">&gt;</span> <span class="k2">(</span>x<span class="k2">)</span> <span class="k3">-</span><span class="k3">&gt;</span> <span class="k1">int</span>

Returns the current x position of the mouse on the graphics context.

<span class="k3">&gt;</span> <span class="k2">(</span>y<span class="k2">)</span> <span class="k3">-</span><span class="k3">&gt;</span> <span class="k1">int</span>

Returns the current y position of the mouse on the graphics context.
</pre></div></div><p>

but the example has:</p><div class="source-code snippet"><div class="inner"><pre>        <span class="k2">(</span>let <span class="k2">(</span><span class="k2">(</span>x <span class="k2">(</span>mouse-x<span class="k2">)</span><span class="k2">)</span>
        <span class="k2">(</span>y <span class="k2">(</span>mouse-y<span class="k2">)</span><span class="k2">)</span><span class="k2">)</span>
</pre></div></div><p>


For various reasons, I think it&#39;s best for language bindings to stick closely to the C API.  For people who know the C API, digging around for the same function with a different name is frustrating.  Also, the manual for the C API can serve, to some extent, for other languages also.  I&#39;m glad your bindings have not deviated too far but there are some (IMHO) unnecessary discrepancies.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Tue, 27 Jun 2006 11:29:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Very interesting.  Someday I&#39;ll do some scheming, but that day has not arrived...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (nonnus29)</author>
		<pubDate>Tue, 27 Jun 2006 16:55:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Peter, the discrepancy is in the prefix. Im not sure if thats an mzscheme thing only but when you import modules you can prefix all the exported definitions with an arbitrary set of characters.</p><p>At the top of the example thing is this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">(</span>require <span class="k2">(</span>prefix mouse- <span class="k2">(</span>planet <span class="s">"mouse.ss"</span> <span class="k2">(</span><span class="s">"kazzmir"</span> <span class="s">"allegro.plt"</span> <span class="n">1</span> <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">)</span><span class="k2">)</span>
</pre></div></div><p>

Which means anything that comes out of the mouse module will have mouse- prefixed onto it. I could have just left it alone in which case the code would be
</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">(</span>let <span class="k2">(</span><span class="k2">(</span>x <span class="k2">(</span>x<span class="k2">)</span><span class="k2">)</span>
      <span class="k2">(</span>y <span class="k2">(</span>y<span class="k2">)</span><span class="k2">)</span><span class="k2">)</span>
</pre></div></div><p>

But then its not very obvious what (x) and (y) are binded to.</p><p>I suppose you may ask why not just export the definition of x and y from mouse.ss as mouse-x and mouse-y and the reason is because the prefix feature exists I didnt want to prevent people from doing as they wished with the function names. The only real naming requirements for the function is that they return what they represent, x returns the x coordinate and y returns the y coordinate. Any other naming convention is purely upto the programmer. If only C++ had this!!</p><p>Also, I noticed quite a number of typos and bugs in the documentation already. I was tired and wrote the whole thing fairly quickly, but I will update it as time goes on. Im going to basically rewrite the entire allegro.txt for this!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kazzmir)</author>
		<pubDate>Wed, 28 Jun 2006 03:49:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I use MzScheme often very. It good is too hard for me but.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Blaize)</author>
		<pubDate>Mon, 03 Jul 2006 17:46:41 +0000</pubDate>
	</item>
</rss>
