Algorithms for the masses - julian m bucknall: All Commentshttp://blog.boyet.com/blog/Graffiti CMS 1.3 Alpha (build 1.3.0.0)Mon, 22 Mar 2010 07:40:29 GMTRE: Ray tracing image from June 2010’s PCPlushttp://blog.boyet.com/blog/pcplus/ray-tracing-image-from-june-2010-rsquo-s-pcplus/#comment-437Mon, 22 Mar 2010 07:40:29 GMThttp://blog.boyet.com/blog/pcplus/ray-tracing-image-from-june-2010-rsquo-s-pcplus/#comment-437Anders Isaksson<p>&quot;... after I’d spent entirely too much time this morning messing around with various options ...&quot;</p> <p>Heh, heh. Watch out, you might get hooked and waste your time tweaking parameters and say to yourself &quot;just this one render too...&quot;. </p> <p>A couple of years ago I was there, but I'm out of it now, honestly, cross my heart etc. - there's just this tiny adjustment I need to do on this...</p> <p> <a target="_blank" href="http://www.brickshelf.com/gallery/anders-isak/IdeaBookInspiration/playtable002.jpg">www.brickshelf.com/.../playtable002.jp</a> </p> RE: Contact Mehttp://blog.boyet.com/blog/blog/contact-me/#comment-436Sun, 21 Mar 2010 22:02:47 GMThttp://blog.boyet.com/blog/blog/contact-me/#comment-436Dave<p>Hi Julian,</p> <p>The zip file is the same code which I'm experiancing the exception. </p> <p>In the code below, oldHeadNext is tested for null if oldHead == oldTail, but not if it isn't. I'm seeing it null inside the else statement, NullReferenceException is thrown from the line where item is assigned oldHeadNext.Item. </p> <p>if (oldHead == head) {</p> <p> if (oldHead == oldTail) {</p> <p> if (oldHeadNext == null) {</p> <p> return false;</p> <p> }</p> <p> SyncMethods.CAS&lt;SingleLinkNode&lt;T&gt;&gt;(...)</p> <p> }</p> <p> else {</p> <p> item = oldHeadNext.Item;</p> <p> haveAdvancedHead = </p> <p> SyncMethods.CAS&lt;SingleLinkNode&lt;T&gt;&gt;(...);</p> <p> }</p> <p>}</p> RE: Contact Mehttp://blog.boyet.com/blog/blog/contact-me/#comment-435Fri, 19 Mar 2010 15:17:46 GMThttp://blog.boyet.com/blog/blog/contact-me/#comment-435julian m bucknall<p>Dave: The code shown on that page is pretty much the latest version. However you can get the really 100% up-to-date :) version here: <a target="_blank" href="http://www.boyet.com/Code/LockFreeCode.zip">www.boyet.com/.../LockFreeCode.zi</a> </p> <p>Cheers, Julian</p> RE: Contact Mehttp://blog.boyet.com/blog/blog/contact-me/#comment-434Fri, 19 Mar 2010 01:25:15 GMThttp://blog.boyet.com/blog/blog/contact-me/#comment-434Dave<p>Hi Julian,</p> <p>I'm using an older version of your lock free queue and I'm occasionally an NullReferenceException in Dequeue() thrown from the line</p> <p>item = oldHeadNext.Item;</p> <p>Is this (http://www.boyet.com/Articles/LockfreeQueue.html) the latest version you've posted? It's newer than the version I used so hopefully the issue I'm experiancing is the thing you fixed. </p> <p>Regards</p> <p>Dave</p> RE: PCPlus 280: Writing a spellcheckerhttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-433Thu, 18 Mar 2010 02:42:15 GMThttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-433julian m bucknall<p>Mark: Quite. Which is why I mentioned it in passing in this blog post. Metaphone is one of those algorithms which is just horrendous in terms of 'special cases' and one that would really not be suitable for a sidebar in an article for the layman. </p> <p>For instance, I can't remember off-hand how it treats -ough endings: rough, bough, hiccough, cough, dough, and so on. Soundex is crap at this, but the discussion of how Metaphone caters for them would be tedious.</p> <p>Cheers, Julian</p> RE: PCPlus 280: Writing a spellcheckerhttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-432Thu, 18 Mar 2010 02:35:48 GMThttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-432julian m bucknall<p>Ruud: the problem with a spellchecker is that you tend to 'embed' knowledge about the language you're spellchecking into the algorithm. So, although a lot of what I described would work in Dutch, quite a bit wouldn't. You've brought up a good issue: essentially it's an area which would require more language expertise.</p> <p>Cheers, Julian</p> RE: PCPlus 280: Writing a spellcheckerhttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-430Wed, 17 Mar 2010 12:51:31 GMThttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-430Mark Gohara<p>A better solution is the metaphone algorithm than soundex it seems to be more precise. </p> RE: PCPlus 280: Writing a spellcheckerhttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-429Wed, 17 Mar 2010 09:44:35 GMThttp://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/#comment-429Ruud<p>In the past I worked with a dictionary (for a song book) in Dutch.</p> <p>In Dutch (especially in poetry) an apostrophe can be used for ommision of one or more letters. This can even be the case at the beginning or the end of a word.</p> <p>But the same computer character that is used for the apostrophe is also used for the single quotation mark (at least in that ASCII time). So an apostrophe at the end of a word (with no whitespace in between) can be part of the word or part of the quotation...</p> <p>I have never found a satifying solution for this problem but manual intervention. Are you aware of solutions ot this problem?</p> <p>If you have a dictionary, looking it up is a possibility, but if you want to extract a dictionary (which was the case I was dealing with), what then?</p> <p>(Side note: Dutch also uses compound words, like German does.)</p> RE: PCPlus 270: An introduction to diffshttp://blog.boyet.com/blog/pcplus/pcplus-270-an-introduction-to-diffs/#comment-428Wed, 17 Mar 2010 04:50:52 GMThttp://blog.boyet.com/blog/pcplus/pcplus-270-an-introduction-to-diffs/#comment-428PCPlus 280: Writing a spellchecker<p>I write a monthly column for PCPlus , a computer news-views-n-reviews magazine in the UK (actually there are 13 issues a year — there’s an Xmas issue as well — so it’s a bit more than monthly). The column is called Theory Workshop and appears in the Make</p> <br /> Trackback url: http://blog.boyet.com/blog/pcplus/pcplus-280-writing-a-spellchecker/RE: Someone is wrong on the internet — the lock-free stack editionhttp://blog.boyet.com/blog/blog/someone-is-wrong-on-the-internet-mdash-the-lock-free-stack-edition/#comment-427Mon, 15 Mar 2010 23:17:20 GMThttp://blog.boyet.com/blog/blog/someone-is-wrong-on-the-internet-mdash-the-lock-free-stack-edition/#comment-427julian m bucknall<p>James: Ah, if only you knew what you were talking about. But since you don't -- otherwise you'd have perhaps put your money where your mouth is and written a blog post to show the error of my ways and referenced it here for all to see -- I'll assume that you're clueless in these matters. Thanks for passing by.</p> <p>Cheers, Julian</p>