<?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>David&#039;s Ramblings &#187; David</title>
	<atom:link href="http://david.davidandpenelope.com/author/david/feed/" rel="self" type="application/rss+xml" />
	<link>http://david.davidandpenelope.com</link>
	<description>Thoughts on programming languages, interesting blurbs that I read, things I learn in school, and details about stuff I&#039;m working on.</description>
	<lastBuildDate>Mon, 30 May 2011 16:55:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Earley Parser</title>
		<link>http://david.davidandpenelope.com/2011/05/30/earley-parser/</link>
		<comments>http://david.davidandpenelope.com/2011/05/30/earley-parser/#comments</comments>
		<pubDate>Mon, 30 May 2011 16:55:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2011/05/30/earley-parser/</guid>
		<description><![CDATA[This is the first post in what will hopefully be a series about how to build an Earley parser. I&#39;ve been struggling to hammer the grammar for a language I&#39;m working on into a form suitable for use with a PEG (parsing expression grammar) parser. Over the past two weekends I was even trying to [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>This is the first post in what will hopefully be a series about how to build an Earley parser. I&#39;ve been struggling to hammer the grammar for a language I&#39;m working on into a form suitable for use with a PEG (parsing expression grammar) parser. Over the past two weekends I was even trying to add support for handling left-recursive grammar rules into Citrus (a PEG parser), but as it turns out, the currently known methods for enabling left-recursion are not powerful enough to recognize all forms of left-recursive grammars. I officially gave up trying to use a PEG parser for my grammar, it simply isn&#39;t flexible enough. I&#39;ve decided to go whole hog, and start trying to implement a parsing method that I know is flexible enough to recognize the entire class of context free grammars; the Earley parsing algorithm will do just that.
<p />
<div>If you start looking for resources online that explain how the Earley&#39;s algorithm works, you quickly find that there isn&#39;t much practically useful information available for free. I found that to be the case when I was investigating whether to use Earley&#39;s algorithm or a similarly powerful parsing technique called SGLR parsing. The papers explaining these parsing techniques are all written by professors and researchers whose sole purpose in life is to get published. As a result, they submit their papers to publishers who then agree to include them into their publication but require the author to assign all distribution rights to the publisher. The publisher is then the only one who can publish the paper, and they do so, for $30 per paper! Don&#39;t even get me started&#8230; In any case, all the good papers about SGLR are behind pay-walls.</div>
<p />
<div>Papers about Earley&#39;s algorithm are a little more accessible, but the really nice thing about Earley&#39;s algorithm is that it is covered in detail in a book called <a href="http://www.nlp.org.cn/docs/20030724/resource/ParsingTechs_A_Practical_Guide.pdf">Parsing Techniques: a practical guide</a>. I will be building my parser based on the book&#39;s description of Earley&#39;s algorithm. Another really nice thing about Earley&#39;s algorithm is that it&#39;s supposed to be easier to implement than an SGLR parser. We&#39;ll see.</div>
<p />
<div>If you&#39;re interested, section 7.2 of the first edition of Parsing Techniques: a practical guide is where Earley parsers are covered.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2011/05/30/earley-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trading Simulation Language</title>
		<link>http://david.davidandpenelope.com/2011/04/30/trading-simulation-language/</link>
		<comments>http://david.davidandpenelope.com/2011/04/30/trading-simulation-language/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 18:05:40 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2011/04/30/trading-simulation-language/</guid>
		<description><![CDATA[In designing my simple trading simulation language, I&#8217;ve been reading up on Haskell a lot lately. For the same reasons that Rich Hickey documents on the Clojure state and identity page, I like the idea of making a simple functional language. I&#8217;ve heard that programs written in functional languages are easier to reason about, and [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>In designing my simple trading simulation language, I&#8217;ve been reading up on Haskell a lot lately. For the same reasons that Rich Hickey documents on the <a href="http://clojure.org/state">Clojure state and identity page</a>, I like the idea of making a simple functional language. I&#8217;ve heard that programs written in functional languages are easier to reason about, and I think that that property makes functional code more intuitive to the reader.</p>
<p>My idea is to translate programs written in my simple language into Clojure (compile to Clojure) similarly to how some high level languages translate to C or C++ (e.g. SequenceL). Clojure is expressive enough to represent all of the constructs in my simple language.</p>
<p>One idea I&#8217;m stealing from Haskell is to allow functions of two arguments be called using infix notation. For example, given the following definition of the function elementOf? :</p>
<p>elementOf?(e, sequence) = any?(sequence, (item){ e == item } )</p>
<p>elementOf? can be invoked using either of the following notations:</p>
<p>1. elementOf?(1, [1,2,3])<br />2. 1 elementOf? [1,2,3]</p>
<p>Both invocations will return true.</p>
<p>One cool thing that Haskell and Erlang both support is pattern matching or destructuring. I&#8217;m not planning on implementing destructuring anytime soon. Clojure supports destructuring in let bindings, and it has come in handy every one in a while, but it&#8217;s not a must have in my language.</p>
<p>Hopefully, people without a CS background will be able to use my language. That&#8217;s the idea.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2011/04/30/trading-simulation-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parsing and Compilers</title>
		<link>http://david.davidandpenelope.com/2010/12/12/parsing-and-compilers/</link>
		<comments>http://david.davidandpenelope.com/2010/12/12/parsing-and-compilers/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 20:39:19 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2010/12/12/parsing-and-compilers/</guid>
		<description><![CDATA[Compilers are a topic in which the phrase &#34;here be dragons&#34; is implied. The classic definitive text on compilers is known as the Dragon Book. I wonder if that was intended.]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>Compilers are a topic in which the phrase &quot;here be dragons&quot; is implied. The classic definitive text on compilers is known as the Dragon Book. I wonder if that was intended.</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/12/12/parsing-and-compilers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Language Project</title>
		<link>http://david.davidandpenelope.com/2010/12/11/language-project/</link>
		<comments>http://david.davidandpenelope.com/2010/12/11/language-project/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 21:08:52 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2010/12/11/language-project/</guid>
		<description><![CDATA[So, I&#39;ve decided I&#39;m going to build a simple domain specific language (DSL) for running trading simulations and for stock screening. My former advisor Dr. Rushton told me that he favors general purpose programming languages over DSLs, but I think I can build a DSL that is easy to use while still being very expressive. [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>So, I&#39;ve decided I&#39;m going to build a simple domain specific language (DSL) for running trading simulations and for stock screening. My former advisor <a href="http://www.cs.ttu.edu/~rushton/">Dr. Rushton</a> told me that he favors general purpose programming languages over DSLs, but I think I can build a DSL that is easy to use while still being very expressive. I began trying to use one of the many PEG parser generators/combinators, but I found out quickly that PEG grammars, like LL grammars, must avoid left-recursive grammar productions. I want to be able to write whatever grammar rule is intuitive for me to write, and avoiding left recursion is not intuitive for me. I recently found out about <a href="http://en.wikipedia.org/wiki/GLR_parser">generalized LR parsers</a> (GLRs) and wanted to implement one, then I read about scannerless GLRs (SGLRs), but there isn&#39;t as much information about those as there is about GLRs. I also wanted a simple parser generator/combinator, and I wanted both a Ruby and Javascript implementation. So, I started thinking about how to build a simple bottom up parser, and I have an idea for how to implement one. I believe I can use regular expressions to build all possible parse trees of a given input sentence (i.e. a parse forrest). In the case that more than one parse tree exists for a given sentence, you must have a way to identify which of the parse trees is the &quot;correct&quot; parse tree. In other words, you need a way to prune all parse trees except one from the parse tree forrest. I think I can prune the parse forrest down to one &quot;correct&quot; parse tree as long as the ambiguous grammar rules are assigned a precedence &quot;rank&quot; and as long as rules that have a right-hand-side containing more than one non-terminal indicate which should be parsed first (i.e. some kind of associativity precedence). I&#39;ll keep you posted on the details. I&#39;ll put the parser up on <a href="http://github.com">github.com</a> as soon as I have something to show.</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/12/11/language-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad code isn’t Technical Debt, it’s an unhedged Call Option &#124; Steve Freeman</title>
		<link>http://david.davidandpenelope.com/2010/11/21/bad-code-isn%e2%80%99t-technical-debt-it%e2%80%99s-an-unhedged-call-option-steve-freeman/</link>
		<comments>http://david.davidandpenelope.com/2010/11/21/bad-code-isn%e2%80%99t-technical-debt-it%e2%80%99s-an-unhedged-call-option-steve-freeman/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 03:00:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2010/11/21/bad-code-isn%e2%80%99t-technical-debt-it%e2%80%99s-an-unhedged-call-option-steve-freeman/</guid>
		<description><![CDATA[1) There is an apocryphal story about a trader buying chocolate santa futures and forgetting to sell them on. Eventually a truckload turned up at the Wall Street headquarters. via m3p.co.uk The article is actually about bad code being characterized as a naked call (a call that you sell without already owning the underlying security) [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<div class="posterous_bookmarklet_entry">
<blockquote class="posterous_short_quote">1) There is an apocryphal story about a trader buying chocolate santa futures and forgetting to sell them on. Eventually a truckload turned up at the Wall Street headquarters.</p></blockquote>
<div class="posterous_quote_citation">via <a href="http://www.m3p.co.uk/blog/2010/07/23/bad-code-isnt-technical-debt-its-an-unhedged-call-option/">m3p.co.uk</a></div>
<p>The article is actually about bad code being characterized as a naked call (a call that you sell without already owning the underlying security) as opposed to &#8220;technical debt&#8221;, but I mostly liked the story at the end.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/11/21/bad-code-isn%e2%80%99t-technical-debt-it%e2%80%99s-an-unhedged-call-option-steve-freeman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colony (4th weekend)</title>
		<link>http://david.davidandpenelope.com/2010/10/30/colony-4th-weekend/</link>
		<comments>http://david.davidandpenelope.com/2010/10/30/colony-4th-weekend/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 19:01:28 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/?p=632117712</guid>
		<description><![CDATA[Finally, a working library, sample script and all! I&#8217;m thinking I&#8217;ll pull out two sub-libraries so I can use them in other projects. I had to build a small redis model library and also a module template library. The redis model library is a simplistic (read: not ActiveRecord) ORM library that is useful for building [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, a working library, sample script and all! I&#8217;m thinking I&#8217;ll pull out two sub-libraries so I can use them in other projects. I had to build a small redis model library and also a module template library.</p>
<p>The redis model library is a simplistic (read: not ActiveRecord) ORM library that is useful for building Redis-backed model classes.</p>
<p>The module template library allows you to create parameterized modules. This makes Ruby meta-programming much more structured and easy to understand.</p>
<p>You can check out colony at <a href="http://github.com/davidkellis/colony">http://github.com/davidkellis/colony</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/10/30/colony-4th-weekend/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How AT&amp;T gives the middle finger to its departing &#8220;Valued Customers&#8221;</title>
		<link>http://david.davidandpenelope.com/2010/10/29/how-att-gives-the-middle-finger-to-its-departing-valued-customers/</link>
		<comments>http://david.davidandpenelope.com/2010/10/29/how-att-gives-the-middle-finger-to-its-departing-valued-customers/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 17:34:01 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2010/10/29/how-att-gives-the-middle-finger-to-its-departing-valued-customers/</guid>
		<description><![CDATA[Here&#8217;s the exchange I just had with AT&#38;T: me: Hi, I&#8217;d like to cancel my AT&#38;T mobile account. ATT: Sure, I&#8217;ll be happy to help you with that. Now, since your contract is not up, an early termination fee will apply. me: Yeah, I&#8217;d like to avoid the termination fee. My contract expires on November [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Here&#8217;s the exchange I just had with AT&amp;T:</p>
<p>me: Hi, I&#8217;d like to cancel my AT&amp;T mobile account.</p>
<p>ATT: Sure, I&#8217;ll be happy to help you with that. Now, since your contract is not up, an early termination fee will apply.</p>
<p>me: Yeah, I&#8217;d like to avoid the termination fee. My contract expires on November 1st, can I schedule the account cancellation date for November 2nd, so I don&#8217;t have to pay the $175 early termination fee?</p>
<p>&nbsp;</p>
<p>ATT: Sure, we can cancel then. You can cancel your account anytime. Do you want to cancel on the last day of your billing cycle?</p>
<p>me: No, my billing cycle just ended on Oct. 23rd, and the new billing cycle just began a few days ago. I&#8217;d like to cancel my account on November 2nd, since my contract ends on November 1st. Can I can cancel on the 2nd and just be charged a pro-rated amount for the week or so of service that I&#8217;ll use?</p>
<p>ATT: I&#8217;m sorry, we don&#8217;t pro-rate the final bill.</p>
<p>me: So you&#8217;re going to charge me for a full month of service for only one week of use, even though my account would be cancelled on the 2nd?</p>
<p>ATT: Um, yes.</p>
<p>&#8230;</p>
<p>The conversation ended with me explaining that I was not expecting to be charged for a full month of service for one week of use and that I&#8217;d call back once I had decided on a cancellation date.</p>
<p>The real kicker is that one of the last things the lady I was talking with told me was &#8220;&#8230; and, Mr. Ellis, you are a valued customer, and you will have 45 days (I don&#8217;t remember the exact number) to re-open your account if the other carrier doesn&#8217;t work out.&#8221;</p>
<p>Gee, thanks.</p>
<p><strong>The essence of this conversation is:</strong></p>
<p>me: I&#8217;d like to cancel my account.</p>
<p>ATT: Sure, we&#8217;d be happy to do that, you !*%&amp;^!%!, I mean, valued customer. By the way, we&#8217;ll be charging you for service that you won&#8217;t be receiving. Thank you and have a nice day.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/10/29/how-att-gives-the-middle-finger-to-its-departing-valued-customers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Colony (2nd weekend)</title>
		<link>http://david.davidandpenelope.com/2010/10/15/colony-2nd-weekend/</link>
		<comments>http://david.davidandpenelope.com/2010/10/15/colony-2nd-weekend/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 03:08:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/?p=632117709</guid>
		<description><![CDATA[I finally have a functioning prototype. It&#8217;s incomplete, but I&#8217;m checking in what I&#8217;ve got. You can enqueue simple tasks and have them run on a distributed work queue. Once a task is queued, the client can either poll for the computed result, or it can block until the result is available. Now I&#8217;m going [...]]]></description>
			<content:encoded><![CDATA[<p>I finally have a functioning prototype. It&#8217;s incomplete, but I&#8217;m checking in what I&#8217;ve got.</p>
<p>You can enqueue simple tasks and have them run on a distributed work queue. Once a task is queued, the client can either poll for the computed result, or it can block until the result is available.</p>
<p>Now I&#8217;m going to add in the functionality that allows completed tasks to call a callback function once the task is complete.</p>
<p>If you&#8217;re interested, check out <a href="http://github.com/davidkellis/colony">http://github.com/davidkellis/colony</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/10/15/colony-2nd-weekend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colony</title>
		<link>http://david.davidandpenelope.com/2010/10/09/colony/</link>
		<comments>http://david.davidandpenelope.com/2010/10/09/colony/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 18:38:17 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2010/10/09/colony/</guid>
		<description><![CDATA[Today I&#8217;m going to try to start and finish a rough version 1 of a distributed task system that I&#8217;ve been thinking about for a while. It&#8217;s going to be in Ruby. Keep me accountable; ask me how close I am to finishing it here in a few hours. The git repo is at&#160;http://github.com/davidkellis/colony. Ok, [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Today I&#8217;m going to try to start and finish a rough version 1 of a distributed task system that I&#8217;ve been thinking about for a while. It&#8217;s going to be in Ruby. Keep me accountable; ask me how close I am to finishing it here in a few hours.</p>
<p>The git repo is at&nbsp;<a href="http://github.com/davidkellis/colony">http://github.com/davidkellis/colony</a>.</p>
<p>Ok, time to get started&#8230;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/10/09/colony/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Extensible Business Reporting Language (XBRL) 2.1</title>
		<link>http://david.davidandpenelope.com/2010/09/19/extensible-business-reporting-language-xbrl-2-1/</link>
		<comments>http://david.davidandpenelope.com/2010/09/19/extensible-business-reporting-language-xbrl-2-1/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 02:34:58 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://david.davidandpenelope.com/2010/09/19/extensible-business-reporting-language-xbrl-2-1/</guid>
		<description><![CDATA[Taxonomy schemas in the DTS are those: 1.&#160;&#160;&#160;&#160;&#160; referenced directly from an XBRL instance using the schemaRef, roleRef, arcroleRef or linkbaseRef element. via xbrl.org This seems contradictory to me. The spec says that linkbaseRef elements can refer to Taxonomy schemas, but later the spec says that the purpose of linkbaseRef elements is to reference linkbase [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<div class="posterous_bookmarklet_entry">
<blockquote class="posterous_long_quote">
<p class="MsoBodyText" style="margin-left: 36.0pt;"><span>Taxonomy  schemas in the DTS are those:</span></p>
<p class="MsoBodyText" style=""><span>1.<span style="font: 7.0pt Times New Roman;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span></span><span>referenced directly from an XBRL instance using  the </span><span class="CODE"><span>schemaRef</span></span><span>, </span><span class="CODE"><span>roleRef, arcroleRef</span></span><span> or </span><span class="CODE"><span>linkbaseRef</span></span><span> element.</span></p>
</blockquote>
<div class="posterous_quote_citation">via <a href="http://www.xbrl.org/Specification/XBRL-RECOMMENDATION-2003-12-31+Corrected-Errata-2008-07-02.htm#_3.2">xbrl.org</a></div>
<p>This seems contradictory to me. The spec says that linkbaseRef elements can refer to Taxonomy schemas, but later the spec says that the purpose of linkbaseRef elements is to reference linkbase documents, not Taxonomy schemas.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://david.davidandpenelope.com/2010/09/19/extensible-business-reporting-language-xbrl-2-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

