<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-7217962</id><updated>2008-08-07T20:53:59.966+01:00</updated><title type='text'>Tin Can Camera</title><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default?start-index=26&amp;max-results=25'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>126</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7217962.post-8929642460288397507</id><published>2008-08-07T20:45:00.003+01:00</published><updated>2008-08-07T20:53:59.982+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='kin'/><title type='text'>Why Type</title><summary type='text'>For work, I'm demoing a GUI editor, which means undo would be nice, which is easiest to implement if you enforce purely functional data structures. So I'm doing a bit of reading as to how to implement suitable structures in Java 1.6, as that's the project's target language, and using Eric Lippert's examples as part of my reference material.

There was also yet another thread on </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/08/why-type.html' title='Why Type'/><link rel='related' href='http://blogs.msdn.com/ericlippert/archive/2007/12/06/immutability-in-c-part-three-a-covariant-immutable-stack.aspx' title='Why Type'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=8929642460288397507' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8929642460288397507'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8929642460288397507'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-740492999980356270</id><published>2008-06-30T23:45:00.005+01:00</published><updated>2008-07-01T01:07:32.617+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='math'/><title type='text'>Cedric's challenge, C port and analytic attempt</title><summary type='text'>I was a bit disappointed that the C port of the previous code wasn't quite as fast as another approach which cached more state instead of generating the i'th value. The second attempt, using the bcd lists was comparable to John Wilson's Java version (1.3 seconds rather that 1.5 reported by the Java), and an attempt using bitsets a bit slower. Timings on Eee pc 900, Ubuntu hardy heron. The code is</summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/06/cedrics-challenge-c-port-and-analytic.html' title='Cedric&apos;s challenge, C port and analytic attempt'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=740492999980356270' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/740492999980356270'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/740492999980356270'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-5558892571476588644</id><published>2008-06-28T16:44:00.004+01:00</published><updated>2008-06-28T16:50:41.948+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>A coding challenge</title><summary type='text'>An implementation of the coding challenge of Cedric's.

Somewhat coloured by the fact I normally use python as a prototyping language prior to production coding in C++. 

The combinations technique (using a bcd string instead of list) gets faster than the filtering technique for max somewhere between 1,000,0000 and 10,000,0000. As python is bytecode, it may be slower to bit-twiddle than use a </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/06/coding-challenge.html' title='A coding challenge'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=5558892571476588644' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5558892571476588644'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5558892571476588644'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-1791579750591271281</id><published>2008-06-12T21:17:00.003+01:00</published><updated>2008-06-14T14:39:51.385+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubiquitous-computing'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Eee's are good, Eee's are good</title><summary type='text'>I got an Asus Eee PC the other week, and spent the weekend and the last few evenings putting Ubuntu 8.04 on it (compiz, Ubuntu studio themes, several desktop tweaks, scite text editor, installing wifi and other drivers). It's small and cute. The screen is surprisingly legible, even for tiny text at arms length, and it's smoother than my big laptop running compiz.

As I don't have a USB DVD drive,</summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/06/eees-are-good-eees-are-good.html' title='Eee&apos;s are good, Eee&apos;s are good'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=1791579750591271281' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/1791579750591271281'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/1791579750591271281'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-9016383683213368967</id><published>2008-06-03T23:23:00.002+01:00</published><updated>2008-06-03T23:28:04.392+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geo'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>On the map</title><summary type='text'>Received a little gps 'mouse' receiver in the post today, and (having installed gpsd and python-gps) have got it running as a local service with my first google maps mashup. The server is here, it just shows a google map centred on the current location. I now need to wait until I get a mobile broadband dongle and the new tiny laptop I've ordered (Asus eee 900) and then can have gps on the road (</summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/06/on-map.html' title='On the map'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=9016383683213368967' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/9016383683213368967'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/9016383683213368967'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-2438445072703294118</id><published>2008-05-28T22:36:00.005+01:00</published><updated>2008-05-29T00:22:16.189+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='uml'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Python and EA</title><summary type='text'>For my current contract, I'm part of a team producing scripts which define interfaces to equipment in a satellite communications system for monitoring and control. Various interfaces, serial, low-level TCP and SNMP.

The application is fairly old - originated on Unix in early 1990s, ported to MFC late 1990s - and there are many links between the various configuration files. It's a high </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/05/python-and-ea.html' title='Python and EA'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=2438445072703294118' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/2438445072703294118'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/2438445072703294118'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-8876163723336053591</id><published>2008-05-20T22:49:00.003+01:00</published><updated>2008-05-20T23:04:09.750+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Lambda The Ultimate and Matrix Distractions</title><summary type='text'>I had been reading up a bit on trace-based JIT. I'm not sure that there's any real difference between trace based and method based JIT if each branch is converted to CPS style call with type feedback. Which means removing the optimisation of having jumps and branches from the bytecode, and replacing them with dynamic calls. 

