<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Aaron Feng comments</title>
    <link>http://www.aaronfeng.com/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Adventures in software development</description>
    <item>
      <title>"Lisp ninja 2 - Refactoring" by Leslie P. Polzer</title>
      <description>&lt;p&gt;And here's another take on PARSE-PHP-ARRAY using LOOP:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(defun parse-php-array (array)
  (loop for value in (mapcar #'get-array-value
                            (split-sequence #\Newline array))
        collect value into values
        finally (return (nreverse values))))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I'm not sure why you want to reverse the values at the end, but here it is.&lt;/p&gt;</description>
      <pubDate>Thu, 03 Jul 2008 09:07:28 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:52fcfcec-e7ea-4091-88a0-6c91650d208b</guid>
      <link>http://www.aaronfeng.com/articles/2008/05/31/lisp-ninja-2-refactoring#comment-5985</link>
    </item>
    <item>
      <title>"Lisp ninja 2 - Refactoring" by Leslie P. Polzer</title>
      <description>&lt;p&gt;Wow, lots of spam here. Maybe you should turn on comment approval or some sort of CAPTCHA...&lt;/p&gt;

&lt;p&gt;Anyway, here's my Shinobi take of GET-FUNCTION-SIGNATURE:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(defun get-function-signature (function-info)
  (let ((name (first function-info))
        (parameters (rest function-info)))
    (format nil "~A(~{~A~^, ~})" name (mapcar #'quote-string parameters))))
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Thu, 03 Jul 2008 08:59:36 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:dc923e81-c0ab-4cc8-bc89-cc1b9b4b4f84</guid>
      <link>http://www.aaronfeng.com/articles/2008/05/31/lisp-ninja-2-refactoring#comment-5984</link>
    </item>
    <item>
      <title>"Closure Fun" by Leslie P. Polzer</title>
      <description>&lt;p&gt;This generator pattern is very common in C, and PHP borrows a lot from C (see strtok(3) for the C interface of this function). Python guys like to do stuff like this, too.&lt;/p&gt;

&lt;p&gt;How it works: the binding to REST is established on execution of the code once (and initialized to NIL). After that, the content of the variable is maintained by the code that is executed in the function body.&lt;/p&gt;

&lt;p&gt;Note that this implementation of strtok isn't thread-safe. Multiple threads will share REST among them.&lt;/p&gt;

&lt;p&gt;By the way, you can also just write&lt;/p&gt;

&lt;p&gt;(let (rest) ...&lt;/p&gt;

&lt;p&gt;if you want.&lt;/p&gt;</description>
      <pubDate>Thu, 03 Jul 2008 05:49:49 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:65fa9e7c-08d0-44a7-a421-a5d952180264</guid>
      <link>http://www.aaronfeng.com/articles/2008/06/30/closure-fun#comment-5975</link>
    </item>
    <item>
      <title>"Lisp ninja" by Aaron Feng</title>
      <description>&lt;p&gt;Leslie,&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;Did you know that this little gadget by Xach uses Lisp to generate PHP?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No, sounds pretty interesting.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 06:35:08 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:faac16ca-b413-4fef-8e67-2caf47004ea6</guid>
      <link>http://www.aaronfeng.com/articles/2008/04/29/lisp-ninja#comment-5283</link>
    </item>
    <item>
      <title>"Lisp ninja" by Aaron Feng</title>
      <description>&lt;p&gt;Jonathan,&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;With slight modification to get-result-for-test-case, it can be generalized for any PHP function&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I also thought about it too.  I'm not sure if the super generic version will out weight the ability to allow Lisp to do error checking for you?  But this should be interesting.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 06:30:54 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:a7f61b92-b5ed-4c2d-b323-c2ca37580294</guid>
      <link>http://www.aaronfeng.com/articles/2008/04/29/lisp-ninja#comment-5282</link>
    </item>
    <item>
      <title>"Lisp ninja" by Aaron Feng</title>
      <description>&lt;p&gt;Kyle,&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;Why did you use prog2 in create-test-cases?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Good question.  I originally wanted to return the second form because I added deftestsuite to create-test-cases.  Since there are no side effects, it doesn't actually matter.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 06:27:38 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:037374c7-d1bf-49f0-b9d6-3568f692e278</guid>
      <link>http://www.aaronfeng.com/articles/2008/04/29/lisp-ninja#comment-5281</link>
    </item>
    <item>
      <title>"Lisp ninja" by Leslie P. Polzer</title>
      <description>&lt;p&gt;Did you know that &lt;a href="http://www.xach.com/scammer-name/"&gt;this little gadget&lt;/a&gt; by Xach uses Lisp to generate PHP?&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 01:44:04 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:6fd5f1fa-be66-4857-b08f-6df45b5f4e5f</guid>
      <link>http://www.aaronfeng.com/articles/2008/04/29/lisp-ninja#comment-5280</link>
    </item>
    <item>
      <title>"Lisp ninja" by Jonathan T</title>
      <description>&lt;p&gt;Why stop there?&lt;/p&gt;

&lt;p&gt;With slight modification to &lt;code&gt;get-result-for-test-case&lt;/code&gt;, it can be generalized for any PHP function, not just &lt;code&gt;wordwrap&lt;/code&gt;, which is especially easy when the Lisp function and the PHP function have the same name.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 01:04:34 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:571a6bfd-ac1d-44af-91c6-8a187ea412d9</guid>
      <link>http://www.aaronfeng.com/articles/2008/04/29/lisp-ninja#comment-5279</link>
    </item>
    <item>
      <title>"Lisp ninja" by Kyle</title>
      <description>&lt;p&gt;It's not just that it's less typing - you're less likely to make mistakes (reducing the LOC), you're more easily able to see the test case data itself (it's all lined up).  You've created a mini-DSL for testing your code.&lt;/p&gt;

&lt;p&gt;I was on the fence about whether to one-time generate the test cases (and thus not require an installation of php to run them), have the php output be created at compile time (macro expansion time) or leave it up till the time the test case is run.  I guess there are a lot of ways this could have gone...&lt;/p&gt;

&lt;p&gt;Why did you use prog2 in create-test-cases?&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 00:06:31 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:11840eaf-20dd-4d43-b03f-7a840a80b386</guid>
      <link>http://www.aaronfeng.com/articles/2008/04/29/lisp-ninja#comment-5278</link>
    </item>
    <item>
      <title>"Lisp newbie jump start" by Todd</title>
      <description>&lt;p&gt;"...there are many interesting concepts/features that can impact one's thinking even when they are not using Lisp."&lt;/p&gt;

&lt;p&gt;That's why they still teach it in school, even after all these years.&lt;/p&gt;</description>
      <pubDate>Thu, 10 Apr 2008 15:46:06 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:a6d030d2-57c1-4de3-82f2-435efc805b1f</guid>
      <link>http://www.aaronfeng.com/articles/2008/04/07/jump-start-in-lisp#comment-4390</link>
    </item>
  </channel>
</rss>
