<?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: Interpreter, redux</title>
	<atom:link href="http://4.flowsnake.org/archives/283/feed" rel="self" type="application/rss+xml" />
	<link>http://4.flowsnake.org/archives/283</link>
	<description>A Pythoneer's adventures with Scheme, Clojure and a whole lot more. ^_^</description>
	<lastBuildDate>Sat, 22 May 2010 22:09:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Hans Nowak</title>
		<link>http://4.flowsnake.org/archives/283/comment-page-1#comment-414</link>
		<dc:creator>Hans Nowak</dc:creator>
		<pubDate>Tue, 23 Dec 2008 16:51:30 +0000</pubDate>
		<guid isPermaLink="false">http://4.flowsnake.org/?p=283#comment-414</guid>
		<description>Sounds like an idea worth trying.</description>
		<content:encoded><![CDATA[<p>Sounds like an idea worth trying.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juri Pakaste</title>
		<link>http://4.flowsnake.org/archives/283/comment-page-1#comment-409</link>
		<dc:creator>Juri Pakaste</dc:creator>
		<pubDate>Mon, 22 Dec 2008 09:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://4.flowsnake.org/?p=283#comment-409</guid>
		<description>I&#039;m not really an OCaml expert either, just dabble in it occasionally. Given that it doesn&#039;t really have any introspection facilities to speak of, I guess going meta like that is not going to happen.

However, one thing that does come to mind is that there&#039;s a limited number of stack effects you need to support - maybe create higher order functions like one_two (for dup), two_two (for swap), etc, that would take a function as a parameter and return a function that takes in the env and ns parameters, pop the correct number of items, give them as args to the function received as a parameter, then push the return values?

Then you could do calls like:

let dup = one_two (fun a -&gt; a, a);;</description>
		<content:encoded><![CDATA[<p>I&#8217;m not really an OCaml expert either, just dabble in it occasionally. Given that it doesn&#8217;t really have any introspection facilities to speak of, I guess going meta like that is not going to happen.</p>
<p>However, one thing that does come to mind is that there&#8217;s a limited number of stack effects you need to support &#8211; maybe create higher order functions like one_two (for dup), two_two (for swap), etc, that would take a function as a parameter and return a function that takes in the env and ns parameters, pop the correct number of items, give them as args to the function received as a parameter, then push the return values?</p>
<p>Then you could do calls like:</p>
<p>let dup = one_two (fun a -&gt; a, a);;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
