<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for Freshmaking!</title>
	<link>http://www.transcendentaxis.com/dthompson/blog</link>
	<description>Delving into the Development of a Developing Developer - C++, Actionscript, C#, Lisp, Objective Caml, and whatever else</description>
	<pubDate>Thu, 04 Dec 2008 18:36:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>Comment on Partial Application in Actionscript 3.0 by Alan</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-281</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Sun, 08 Jun 2008 16:06:12 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-281</guid>
		<description>Great stuff! I'll be back for more.....</description>
		<content:encoded><![CDATA[<p>Great stuff! I&#8217;ll be back for more&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Partial Application in Actionscript 3.0 by Douglas Thompson</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-162</link>
		<dc:creator>Douglas Thompson</dc:creator>
		<pubDate>Wed, 14 May 2008 01:36:09 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-162</guid>
		<description>Holy hell Mike, you're absolutely right!  Ten lines of code and I still managed to screw it up...

Thanks a ton.  No blog or site to plug?  C'mon, we need more guys like you to help out chumps like me :)</description>
		<content:encoded><![CDATA[<p>Holy hell Mike, you&#8217;re absolutely right!  Ten lines of code and I still managed to screw it up&#8230;</p>
<p>Thanks a ton.  No blog or site to plug?  C&#8217;mon, we need more guys like you to help out chumps like me <img src='http://www.transcendentaxis.com/dthompson/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Partial Application in Actionscript 3.0 by Mike Spiz</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-161</link>
		<dc:creator>Mike Spiz</dc:creator>
		<pubDate>Wed, 14 May 2008 00:49:47 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-161</guid>
		<description>I don't think that the partial_apply will work as written if you call the curried function more than once. partial_arguments is part of the closure, so on the second call, you will concatenate more arguments to the existing ones from the last call and break. 
If you one-line it like so:
return f.apply(null, partial_arguments.concat(arguments));
you can avoid that problem. Nested currying still won't work though.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think that the partial_apply will work as written if you call the curried function more than once. partial_arguments is part of the closure, so on the second call, you will concatenate more arguments to the existing ones from the last call and break.<br />
If you one-line it like so:<br />
return f.apply(null, partial_arguments.concat(arguments));<br />
you can avoid that problem. Nested currying still won&#8217;t work though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Partial Application in Actionscript 3.0 by Douglas Thompson</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-149</link>
		<dc:creator>Douglas Thompson</dc:creator>
		<pubDate>Sat, 10 May 2008 11:26:36 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-149</guid>
		<description>James - Hey, at least you've dabbled with it in class--my entire CS curriculum basically stuck functional programming onto the end somewhere in a "oh, there's that too" sort of fashion.  Anyway, the posts here help me get through some of my uglier hangovers, believe it or not :p  Some of them are forum posts, others (like this one) are me just figuring crap out and posting it for "verification" by the public, heh.

Austin - Ahh yeah I guess I hadn't explicitly reasoned through the application stuff being left-associative.  I think that makes it much more clear.  Your explanation is proably a hell of a lot better than mine.  I tend to say in a page what can be said in a sentence.

Rez - Yeah, reading about Javascript's functional-abilities is what prompted me to try this stuff out in AS3.  C and C++ in particular allow you to have pointers to functions.  They can be REALLY useful, but still tend to be pretty limited compared to these modern day languages which treat functions as "first class citizens".  As well, there's support for 'variadic functions' in those languages, kind of like the 'rest' operator in AS3.  In C++, in particular, these variadic functions are considered really bad form because of the lack of type safety, amoung other things--they're a massive haven for runtime issues.  In AS3, a runtime error nets you an accurate explanation and a line number of where it occurred.  In C/C++, a runtime error nets you nightmares for the next ten years.</description>
		<content:encoded><![CDATA[<p>James - Hey, at least you&#8217;ve dabbled with it in class&#8211;my entire CS curriculum basically stuck functional programming onto the end somewhere in a &#8220;oh, there&#8217;s that too&#8221; sort of fashion.  Anyway, the posts here help me get through some of my uglier hangovers, believe it or not :p  Some of them are forum posts, others (like this one) are me just figuring crap out and posting it for &#8220;verification&#8221; by the public, heh.</p>
<p>Austin - Ahh yeah I guess I hadn&#8217;t explicitly reasoned through the application stuff being left-associative.  I think that makes it much more clear.  Your explanation is proably a hell of a lot better than mine.  I tend to say in a page what can be said in a sentence.</p>
<p>Rez - Yeah, reading about Javascript&#8217;s functional-abilities is what prompted me to try this stuff out in AS3.  C and C++ in particular allow you to have pointers to functions.  They can be REALLY useful, but still tend to be pretty limited compared to these modern day languages which treat functions as &#8220;first class citizens&#8221;.  As well, there&#8217;s support for &#8216;variadic functions&#8217; in those languages, kind of like the &#8216;rest&#8217; operator in AS3.  In C++, in particular, these variadic functions are considered really bad form because of the lack of type safety, amoung other things&#8211;they&#8217;re a massive haven for runtime issues.  In AS3, a runtime error nets you an accurate explanation and a line number of where it occurred.  In C/C++, a runtime error nets you nightmares for the next ten years.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Base 2 Fraction Fiasco by Rezmason</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/17#comment-148</link>
		<dc:creator>Rezmason</dc:creator>
		<pubDate>Sat, 10 May 2008 04:36:29 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/17#comment-148</guid>
		<description>For situations requiring perfect accuracy, we can create a Fraction class, with a _numerator:uint and a _denominator:uint, with getters for the numerator:uint, denominator:uint and approximateValue:Number. The numerator(value:uint) and denominator(value:uint) setters would call a private function reduce() that would reduce the fraction. A small pile of overloaded operators would be handy, but ultimately unnecessary. 

The Fraction class could be subclassed to a ComplexNumber representation without much trouble. These classes would give the most accurate floating point estimates of their numerical values. Taking this to the extreme, however, and allowing the introduction of irrational constants would require a means of representing things like "π^2+3*e÷4" as an associated cluster of numerical objects, whose reduce() methods would be monstrous, at which point any programmer would say, "Forget it, let's use floating point."</description>
		<content:encoded><![CDATA[<p>For situations requiring perfect accuracy, we can create a Fraction class, with a _numerator:uint and a _denominator:uint, with getters for the numerator:uint, denominator:uint and approximateValue:Number. The numerator(value:uint) and denominator(value:uint) setters would call a private function reduce() that would reduce the fraction. A small pile of overloaded operators would be handy, but ultimately unnecessary. </p>
<p>The Fraction class could be subclassed to a ComplexNumber representation without much trouble. These classes would give the most accurate floating point estimates of their numerical values. Taking this to the extreme, however, and allowing the introduction of irrational constants would require a means of representing things like &#8220;π^2+3*e÷4&#8243; as an associated cluster of numerical objects, whose reduce() methods would be monstrous, at which point any programmer would say, &#8220;Forget it, let&#8217;s use floating point.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Implicit Conversion and Performance in Actionscript 3.0 by Rezmason</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/10#comment-147</link>
		<dc:creator>Rezmason</dc:creator>
		<pubDate>Sat, 10 May 2008 04:21:15 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/10#comment-147</guid>
		<description>Geez, without resorting to ABCDumping all my complex AS3, isn't there some way of avoiding conversions in a statement by just looking at it? If it came down to it, I'd rather leave ABCDump on the shelf.

I think that hesitation, by the way, is largely due to Flash developers' tendency to stick with graphical development environments whenever possible. ABCDump runs in a shell, right? That can be intimidating.</description>
		<content:encoded><![CDATA[<p>Geez, without resorting to ABCDumping all my complex AS3, isn&#8217;t there some way of avoiding conversions in a statement by just looking at it? If it came down to it, I&#8217;d rather leave ABCDump on the shelf.</p>
<p>I think that hesitation, by the way, is largely due to Flash developers&#8217; tendency to stick with graphical development environments whenever possible. ABCDump runs in a shell, right? That can be intimidating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Closures in Actionscript 3.0 by Rezmason</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/19#comment-146</link>
		<dc:creator>Rezmason</dc:creator>
		<pubDate>Sat, 10 May 2008 04:13:21 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/19#comment-146</guid>
		<description>The persistence of foo through its reference to (from?) bar in the first code example is a very astute observation, as is the persistence of count in the second example.

However, what's really astonishing is this idea of chaining variables to an event handler. This gives us the power to associate new variables with objects, essentially giving those objects new properties and functions (accessible via the closure) without bothering to redefine them (by subclassing them, for instance). It is in some sense a powerful form of composition.</description>
		<content:encoded><![CDATA[<p>The persistence of foo through its reference to (from?) bar in the first code example is a very astute observation, as is the persistence of count in the second example.</p>
<p>However, what&#8217;s really astonishing is this idea of chaining variables to an event handler. This gives us the power to associate new variables with objects, essentially giving those objects new properties and functions (accessible via the closure) without bothering to redefine them (by subclassing them, for instance). It is in some sense a powerful form of composition.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Partial Application in Actionscript 3.0 by Rezmason</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-145</link>
		<dc:creator>Rezmason</dc:creator>
		<pubDate>Sat, 10 May 2008 03:53:50 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-145</guid>
		<description>Neat stuff! None of this would be possible if AS3 weren't so freaking awesome. How many other C-style languages let you treat functions like variables and arguments like arrays? Booyah.</description>
		<content:encoded><![CDATA[<p>Neat stuff! None of this would be possible if AS3 weren&#8217;t so freaking awesome. How many other C-style languages let you treat functions like variables and arguments like arrays? Booyah.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Partial Application in Actionscript 3.0 by Austin Seipp</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-54</link>
		<dc:creator>Austin Seipp</dc:creator>
		<pubDate>Sat, 26 Apr 2008 00:59:25 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/20#comment-54</guid>
		<description>I think on the notion of currying it's a lot more simple to specify it in terms of the actual LC syntax.

All lambda calculus functions (in the simple lambda calculus, of course) only take one argument, ever. For the identity which just gives you back whatever you use, you can define it as so:

(\x. x)

When applied to any argument, this just returns the argument.
How do we get functions that take multiple arguments? Return other functions!

This takes two parameters:

(\x. (\y. y x))

So we can apply it to two parameters and it will apply y to x. It's worth noting this works because of the associativity of function application in a functional language, that is:

f x y

Is actually

(f x) y

Since function application is left-associative. Also, types are right associative, so the type

Int -&#62; Int -&#62; Int -&#62; Int

Is actually

Int -&#62; (Int -&#62; (Int -&#62; Int))

The reason types are right-associative is really because of currying.

I think when you explain it this way, partial-application and currying make a bit more sense and may make things a bit more lucid without complicating it too much. Your explanation is perfectly valid, however.</description>
		<content:encoded><![CDATA[<p>I think on the notion of currying it&#8217;s a lot more simple to specify it in terms of the actual LC syntax.</p>
<p>All lambda calculus functions (in the simple lambda calculus, of course) only take one argument, ever. For the identity which just gives you back whatever you use, you can define it as so:</p>
<p>(\x. x)</p>
<p>When applied to any argument, this just returns the argument.<br />
How do we get functions that take multiple arguments? Return other functions!</p>
<p>This takes two parameters:</p>
<p>(\x. (\y. y x))</p>
<p>So we can apply it to two parameters and it will apply y to x. It&#8217;s worth noting this works because of the associativity of function application in a functional language, that is:</p>
<p>f x y</p>
<p>Is actually</p>
<p>(f x) y</p>
<p>Since function application is left-associative. Also, types are right associative, so the type</p>
<p>Int -&gt; Int -&gt; Int -&gt; Int</p>
<p>Is actually</p>
<p>Int -&gt; (Int -&gt; (Int -&gt; Int))</p>
<p>The reason types are right-associative is really because of currying.</p>
<p>I think when you explain it this way, partial-application and currying make a bit more sense and may make things a bit more lucid without complicating it too much. Your explanation is perfectly valid, however.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fast Fourier Transform Overview and Really Rough Beat Detection by Douglas Thompson</title>
		<link>http://www.transcendentaxis.com/dthompson/blog/archives/14#comment-48</link>
		<dc:creator>Douglas Thompson</dc:creator>
		<pubDate>Fri, 25 Apr 2008 04:00:31 +0000</pubDate>
		<guid>http://www.transcendentaxis.com/dthompson/blog/archives/14#comment-48</guid>
		<description>James - Nice game!  I'm always impressed with how good your art is alongside your ability to program the stuff.  Anyway, I agree with the hand-tuning of the notes.  Even if you could perfectly isolate the sounds you wanted to, it'd probably be difficult to 'automate' difficulty levels, etc.  And in the end, coming up with a perfect instrument recognition algorithm would likely take way more time than just doing it by hand anyway.

Zack - Should be fixed now... I had changed the capitialization on one of my directories and didn't go around updating links.  Unfortunately the example is REALLY REALLY BAD.  I had just suggested the FFT to a guy who asked about beat detection on Newgrounds, and someone else basically said "No that's dumb and useless" and I just couldn't let it slide, so I made a quick demo in an hour or two.  THEN when I threw this blog up, I decided to slap up a bunch of posts I'd made on Newgrounds as 'filler' until I got around to updating regularly (which I haven't yet and probably never will).  Pretty good story, huh?  At any rate, this is one of the articles I like seeing the least, just because the results were so bad--just good enough to prove my point to some douchebag on a Flash forum who probably never read the post anyway, but not much else.  The link I gave at the end of the article is a more serious attempt by someone else.

Also, sorry about the weird spacing in the code--it shows up aligned properly in my IDE.  I know it never translates anywhere else properly, but I've been too lazy to fix it, heh.  Like I said, filler!</description>
		<content:encoded><![CDATA[<p>James - Nice game!  I&#8217;m always impressed with how good your art is alongside your ability to program the stuff.  Anyway, I agree with the hand-tuning of the notes.  Even if you could perfectly isolate the sounds you wanted to, it&#8217;d probably be difficult to &#8216;automate&#8217; difficulty levels, etc.  And in the end, coming up with a perfect instrument recognition algorithm would likely take way more time than just doing it by hand anyway.</p>
<p>Zack - Should be fixed now&#8230; I had changed the capitialization on one of my directories and didn&#8217;t go around updating links.  Unfortunately the example is REALLY REALLY BAD.  I had just suggested the FFT to a guy who asked about beat detection on Newgrounds, and someone else basically said &#8220;No that&#8217;s dumb and useless&#8221; and I just couldn&#8217;t let it slide, so I made a quick demo in an hour or two.  THEN when I threw this blog up, I decided to slap up a bunch of posts I&#8217;d made on Newgrounds as &#8216;filler&#8217; until I got around to updating regularly (which I haven&#8217;t yet and probably never will).  Pretty good story, huh?  At any rate, this is one of the articles I like seeing the least, just because the results were so bad&#8211;just good enough to prove my point to some douchebag on a Flash forum who probably never read the post anyway, but not much else.  The link I gave at the end of the article is a more serious attempt by someone else.</p>
<p>Also, sorry about the weird spacing in the code&#8211;it shows up aligned properly in my IDE.  I know it never translates anywhere else properly, but I&#8217;ve been too lazy to fix it, heh.  Like I said, filler!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
