<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>Karzilla, Destroyer of Bugs</title>
  <link>https://karzilla.dreamwidth.org/</link>
  <description>Karzilla, Destroyer of Bugs - Dreamwidth Studios</description>
  <lastBuildDate>Sat, 18 Sep 2010 00:08:05 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>karzilla</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/9314530/526834</url>
    <title>Karzilla, Destroyer of Bugs</title>
    <link>https://karzilla.dreamwidth.org/</link>
    <width>100</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>https://karzilla.dreamwidth.org/13251.html</guid>
  <pubDate>Sat, 18 Sep 2010 00:08:05 GMT</pubDate>
  <title>Friday, Sep 17, 6:45PM</title>
  <link>https://karzilla.dreamwidth.org/13251.html</link>
  <description>&lt;h3&gt;Bug counts: resolved 246, assigned 15, needs-review 10&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;I did my first Template Toolkit conversion in bug 3030.  It&apos;s still counterintuitive to me that the views are linked to the document hierarchy in DW/Controller files that are buried deep in cgi-bin, instead of some sort of top-level HEY LOOKEE HERE easy to find place, but hey, whatever works.&lt;br /&gt;&lt;br /&gt;I also defined my first hook, because I noticed that the index page only linked to the files in dw-free, and there were a bunch more in the same directory in dw-nonfree that needed to be linked as well.  Hooks are the simplest way to tell a program: &quot;Whoops, hey, if that code over there is loaded, pass this here data through it.  If not, forget I said anything.&quot;  It&apos;s also a good example of a concept I learned years ago from customizing &lt;a href=&quot;http://www.tinyfugue.de/sourceforge/help/tf-40s1-help/topics/hooks.html&quot;&gt;Tinyfugue&lt;/a&gt;; I learned most of my basic programming skills on MU*s before I ever learned Perl.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=karzilla&amp;ditemid=13251&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://karzilla.dreamwidth.org/13251.html</comments>
  <category>insights</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://karzilla.dreamwidth.org/12124.html</guid>
  <pubDate>Mon, 30 Aug 2010 03:43:04 GMT</pubDate>
  <title>Sunday, Aug 29, 10:20PM</title>
  <link>https://karzilla.dreamwidth.org/12124.html</link>
  <description>&lt;h3&gt;Bug counts: resolved 229, assigned 23, needs-review 19&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Continuing on the subject of things that weren&apos;t as hard as I feared: making a gearman worker.&lt;br /&gt;&lt;br /&gt;Here&apos;s your basic gearman worker in its entirety:&lt;br /&gt;&lt;pre&gt;
use LJ::Worker::Gearman;
gearman_decl( &apos;name-of-worker&apos;  =&amp;gt; \&amp;worker );
gearman_work();
sub worker {
    # stuff what needs doing
}&lt;/pre&gt;&lt;br /&gt;And then you call it with something like &lt;tt&gt;LJ::gearman_client()-&amp;gt;dispatch_background( &apos;name-of-worker&apos;, ...)&lt;/tt&gt; (at least for my purposes, which were &quot;go do this other time-consuming thing somewhere else and don&apos;t tell me what happens.&quot;)&lt;br /&gt;&lt;br /&gt;The only real voodoo, AFAICT, is that you have to use Storable methods (freeze/thaw) for passing the function arguments from the web execution to the worker execution.  I just did a copy and paste of code from someone else&apos;s worker script and it worked like a charm.&lt;br /&gt;&lt;br /&gt;Later on I get to either write more gearman workers or overcome my fear of TheSchwartz, depending on whether or not gearman can do everything I need for delivering vgifts.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=karzilla&amp;ditemid=12124&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://karzilla.dreamwidth.org/12124.html</comments>
  <category>insights</category>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://karzilla.dreamwidth.org/11953.html</guid>
  <pubDate>Fri, 27 Aug 2010 02:33:39 GMT</pubDate>
  <title>Thursday, Aug 26, 9:10PM</title>
  <link>https://karzilla.dreamwidth.org/11953.html</link>
  <description>&lt;h3&gt;Bug counts: resolved 228, assigned 23, needs-review 21&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;I figured out how to bend S2 to my will!  Well, a bit anyway.&lt;br /&gt;&lt;br /&gt;I was all &quot;um there&apos;s no sort function here wtf&quot; and then I saw &lt;a href=&quot;http://wiki.dwscoalition.org/notes/S2_Guide:_Language_Tutorial#Built-in_functions&quot;&gt;this bit of wiki&lt;/a&gt; that described how to make a Perl subroutine load into S2.  So that&apos;s what I did.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;function builtin keys_alpha(string{} elements) : string[]
&quot;Return the keys of the array in alphabetically sorted order.&quot;;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That&apos;s it.  &lt;tt&gt;keys_alpha&lt;/tt&gt; is a regular Perl subroutine in LJ::S2.  The only nonintuitive part (for me, because I don&apos;t like languages that declare variable types) was figuring out what the input and output type declarations should look like.  As near as I can figure, string[] is a regular array reference and string{} is like a hash reference, except unlike a Perl hash it implicitly acts like an array of hash keys in array context.  Anyway, I needed an array because in Perl, arrays preserve the ordering of their elements and hashes do not.&lt;br /&gt;&lt;br /&gt;So yeah, that wasn&apos;t as hard as I feared.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=karzilla&amp;ditemid=11953&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://karzilla.dreamwidth.org/11953.html</comments>
  <category>insights</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://karzilla.dreamwidth.org/4218.html</guid>
  <pubDate>Fri, 02 Jul 2010 16:25:20 GMT</pubDate>
  <title>Friday, Jul 2, 11:20AM</title>
  <link>https://karzilla.dreamwidth.org/4218.html</link>
  <description>&lt;h3&gt;Bug counts: resolved 201, assigned 10, needs-review 6&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;I have to remind myself that not everyone is as fearless about rearranging the guts of the code as I am.&lt;br /&gt;&lt;br /&gt;Hence, I just &lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=1960#c6&quot;&gt;changed my mind&lt;/a&gt; and accepted a patch from a new contributor that I had rejected a few days ago as being too small in scope.  I&apos;ll open a new bug for the gut rearranging and probably do it myself.&lt;br /&gt;&lt;br /&gt;I hope I didn&apos;t scare the newbie away!&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=karzilla&amp;ditemid=4218&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://karzilla.dreamwidth.org/4218.html</comments>
  <category>insights</category>
  <lj:security>public</lj:security>
  <lj:reply-count>5</lj:reply-count>
</item>
</channel>
</rss>
