<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: OpenGL and Haskell</title>
	<atom:link href="http://twoguysarguing.wordpress.com/2010/02/20/opengl-and-haskell/feed/" rel="self" type="application/rss+xml" />
	<link>http://twoguysarguing.wordpress.com/2010/02/20/opengl-and-haskell/</link>
	<description>colorful back and forth from two highly opinionated programmers</description>
	<lastBuildDate>Fri, 17 May 2013 10:05:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: thu</title>
		<link>http://twoguysarguing.wordpress.com/2010/02/20/opengl-and-haskell/#comment-160</link>
		<dc:creator><![CDATA[thu]]></dc:creator>
		<pubDate>Mon, 22 Feb 2010 09:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://twoguysarguing.wordpress.com/?p=617#comment-160</guid>
		<description><![CDATA[Hey, a few tips:

The parens around elements in the list are not needed, e.g. [(a + b), 5] can be just [a + b, 5].

Instead of
v0
    &#124; x == 0 &#124;&#124; x == 1 &#124;&#124; x == 2 &#124;&#124; x == 3 = -1
    &#124; x == 4 &#124;&#124; x == 5 &#124;&#124; x == 6 &#124;&#124; x == 7 = 1
you may use
v0
    &#124; x `elem` [0,1,2,3] = -1
    &#124;otherwise = 1
Or use real arrays instead of the v function.
In fact I would directly put the values in the faces, without the v function or an array.

Also, in faces, don&#039;t use nest lists but [(Float,Float,Float,Float)] to ensure the elements have each 4 values.

You can combine the zip and the mapM into zipWithM, or even better, zipWithM_, to avoid the need for return ().

Oh and slightly better name, in v x, v i would make in clear it is some kind of indexing, and using x, y, z instead of v1, v2, v3, make it clear these are 3d coord.]]></description>
		<content:encoded><![CDATA[<p>Hey, a few tips:</p>
<p>The parens around elements in the list are not needed, e.g. [(a + b), 5] can be just [a + b, 5].</p>
<p>Instead of<br />
v0<br />
    | x == 0 || x == 1 || x == 2 || x == 3 = -1<br />
    | x == 4 || x == 5 || x == 6 || x == 7 = 1<br />
you may use<br />
v0<br />
    | x `elem` [0,1,2,3] = -1<br />
    |otherwise = 1<br />
Or use real arrays instead of the v function.<br />
In fact I would directly put the values in the faces, without the v function or an array.</p>
<p>Also, in faces, don&#8217;t use nest lists but [(Float,Float,Float,Float)] to ensure the elements have each 4 values.</p>
<p>You can combine the zip and the mapM into zipWithM, or even better, zipWithM_, to avoid the need for return ().</p>
<p>Oh and slightly better name, in v x, v i would make in clear it is some kind of indexing, and using x, y, z instead of v1, v2, v3, make it clear these are 3d coord.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alejandro Segovia</title>
		<link>http://twoguysarguing.wordpress.com/2010/02/20/opengl-and-haskell/#comment-158</link>
		<dc:creator><![CDATA[Alejandro Segovia]]></dc:creator>
		<pubDate>Mon, 22 Feb 2010 05:23:06 +0000</pubDate>
		<guid isPermaLink="false">http://twoguysarguing.wordpress.com/?p=617#comment-158</guid>
		<description><![CDATA[Ever since I learned Haskell could use OpenGL, I&#039;ve been wondering how this could actually be achieved. This is a great example, showing how to marry Haskell to OpenGL. Thanks!

Alejandro.-]]></description>
		<content:encoded><![CDATA[<p>Ever since I learned Haskell could use OpenGL, I&#8217;ve been wondering how this could actually be achieved. This is a great example, showing how to marry Haskell to OpenGL. Thanks!</p>
<p>Alejandro.-</p>
]]></content:encoded>
	</item>
</channel>
</rss>
