|<< August 2006||October 2006 >>|
int findPositionIf(Collection coll, Predicate pred)
Spent a few minutes playing with the new Turbo C++. It looks pretty lovely, although I haven't spent much time with it yet. I have it building Arabica as a static library against expat, libxml2, and, rather surprisingly, MSXML. Minor issue with Xerces, which just requires an extra header included somewhere (memcpy not declared). No luck so far compiling with Boost. Not sure why.
Initial build files are in svn here.
Pretty printing XML looks like something that should be trivial in XSLT. Something like
perhaps? Sadly that only seems to work with Saxon.
<xsl:output method="xml" indent="yes"/>
Here's a more general solution, cooked up from suggestions here. It produces identical results for the transformers I tested - Saxon, Saxon8, Xalan and MSXML.
<xsl:output method="xml" indent="no"/>
<xsl:param name="indent-increment" select="' '" />
<xsl:param name="indent" select="'
<xsl:copy-of select="@*" />
Had a nice email reporting a successful build and test on Mac OS X 10.4 PPC with g++ 4.0.0 and Boost 1.33.1. Marvellous.
Added Partition, an algorithm for splitting a collection into two. Iterates over the collection, applying a predicate to each element. Objects matching the predicate are removed and added to a results collection.
Anyway, now the Autotools excitement is over and done with, I've kicked off a new branch for the XSLT development, and checked in the code so far. Right now, I have easy bits done (skeleton implementations of xsl:stylesheet and xsl:template, partial implementation of xsl:apply-template, and finished up xsl:choose, xsl:comment, xsl:copy, xsl:copy-of, xsl:for-each, xsl:if, xsl:processing-instruction, xsl:text, xsl:value-of and xsl:sort). There's a smidgen of test code and little command line executable to play with. I know the shape of what's to come, it's just SMOP from now on :)
The changes keep coming. Yesterday saw set intersection, and today I've just committed symmetric difference. My initial feeling was to call it disjunction, but that's clearly the latent logician in me talking.
Another release. I feel giddy.
This release further improves the configuration options, allowing easier selection of the underlying XML parser library.
The Visual Studio 2003 solution and project files have been properly updated (something I unaccountably forgot to do), so that all the tests and examples are built. Compiling Arabica against MSXML also now compiles correctly again.
This release introduces no other new functionality.
Build reports are welcome. Do please drop me a line about how it goes on your particular OS/compiler/library combination to email@example.com
Mango has suddenly become work relevant again. In the last couple of days I've committed a new iterator that works over Strings, and a new algorithm for stripping duplicates from a sorted collection.
I expect more to follow, and will drop a new release soon.
One of the heron's favourite spots at the park is at the top of the pool where the little stream flows in. It wasn't a surprise this morning then when, as I approached, a heron took off and fly down to the far end. Usually, it flies low over the water, and rather sedately. This morning, it was high and fast, settling in a tree rather than down at the water's edge.
Once Badger and I dawdled our way down to the end, I found out why. There were two herons - one taking off from side of the pool, the other out the branches above me. The one I'd disturbed wasn't the regular visitor, but some fish-stealing interloper. The brigand (arr!) flew off over Salisbury Road and disappeared, while our usual morning chum did a gentle circuit and settled in a tree on the island. Order had been restored.
Swans were, well, swanning around on the water this morning. They are very pretty.
Yet another release. Alarming, I know.
This release follows hot on the heels of the previous one, adding incremental tweaks and improvements to the new GNU Autotools based build.
Most significantly, Arabica can now be configured to build without the Boost libraries. If Boost is not available, or is specifically turned off using configure's --without-boost option, the XPath engine is excluded from the build, as is the ability to provide XMLReader template parameters in any order. Chances are you aren't using that second one anyway.
This release introduces no other new functionality.
Build reports are very welcome.
I was all set to write about how the heron who visits the park (currently almost every day, around 6:30 in the morning) has taken to swimming. Swimming isn't something herons are especially known for - I'd certainly never heard of such a thing - but I've seen it swimming again on three separate occasions in the last couple of weeks. This morning it was sculling about in the middle of the pool hunting - actually striking at fish. Amazing.
Anyway, that's what I was going to write about, but on my way back up the park I was startled to see a pair of black swans grazing on the bank. So I didn't.
I have succumbed to yet another mid-to-late-30s Dad stereotype. Racquet sports. Played badminton on Monday with my chum Oli (also mid-30s, three kids aged 6,4 and 6 weeks, works largely from home, see the pattern). I was rubbish. He was marginally less rubbish.
Played again on Wednesday. I was less rubbish. Unfortunately so was he. We were also both stiff as hell from our unaccustomed exercise on Monday. With the benefit of hindsight that was entirely predictable but it didn't occur to either of us when we booked the court.
We'll probably play again next week, as we're clearly now locked in an everlasting duel. Oli has to play to maintain his dominance, will I have that my age'n'guile will overcome his young'n'mobility. Or something.
If you'll excuse me, I have to do some mild calisthenics.
Frighteningly, I've just cut a new Arabica release, a mere month after the previous one. On the one hand I'm happy to announce this, because it's a quite significant. On the other I'm not, because the reason I've had time to do it is because I haven't had any work. Don't be afraid to get in touch if you need an extra pair of hands.
This release significantly simplifies the build procedure, as
I've finally abandoned my increasingly unwieldy collection of Makefile
variables in favour if GNU Autotools. Arabica has been
autoconfiscated, so on any reasonable Unix box the familiar
./configure - make - make install will do the business.
The configure script will check for Expat, Libxml2 or Xerces, in that order, and use which ever it finds first. It also confirms the Boost libraries are available. Finally, it checks for std::wstring support. If std::wstring isn't available, then the appropriate bits of the build are turned off.
As part of autoconfiscating the build, the source tree has been rearranged slightly. The library source files have been split out from the header files, which makes it much easier to sort out installing the built library. The Visual Studio 7 solution files have also been moved out of the main tree into their own subdirectory.
This release introduces no new functionality or bug fixes.
The release has been successfully built on Linux, Cygwin, FreeBSD and DragonFly BSD. Built reports on other platforms, particularly those not using GCC, would be welcome.
Because it has a tender behind.
Went with the Bean to the Redditch Model Railway Club's exhibition, which for reasons I'm not privvy too was held at a leisure centre in King's Heath. Handy for us anyway. He's been wanting to build a model railway of his own for a while. Natalie's Uncle Robert has a particularly impressive setup in his loft - he's a terrific scratch-builder. When we visited last summer, he let Daniel go at controlling the trains, which left rather a strong impression.
What really tipped him over the top to actually wanting to build a railway of his own was seeing the immense model layout at housed at the Telford Steam Railway (which is a lovely little railway, and worth a trip out if your nipper is even remotely train-interested). That was back in December, and I spent the time since trying to put him off. Model railways aren't cheap, and building any kind of fixed layout is going to be a time-consuming business. I didn't want to kick it all off, only for him to change his mind. He's stuck at it though, and after a second trip to Telford in June, I agreed we could.
He seemed thorough reconciled to the fact that we'll have to start small, that our models may not look as spectacular as those we've seen, and all the rest. I made clear at the time we wouldn't start building until the end of the summer. He, bless him, has seemed to have been patiently mulling it over almost constantly since (remarkably - patient isn't something he's usually good at). Periodically, he's produced little colour maps of proposed layouts, complete with annotations and keys. I've researched Ebay. We have been gently preparing ourselves mentally.
And today we started. At the exhibition, there were 16 or so display layouts, all of which were more or less terrific. There were at various different scales ranging from N (teeny-tiny) through to things that look almost big enough to ride on. Some layouts modelled real locations (to astonishing detail) while other tried to evoke a particular time and period - 1830s US East Coast, a Midlands branch line in the 1950s, that kind of thing. For us the best layout was Sutton Coldfield MRC's Sutton Folly. Uniquely in the country apparently, they let the general public actually control the trains on the track. We don't pretend this is anything other than a big trainset remarked one of the chaps running it, but that was why it was so great. Daniel got to control a train, a signal, some points. They'd made a point of using off-the-shelf track, rolling stock, models and other scenery, so I got a chance to see what was achievable.
I have some small painting and model-building skillz from when I was an active table-top gamer and, as we toured the dealers stands, I began to get really quite fired up. Some of the kits you can buy are absolutely beautiful. You could put the uncut sheets on your wall, some of them. We don't actually have any track or trains yet, nor any idea of what our layout will look like, but we really, really wanted to buy something (because we explicitly hadn't planned to and wanted the thrill of the naughty). Daniel decided the most useful thing we could get would be a station, as we'd be bound to have one somewhere. That seemed sensible, so we did. I chose a pre-cut cardboard model kit, so he could join in the forthcoming cutting'n'gluing fun. This afternoon, I bought a fresh tube of Uhu and some fresh X-Acto blades. Tomorrow, perhaps, we'll do a bit of cut-and-stick.
Dad? he asked, as we left when we build out layout, will I be allowed to control the trains? Yes, little mate I assured him, you will.
Years later, in Texas, I started collecting HO scale North American models and got hooked. Right now everything is in storage (in Redditch!) but I am looking forward to one day having my Southern Pacific GS-4 4-8-4 "Daylight" pulling a rake of 10 cars (coaches in UK parlance) round wide curves in some space I don't actually own yet! And I have a Union Pacific "Big Boy" as well for the freight train. Woo woo, Engineer Ashton here!
My track arrived today. I'd assumed it was going to be a random selection of odd bits, bit it appears to a be a complete set of some early vintage. It came with a rather yellowed Tri-ang Hornby leaflet, listing dealers across the country and around the globe. Need your train-set fixed while on a jaunt to Nassau? The Maura Lumber Co Ltd can assist!
I found it all jolly exciting, and insisted on showing it to Pete (who I detect was also slightly stirred). He mentioned your set, but didn't know its disposition. I've been bracing chaps I know who fit the profile (mid-50s+, grown-up children) to see if I can locate a stash in someone's attic. Thee's always the possibility, of course, that they'd be keeping it for themselves, and I see that's the case with you :)
Ah - our chum Google has your pictures too ...
|<< August 2006||October 2006 >>|