<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Phil Dawes' Stuff - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-0a0f319f" type="application/json"/><link>http://phildawesstuff.disqus.com/</link><description></description><language>en</language><lastBuildDate>Tue, 02 Jun 2009 22:05:31 -0000</lastBuildDate><item><title>Re: The Factor Attraction</title><link>http://www.phildawes.net/blog/2007/11/23/the-factor-attraction/#comment-10407505</link><description>Hi,&lt;br&gt;&lt;br&gt;Do you feel that your agility in Factor has improved since this post?&lt;br&gt;&lt;br&gt;Roger</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Roger Levy</dc:creator><pubDate>Tue, 02 Jun 2009 22:05:31 -0000</pubDate></item><item><title>Re: Disqus comments</title><link>http://phildawes.net/blog/2008/10/01/disqus-comments/#comment-9200720</link><description>Thanks for the pointer - I've cleaned up the spam and regrettably added some moderation</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phildawes</dc:creator><pubDate>Mon, 11 May 2009 07:44:21 -0000</pubDate></item><item><title>Re: Disqus comments</title><link>http://phildawes.net/blog/2008/10/01/disqus-comments/#comment-9199732</link><description>I'm loving the comments thread for this post. Can't decide whether to get my upholstery cleaned or do something about my fast food obesity.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Mon, 11 May 2009 06:07:24 -0000</pubDate></item><item><title>Re: Factor makes you write better code</title><link>http://phildawes.net/blog/2009/03/30/factor-makes-you-write-better-code/#comment-8099163</link><description>Cool - thanks Eric</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phildawes</dc:creator><pubDate>Sun, 12 Apr 2009 14:57:30 -0000</pubDate></item><item><title>Re: Factor makes you write better code</title><link>http://phildawes.net/blog/2009/03/30/factor-makes-you-write-better-code/#comment-8092673</link><description>I pasted some code that does the moving sum in factor.&lt;br&gt;&lt;br&gt;&lt;a href="http://paste.factorcode.org/paste?id=569#282" rel="nofollow"&gt;http://paste.factorcode.org/paste?id=569#282&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Mertens</dc:creator><pubDate>Sun, 12 Apr 2009 03:25:21 -0000</pubDate></item><item><title>Re: Factor makes you write better code</title><link>http://phildawes.net/blog/2009/03/30/factor-makes-you-write-better-code/#comment-7673894</link><description>This &lt;a href="http://www.reddit.com/r/programming/comments/88oln/factor_makes_you_write_better_code/c08klku" rel="nofollow"&gt;comment on proggit&lt;/a&gt; was particularly good I thought</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phildawes</dc:creator><pubDate>Tue, 31 Mar 2009 08:54:52 -0000</pubDate></item><item><title>Re: Factor makes you write better code</title><link>http://phildawes.net/blog/2009/03/30/factor-makes-you-write-better-code/#comment-7664499</link><description>More discussion at &lt;a href="http://www.reddit.com/r/programming/comments/88oln/factor_makes_you_write_better_code/" rel="nofollow"&gt;proggit&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phildawes</dc:creator><pubDate>Tue, 31 Mar 2009 05:26:48 -0000</pubDate></item><item><title>Re: Factor makes you write better code</title><link>http://phildawes.net/blog/2009/03/30/factor-makes-you-write-better-code/#comment-7659727</link><description>Here is moving average in J:&lt;br&gt;&lt;br&gt;   [arr =. i.10&lt;br&gt;0 1 2 3 4 5 6 7 8 9&lt;br&gt;&lt;br&gt;   ave =. +/%#&lt;br&gt;&lt;br&gt;   4 ave \ arr&lt;br&gt;1.5 2.5 3.5 4.5 5.5 6.5 7.5</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex13</dc:creator><pubDate>Tue, 31 Mar 2009 02:16:54 -0000</pubDate></item><item><title>Re: Factor makes you write better code</title><link>http://phildawes.net/blog/2009/03/30/factor-makes-you-write-better-code/#comment-7652280</link><description>I think you can eliminate the inner loop by storing a "moving" sum. I'm sorry but I don't know how to put this into factor.&lt;br&gt;&lt;br&gt;    var sum = 0;&lt;br&gt;    for (i=0; i&amp;lt;arr.length; i++) {&lt;br&gt;        if (i &amp;gt;= period) sum -= arr[i - period];&lt;br&gt;        sum += arr[i];&lt;br&gt;        out.push (sum / period);&lt;br&gt;    }</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sam Danielson</dc:creator><pubDate>Mon, 30 Mar 2009 21:24:59 -0000</pubDate></item><item><title>Re: And another new programming language</title><link>http://www.phildawes.net/blog/2007/09/28/and-another-new-programming-language/#comment-7193132</link><description>I'm still looking for a minimal machine that supports true hardware parallelism.  Any thoughts? Pointers?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeff</dc:creator><pubDate>Fri, 13 Mar 2009 21:00:20 -0000</pubDate></item><item><title>Re: Spread Betting</title><link>http://phildawes.net/blog/2008/12/12/spread-betting/#comment-5557054</link><description>How is it going, a few weeks later?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lorraine</dc:creator><pubDate>Mon, 26 Jan 2009 16:51:30 -0000</pubDate></item><item><title>Re: Spread Betting</title><link>http://phildawes.net/blog/2008/12/12/spread-betting/#comment-4439667</link><description>nice read i understand your pain about requiring compliance permission for each trade as i used to work for a brokerage company and had the same problem, the current system is pretty ridiculous - at the time i used to trade forex which didn't  require disclosure ;)&lt;br&gt;&lt;br&gt;Andy&lt;br&gt;&lt;br&gt;&lt;a href="http://www.financial-spread-betting.com" rel="nofollow"&gt;http://www.financial-spread-betting.com&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy</dc:creator><pubDate>Tue, 16 Dec 2008 19:19:03 -0000</pubDate></item><item><title>Re: Disqus comments</title><link>http://phildawes.net/blog/2008/10/01/disqus-comments/#comment-2800166</link><description>Thanks for pointing me at your script - I'll defo check it out</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phildawes</dc:creator><pubDate>Thu, 02 Oct 2008 10:19:14 -0000</pubDate></item><item><title>Re: Really simple html templating in factor</title><link>http://www.phildawes.net/blog/2008/09/29/really-simple-html-templating-in-factor/#comment-2795674</link><description>Phil, by sheer coincidence, Doug Coleman (erg) implemented something similar in extra/interpolate. He's using it to construct SQL stored procedures, IIRC. Perhaps you could look at his code for ideas, or merge your efforts? On a related note, I'd love to have your work (possibly after refactoring it to use 'interpolate') in the repository under basis/html/templates/simple, or something like that. Having more options for templating is always good.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Slava Pestov</dc:creator><pubDate>Thu, 02 Oct 2008 05:24:14 -0000</pubDate></item><item><title>Re: Disqus comments</title><link>http://phildawes.net/blog/2008/10/01/disqus-comments/#comment-2779408</link><description>For the past 5 years my blog has consisted of a gently accumulating Python script. It is currently around 300 lines, up from 200 or so when I initially created it. Around 2006 I decided to write a script to import the (filesystem-based) articles into a WordPress install. Instant dissatisfaction. WordPress is huge, insecure, and a little overfeatured for the average Joe.&lt;br&gt;&lt;br&gt;So I'm still here with my horrible little Python script, and quite happy to be using it over WordPress. I'm presently adding an archives facility, integration with Disqus, and my first attempt at a pretty theme.&lt;br&gt;&lt;br&gt;Take a look, it does HTML and RSS 2.0 output, and supports either HTML or a horrible wiki-like formatting for posts:&lt;br&gt;&lt;br&gt;&lt;a href="http://pastebin.com/f1be9ea59" rel="nofollow"&gt;http://pastebin.com/f1be9ea59&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">davemw</dc:creator><pubDate>Wed, 01 Oct 2008 11:24:21 -0000</pubDate></item><item><title>Re: Really simple html templating in factor</title><link>http://www.phildawes.net/blog/2008/09/29/really-simple-html-templating-in-factor/#comment-2764128</link><description>Have you seen Haml? It's a templating language that makes some complex control stuff with HTML or XML look good. I'm not really sure how it would integrate with Factor evaluation methods though.&lt;br&gt;&lt;br&gt;&lt;a href="http://haml.hamptoncatlin.com/" rel="nofollow"&gt;http://haml.hamptoncatlin.com/&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ryantm</dc:creator><pubDate>Tue, 30 Sep 2008 17:25:02 -0000</pubDate></item><item><title>Re:  Searching arrays in X86 assembler with a bloom filter pt 3</title><link>http://www.phildawes.net/blog/2008/09/12/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-3/#comment-2753783</link><description>Slava Pestov wrote:&lt;br&gt;&amp;gt; Hi Phil,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; I couldn't post a comment on your blog for some reason so I'm posting&lt;br&gt;&amp;gt; this to the list instead.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; The seq&amp;gt;hash word you write already exists in the sets vocabulary, its&lt;br&gt;&amp;gt; called unique.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; And (prepare-filter) looks nicer if you use fry:&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;     : (prepare-filter) ( filter seq -- )&lt;br&gt;&amp;gt;       '[ 1048576 mod _ set-bit ] each ;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Slava</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Phil Dawes</dc:creator><pubDate>Sat, 13 Sep 2008 06:30:13 -0000</pubDate></item><item><title>Re:  Searching arrays in X86 assembler with a bloom filter pt 3</title><link>http://www.phildawes.net/blog/2008/09/12/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-3/#comment-2753782</link><description>@Asm - thanks for the link, that's a handy resource</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Phil Dawes</dc:creator><pubDate>Sat, 13 Sep 2008 06:29:11 -0000</pubDate></item><item><title>Re:  Searching arrays in X86 assembler with a bloom filter pt 3</title><link>http://www.phildawes.net/blog/2008/09/12/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-3/#comment-2753785</link><description>Variable shifts have the count in %cl.&lt;br&gt;&lt;br&gt;But why bother? bt r,r and bt r,i are only 1 uop on a Core2. Check the instruction timings here: &lt;a href="http://www.agner.org/optimize/" rel="nofollow"&gt;http://www.agner.org/optimize/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Use mov (%eax,%edi,4), %edi and drop the shl $0x2, %edi.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Asm</dc:creator><pubDate>Fri, 12 Sep 2008 19:44:30 -0000</pubDate></item><item><title>Re:  Searching arrays in X86 assembler with a bloom filter pt 3</title><link>http://www.phildawes.net/blog/2008/09/12/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-3/#comment-2753784</link><description>You can shift by the contents of the CL register, e.g. shl %cl, %eax .</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 12 Sep 2008 19:15:20 -0000</pubDate></item><item><title>Re: Searching arrays in X86 assembler with a bloom filter pt 2</title><link>http://www.phildawes.net/blog/2008/09/11/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-2/#comment-2753774</link><description>Thanks for the tip Asm. It seems pretty quick but I'll try the ANDing and SHRing approach to see how it compares</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Phil Dawes</dc:creator><pubDate>Fri, 12 Sep 2008 09:21:58 -0000</pubDate></item><item><title>Re: Searching arrays in X86 assembler with a bloom filter pt 2</title><link>http://www.phildawes.net/blog/2008/09/11/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-2/#comment-2753773</link><description>BT is slow for m, r operands. 12 uops on a P4. 10 uops on a Core2. Avoid.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Asm</dc:creator><pubDate>Fri, 12 Sep 2008 07:55:07 -0000</pubDate></item><item><title>Re: Searching arrays in X86 assembler with a bloom filter pt 2</title><link>http://www.phildawes.net/blog/2008/09/11/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-2/#comment-2753772</link><description>Hi Kieran! I'm expecting thousands occasionally. Hundreds commonly.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Phil Dawes</dc:creator><pubDate>Fri, 12 Sep 2008 06:33:13 -0000</pubDate></item><item><title>Re: Searching arrays in X86 assembler with a bloom filter pt 2</title><link>http://www.phildawes.net/blog/2008/09/11/searching-arrays-in-x86-assembler-with-a-bloom-filter-pt-2/#comment-2753771</link><description>Hello, you've said there are around 12M elements in the array, but how many are you expecting in the set? Tens? Hundreds? Thousands?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kieran</dc:creator><pubDate>Fri, 12 Sep 2008 06:26:57 -0000</pubDate></item><item><title>Re: Searching arrays in X86 assembler with a bloom filter</title><link>http://www.phildawes.net/blog/2008/09/10/searching-arrays-in-x86-assembler-with-a-bloom-filter/#comment-2753769</link><description>did you try a judy array?&lt;br&gt;&lt;br&gt;&lt;a href="http://judy.sourceforge.net/" rel="nofollow"&gt;http://judy.sourceforge.net/&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jsh</dc:creator><pubDate>Thu, 11 Sep 2008 20:45:00 -0000</pubDate></item></channel></rss>