<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pivotal Labs &#187; languages</title>
	<atom:link href="http://pivotallabs.com/tag/languages/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Sat, 18 May 2013 23:45:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Term rewriting. It looks to be powerful!</title>
		<link>http://pivotallabs.com/term-rewriting-it-looks-to-be-powerful/</link>
		<comments>http://pivotallabs.com/term-rewriting-it-looks-to-be-powerful/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 02:58:00 +0000</pubDate>
		<dc:creator>Pivotal Labs</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[languages]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/term-rewriting-it-looks-to-be-powerful/</guid>
		<description><![CDATA[<p><p>This weekend I discovered the Q language. Check this out: Into a file called <code>sq.q</code> I type:</p>

<pre><code>sq X = X * X;
X+&#40;Y+Z&#41; = &#40;X+Y&#41;+Z; X*&#40;Y*Z&#41; = &#40;X*Y&#41;*Z;
X*&#40;Y+Z&#41; = X*Y+X*Z; &#40;X+Y&#41;*Z = X*Z+Y*Z;
</code></pre>

<p>This is the definition of square, followed by the laws for distributivity and associativity as they could be copied directly out of a textbook. Then I evaluate this file in the Q VM-based interpreter, whose speed apparently rivals that of the Glasgow Haskell Compiler or CLISP:</p>

<pre><code>q sq.q
</code></pre>

<p>In the interepretter window I then type a <em>term</em>, and using my rules Q reduces it to <em>normal form</em>:</p>

<pre><code>==&#62; sq &#40;A+B&#41;
A*A+B*A+A*B+B*B
</code></pre>

<p>I am pretty sure this language is going to unleash an unreal amount of metaprogramming power. Term rewriting is a genius idea.</p> <a href="http://pivotallabs.com/term-rewriting-it-looks-to-be-powerful/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/term-rewriting-it-looks-to-be-powerful/">Term rewriting. It looks to be powerful!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This weekend I discovered the Q language. Check this out: Into a file called <code>sq.q</code> I type:</p>
<pre><code>sq X = X * X;
X+&#40;Y+Z&#41; = &#40;X+Y&#41;+Z; X*&#40;Y*Z&#41; = &#40;X*Y&#41;*Z;
X*&#40;Y+Z&#41; = X*Y+X*Z; &#40;X+Y&#41;*Z = X*Z+Y*Z;
</code></pre>
<p>This is the definition of square, followed by the laws for distributivity and associativity as they could be copied directly out of a textbook. Then I evaluate this file in the Q VM-based interpreter, whose speed apparently rivals that of the Glasgow Haskell Compiler or CLISP:</p>
<pre><code>q sq.q
</code></pre>
<p>In the interepretter window I then type a <em>term</em>, and using my rules Q reduces it to <em>normal form</em>:</p>
<pre><code>==&gt; sq &#40;A+B&#41;
A*A+B*A+A*B+B*B
</code></pre>
<p>I am pretty sure this language is going to unleash an unreal amount of metaprogramming power. Term rewriting is a genius idea.</p>
<p>The post <a href="http://pivotallabs.com/term-rewriting-it-looks-to-be-powerful/">Term rewriting. It looks to be powerful!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/term-rewriting-it-looks-to-be-powerful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching 1/8 queries in 0.011 seconds using apc
Object Caching 399/406 objects using apc

 Served from: pivotallabs.com @ 2013-05-19 03:04:49 by W3 Total Cache -->