<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>I/O Reader</title>
	<link>http://ioreader.com/feed</link>
	<description>Peter Goodman's blog about computer programming.</description>
	<pubDate>Thu, 18 Jun 2009 19:57:54 GMT</pubDate>
	<language>en</language>
		<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/flyingwithfire" type="application/rss+xml" /><feedburner:emailServiceId>flyingwithfire</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
				<title><![CDATA[Self-Descriptive Grammars]]></title>
		<link>http://feedproxy.google.com/~r/flyingwithfire/~3/7XtEhHApv0Y/self-descriptive-grammars</link>
		<comments>http://ioreader.com/2009/06/18/self-descriptive-grammars#comments</comments>
		<pubDate>Thu, 18 Jun 2009 19:57:54 GMT</pubDate>
		<dc:creator>Peter Goodman</dc:creator>
				<category><![CDATA[Computer Science]]></category>
				<category><![CDATA[Parsing Theory]]></category>
				<guid isPermaLink="false">2g</guid>
		<description><![CDATA[<p>
<ul>
<li>
Languages have structure.
</li>
<li>
We can make a new language, X, to describe the structure of languages.
</li>
<li>
Language X itself has a structure and as a result the structure of language X can be described.
</li>
<li>
We made language X to describe the structure of languages.
</li>
<li>
Therefore, language X can describe its own structure.
</li>
</ul>
</p>]]></description>
	<feedburner:origLink>http://ioreader.com/2009/06/18/self-descriptive-grammars</feedburner:origLink></item>
		<item>
				<title><![CDATA[Taming Java Swing]]></title>
		<link>http://feedproxy.google.com/~r/flyingwithfire/~3/DwTHL2Ni-jU/taming-swing</link>
		<comments>http://ioreader.com/2009/02/17/taming-swing#comments</comments>
		<pubDate>Tue, 17 Feb 2009 10:03:10 GMT</pubDate>
		<dc:creator>Peter Goodman</dc:creator>
				<category><![CDATA[Functional Programming]]></category>
				<category><![CDATA[Swing]]></category>
				<category><![CDATA[Java]]></category>
				<guid isPermaLink="false">2f</guid>
		<description><![CDATA[<p>
	<strong>Update:</strong><br />
	The code for the GUI and functional parts of the Java code that I used in my MineSweeper
	implementation can be found <a href="http://ioreader.com/code/java/">in the code/java section of my website.</a>
</p>
<p>
	Recently I have been working on a Java implementation of the popular
	desktop game MineSweeper for a software engineering class I am currently
	taking. One of the project requirements is that Java Swing must be used and
	that NetBeans could not be used. I have now finished the programming side
	of the assignment and decided that I wanted to talk about a few ways that
	I made it easier for myself to use some of the components in the Swing 
	Framework.
</p>
<p>
	For those interested, a picture of the game with a bit of the code displayed
	nearby can be found <a href="http://ioreader.com/images/minesweeper.png">here</a>.
</p>
<p>
	In this article I will refer to two types of functions. The first type is
	which are public static methods of a class and the second type is a special
	Function type. Lack of capitalization will distinguish the former from the
	latter.
</p>
<!-- section -->
<h3>Types</h3>
<p>
	The following types are, for the most part, necessary to understand how
	any of the bits of code work. Originally, I used the long, descriptive
	names for each of these types; however, once I started using them so often
	I decided to follow the lead of the <a href="http://functionaljava.org/">Functional Java</a> 
	library and shorten the names to a single letter. Although convenient, the 
	shortened names have some drawbacks: the programmer needs to know ahead of 
	time what each type represents and needs to be careful when writing generic 
	code. 
</p>
<p>
	A final note is that I have likely re-created a few of the existing classes
	or interfaces in one of Java's standard libraries or in existing third-party
	libraries (such as Functional Java). In each of the cases, I've added my
	own touch to each of the classes.
</p>
<h4>D: Delegate</h4>
<p>
	A delegate is an abstract class that uses a single value of a given type
	as a means to the end of causing some sort of side-effect. I.e.: a delegate
	goes and does something with a single input.
</p>
<p>
	Delegates can be chained together in sequence, which I felt was a nice touch;
	however, in MineSweeper I never ended up using this functionality.
</p>
<h4>G: Generator</h4>
<p>
	Generators, in the sense that I have built them (not in the sense of
	continuations) as being the complement of Delegates and not as powerful as
	a Functions. A generator is a class that does something to the end of 
	producing a single value of some type.
</p>
<p>
	Again, generators in this sense were nice in terms of their symmetry with
	Delegates; however, they were not used.
</p>
<h4>F, F2: Function</h4>
<p>
	There are two function types: one that takes a single argument of one type
	and returns a single value of another and one that takes two arguments and
	returns a single value. The former is suitable for mapping operations whereas
	the latter is best for folds.
</p>
<p>
	Functions of one argument support function composition. Functions of two 
	arguments do not support composition; however, either of the two arguments
	can be curried&#8212;the result being a Function of one argument.
</p>
<h4>P: Predicate</h4>
<p>
	I made predicates in response to a future need that I will have when developing
	code for this course. Currently, predicates are supported by the filter
	operation. Predicates come with a set of combinators: and, or, nand, and
	nor. Predicates can also be negated using the not operation.
</p>
<!-- section -->
<h3>Taming Swing</h3>
<h4>Frames</h4>
<p>
	Making a frame was the first and most obvious challenge I needed to tackle.
	I'm reaching when I say that frames were a challenge; my application only
	requires a single frame and I could have easily used the frame code as 
	outlined in the Java Swing documentation.
</p>
<p>
	The challenge was thus one of coding style. I started my application by
	making a frame and so it set the stage for how I wanted to go about coding
	the rest of the application.
</p>
<p>
	For the most part, I dislike needlessly assigning values to local 
	variables&#8212;especially in Java (as it's type system is verbose). This
	usually stems from only needing something once. As a result of this somewhat
	odd dislike of mine, I decided that any of my GUI simplification code must
	return a value of the component they construct (assuming they construct
	one) so that they can be assigned to variables when needed. Also, I wanted
	to be able to pass in delegates that would initialize some of the components.
	This strategy has the nice property that construction of a particular
	component is isolated in a single function and that function is responsible
	for calling the delegate and passing in the constructed instance.
</p>
<p>
	The following is an example of making a frame:
</p>
<pre class="code java">
frame(&quot;Mine Sweeper&quot;, new D&lt;JFrame&gt;() {
    public void call(final JFrame f) {
        // initialize the frame
    }
});
</pre>
<!-- section -->
<h4>Menus</h4>
<p>
	Menus are one of the more obviously hierarchical elements of a GUI (despite
	all GUI components being part of an implicit hierarchy). The goal here was
	to make the code representative of the structure of the menu itself and that
	was very straightforward. Again, each function has a return value. Also,
	instead of taking in initialization delegates, the menus take in delegates
	to deal with their on-click events. The following is an example of the menu
	I use in MineSweeper.
</p>
<pre class="code java">
menu_bar(f,
    menu(&quot;File&quot;,
        menu(&quot;New Game&quot;, 
            menu_item(&quot;4 x 4 (3 mines)&quot;, new D&lt;JMenuItem&gt;() {
                public void call(JMenuItem item) {
                    self.safeCreateMineField(f, 4, 4, 7);
                }
            }),
            menu_item(&quot;6 x 4 (7 mines)&quot;, new D&lt;JMenuItem&gt;() {
                public void call(JMenuItem item) {
                    self.safeCreateMineField(f, 6, 4, 7);
                }
            }),
            menu_item(&quot;8 x 8 (10 mines)&quot;, new D&lt;JMenuItem&gt;() {
                public void call(JMenuItem item) {
                    self.safeCreateMineField(f, 8, 8, 10);
                }
            }),
            menu_item(&quot;Custom Dimensions&quot;, new D&lt;JMenuItem&gt;() {
                public void call(JMenuItem item) {
                    self.createCustomMineField(f);
                }
            }),
            menu_item(&quot;Using Current Dimensions&quot;, new D&lt;JMenuItem&gt;() {
                public void call(JMenuItem item) {
                    self.recreateMineField(f);
                }
            })
        ),
        menu_item(&quot;Quit&quot;, new D&lt;JMenuItem&gt;() {
            public void call(JMenuItem item) {
                self.quit_program_delegate.call(f);
            }
        })
    ),
    
    // ...
);
</pre>
<!-- section -->
<h4>Grids</h4>
<p>
	I wanted the most flexibility in laying out objects in the GUI so I chose
	to use the GridBagLayout. This is a notoriously annoying layout manager to
	work with; however, I feel like I came to a decent compromise between
	brevity in code and understandability.
</p>
<p>
	The first thing to understand is the GridCell. This is actually a tuple 
	(ordered pair) with a Component and a GridBagConstraints instance in it.
	All of its methods can be chained together (i.e.: each method returns
	the GridCell instance). The important methods I needed to provide were:
	pos (position), padding, margin (insets), and anchor (where to align the 
	component within the cell). Another important feature that needed to be
	covered was the ability to have a cell span many rows or columns.
</p>
<p>
	I approached by the problem of having a cell span rows/columns through the
	function that creates a GridCell. Using method overloading, I made the
	order of arguments to the grid_cell function significant. Thus, a 1x1 cell
	can be constructed by passing in a component to grid_cell(); however, should
	one want to, one can call grid_cell with as many as three parameters:
	column span (int), component (Component), row span (int). 
</p>
<p>
	Margin, padding, and position are self-explanatory. Margin and padding work
	in the same way as they do in CSS. Position takes integer x, y coordinates.
	Anchoring is slightly more interesting. It takes four integers, all either
	zero or one (this is enforced by taking only their low-order bit). In order,
	the integers represent north, east, south, west. To centre a component within
	its cell, one sets all of them to 1. To get something anchored to the north-east,
	only north and east need be set to one. Finally, something can be anchored
	to only a specific direction by setting any one of the inputs to one and
	the others to zero.
</p>
<p>
	The following is a code sample that lays out the form to input custom
	dimensions for a minesweeper game.
</p>
<pre class="code java">
// create the form for inputting the custom mine field 
// dimensions
return grid(

    // number of rows
    grid_cell(label(&quot;Number of Rows&quot;))
        .margin(10, 10, 10, 10)
        .anchor(0,1,0,0), // align east

    grid_cell(rows)
        .pos(1, 0),

    // number of columns
    grid_cell(label(&quot;Number of Columns&quot;))
        .pos(0, 1)
        .margin(0, 10, 10, 10)
        .anchor(0,1,0,0),

    grid_cell(cols)
        .pos(1, 1)
        .margin(0, 0, 10, 0),

    // number of bombs
    grid_cell(label(&quot;Number of Mines&quot;))
        .pos(0, 2)
        .margin(0, 10, 10, 10)
        .anchor(0,1,0,0),

    grid_cell(bombs)
        .pos(1, 2)
        .margin(0, 0, 10, 0),

    // play button, create a game using the dimensions
    grid_cell(button(&quot;Play&quot;, new D&lt;JButton&gt;() {
        public void call(JButton b) {
            // ...
        }
    }), 3).pos(2, 0).margin(0, 10, 0, 10).anchor(0, 0, 0, 1)
);
</pre>
<p>
	The result is a nice form with all of the text field labels right-aligned
	to their text fields. Each label/text field pair is in a new row. Finally,
	the play button is in the third column, vertically centered.
</p>
<!-- section -->
<h4>The Rest</h4>
<p>
	The rest includes dialogs, buttons, icons, text fields, etc. I don't think
	it's really worth it to go into each of those as they follow a similar pattern
	to the above code and it fairly trivial to simplify the Swing API into this
	coding style for those components.
</p>
<!-- section -->
<h3>Final Thoughts</h3>
<p>
	I wouldn't consider any of this to be breaking any ground; I suspect someone
	who has had to use the Swing framework and has a similar dislike for its 
	API has made similar simplifications.
</p>
<p>
	Another thing to note is that while such a library might very well exist
	elsewhere on the Internet, I decided it would be prudent to only use my own
	code for this assignment and in the end I'm fairly happy with the result.
</p>
<p>
	Finally, this assignment was very interesting for me because my entire
	programming career has focused on web-based technologies and with websites
	the languages used for logic and that used for GUI are so distinct that it's
	easy to separate them. I found that I wasn't really following any real
	architectural style when writing this code as it was more difficult to
	distinguish what was GUI-specific and what was logic-specific.
</p>
<p>
	I suspect my uncertainty of where to draw the line between logic and GUI code
	in this case stems from the fact that desktop GUI programming is new to me
	and that all of the GUI is constructed through code anyway. Regardless, I
	had a lot of fun writing code to make my life simpler and in the end, using
	Swing became much more enjoyable than it otherwise looked from the online
	documentation.
</p>]]></description>
	<feedburner:origLink>http://ioreader.com/2009/02/17/taming-swing</feedburner:origLink></item>
		<item>
				<title><![CDATA[Common Lisp Recursive Descent Parser Interpreter and Generator]]></title>
		<link>http://feedproxy.google.com/~r/flyingwithfire/~3/tBZxNNWWjmI/common-lisp-recursive-descent-parser-int</link>
		<comments>http://ioreader.com/2009/01/01/common-lisp-recursive-descent-parser-int #comments</comments>
		<pubDate>Thu, 01 Jan 2009 14:03:38 GMT</pubDate>
		<dc:creator>Peter Goodman</dc:creator>
				<category><![CDATA[Common Lisp]]></category>
				<category><![CDATA[Functional Programming]]></category>
				<category><![CDATA[Parsing Theory]]></category>
				<guid isPermaLink="false">2e</guid>
		<description><![CDATA[<p>
Recently I've been having a lot of fun learning and hacking with Common Lisp. 
Two of the more interesting (and not particularly elegant) pieces of code 
I've written include a recursive descent parser interpreter and a recursive 
descent parser generator. I'm happy with these two programs because both work 
(although the interpreter might have a few quirks) and because they were simple 
to make (despite the large amount of code).
</p>
<h3>Interpreter</h3>
<p>
The interpreter takes patterns (written in lisp) and at run time goes through 
the parts of the patterns and generates functions that can parse certain parts 
of text. Everything is considered a pattern function, be it a string or character 
or an explicit call to a pattern operator such as OR or FIND-NEXT.
</p>
<p>The way the interpreter matches text is fairly simple: each function that 
is generated takes two parameters: the current list of matches, and the remaining 
text that hasn't been seen yet. These functions then return three parameters: 
the updated list of matches, the remaining text that hasn't been seen yet, and 
whether or not the function succeeded in matching something. The following is 
a simplified diagram of how the interpreter goes through the a pattern and 
matches text against the current part of the pattern it is looking at.
</p>
<p>
<center>
<img src="http://ioreader.com/images/parser-int-run.png" alt="Recursive Descent Interpreter Session" />
</center>
</p>
<p>
As is clear from the image, there can be no back-tracking of any sorts because 
every matching function gets either the same or a smaller version of the text 
than the previous one. This fulfills the descent component of the parser: it 
always goes down by consuming text and cannot go back up. The interpreter is 
recursive in two ways: the way it interprets the patterns and creates matching 
functions is recursive and because this is done on-the-fly the pattern matching 
is inherently recursive because of this. It is also recursive because one can 
define multiple different pattern functions and call them from within other 
pattern functions.
</p>
<h3>Parser Generator</h3>
<p>
The parser generator works in a similar way but is much less elegant than the 
interpreter in terms of how it works. At compile time, macros do a depth-first 
expansion of the pattern operators into blocks of code and end up making a large 
chunk of code representing a pattern-matching function. Each block of code 
returns three values: any <u>matches</u> that the block found, whether or not 
the block <u>matched</u> anything, and whether or not the match <u>consumed</u> 
any text. It is up to any parent operators to deal with these values, and it's 
usually the case that the matches bubble up to the top-level of a pattern function 
and are handled there.
</p>
<p>
The three values reported by each block are important for several reasons. 
Pattern operators such as OR can sometimes <em>always</em> return a positive 
match but not consume any text. Consider this pattern: (maybe &quot;hello&quot;). 
This is translated into to the OR operator: (or &quot;hello&quot; &quot;&quot;). 
As can be seen, if the operator fails to match &quot;hello&quot; then it will 
<em>always</em> succeed at matching &quot;&quot; (an empty string). When used 
in the REPEAT or FIND-NEXT operators this can be dangerous, so those operators 
require that the patterns match as well as consume.
</p>
<p>
At first glance the <u>matched</u> boolean seems redundant given that each 
block also returns a list of matched values. The <u>matched</u> value is 
required because of the NO-CAPTURE operator, which allows the pattern to 
match something but not record the match. This operator is very useful because 
it's often required that we match some part of a pattern but where that 
specific part gives us no useful information. For example, when matching 
XML-like tags, the &lt; and &gt; symbols delimit tags but do not represent 
useful match information.
</p>
<h3>Example: Splitting Up an HTML Document</h3>
<p>
The following pattern functions properly split up some text by HTML tags. Note: 
the pattern functions <em>do not</em> validate the HTML.
</p>
<noscript>
<pre class="code common-lisp">
(defun-parser :html-attr
  (no-capture (repeat 0 nil &quot; &quot;))
  (and (concat (repeat 0 nil (range #a #z))
               (and &quot;:&quot; (repeat 0 nil (concat (range #a #z)))))
       (no-capture #= #&quot;)
       (find-next #&quot;)
       (no-capture #&quot;)))

(defun-parser :html-attrs
  (repeat 0 nil :html-attr))

(defun-parser :html-tag-name
  (concat (maybe &quot;!&quot;)
          (repeat 0 nil (range #a #z))
          (and &quot;:&quot; (repeat 0 nil (range #a #z)))))

(defun-parser :html-tag
  (and (no-capture &quot;&lt;&quot;)
       (maybe &quot;/&quot;)
       :html-tag-name
       :html-attrs
       (no-capture (repeat 0 nil &quot; &quot;))
       (maybe &quot;/&quot;)
       (no-capture &quot;&gt;&quot;)))

(defun-parser :html
  (repeat 0 nil (and (find-next &quot;&lt;&quot;)
                     :html-tag))
  (concat (repeat 0 nil (any-char))))
</pre>
</noscript>
<script src="http://gist.github.com/42373.js"></script>
<p>
When we apply the above patterns to some HTML (from the older version of this blog) using the parser generator we get 
the following code and parse tree:
</p>
<pre class="code html">
prefix text
&lt;div class=&quot;post&quot;&gt;
    &lt;a name=&quot;comment-{$comment.comment_ID}&quot; id=&quot;comment-{$comment.comment_ID}&quot;&gt;&lt;/a&gt;
    {$comment.content}
    &lt;ul class=&quot;categories&quot;&gt;
        by 
        &lt;cond:if var=&quot;comment.comment_author_url&quot; neq=&quot;&quot;&gt;

            &lt;a href=&quot;{$comment.comment_author_url}&quot; title=&quot;{$comment.comment_author}&quot;&gt;
                {$comment.comment_author}
            &lt;/a&gt;
        &lt;cond:else /&gt;
            {$comment.comment_author}
        &lt;/cond:if&gt;

        on {$comment.date}
    &lt;/ul&gt;
&lt;/div&gt;
postfix text
</pre>
<script src="http://gist.github.com/42384.js"></script>
<noscript>
<pre class="code common-lisp">
(&quot;prefix text&quot; 
 (:HTML-TAG 
    &quot;&quot; 
    (:HTML-TAG-NAME &quot;div&quot;) 
    (:HTML-ATTRS 
        (:HTML-ATTR &quot;class&quot; &quot;post&quot;)) 
    &quot;&quot;) 
 &quot;&quot; 
 (:HTML-TAG 
    &quot;&quot; 
    (:HTML-TAG-NAME &quot;a&quot;) 
    (:HTML-ATTRS 
        (:HTML-ATTR &quot;name&quot; &quot;comment-{$comment.comment_ID}&quot;)
        (:HTML-ATTR &quot;id&quot; &quot;comment-{$comment.comment_ID}&quot;)) 
    &quot;&quot;) 
 &quot;&quot; 
 (:HTML-TAG 
    &quot;/&quot; 
    (:HTML-TAG-NAME &quot;a&quot;)
    (:HTML-ATTRS) 
    &quot;&quot;) 
 &quot;{$comment.content}&quot; 
 (:HTML-TAG 
    &quot;&quot; 
    (:HTML-TAG-NAME &quot;ul&quot;) 
    (:HTML-ATTRS 
        (:HTML-ATTR &quot;class&quot; &quot;categories&quot;)) 
    &quot;&quot;) 
 &quot;by &quot; 
 (:HTML-TAG 
    &quot;&quot; 
    (:HTML-TAG-NAME &quot;cond:if&quot;) 
    (:HTML-ATTRS 
        (:HTML-ATTR &quot;var&quot; &quot;comment.comment_author_url&quot;)
        (:HTML-ATTR &quot;neq&quot; &quot;&quot;)) 
    &quot;&quot;) 
 &quot;&quot; 
 (:HTML-TAG 
    &quot;&quot; 
    (:HTML-TAG-NAME &quot;a&quot;)
    (:HTML-ATTRS 
        (:HTML-ATTR &quot;href&quot; &quot;{$comment.comment_author_url}&quot;)
        (:HTML-ATTR &quot;title&quot; &quot;{$comment.comment_author}&quot;)) 
    &quot;&quot;)
 &quot;{$comment.comment_author}&quot;

 (:HTML-TAG 
    &quot;/&quot; 
    (:HTML-TAG-NAME &quot;a&quot;)
    (:HTML-ATTRS) 
    &quot;&quot;) 
 &quot;&quot; 
 (:HTML-TAG 
    &quot;&quot; 
    (:HTML-TAG-NAME &quot;cond:else&quot;)
    (:HTML-ATTRS) 
    &quot;/&quot;) 
 &quot;{$comment.comment_author}&quot;

 (:HTML-TAG 
    &quot;/&quot; 
    (:HTML-TAG-NAME &quot;cond:if&quot;)
    (:HTML-ATTRS) 
    &quot;&quot;)
 &quot; on {$comment.date} &quot; 
 (:HTML-TAG 
    &quot;/&quot; 
    (:HTML-TAG-NAME &quot;ul&quot;)
    (:HTML-ATTRS) 
    &quot;&quot;) 
 &quot;&quot; 
 (:HTML-TAG 
    &quot;/&quot; 
    (:HTML-TAG-NAME &quot;div&quot;)
    (:HTML-ATTRS) 
    &quot;&quot;) 
 &quot;postfix text&quot;)
</pre>
</noscript>
<h3>The Code</h3>
<p>
You can find the code for the parser interpreter and parser generators at the 
following locations:
<ul>
<li><a href="http://ioreader.com/code/common-lisp/parser-1.lisp">Parser Interpreter</a></li>
<li><a href="http://ioreader.com/code/common-lisp/parser-2.lisp">Parser Generator</a></li>
</ul>
One thing to note is that I am new to common lisp and I recognize that some of 
the code is not exceptionally attractive. If any Common Lisp hackers read this 
post then please feel free to comment on how I might improve the coding style!
A final note is to say that the interpreter is coded in a more functional way
whereas the parser generator is much more procedural.
</p>]]></description>
	<feedburner:origLink>http://ioreader.com/2009/01/01/common-lisp-recursive-descent-parser-int</feedburner:origLink></item>
		<item>
				<title><![CDATA[The Plan for the Next Few Months]]></title>
		<link>http://feedproxy.google.com/~r/flyingwithfire/~3/phkj1ghHSJk/the-plan-for-the-next-few-months</link>
		<comments>http://ioreader.com/2008/08/19/the-plan-for-the-next-few-months#comments</comments>
		<pubDate>Tue, 19 Aug 2008 15:22:34 GMT</pubDate>
		<dc:creator>Peter Goodman</dc:creator>
				<category />
				<guid isPermaLink="false">26</guid>
		<description><![CDATA[<p>
It always sucks to write a &quot;sorry for not posting&quot; blog post and so here is the plan for the next few months. PINQ development is temporarily on hold. It's at a point where I like the ideas in it but where the implementation of the packages system is overly complex. My plans are to take a bunch of stuff out of the database and model/gateway areas and move them permanently into the PQL-specific stuff. This makes a lot of sense, especially since I think it would be worthwhile to make PQL as module-like as possible so that I can release it alone for those interested in it.
</p>
<p>
On the personal development side of things, I have been buying up a huge number of books which I intend to read over the next few/many months. The books that I have queued up to read align nicely with my long-term goals. I just finished reading <a href="http://www.amazon.ca/Programming-Language-Brian-W-Kernighan/dp/0131103628/ref=pd_ys_iyr5">The C Programming Language</a> (a.k.a. K&amp;R) and am now getting into <a href="http://www.amazon.ca/ANSI-Common-LISP-Paul-Graham/dp/0133708756/ref=pd_ys_iyr11">ANSI Common Lisp</a>. After ANSI CL I plan on reading through <a href="http://www.amazon.ca/Practical-Common-Lisp-Peter-Seibel/dp/1590592395/ref=pd_ys_iyr12">Practical Common Lisp</a> (which if you are a longtime reader then you will know I've previously read parts of this book). My main motivation for getting into Common Lisp is that I want to be able to read <a href="http://www.amazon.ca/Art-Metaobject-Protocol-Gregor-Kiczales/dp/0262610744/ref=pd_ys_iyr13">The Art of the Metaobject Protocol</a> and know exactly what's going on in it.
</p>
<p>
That's about all there is on the Lisp side of things. I then get into the more systems programmy things that I'm into: language design, compilers, garbage collection, etc. Not too long ago I started reading the dragon book (<a href="http://www.amazon.ca/Compilers-Principles-Techniques-Alfred-Aho/dp/0321486811/ref=pd_ys_iyr6">Compilers: Principles, Techniques, and Tools</a>) and have paused reading of that. It's a dense book so I want to ease into it a bit more. I intend to do that by first reading <a href="http://www.amazon.ca/Programming-Language-Pragmatics-Michael-Scott/dp/0126339511/ref=pd_ys_iyr3">Programming Language Pragmatics</a> and <a href="http://www.amazon.ca/Compiler-Design-Allen-I-Holub/dp/0131550454/ref=pd_ys_iyr2">Compiler Design in C</a>. After those I think I will be ready to finish off the dragon book. Finally, I'm going to jump into <a href="http://www.amazon.ca/Virtual-Machines-Iain-D-Craig/dp/1852339691/ref=pd_ys_iyr9">Virtual Machines</a> and <a href="http://www.amazon.ca/Garbage-Collection-Algorithms-Automatic-Management/dp/0471941484/ref=pd_ys_iyr10">Garbage Collection: Algorithms for Automatic Dynamic Memory Management</a>
</p>
<p>
Throughout all of this, I've got side reading of <a href="http://www.amazon.ca/Pragmatic-Programmer-Journeyman-Master/dp/020161622X/ref=pd_ys_iyr7">The Pragmatic Programmer</a> and <a href="http://www.amazon.ca/Beautiful-Code-Leading-Programmers-Explain/dp/0596510047/ref=pd_ys_iyr8">Beautiful Code</a> to read into.
</p>
<p>
This is my really long term reading schedule. I can imagine reading these books could take me well over a year-- especially now that my third year of university is about to start. School is an increasingly important part of my life, as is my job as a residence advisor at my school and so all of this together will likely limit my blogging ability. However, expect a few random posts now and then, especially around statutory holidays.
</p>
<p>
Finally, if anyone is ever looking for PHP help, I'm a regular on the <a href="http://www.sitepoint.com/forums/forumdisplay.php?f=147">SitePoint forums</a> so either create a thread or send me a private message. My username is: <a href="http://www.sitepoint.com/forums/member.php?u=262567">Peter Goodman</a>.
</p>
<p>
See you all on the other side!
</p>]]></description>
	<feedburner:origLink>http://ioreader.com/2008/08/19/the-plan-for-the-next-few-months</feedburner:origLink></item>
		<item>
				<title><![CDATA[Control Flow in PINQ]]></title>
		<link>http://feedproxy.google.com/~r/flyingwithfire/~3/ZOUnsTh4A4c/control-flow-in-pinq</link>
		<comments>http://ioreader.com/2008/07/16/control-flow-in-pinq#comments</comments>
		<pubDate>Wed, 16 Jul 2008 17:48:49 GMT</pubDate>
		<dc:creator>Peter Goodman</dc:creator>
				<category><![CDATA[PHP]]></category>
				<category><![CDATA[PINQ]]></category>
				<guid isPermaLink="false">25</guid>
		<description><![CDATA[<p>
I was a bit bored so I whipped up this little diagram in OmniGraffle of the control flow within the PINQ framework and an application. Most things will seem familiar to programmers who regularly use MVC frameworks. It's actually slightly more complex than what is going on in there; however, I was limited to using 20 object with the demo version of OmniGraffle and so I was rather limited on what I could show.
</p>
<p>
<center>
<img src="http://ioreader.com/images/pinq_control_flow.png" alt="PINQ Control Flow" />
</center>
</p>
<p>
The one interesting bit in here is the yield resource exception. As I've written in previous posts, it changes control from one controller to another.
</p>]]></description>
	<feedburner:origLink>http://ioreader.com/2008/07/16/control-flow-in-pinq</feedburner:origLink></item>
	</channel>
</rss>
