OSGeo Charter Nomination for Martin Daly

This month, OSGeo Foundation is conducting annual election of new OSGeo Charter Members.

I have nominated Martin Daly (CTO of Cadcorp) for Charter Member of the OSGeo Foundation.

Martin has long-standing experience in development of geospatial software and development, and adoption of open standards for geospatial under his belt.

Martin has used and supported numerous open source software projects. Martin led Cadcorp to offer first implementation of PostGIS by a GIS vendor, to become a GDAL/OGR Silver Sponsor, to contribute funds and time of Cadcorp development team to make the wheels of PostGIS Raster project (aka WKT Raster) spinning. Improvements in PostgreSQL are also on not-a-short list of contributions to the Free and Open Source Software projects, as is GEOS.

Martin was one of the original members of the OGC Architecture Board (OAB). He was also the main author of the OpenGIS Coordinate Transformation Services Specification as well as participated in developing several other OpenGIS specifications. Martin is one of authors of the GeoJSON Format Specification and actively participates in future development of GeoJSON.

Martin is a member of the Advisory Board of the Open Source Geospatial Lab (OSGL) at the University of Nottingham Centre for Geospatial Science.

Martin also participates and leads Cadcorp involvement in the annual FOSS4G WMS Benchmark.

I believe Martin Daly’s experience and contributions make him a valuable candidate for the OSGeo Charter Member.

New SOCI Project Leader needed

Maciej Sobczak, current leader of SOCI project has just announced on soci-users mailing list that he is looking for a volunteer willing to take over the project leadership. For someone, who would like to take over the project management responsibilities and has a good understanding of the subject as well as a solid vision of what to do with the project in the future.

SOCI is a database access library for C++ that makes the illusion of embedding SQL queries in the regular C++ code, staying entirely within the Standard C++.

Building Boost with Visual Studio 11 Developer Preview

Yesterday, I installed Visual Studio 11 Developer Preview. The new release is available for free and is usable for free until June 2012, so it’s a great opportunity to try and learn what Microsoft has to offer for C++ programmers. And, it looks it offers a lot, including SCARY features.

The first test I usually do when it comes to test a new C++ toolset is to build Boost C++ Libraries using mainstream development sources.

The Boost simply builds well. I have even configured build of Boost.Python using Python version 3.2.

There are no hacks required to make the build happen. Simply, follow Boost Getting Started on Windows, section 5.3. Or, Build Binaries From Source. Once the Boost.Build tools bootstrapped, I issued the following command:

b2 --toolset=msvc variant=debug runtime-link=shared threading=multi define=_CRT_NONSTDC_NO_DEPRECATE define=_CRT_SECURE_NO_DEPRECATE define=_SCL_SECURE_NO_DEPRECATE stage

Fifteen minutes later, the Boost build was ready and staged.

By the way, some time ago Christian Henning posted a quick cheat sheet of bjam commands for Visual Studio. It’s very handy.

shared_ptr almost like intrusive_ptr

The current C++11 Standard consists of a very important remark in section 20.9.11.2.6. It is about creation of shared_ptr object. The remarks state:

Implementations are encouraged, but not required, to perform no more than one memory allocation.
[Note: this provides efficiency equivalent to an intrusive smart pointer. end note]

At work [1], I use Visual C++ 2010+ implementation of C++. I couldn’t resist myself to check if the standard managed to encourage Stephan T. Lavavej (STL) and his team at Microsoft to go for this optimisation.

I compiled and run a quick test:


#include <memory>
int main()
{
    std::shared_ptr<int> p0(
       new int(3)); // #1

    std::shared_ptr<int> p1
        = std::make_shared<int>(3); // #2
    return 0;
}

Quick check using breakpoints confirmed that Visual C++ 2010 indeed optimises construction of the shared_ptr. The difference between #1 and #2 is an important one: the second version causes 50% less memory allocations than the first one. Namely, one allocation. std::make_shared packs bookkeeping data and the user-defined data into a single block of memory.

Know your tools or suffer fragmented.

GCC At Home

I couldn’t leave a blog post alone without some kind of unrelated off-topic and pointless digression. So, here is one: Stephan T. Lavavej on his homepage provides custom-built distribution of MinGW toolset with What MinGW Is section starting as follows:

I recommend that anyone who is learning Standard C++ and who uses Windows for a primary development environment should use two compilers: the most modern version of Microsoft Visual C++ (currently 2010 SP1) and the most modern version of GCC, the GNU Compiler Collection.

Stephan works at Microsoft. I admire this kind of professionalism free from strategically competitive marketing b******t. GCC should definitely be included in the list of New Seven Wonders of the World. Recently, a new wonder has emerged: LLVM/Clang. I’m a user of all the three compilers (and related toolsets). It is easy for me to dream about Visual C++Visual Studio IDE based on LLVM/Clang as C++ compiler and shipped with C/C++ standard libraries provided by GCC. That would be a real C++ Renaissance