<?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>Alice, Bob and Mallory comments</title>
    <link>http://alicebobandmallory.com/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>security and obscurity</description>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;&lt;a href="http://coding-time.blogspot.com/2008/03/implement-your-own-parallelfor-in-c.html" rel="nofollow"&gt;http://coding-time.blogspot.com/2008/03/implement-your-own-parallelfor-in-c.html&lt;/a&gt; - makes it possible to run FindPrimesBySieveOfAtkins unchanged in C# 2.0-3.5.&lt;/p&gt;</description>
      <pubDate>Wed, 20 Jan 2010 09:11:22 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d5f02f7b-3ad8-44c6-b427-17d58eec4f51</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3939</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;So should maybe use the Set method instead then? Or doesn&amp;#8217;t make much difference perhaps&amp;#8230;&lt;/p&gt;

&lt;p&gt;Thanks for the link. Will check it out :)&lt;/p&gt;</description>
      <pubDate>Tue, 19 Jan 2010 18:33:16 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:ab5f14c5-6d7f-4149-84cb-383057d2e248</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3934</link>
    </item>
    <item>
      <title>"Find primes in regexp" by Jonas Elfström</title>
      <description>&lt;p&gt;&lt;a href="http://stackoverflow.com/questions/20448/what-is-the-most-brilliant-regex-youve-ever-used/20546#20546" rel="nofollow"&gt;http://stackoverflow.com/questions/20448/what-is-the-most-brilliant-regex-youve-ever-used/20546#20546&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And it was created by &lt;a href="http://www.abigail.be/" rel="nofollow"&gt;http://www.abigail.be/&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 18 Jan 2010 21:46:43 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:6c0e4551-f064-49db-a78b-f520108e0899</guid>
      <link>http://alicebobandmallory.com/articles/2007/03/30/find-primes-in-regexp#comment-3931</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;&lt;i&gt;&amp;#8220;I was wondering if it could be done in a nice way without using Parallel.&amp;#8221;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Check out:  &lt;a href="http://www.codeproject.com/KB/dotnet/PoorMansParallelForEach.aspx" rel="nofollow"&gt;http://www.codeproject.com/KB/dotnet/PoorMansParallelForEach.aspx&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 16 Jan 2010 16:11:21 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:cc5562be-58a8-4d77-b9f1-bc2ff135ce61</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3919</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;If Holterman is correct then my usage is thread safe: &lt;a href="http://stackoverflow.com/questions/1213997/is-there-a-generic-type-safe-bitarray-in-net/1214686#1214686" rel="nofollow"&gt;http://stackoverflow.com/questions/1213997/is-there-a-generic-type-safe-bitarray-in-net/1214686#1214686&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 17:24:41 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:5c6e0ff7-7806-4f22-9995-72d7d9531954</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3914</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;That&amp;#8217;s for &amp;#8220;long, ulong, double, and decimal&amp;#8221;.
Read/write of booleans is atomic. I&amp;#8217;m just not sure that isPrime[n] = !isPrime[n]; is the same as 
Boolean test = false;
test = !test;
which would be atomic.&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 16:23:15 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:254adce2-07ea-4bbf-adec-abf09c5dbf4c</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3913</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;From that link you posted: &amp;#8220;Aside from the library functions designed for that purpose, there is no guarantee of atomic read-modify-write, such as in the case of increment or decrement.&amp;#8221; &amp;#8211; Wouldn&amp;#8217;t that mean that it is not thread-safe? or?&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 15:50:13 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:0fbcedf0-41f7-48b3-a761-e72922250f46</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3912</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;But that would remove the parallelism :p I was wondering if it could be done in a nice way without using Parallel.For, but still have the parallelism. (So do whatever Parallel.For does yourself)&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 15:47:57 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:e3c5ceb0-c341-430d-be76-77eccded5be8</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3911</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;Replace the Parallel.For with
for (int x = 1; x &amp;lt;= sqrt; x++)
and remove ); from row 24 and you should be good to go.&lt;/p&gt;

&lt;p&gt;If I understand 
&lt;a href="http://bit.ly/8lZagW"&gt;http://bit.ly/8lZagW&lt;/a&gt; correctly the isPrime[n] = !isPrime[n]; is an atomic operation but I have to investigate the matter of thread safety further. Thanks!&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 13:33:16 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:83d5ec5d-e28b-4bde-9d11-5c211ea3d7fb</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3909</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;Are BitArrays thread-safe, or how does that work?&lt;/p&gt;

&lt;p&gt;Is it possible to write a version of this without the Parrallel.For method? Well, I suppose it is possible of course, but would it be a big mess? :p&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 11:03:18 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:16e6e69c-cc7a-47ee-92b3-8a2a7904f05f</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3908</link>
    </item>
  </channel>
</rss>
