<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Phil Dawes' Stuff - Latest Comments</title><link>http://phildawesstuff.disqus.com/</link><description></description><atom:link href="https://phildawesstuff.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 07 Feb 2010 23:55:50 -0000</lastBuildDate><item><title>Re: RDF Literal searching using a suffix array</title><link>http://www.phildawes.net/blog/2004/12/30/rdf-literal-searching-using-a-suffix-array/#comment-32985532</link><description>&lt;p&gt;I've been looking for a nice solution for indexed substring searches - have you gone further with this method, or is there a better solution (afterall, this was 6 years ago) with mysql?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Levi</dc:creator><pubDate>Sun, 07 Feb 2010 23:55:50 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Making tests less brittle</title><link>http://phildawes.net/blog/2009/12/18/tests-less-brittle/#comment-26256660</link><description>&lt;p&gt;Very cool  -I really like these ideas and would love to see more stuff along the same lines, if you or anyone else has any.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Hartley</dc:creator><pubDate>Fri, 18 Dec 2009 14:22:49 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Making tests less brittle</title><link>http://phildawes.net/blog/2009/12/18/tests-less-brittle/#comment-26225724</link><description>&lt;p&gt;This is some of the most sensible writing about test first I've ever read.&lt;/p&gt;&lt;p&gt;For an improvement on unit testing I recently implemented QuickCheck for JavaScript and used it on my own code. I had some existing unit tests and rewrote them as a QuickCheck property. I was happier with the result. There's still some coupling, but the property encapsulates several unit tests. My gut says there's a little less coupling as a result but time will tell.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">darrint</dc:creator><pubDate>Fri, 18 Dec 2009 10:17:15 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Idea for a global interpreter lock optimized for low contention</title><link>http://phildawes.net/blog/2009/10/21/factor-gil-lock-idea/#comment-22029440</link><description>&lt;p&gt;Spinlocks, &lt;a href="http://repnop.org/analysis/spinlocks.html" rel="nofollow noopener" target="_blank" title="http://repnop.org/analysis/spinlocks.html"&gt;http://repnop.org/analysis/...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous Coward</dc:creator><pubDate>Fri, 06 Nov 2009 08:37:31 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Idea for a global interpreter lock optimized for low contention</title><link>http://phildawes.net/blog/2009/10/21/factor-gil-lock-idea/#comment-21784248</link><description>&lt;p&gt;You should look at what the Java folks have done with thin locks, too.  They noticed that a large number of locks are grabbed and uncontended, so they came up with a locking design that's optimized for that case.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nathan</dc:creator><pubDate>Tue, 03 Nov 2009 16:23:51 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Idea for a global interpreter lock optimized for low contention</title><link>http://phildawes.net/blog/2009/10/21/factor-gil-lock-idea/#comment-20792105</link><description>&lt;p&gt;You should look at Linux futexes.&lt;/p&gt;&lt;p&gt;Note that futexes are (very) tricky to implement correctly, so you should rather study them carefully. Google for "Futexes Are Tricky".&lt;/p&gt;&lt;p&gt;Given that pthread stuffs are implemented using futex under Linux, it would be an error to add another layer.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xilun</dc:creator><pubDate>Thu, 22 Oct 2009 13:29:19 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Hand-coding multi-platform assembler using Factor compiler intrinsics</title><link>http://phildawes.net/blog/2009/10/07/factor-compiler-intrinsics/#comment-19598106</link><description>&lt;p&gt;After reading this, I really can't wait for your next post on INSN: and CODEGEN: words.  I have some ideas that I want the compiler to emit (just learning experiments) but this really was a good tutorial on at least the intrinsics support.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Adam</dc:creator><pubDate>Thu, 08 Oct 2009 15:12:19 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Making a C codebase reentrant by turning it into a big C++ object</title><link>http://phildawes.net/blog/2009/09/21/c-codebase-reentrant/#comment-17068083</link><description>&lt;p&gt;If you want to keep it C-style, you can encapsulate global state in a struct and pass it around.&lt;/p&gt;&lt;p&gt;int x;&lt;/p&gt;&lt;p&gt;int foo(){ return x; }&lt;/p&gt;&lt;p&gt;Becomes:&lt;/p&gt;&lt;p&gt;typedef struct vm_t{&lt;br&gt;   int x;&lt;br&gt;} *VM;&lt;/p&gt;&lt;p&gt;void foo(VM vm){ return vm-&amp;gt;x; }&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">foobar</dc:creator><pubDate>Mon, 21 Sep 2009 19:07:53 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; Making a C codebase reentrant by turning it into a big C++ object</title><link>http://phildawes.net/blog/2009/09/21/c-codebase-reentrant/#comment-17034898</link><description>&lt;p&gt;I thought of this idea for another project but haven't tried it yet.  I'm glad to see the approach works and your 5 steps will save me a few false starts.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian</dc:creator><pubDate>Mon, 21 Sep 2009 09:53:18 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; BTriples - a model for aggregating structured data</title><link>http://phildawes.net/blog/2009/07/19/btriples-model-for-aggregating-structured-data/#comment-13199708</link><description>&lt;p&gt;Why don't you call it an RDF molecule?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Name</dc:creator><pubDate>Thu, 23 Jul 2009 08:40:05 -0000</pubDate></item><item><title>Re: Phil Dawes Stuff &gt;&gt; BTriples - a model for aggregating structured data</title><link>http://phildawes.net/blog/2009/07/19/btriples-model-for-aggregating-structured-data/#comment-12943348</link><description>&lt;p&gt;Tribbles, surely.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Mon, 20 Jul 2009 04:54:21 -0000</pubDate></item><item><title>Re: The Factor Attraction</title><link>http://www.phildawes.net/blog/2007/11/23/the-factor-attraction/#comment-10407505</link><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Do you feel that your agility in Factor has improved since this post?&lt;/p&gt;&lt;p&gt;Roger&lt;/p&gt;</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>&lt;p&gt;Thanks for the pointer - I've cleaned up the spam and regrettably added some moderation&lt;/p&gt;</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>&lt;p&gt;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.&lt;/p&gt;</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>&lt;p&gt;Cool - thanks Eric&lt;/p&gt;</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>&lt;p&gt;I pasted some code that does the moving sum in factor.&lt;/p&gt;&lt;p&gt;&lt;a href="http://paste.factorcode.org/paste?id=569#282" rel="nofollow noopener" target="_blank" title="http://paste.factorcode.org/paste?id=569#282"&gt;http://paste.factorcode.org...&lt;/a&gt;&lt;/p&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>&lt;p&gt;This &lt;a href="http://www.reddit.com/r/programming/comments/88oln/factor_makes_you_write_better_code/c08klku" rel="nofollow noopener" target="_blank" title="http://www.reddit.com/r/programming/comments/88oln/factor_makes_you_write_better_code/c08klku"&gt;comment on proggit&lt;/a&gt; was particularly good I thought&lt;/p&gt;</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>&lt;p&gt;More discussion at &lt;a href="http://www.reddit.com/r/programming/comments/88oln/factor_makes_you_write_better_code/" rel="nofollow noopener" target="_blank" title="http://www.reddit.com/r/programming/comments/88oln/factor_makes_you_write_better_code/"&gt;proggit&lt;/a&gt; &lt;/p&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>&lt;p&gt;Here is moving average in J:&lt;/p&gt;&lt;p&gt;   [arr =. i.10&lt;br&gt;0 1 2 3 4 5 6 7 8 9&lt;/p&gt;&lt;p&gt;   ave =. +/%#&lt;/p&gt;&lt;p&gt;   4 ave \ arr&lt;br&gt;1.5 2.5 3.5 4.5 5.5 6.5 7.5&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</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>&lt;p&gt;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;/p&gt;&lt;p&gt;    var sum = 0;&lt;br&gt;    for (i=0; i&amp;lt;arr.length; i++)="" {="" 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;    }&lt;br&gt;&lt;/p&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>&lt;p&gt;I'm still looking for a minimal machine that supports true hardware parallelism.  Any thoughts? Pointers?&lt;/p&gt;</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>&lt;p&gt;How is it going, a few weeks later?&lt;/p&gt;</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>&lt;p&gt;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;/p&gt;&lt;p&gt;Andy&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.financial-spread-betting.com" rel="nofollow noopener" target="_blank" title="http://www.financial-spread-betting.com"&gt;http://www.financial-spread...&lt;/a&gt;&lt;/p&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>&lt;p&gt;Thanks for pointing me at your script - I'll defo check it out&lt;/p&gt;</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>&lt;p&gt;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.&lt;/p&gt;</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></channel></rss>