<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Programmer: new to the area&#8230; seeks support</title>
	<atom:link href="http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/feed/" rel="self" type="application/rss+xml" />
	<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/</link>
	<description>(notes from an average programmer studying the hard stuff)</description>
	<lastBuildDate>Thu, 21 May 2009 01:17:58 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: draegtun</title>
		<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/#comment-2285</link>
		<dc:creator>draegtun</dc:creator>
		<pubDate>Wed, 15 Oct 2008 10:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://lispy.wordpress.com/?p=312#comment-2285</guid>
		<description>Blimey... you&#039;ve written more Perl code here than I&#039;ve done in last few months!  You&#039;ve certainly got the bit between the teeth on this one.

Couple of things which you probably jumped across by now but just in case for other passers by here...

1. Packages.   Something I&#039;ve fallen over before was this....

[sourcecode language=&quot;ruby&quot;]
use strict;
use warnings;

package A;
our $X = &#039;X create while in Package A&#039;;
my $x = &quot;lexical x&quot;;

package B;
say &quot;In package B...&quot;, $X;
say &quot;In package B...&quot;, $x;
[/sourcecode]

Package B will happily print whats in $X &amp; $x without giving an error ;-(

Instead you need to put packages into separate files or enclose a block around them....

[sourcecode language=&quot;ruby&quot;]
{
    package A;
    our $X = &#039;X create while in Package A&#039;;
    my $x = &quot;lexical x&quot;;
}

{
    package B;
    say &quot;In package B...&quot;, $X;
    say &quot;In package B...&quot;, $x;
}
[/sourcecode]

Now above will throw a compile error on both those say lines in Package B.


2.  Easy way to return hash or array references from sub....

[sourcecode language=&quot;ruby&quot;]
sub return_hashref {
    return { hello =&gt; &#039;Hello&#039; };
}

sub return_arrayref {
    return [ &#039;zero&#039;, &#039;one&#039;, &#039;two&#039; ];
}

# thus your Moose has statement can be a bit sweeter....

has &#039;Rows&#039; =&gt; (isa =&gt; &#039;HashRef&#039;, is =&gt; &#039;rw&#039;, default =&gt; sub { {} } );
has &#039;Columns&#039; =&gt; (isa =&gt; &#039;ArrayRef[Str]&#039;, is =&gt; &#039;rw&#039;, default =&gt; sub { [] } );
[/sourcecode]

Learning Perl is fun eh!

/I3az/</description>
		<content:encoded><![CDATA[<p>Blimey&#8230; you&#8217;ve written more Perl code here than I&#8217;ve done in last few months!  You&#8217;ve certainly got the bit between the teeth on this one.</p>
<p>Couple of things which you probably jumped across by now but just in case for other passers by here&#8230;</p>
<p>1. Packages.   Something I&#8217;ve fallen over before was this&#8230;.</p>
<pre class="brush: ruby;">
use strict;
use warnings;

package A;
our $X = 'X create while in Package A';
my $x = "lexical x";

package B;
say "In package B...", $X;
say "In package B...", $x;
</pre>
<p>Package B will happily print whats in $X &amp; $x without giving an error ;-(</p>
<p>Instead you need to put packages into separate files or enclose a block around them&#8230;.</p>
<pre class="brush: ruby;">
{
    package A;
    our $X = 'X create while in Package A';
    my $x = "lexical x";
}

{
    package B;
    say "In package B...", $X;
    say "In package B...", $x;
}
</pre>
<p>Now above will throw a compile error on both those say lines in Package B.</p>
<p>2.  Easy way to return hash or array references from sub&#8230;.</p>
<pre class="brush: ruby;">
sub return_hashref {
    return { hello =&gt; 'Hello' };
}

sub return_arrayref {
    return [ 'zero', 'one', 'two' ];
}

# thus your Moose has statement can be a bit sweeter....

has 'Rows' =&gt; (isa =&gt; 'HashRef', is =&gt; 'rw', default =&gt; sub { {} } );
has 'Columns' =&gt; (isa =&gt; 'ArrayRef[Str]', is =&gt; 'rw', default =&gt; sub { [] } );
</pre>
<p>Learning Perl is fun eh!</p>
<p>/I3az/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Miller</title>
		<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/#comment-2278</link>
		<dc:creator>Mark Miller</dc:creator>
		<pubDate>Sat, 11 Oct 2008 00:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://lispy.wordpress.com/?p=312#comment-2278</guid>
		<description>@Lispy:

Check out &lt;a href=&quot;http://www.moserware.com/2008/08/meta-fizzbuzz.html&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt; by Jeff Moser for inspiration. He uses his port of OMeta (OMeta#) to write a small language in which to implement &lt;a href=&quot;http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/&quot; rel=&quot;nofollow&quot;&gt;FizzBuzz&lt;/a&gt;. Really neat! Instead of writing a program in Java, C#, Ruby, etc. that directly implements FizzBuzz (which is like, DUH! EASY!), he wrote his own mini-language to provide the structures he needed in order to write FizzBuzz. He first shows the implementation of FizzBuzz in the language he wrote. Then he shows the complete source code, in OMeta#, for the language.</description>
		<content:encoded><![CDATA[<p>@Lispy:</p>
<p>Check out <a href="http://www.moserware.com/2008/08/meta-fizzbuzz.html" rel="nofollow">this article</a> by Jeff Moser for inspiration. He uses his port of OMeta (OMeta#) to write a small language in which to implement <a href="http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/" rel="nofollow">FizzBuzz</a>. Really neat! Instead of writing a program in Java, C#, Ruby, etc. that directly implements FizzBuzz (which is like, DUH! EASY!), he wrote his own mini-language to provide the structures he needed in order to write FizzBuzz. He first shows the implementation of FizzBuzz in the language he wrote. Then he shows the complete source code, in OMeta#, for the language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lispy</title>
		<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/#comment-2277</link>
		<dc:creator>lispy</dc:creator>
		<pubDate>Fri, 10 Oct 2008 19:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://lispy.wordpress.com/?p=312#comment-2277</guid>
		<description>Hey Mark.

Yeah... it&#039;s definitely time to (a) start reading more code and (b) start learning about parsing and grammers.

There&#039;s a big difference between code written to get something done and code written to explore an idea.  The code above is more of the former than the latter right now.

I think what I want... sort of like how sed is a command-line driven text editor... I want a script driven subtitute for spreadsheets and desktop databases....  I&#039;m going to need to write a BASIC-like mini-language for writing simple functions and operating on the environment....

I tried playing with some source filtering, but it was an absolute pain to implement.  Extending the dispatch tables is pretty easy in comparison even though it might be less efficient.

That reminds me of something I want to go figure out real quick....</description>
		<content:encoded><![CDATA[<p>Hey Mark.</p>
<p>Yeah&#8230; it&#8217;s definitely time to (a) start reading more code and (b) start learning about parsing and grammers.</p>
<p>There&#8217;s a big difference between code written to get something done and code written to explore an idea.  The code above is more of the former than the latter right now.</p>
<p>I think what I want&#8230; sort of like how sed is a command-line driven text editor&#8230; I want a script driven subtitute for spreadsheets and desktop databases&#8230;.  I&#8217;m going to need to write a BASIC-like mini-language for writing simple functions and operating on the environment&#8230;.</p>
<p>I tried playing with some source filtering, but it was an absolute pain to implement.  Extending the dispatch tables is pretty easy in comparison even though it might be less efficient.</p>
<p>That reminds me of something I want to go figure out real quick&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Perl source filters: evil or not? &#171; Learning Lisp</title>
		<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/#comment-2270</link>
		<dc:creator>Perl source filters: evil or not? &#171; Learning Lisp</dc:creator>
		<pubDate>Wed, 08 Oct 2008 14:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://lispy.wordpress.com/?p=312#comment-2270</guid>
		<description>[...] Learning Lisp (notes from an average programmer studying the hard stuff)      &#171; Programmer: new to the area&#8230; seeks&#160;support [...]</description>
		<content:encoded><![CDATA[<p>[...] Learning Lisp (notes from an average programmer studying the hard stuff)      &laquo; Programmer: new to the area&#8230; seeks&nbsp;support [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Miller</title>
		<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/#comment-2267</link>
		<dc:creator>Mark Miller</dc:creator>
		<pubDate>Tue, 07 Oct 2008 21:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://lispy.wordpress.com/?p=312#comment-2267</guid>
		<description>From my recollection stdin and stdout work on Windows, in the Command window anyway. I used to program in C on DOS and I&#039;m pretty sure I used stdin/stdout at least a few times. It could just be that the Perl runtime doesn&#039;t support it well in the Windows version.

As for Alan Kay, something he&#039;s railed about for years is how there&#039;s barely a literary culture in the computer field. There&#039;s no sense of history. We keep reinventing the wheel, because &quot;we don&#039;t read&quot;, he says. One example he cited was that Rand had figured out in the late 1960s how to do handwriting recognition really well, but no one&#039;s bothered to read how they did it, and instead industry has produced crappy handwriting recognition systems.

I&#039;ve been reading your last few posts on the Perl stuff you&#039;re working on, as much as I can without knowing much about Perl. In terms of what you&#039;re working on you&#039;re ahead of me. I have yet to develop a good sense of system architecture. I&#039;ve mostly been building a philosophical basis for ultimately getting into this stuff.

I&#039;ll just say that your dispatch table looks a lot like code I&#039;ve seen from a language that&#039;s being developed at Viewpoints Research Institute, Alan Kay&#039;s organization, called OMeta. It&#039;s a pattern language that uses PEGs (Parsing Expression Grammars), memoization, and objects. It looks a bit like BNF, but it doesn&#039;t act like older LR parsers. Instead it tries to find the closest match in subsets of rules. Whichever subset is closer, it goes through that subset, and then goes through it sequentially to find a match. If it finds a match, it executes the corresponding action block. It handles left-recursion just fine via. memoization, making grammars simpler to write. You can check out OMeta at http://www.cs.ucla.edu/~awarth/ometa/. You can run it right inside your browser (the current version only works on Firefox, and I think Safari) since the primary version is written in Javascript. I think there&#039;s a PDF link there that shows documentation on a different implementation they worked on. This gives you an idea of the concepts being used anyway.

Other people are working on ports. &lt;a href=&quot;http://www.moserware.com&quot; rel=&quot;nofollow&quot;&gt;Jeff Moser&lt;/a&gt; is working on making a version that runs in .Net 3.0. He&#039;s been writing about it on his blog (the link I cite).

You can write multiple languages in OMeta and bring in parts of them for whatever you&#039;re working on, however you choose. One of the goals they have with the project is being able to write code in a way that&#039;s more self-explanatory. Jeff Moser has written a couple posts that illustrate this idea.

One thought I had on your program overall, though it may be totally uninformed, is why not have the goals drive the program? This is thinking in more of a functional, perhaps Prolog-ish style. Rather than taking the data and saying &quot;if (blah) then&quot;, what I was thinking was along the lines of &quot;(enlistedp (blah))&quot;, where the predicate drives functionality that seeks structures that will match its conditions, and either succeeds or fails. If it does, then the next predicate is tried.</description>
		<content:encoded><![CDATA[<p>From my recollection stdin and stdout work on Windows, in the Command window anyway. I used to program in C on DOS and I&#8217;m pretty sure I used stdin/stdout at least a few times. It could just be that the Perl runtime doesn&#8217;t support it well in the Windows version.</p>
<p>As for Alan Kay, something he&#8217;s railed about for years is how there&#8217;s barely a literary culture in the computer field. There&#8217;s no sense of history. We keep reinventing the wheel, because &#8220;we don&#8217;t read&#8221;, he says. One example he cited was that Rand had figured out in the late 1960s how to do handwriting recognition really well, but no one&#8217;s bothered to read how they did it, and instead industry has produced crappy handwriting recognition systems.</p>
<p>I&#8217;ve been reading your last few posts on the Perl stuff you&#8217;re working on, as much as I can without knowing much about Perl. In terms of what you&#8217;re working on you&#8217;re ahead of me. I have yet to develop a good sense of system architecture. I&#8217;ve mostly been building a philosophical basis for ultimately getting into this stuff.</p>
<p>I&#8217;ll just say that your dispatch table looks a lot like code I&#8217;ve seen from a language that&#8217;s being developed at Viewpoints Research Institute, Alan Kay&#8217;s organization, called OMeta. It&#8217;s a pattern language that uses PEGs (Parsing Expression Grammars), memoization, and objects. It looks a bit like BNF, but it doesn&#8217;t act like older LR parsers. Instead it tries to find the closest match in subsets of rules. Whichever subset is closer, it goes through that subset, and then goes through it sequentially to find a match. If it finds a match, it executes the corresponding action block. It handles left-recursion just fine via. memoization, making grammars simpler to write. You can check out OMeta at <a href="http://www.cs.ucla.edu/~awarth/ometa/" rel="nofollow">http://www.cs.ucla.edu/~awarth/ometa/</a>. You can run it right inside your browser (the current version only works on Firefox, and I think Safari) since the primary version is written in Javascript. I think there&#8217;s a PDF link there that shows documentation on a different implementation they worked on. This gives you an idea of the concepts being used anyway.</p>
<p>Other people are working on ports. <a href="http://www.moserware.com" rel="nofollow">Jeff Moser</a> is working on making a version that runs in .Net 3.0. He&#8217;s been writing about it on his blog (the link I cite).</p>
<p>You can write multiple languages in OMeta and bring in parts of them for whatever you&#8217;re working on, however you choose. One of the goals they have with the project is being able to write code in a way that&#8217;s more self-explanatory. Jeff Moser has written a couple posts that illustrate this idea.</p>
<p>One thought I had on your program overall, though it may be totally uninformed, is why not have the goals drive the program? This is thinking in more of a functional, perhaps Prolog-ish style. Rather than taking the data and saying &#8220;if (blah) then&#8221;, what I was thinking was along the lines of &#8220;(enlistedp (blah))&#8221;, where the predicate drives functionality that seeks structures that will match its conditions, and either succeeds or fails. If it does, then the next predicate is tried.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lispy</title>
		<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/#comment-2266</link>
		<dc:creator>lispy</dc:creator>
		<pubDate>Tue, 07 Oct 2008 16:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://lispy.wordpress.com/?p=312#comment-2266</guid>
		<description>Nice tip.  Thanks.</description>
		<content:encoded><![CDATA[<p>Nice tip.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jhc</title>
		<link>http://lispy.wordpress.com/2008/10/06/programmer-new-to-the-area-seeks-support/#comment-2262</link>
		<dc:creator>jhc</dc:creator>
		<pubDate>Mon, 06 Oct 2008 23:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://lispy.wordpress.com/?p=312#comment-2262</guid>
		<description>i&#039;m not sure if this is what you are referring to, but you can copy and paste from windows cmd (although, you are right in saying that you can&#039;t cut).

first, right click on the title bar of a cmd window and select &#039;properties&#039;. then select the &#039;options&#039; tab and enable QuickEdit mode.

now you can highlight the text that you want copied with your mouse. right click to copy the active mark to the clipboard.

if there is no active mark in a cmd window, a right click will paste into the cmd window from the clipboard.</description>
		<content:encoded><![CDATA[<p>i&#8217;m not sure if this is what you are referring to, but you can copy and paste from windows cmd (although, you are right in saying that you can&#8217;t cut).</p>
<p>first, right click on the title bar of a cmd window and select &#8216;properties&#8217;. then select the &#8216;options&#8217; tab and enable QuickEdit mode.</p>
<p>now you can highlight the text that you want copied with your mouse. right click to copy the active mark to the clipboard.</p>
<p>if there is no active mark in a cmd window, a right click will paste into the cmd window from the clipboard.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
