<?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>Fri, 06 Nov 2009 08:37:31 -0000</lastBuildDate><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>Spinlocks, &lt;a href="http://repnop.org/analysis/spinlocks.html" rel="nofollow"&gt;http://repnop.org/analysis/spinlocks.html&lt;/a&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>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.</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>You should look at Linux futexes.&lt;br&gt;&lt;br&gt;Note that futexes are (very) tricky to implement correctly, so you should rather study them carefully. Google for "Futexes Are Tricky".&lt;br&gt;&lt;br&gt;Given that pthread stuffs are implemented using futex under Linux, it would be an error to add another layer.</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>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.</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>If you want to keep it C-style, you can encapsulate global state in a struct and pass it around.&lt;br&gt;&lt;br&gt;int x;&lt;br&gt;&lt;br&gt;int foo(){ return x; }&lt;br&gt;&lt;br&gt;Becomes:&lt;br&gt;&lt;br&gt;typedef struct vm_t{&lt;br&gt;   int x;&lt;br&gt;} *VM;&lt;br&gt;&lt;br&gt;void foo(VM vm){ return vm-&amp;gt;x; }</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>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.</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>Why don't you call it an RDF molecule?</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>Tribbles, surely.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dominicsayers</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>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></channel></rss>