But then I got distracted by a discussion of Strassen matrix </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/05/lambda-ultimate-and-matrix-distractions.html' title='Lambda The Ultimate and Matrix Distractions'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=8876163723336053591' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8876163723336053591'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8876163723336053591'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-8307802797791755309</id><published>2008-04-30T21:51:00.006+01:00</published><updated>2008-04-30T22:20:00.696+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Test of syntax highlight</title><summary type='text'>Test of the syntaxhighlighter:


    # generic sequence trait
    trait seq&lt;T&gt;
        def empty : boolean
        def head : T
        def tail : seq&lt;T&gt;
        def to_string =&gt; '[' ++ join(self, ', ') ++ ']'
        def concat (other:seq&lt;T&gt;)
            =&gt; other.empty ? self : shift(other, reverse)
        def reverse =&gt; shift([], self)
</summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/04/test-of-syntax-highlight.html' title='Test of syntax highlight'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=8307802797791755309' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8307802797791755309'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8307802797791755309'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-7359761291744715275</id><published>2008-04-25T09:55:00.002+01:00</published><updated>2008-04-25T10:53:22.181+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='uml'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='kin'/><category scheme='http://www.blogger.com/atom/ns#' term='languages'/><title type='text'>Some things I'm thinking about</title><summary type='text'>I've been playing more with my mostly functional modelling and simulation language (kin), here are some ideas which I want to try and profile to see if they offer gains:

Carrying type and data as a tuple:
Some implementation of Scheme and JavaScript use a single void* size datum for each object, and for integers set the lowest bit and encode the value in the rest, and for other objects the </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/04/some-things-im-thinking-about.html' title='Some things I&apos;m thinking about'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=7359761291744715275' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/7359761291744715275'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/7359761291744715275'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-8939523464531964508</id><published>2008-04-20T22:29:00.003+01:00</published><updated>2008-04-20T22:50:35.891+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='kin'/><category scheme='http://www.blogger.com/atom/ns#' term='languages'/><title type='text'>Bjarne Stroustrup on the Evolution of Languages</title><summary type='text'>A few comments on this -

The illustrations in the interview don't appear related other than that they are of an IDE ("I might have a different opinion if a good IDE was universally available", queue Visual Studio, which implies that VS isn't a good IDE) and that the UML is illustrating multiple inheritance, but  mechanism for dispatch in the paper is not based on multiple inheritance (at least </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/04/bjarne-stroustrup-on-evolution-of.html' title='Bjarne Stroustrup on the Evolution of Languages'/><link rel='related' href='http://msdn2.microsoft.com/en-us/magazine/cc500572.aspx' title='Bjarne Stroustrup on the Evolution of Languages'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=8939523464531964508' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8939523464531964508'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8939523464531964508'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-256671724281714997</id><published>2008-04-13T11:14:00.004+01:00</published><updated>2008-04-13T11:29:50.233+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='art'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Andy Goldsworthy - Rivers and Tides</title><summary type='text'>We got the DVD as a wedding gift, and watched it last night. 

I like Andy Goldsworthy, both for his aesthetic and the humility that lets a work exist within an environment which makes it transient, or fluid.

Watching him create a work, sometimes it would fall. Often it was compromised to fit with the time scale imposed by the environment by tide or light.  

At each fall, a discovery. More of </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/04/andy-goldsworthy-rivers-and-tides.html' title='Andy Goldsworthy - Rivers and Tides'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=256671724281714997' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/256671724281714997'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/256671724281714997'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-8017364174698801995</id><published>2008-04-08T09:44:00.003+01:00</published><updated>2008-04-08T09:47:44.419+01:00</updated><title type='text'>Boot Wierdness</title><summary type='text'>Note to self:

I added bootparamsd to my bubba (so I can increase RAM disk size), and now if it's plugged into the ADSL I can't get the internet.

Also, continuing errors on booting the Amilo A1650g - added noapic to the boot params and turned off fast boot in the bios. Still don't know why there's a IRQ conflict.</summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/04/boot-wierdness.html' title='Boot Wierdness'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=8017364174698801995' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8017364174698801995'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8017364174698801995'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-6110536911834837166</id><published>2008-03-29T18:13:00.004Z</published><updated>2008-04-03T18:13:59.084+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='kin'/><category scheme='http://www.blogger.com/atom/ns#' term='languages'/><title type='text'>More kin musings</title><summary type='text'>Back from finishing a contract in Malvern, and have had a few ideas on kin.

If general allocation is monomorphic arrays in column order, then single object representation is just a stride of 1 and a length of 1, and padded as required.

Assumption is that the code will operate on arrays, so compiler should default to vector ops where possible.

Need some basic constructs before starting, </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/03/more-kin-musings.html' title='More kin musings'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=6110536911834837166' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6110536911834837166'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6110536911834837166'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-6371143261447424825</id><published>2008-03-29T12:13:00.002Z</published><updated>2008-03-29T12:25:50.249Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>Update</title><summary type='text'>I haven't posted since November, as I've been a bit busy.

I got married on the 29th December.

I left my job writing an interpreter for real-time simulation in South Wales so I could come to Glasgow and had employment at Crocodile Clips in Edinburgh, writing electronics and physics simulation software for schools. Unfortunately, Crocodile lost a large order so failed to honour that contract, so </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/03/update.html' title='Update'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=6371143261447424825' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6371143261447424825'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6371143261447424825'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-6767037958515632672</id><published>2008-01-28T10:34:00.001Z</published><updated>2008-03-29T12:13:47.956Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='languages'/><title type='text'>Plays well with others?</title><summary type='text'>&gt; I know large systems can be built statically...I've also done it dynamically in more than one dynamic language.
That hasn't quite been my experience - every large system I've worked on has ended up getting layered into a static core with dynamic or DSL scripting. Greenspun's tenth rule.

On the other hand, even medium applications I've been involved in which were implemented only in a dynamic </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2008/01/plays-well-with-others.html' title='Plays well with others?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=6767037958515632672' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6767037958515632672'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6767037958515632672'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-14273009365452972</id><published>2007-11-01T09:01:00.000Z</published><updated>2007-11-01T10:14:39.245Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='widefinder'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>One more wide-finder</title><summary type='text'>Since previous efforts didn't print the results summary, they weren't really complete, so here are two more variants using a vector (tbrayA.cpp) and a priority queue (tbrayB.cpp) to get the top 10 entries.  

There's a pthread parallel version of the B variant (tbrayB_parallel.cpp). The main thread reads chunks, scans back to a line break, and hands off the chunk to a pool of worker objects, </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/11/one-more-wide-finder.html' title='One more wide-finder'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=14273009365452972' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/14273009365452972'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/14273009365452972'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-5115170659546449217</id><published>2007-10-26T19:45:00.000+01:00</published><updated>2007-10-26T20:10:36.373+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='kin'/><category scheme='http://www.blogger.com/atom/ns#' term='gc'/><title type='text'>Garbage</title><summary type='text'>I've been thinking a bit about garbage collection and stack allocation, and both Robert O'Callahan and phaeron at virtualdub seem to have been.

Chicken scheme seems to have something interesting - a single stack which is collected on exhaustion (rather than C# or Java VMs which have a traditional program stack and a stack based allocator), so I'm thinking about implementing a </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/10/garbage.html' title='Garbage'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=5115170659546449217' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5115170659546449217'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5115170659546449217'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-9211519055666450152</id><published>2007-10-18T22:39:00.000+01:00</published><updated>2007-10-18T23:40:30.910+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='metaprogramming'/><category scheme='http://www.blogger.com/atom/ns#' term='math'/><category scheme='http://www.blogger.com/atom/ns#' term='languages'/><title type='text'>I hate everybody</title><summary type='text'>Well, every programming language I've ever used anyway.

Not a lot to report, I've faded off of doing the wide-finder thing as the MPI ruby code was about as good as I could expect in elegance, and I'm more interested in other stuff at the moment. It did get me annoyed with C++ again, in that its primary mechanisms for specialisation - template metaprogramming and single dispatch polymorphism - </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/10/i-hate-everybody.html' title='I hate everybody'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=9211519055666450152' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/9211519055666450152'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/9211519055666450152'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-5843617658849009254</id><published>2007-10-05T23:32:00.000+01:00</published><updated>2007-10-05T23:43:12.011+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='widefinder'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>A few more thoughts on concurrency and high-level languages</title><summary type='text'>I little while ago, I started playing with a pattern-matching and relational language for meta-programming called 'kin' (it's got relations, and does pattern, so kin/kinship).

Being a machine elf rather than a language lawyer, I never could come up with a decent user syntax for it; I've toyed with making it a lisp (either L1 like scheme or L2 like common lisp; I wrote something that used lisp </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/10/few-more-thoughts-on-concurrency-and.html' title='A few more thoughts on concurrency and high-level languages'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=5843617658849009254' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5843617658849009254'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5843617658849009254'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-8672195134919295791</id><published>2007-10-05T20:52:00.000+01:00</published><updated>2007-10-05T20:57:36.693+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='widefinder'/><title type='text'>POITROAI</title><summary type='text'>For this particular problem, the principles are more important that the exact results, but I'm happier with tbray7.cpp which gives the same results as the regex in the original ruby code:fortinbras:$ time bin/tbray7 datasets/hundred-o10k.ap 
matches: 95400

real    0m0.439s
user    0m0.284s
sys     0m0.144sThe file was in cache for that one so ignore the real time; the important thing is that the</summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/10/poitroai.html' title='POITROAI'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=8672195134919295791' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8672195134919295791'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/8672195134919295791'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-5266092327999232129</id><published>2007-10-04T22:40:00.000+01:00</published><updated>2007-10-04T22:57:52.102+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='widefinder'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Of course, it helps if you tell gcc to generate a 64 bit executable</title><summary type='text'>... when you're using 64 bit operations:
tercel-2:$ time bin32/tbray4 datasets/hundred-o10k.ap 
user    0m5.644s
tercel-2:$ time bin32/tbray6 datasets/hundred-o10k.ap 
user    0m4.048s
tercel-2:$ time bin/tbray4 datasets/hundred-o10k.ap 
user    0m5.725s
tercel-2:$ time bin/tbray6 datasets/hundred-o10k.ap 
user    0m3.839sI'd assumed it would default as it does on linux, but no. Which also </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/10/of-course-it-helps-if-you-tell-gcc-to.html' title='Of course, it helps if you tell gcc to generate a 64 bit executable'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=5266092327999232129' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5266092327999232129'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/5266092327999232129'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-1502970738250787860</id><published>2007-10-02T23:19:00.000+01:00</published><updated>2007-10-03T19:24:48.888+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='widefinder'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>Some fingers in the air.</title><summary type='text'>I got Steve Vinoski's 2007/09/29 erlang code, installed hipe and the bfile module, and it ran on the laptop:
fortinbras:$ cat ../datasets/thousand-o10k.ap &gt; /dev/null
fortinbras:$ time erl -smp -noshell -run tbray5 main 512 ../datasets/hundred-o10k.ap 
110100 matches found

user    1m23.649s
real    1m33.683s
sys     0m1.620sI'm not sure looking at either mine or Steve's code where the 1101th </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/10/some-fingers-in-air.html' title='Some fingers in the air.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=1502970738250787860' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/1502970738250787860'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/1502970738250787860'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-1846046089206546881</id><published>2007-10-02T19:31:00.000+01:00</published><updated>2007-10-02T20:00:54.473+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='art'/><title type='text'>It's a glitch in the Matrix..</title><summary type='text'>Real wire-frame car</summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/10/its-glitch-in-matrix.html' title='It&apos;s a glitch in the Matrix..'/><link rel='related' href='http://www.hemmy.net/2007/09/28/wireframe-toyota-corolla/' title='It&apos;s a glitch in the Matrix..'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=1846046089206546881' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/1846046089206546881'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/1846046089206546881'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-6141100997778189079</id><published>2007-09-30T14:50:00.000+01:00</published><updated>2007-10-01T23:18:21.742+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='widefinder'/><title type='text'>Data-wide wide-finder</title><summary type='text'>Running a test with just breaking into lines without the matching, compared to the non-MPI version with matching runs on the 100x file in 380ms user time rather than 720ms. So there is work in both parts of the string processing.

Parallelising the scan for newlines to work on 8 chars at a time gives a reduction to around 220ms.

Restoring the matching, and parallelising the scan for the first </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/09/data-wide-wide-finder.html' title='Data-wide wide-finder'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=6141100997778189079' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6141100997778189079'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/6141100997778189079'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-7217962.post-7270832174561254421</id><published>2007-09-29T21:56:00.000+01:00</published><updated>2007-10-01T23:13:45.623+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='fortress'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='widefinder'/><category scheme='http://www.blogger.com/atom/ns#' term='languages'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>Wide finder, parallelism and languages</title><summary type='text'>Tim Bray, who knows about web search and was part of the XML specification process, is experimenting with exploiting parallelism in his wide finder project.

I'm interested in parallelism (running similar processes on multiple hardware) and concurrency (having multiple collaborating threads of control in a system), as many interesting problems are intrinsically concurrent, and as hardware isn't </summary><link rel='alternate' type='text/html' href='http://www.tincancamera.com/blog/2007/09/wide-finder-parallelism-and-languages.html' title='Wide finder, parallelism and languages'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7217962&amp;postID=7270832174561254421' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.tincancamera.com/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/7270832174561254421'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7217962/posts/default/7270832174561254421'/><author><name>Pete Kirkham</name><uri>http://www.blogger.com/profile/17321624014729731964</uri><email>noreply@blogger.com</email></author></entry></feed>