Pages tagged #boostcpp

by . Last updated .

1. Sunday 14th July 2013
Sunday 14th July 2013: 9.05pm. A long but productive week. The documentation for proposed Boost.AFIO is beginning to resemble something approaching final, despite having been a real pain to get working right. Paul continues to do great work in ripping bits out. As Google Summer of Code Milestone 1 is just three weeks away now, the race is on to deliver a peer review ready new Boost library by then. ...

2. Sunday 28th July 2013
Sunday 28th July 2013: 6.52pm. Link shared: https://github.com/BoostGSoC/boost.afio Last weekend before Google Summer of Code Milestone 1! The race is definitely on, so I was up till 7am poking the unit test bot with a stick and I have a lovely live build matrix showing whether, per-commit, the proposed library compiles and passes a unit test run on these platform and toolset combinations:Static analysis: clang + oclintLinux: GCC + libstdc++ 4. ...

3. Sunday 11th August 2013
Sunday 11th August 2013: 11.22pm. Proposed Boost.AFIO is now within spitting distance of all green :) Just that pesky VS2010 support to go really, Paul's been working hard on the C preprocessor programming to emulate variadic templates.#gsoc2013 #boostcpp #cpp #cpp11https://ci.nedprod.com/ ...

4. Wednesday 14th August 2013
Wednesday 14th August 2013: 3.59am. VS2010 now compiles proposed Boost.AFIO. It has even been known to, sometimes, pass it its unit tests ... still some work to go there, though there is sadly a showstopping segfault in the VS2010 runtime regarding null exception_ptr returns from std::current_exception(), so we may have look into patching in the greatly fixed VS2010 runtime from VS2012. My congrats to Paul for doing such great work in C preprocessor programming! ...

5. Saturday 24th August 2013
Saturday 24th August 2013: 5.18am. Boost.AFIO finally goes all green on the CI ... you have no idea how many dozens and dozens of hours of debugging race conditions in other people's code (and then figuring out workarounds in AFIO code) it has taken to reach this point.I am actually quite emotional. Such a huge amount of effort. So many, many bugs and weirdnesses in the older STLs and Boost. ...

6. Thursday 29th August 2013
Thursday 29th August 2013: 1.15am. Link shared: https://github.com/ned14/FastDirectoryEnumerator So last few days I've been doing some prototyping and experimentation with how to enumerate directories far, far quicker than one usually can as part of implementing the #1 requested feature for proposed Boost.AFIO before GSoC ends, Directory Monitoring Support (http://boostafio.uservoice.com/forums/218980-boost-afio-feature-request/filters/top), and I have discovered many interesting things worth sharing.We all know the common advice to never put too many files into a single directory because " ...

7. Saturday 7th September 2013
Saturday 7th September 2013: 12.14am. Assuming the CI goes all green, fast, asynchronous directory enumeration for Boost.AFIO is done! I'm feeling pretty wrecked, it's been one of those "burn the candle at both ends while you have the open window of time" sorts of things.The process of finding a new job in North America has taken a turn for the worse: the initial very positive recruitment feedback from the tech multinationals - and mention, in at least one instance, of me being the best candidate seen in some years - has been stopped in its tracks once they realised that there is currently a nine month backlog in US green card processing, and a three month backlog in Canadian Labour Market Opinion processing. ...

8. Tuesday 24th September 2013
Tuesday 24th September 2013: 1.14am. So Google Summer of Code 2013 ended today! Boost.AFIO is more or less peer review ready - some additional unit tests to be added mainly to get the code coverage back up, otherwise it's done. Paul will still need some time to finish his directory monitoring feature, but that is fairly orthogonal to the existing code base and its lack of presence doesn't disturb anything. ...

9. Sunday 29th September 2013
Sunday 29th September 2013: 7.03pm. Bleh I'm feeling rough today. Last night whilst watching TV with Megan I had this crazy idea of how to make proposed Boost.AFIO - yes I know it's supposed to be finished as of last Monday - lock free, even wait free apart from the pesky std::unordered_map<> which would need locks around it. And it sufficiently excited me that I just had to get to work on it right now i. ...

10. Monday 30th September 2013
Monday 30th September 2013: 9.10am. Link shared: https://github.com/BoostGSoC/boost.afio/blob/increase_parallelism2/boost/afio/detail/MemoryTransactions.hpp Added a further 15% to AFIO's performance :) I noticed that the standard spinlock was being stupid and was looping compare-exchange which of course sends a ton load of cache line invalidations to all other CPUs. Adding a simple read check to my custom spin lock implementation before the compare-exchange eliminates those cache line invalidations, and voila up goes performance again. My new custom spin lock class is very nice, you compose its behaviour out of templated policy types and it is written using C++ 11 atomics. ...

11. Tuesday 8th October 2013
Tuesday 8th October 2013: 2.37pm. Location: Waterloo, Ontario. Big day today - I should be able to send AFIO into the Boost peer review queue, and hence drawing a line under what has probably been my main excuse against getting a job. It's been a long, long summer indeed! Next week I go to the Googleplex in California for the Google summer of code mentors summit - never been to California before, so that should be interesting. ...

12. Wednesday 9th October 2013
Wednesday 9th October 2013: 4.52am. Looks like AFIO won't enter peer review tonight ... the GCC 4.6 Linux build hangs some of the time on the CI, but I'm dammed if I can replicate the problem on my workstation here. Other than specifically GCC 4.6 on Linux, it's all green across the board, which is great, except for that one remaining obstacle. Grrr ...#boostafio #boostcpp ...

13. Thursday 10th October 2013
Thursday 10th October 2013: 12.51am. Boost.AFIO has just been submitted for Boost peer review. After so many months of effort, I'd like to thank Megan for putting up with all the hours I spent after work pattering away on it; I'd like to thank Paul for doing such a great job in porting the code to Boost for Google Summer of Code; I'd like to thank Google for sponsoring Paul, and the Boost C++ Libraries for voting for AFIO as a GSoC sponsorship candidate; and finally, I'd like to thank my former colleagues at BlackBerry who pulled a lot of favours internally to get BlackBerry Legal to eventually sign off on me working on this in my free time (first ever in BlackBerry history I believe that permission was granted for an employee to contribute to a non-work related open source library). ...

14. Thursday 14th November 2013
Thursday 14th November 2013: 7.40pm. Link shared: http://thread.gmane.org/gmane.comp.lib.boost.devel/246214/ My first time peer review managing a new Boost library appears to be going well, with a lengthy ongoing thread of discussion which suggests I did okay in persuading Boost community members to have a look at the proposed library at all. I'm very glad! I had been worried no one would comment at all! Instead I've got over 30 responses (so far! ...

15. Monday 25th November 2013
Monday 25th November 2013: 12.26am. Link shared: http://boost.2283326.n4.nabble.com/Peer-Review-Report-for-proposed-Boost-TypeIndex-v2-1-Nov-12th-21st-2013-td4655327.html My peer review managership for the Boost C++ Libraries is over! The link links to my report of the peer review.#boostcpp ...

16. Wednesday 27th November 2013
Wednesday 27th November 2013: 3.52am. Link shared: https://github.com/BoostGSoC/boost.afio/commits/content_hashing_merge Was very pleased today with my fourth attempt at an asynchronous batch hash engine for Boost.AFIO which can schedule digest hashing of arbitrary length texts to all SIMD streams on all CPU cores (with a preference for filling SIMD streams before CPU cores). Getting the scheduler design right was quite tricky, because as individual hash operations end, the tail operations from the end of the scheduled batch need moving downwards to fill holes such that individual SIMD streams in CPUs aren't doing useless work, and this must be done while each CPU core runs entirely independently from the others (a CPU core only breaks processing if one stream runs out of data) so getting the locking semantics correct was non-trivial. ...

17. Saturday 11th January 2014
Saturday 11th January 2014: 5.37pm. After another day spent optimising proposed Boost.AFIO's build infrastructure and patching in precompiled headers support, I now have total rebuild time including all unit tests and code examples on my Intel Atom 220 down to 5 minutes 8 seconds. That's down from somewhere north of 40 minutes originally, which makes for an eightfold improvement in build times.It's quite amazing how lazy modern CPUs make us actually. ...

18. Friday 28th March 2014
Friday 28th March 2014: 8.36pm. Link shared: https://travis-ci.org/BoostGSoC13/boost.afio/jobs/21789340 Finally got round to adding a clang 3.4 ThreadSanitize and UndefinedBehaviorSanitize pass per commit to proposed Boost.AFIO. The reason I put it off for so long was the labour of writing the suppressions file to filter out all the false positives generated by the Boost libraries - I really wish the maintainers of those Boost libraries would get round to fixing up their code with _attribute_((no_sanitize_thread)) where needed :( Anyway, tis done now, and if I should ever accidentally introduce racy code in the future, Travis CI will shout at me :)#boostcpp #boostafio #clang #llvm #racecondition ...

19. Tuesday 22nd April 2014
Tuesday 22nd April 2014: 11.44pm. Location: Dromahane. Just finished with Megan the last of the most excellent Yellow Spot to celebrate finishing the first draft of my C++ Now conference paper, and all the coursework for my OU graph algorithms course. It's been a very long and hard month to get this far, but the end is finally coming into sight. Hoorah!#cppnow#boostcpp ...

20. Monday 28th April 2014
Monday 28th April 2014: 5.16pm. Just paid $1,566 canadian dollars to the Canadian tax man for my 2013 tax return to pay for the pleasure of being laid off. It was a royal pain in the hole to get that tax return completed - I was missing important documents, which had to get rushed to Megan's parents so they could scan them to me; I was capped at how much moving expenses I could deduct to my Irish 2013 earnings, which were virtually nil, turning my expected refund into a large bill; online submission refused to work, so it was a rush job to the post office today with printed copies which weigh in a 36 pages each (one for me, another for Megan), coupled with a direct bank transfer all of which had to be set up because the Canadian revenue agency make it surprisingly hard to pay taxes - forget about using a credit or debit card, for example. ...

21. Saturday 3rd May 2014
Saturday 3rd May 2014: 3.37pm. One week to go to the C++ Now conference in Aspen, Colorado where I'll be presenting. I have not, as yet:* Completed the academic paper for the proceedings. It has become like a hydra, ever-bloating with yet more information and supporting evidence, having been intended to be ten pages, and now up to nineteen with twenty pages expected. Bleh.* Submitted the new Boost permit object for review. ...

22. Thursday 8th May 2014
Thursday 8th May 2014: 10.23am. Looks like my talk at C++ Now is going to be even more controversial than originally planned. I've been scraping together my evidence that C++ and especially the Boost libraries are in a terminal decline as part of the rationale on why Boost and C++ needs an embedded graph database in its core runtime, and even I was surprised at how much worse things have become this past year (it's been about a year since I last looked at the empirical numbers). ...

23. Tuesday 13th May 2014
Tuesday 13th May 2014: 4.16pm. Location: Aspen Institute. So the C++ Now conference has begun! My bag remains stuck in Denver which is annoying. Making do with my carry on okay so far. Everything here is covered with snow ... reminds me of Christmas!#cppnow #boostcpp ...

24. Sunday 20th July 2014
Sunday 20th July 2014: 1.20am. Shortly forthcoming Boost v1.56 is the first source code modularised Boost to be released, and the breakages it has imposed on proposed Boost.AFIO meant I had to throw out the old CI and start from scratch. Below is the new CI test matrix dashboard for AFIO, so far I only have build working, testing is still some way off. Even just to reach building everything including docs and PDFs correctly has taken several weeks of after work time, there was an enormous amount of breakage to work around - quite a lot of Boost is broken in subtle ways too. ...

25. Monday 21st July 2014
Monday 21st July 2014: 10.54am. Link shared: https://careers.stackoverflow.com/jobs/62621/remote-c-plus-plus-11-14-open-source-software-engineer-maidsafe Job going with my current employer: https://careers.stackoverflow.com/jobs/62621/remote-c-plus-plus-11-14-open-source-software-engineer-maidsafe. There is an interesting story about that format of job advert actually (i.e. one where you are asked to send a list of URLs pointing to evidence to a series of questions about your history in open source, nothing else requested) - I originally pushed that idea whilst at BlackBerry as a way of fully automating via scripts the early stages of recruitment, and thus saving an enormous amount of otherwise wasted engineering time in filtering out the 80% of total time wasters and preventing HR from filtering out some of the really good candidates with unconventional backgrounds. ...

26. Wednesday 30th July 2014
Wednesday 30th July 2014: 11.08pm. Link shared: http://boost.2283326.n4.nabble.com/Request-for-feedback-on-design-of-concurrent-unordered-map-plus-notes-on-use-of-memory-transactions-td4665594.html Realised earlier tonight that the design for a concurrent_unordered_map which I posted to http://boost.2283326.n4.nabble.com/Request-for-feedback-on-design-of-concurrent-unordered-map-plus-notes-on-use-of-memory-transactions-td4665594.html is flawed in two ways: (i) references could invalidate during inserts if the load factor was high, which makes concurrent use hard (ii) I couldn't make rehashing meet the Abrahams exception guarantees. Which is probably why unordered_map always uses malloc to store objects, and which drove a stake through my own attempt to avoid malloc :(So, restoring malloc in there has had obvious severe consequences to performance. ...

27. Sunday 3rd August 2014
Sunday 3rd August 2014: 1.54am. It's taken four weekends of effort to get that (almost) sea of green for the newly rebuilt CI for the newly modularised proposed Boost.AFIO as the modularisation broke the old CI config so badly I decided I might as well begin afresh with a much more orchestrated and scripted automation. I've learned an enormous amount about modularised Boost, Jenkins and how clang 3.4 simply does not produce actually working C++ executables on ARMv7 - yes, 3. ...

28. Friday 12th December 2014
Friday 12th December 2014: 3.15am. Location: Dromahane. Last day of work for me in 2014 is tomorrow, and this Monday we depart to the States for Christmas. Despite not getting many paid hours in these last few weeks (Megan is sick so I get extra Clara duty, and I'm not feeling particularly well myself either, I have a sore throat and I haven't been able to breath well through my nose for some weeks), I raised a comprehensive build test matrix for Boost Thread this week. ...

29. Tuesday 3rd March 2015
Tuesday 3rd March 2015: 1.30pm. Woke up after particularly little sleep last night to find a sea of green on the AFIO CI dashboard as you can see below (yes, the number of test targets is very considerably higher now, plus there is now official support for Apple OS X/iOS and Android). Which was a surprise actually. Megan returned to work four weeks ago now, and I was supposed to have shipped AFIO v1. ...

30. Monday 16th March 2015
Monday 16th March 2015: 6.57am. Six weeks have now passed with me staying up till 5am each night on top of the day job working on proposed Boost AFIO to finish it to a release quality for the v1.3 release. Probably 200 extra hours invested or so now on what was supposed to be almost ready to go, absolutely crazy. I had originally thought maybe a week or two maximum so get it out the door, I was in fact very wrong. ...

31. Sunday 3rd May 2015
Sunday 3rd May 2015: 3.35am. Just finished my C++ Now 2015 presentation with exactly one week to go! Currently 90 slides for a 90 minute long presentation, I had originally been worried I'd be boring but I think, even if I do say so myself, that this will be one of the more interesting talks at C++ Now this year. It reviews ten C++ 11/14 only libraries close to entering Boost, three of which in detail (Boost. ...

32. Thursday 7th May 2015
Thursday 7th May 2015: 4.05pm. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 1 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:1. CONVENIENCE: Strongly consider using git and GitHub to host a copy of your library and its documentationThere are many source code control systems, with subversion and CVS being the two most recently popular of yesteryear. ...

33. Thursday 7th May 2015
Thursday 7th May 2015: 4.11pm. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 2 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:2. COUPLING: Strongly consider versioning your library's namespace using inline namespaces and requesting users to alias a versioned namespace instead of using it directlyC++ 11 adds a new feature called inline namespaces which are far more powerful than they first appear:namespace boost { namespace afio { inline namespace v1 { /* stuff */ } } }// Stuff is generated at the ABI link layer in boost::afio::v1// But to the compiler everything boost::afio::v1::* appears identically in boost::afio::*// INCLUDING for ADL and overload resolution// In other words you can declare your code in boost::afio::v1, and use it as if declared in boost::afio. ...

34. Friday 8th May 2015
Friday 8th May 2015: 10.27am. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 3 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:3. PORTABILITY: Strongly consider trying your library on Microsoft Visual Studio 2015More than half the libraries reviewed had no support for Microsoft Visual Studio, and only supported GCC and clang. When the authors were asked why, in many cases it was simply assumed that MSVC didn't implement much C++ 11/14 and the authors hadn't attempted MSVC support. ...

35. Saturday 9th May 2015
Saturday 9th May 2015: 12.28am. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 4 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:4. QUALITY: Strongly consider using free CI per-commit testing, even if you have a private CIDespite that Travis provides free of cost per-commit continuous integration testing for Linux and OS X, and that Appveyor provides the same for Microsoft Windows, there were still libraries in those reviewed which made use of neither and furthermore had no per-commit CI testing whatsoever. ...

36. Monday 11th May 2015
Monday 11th May 2015: 6.01pm. Link shared: http://clang-analyzer.llvm.org/scan-build.html As part of publicising my C++ Now 2015 talk next week, here is part 5 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:5. QUALITY: Strongly consider per-commit compiling your code with static analysis toolsIn Travis and Appveyor it is easy to configure a special build job which uses the clang static analyser on Linux/OS X and the MSVC static analyser on Windows. ...

37. Monday 11th May 2015
Monday 11th May 2015: 6.05pm. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 6 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:6. QUALITY/SAFETY: Strongly consider running a per-commit pass of your unit tests under both valgrind and the runtime sanitisersIn Travis it is highly worth adding a special build job which runs your unit tests under:valgrind memcheck (Linux only)This detects illegal reads and writes, use of uninit values, use of unaddressable memory, illegal/double frees, and memory leaks. ...

38. Monday 11th May 2015
Monday 11th May 2015: 6.06pm. Link shared: http://llvm.org/docs/LibFuzzer.html As part of publicising my C++ Now 2015 talk next week, here is part 7 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:7. SAFETY: Strongly consider a nightly or weekly input fuzz automated test if your library is able to accept untrusted inputIf your library can consume any form of serialisation or parameters supplied from a network or file or query, including any regular expressions or any type of string even if you don't process it yourself and hand it off to another library, then you need to be doing input fuzz testing for a few hours weekly. ...

39. Monday 11th May 2015
Monday 11th May 2015: 6.12pm. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 8 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:8. DESIGN: (Strongly) consider using constexpr semantic wrapper transport types to return states from functionsThanks to constexpr and rvalue refs, C++ 11 codebases have much superior ways of returning states from functions. ...

40. Tuesday 12th May 2015
Tuesday 12th May 2015: 5.46pm. Link shared: https://github.com/boostorg/test As part of publicising my C++ Now 2015 talk next week, here is part 9 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:9. MAINTENANCE: Consider making it possible to use an XML outputting unit testing framework, even if not enabled by defaultA very noticeable trend in the libraries reviewed above is that around half use good old C assert() and static_assert() instead of a unit testing framework. ...

41. Tuesday 12th May 2015
Tuesday 12th May 2015: 5.49pm. Link shared: http://ispras.linuxbase.org/index.php/API_Sanity_Autotest As part of publicising my C++ Now 2015 talk next week, here is part 10 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:10. DESIGN/QUALITY: Consider breaking up your testing into per-commit CI testing, 24 hour soak testing, and parameter fuzz testingWhen a library is small, you can generally get away with running all tests per commit, and as that is easier that is usually what one does. ...

42. Wednesday 13th May 2015
Wednesday 13th May 2015: 11.10pm. Link shared: https://github.com/ned14/Boost.APIBind/blob/master/include/cpp_feature.h As part of publicising my C++ Now 2015 talk this week, here is part 11 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:11. PORTABILITY: Consider not doing compiler feature detection yourselfSomething extremely noticeable about nearly all the reviewed C++ 11/14 libraries is that they manually do compiler feature detection in their config.hpp, usually via old fashioned compiler version checking. ...

43. Wednesday 13th May 2015
Wednesday 13th May 2015: 11.12pm. Link shared: https://coveralls.io/r/krzysztof-jusiak/di?branch=cpp14 As part of publicising my C++ Now 2015 talk this week, here is part 12 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:12. CONVENIENCE: Consider having Travis send your unit test code coverage results to Coveralls.ioThere is quite a neat web service called coveralls.io free for open source projects which graphically displays unit test line coverage in a pretty colour coded source code browser UI. ...

44. Thursday 14th May 2015
Thursday 14th May 2015: 9.13pm. Link shared: https://boostgsoc13.github.io/boost.afio As part of publicising my C++ Now 2015 talk this week, here is part 13 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:13. CONVENIENCE: Consider creating a status dashboard for your library with everything you need to know shown in one placeI like all-in-one-place software status dashboards where with a quick glance one can tell if there is a problem or not. ...

45. Friday 15th May 2015
Friday 15th May 2015: 4.23pm. Link shared: https://en.wikipedia.org/wiki/Policy-based_design As part of publicising my C++ Now 2015 talk this week, here is part 14 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:14. DESIGN: Consider making (more) use of ADL C++ namespace composure as a design patternMost C++ programmers are aware of C++ template policy based design. This example is taken from https://en.wikipedia.org/wiki/Policy-based_design:#include <iostream>#include <string> template <typename OutputPolicy, typename LanguagePolicy>class HelloWorld : private OutputPolicy, private LanguagePolicy{ using OutputPolicy::print; using LanguagePolicy::message; public: // Behaviour method void run() const { // Two policy methods print(message()); }}; class OutputPolicyWriteToCout{protected: template<typename MessageType> void print(MessageType const &message) const { std::cout << message << std::endl; }}; class LanguagePolicyEnglish{protected: std::string message() const { return " ...

46. Tuesday 19th May 2015
Tuesday 19th May 2015: 5.00pm. Link shared: https://github.com/sakra/cotire As part of publicising my C++ Now 2015 talk last week, here is part 15 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:15. BUILD: Consider defaulting to header only, but actively manage facilities for reducing build timesMaking your library header only is incredibly convenient for your users - they simply drop in a copy of your project and get to work, no build system worries. ...

47. Thursday 28th May 2015
Thursday 28th May 2015: 6.22pm. Link shared: https://github.com/BoostGSoC13/boost.afio/blob/master/include/boost/afio/config.hpp As part of publicising my C++ Now 2015 talk two weeks ago, here is part 16 of 19 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:16. COUPLING: Consider allowing your library users to dependency inject your dependencies on other librariesAs mentioned earlier, the libraries reviewed overwhelmingly chose to use STL11 over any equivalent Boost libraries, so hardcoded std::thread instead of boost::thread, hardcoded std::shared_ptr over boost::shared_ptr and so on. ...

48. Friday 12th June 2015
Friday 12th June 2015: 12.11pm. As some may know, I've been working on the world's simplest C++ runtime monad these past two weeks, where most of that effort is being spent on getting it to STL quality with a full conformance and validation unit test suite. The hope is that this will become the official Boost monad, and thereafter the monad proposed for standardisation. Unlike any other C++ monad that I am aware of, this design focuses on:(i) Absolute minimum possible impact on build times and especially runtime overhead. ...

49. Friday 12th June 2015
Friday 12th June 2015: 12.12pm. As some may know, I've been working on the world's simplest C++ runtime monad these past two weeks, where most of that effort is being spent on getting it to STL quality with a full conformance and validation unit test suite. The hope is that this will become the official Boost monad, and thereafter the monad proposed for standardisation. Unlike any other C++ monad that I am aware of, this design focuses on:(i) Absolute minimum possible impact on build times and especially runtime overhead. ...

50. Saturday 13th June 2015
Saturday 13th June 2015: 4.02am. Link shared: http://melpon.org/wandbox/permlink/M6Cn87YHamdymHWE As much as I only just said earlier today that my world's simplest C++ monad was going to be obsessive about keeping build times low and therefore avoiding all metaprogramming, there is one niche area where heavy metaprogramming makes a lot of sense: the monadic bind and map operations. Under the "you only pay for what you use" principle, if you are using those monadic programming operations it means you accept substantial build time costs over doing the same operations manually by hand. ...

51. Saturday 13th June 2015
Saturday 13th June 2015: 4.02am. Link shared: http://melpon.org/wandbox/permlink/M6Cn87YHamdymHWE As much as I only just said earlier today that my world's simplest C++ monad was going to be obsessive about keeping build times low and therefore avoiding all metaprogramming, there is one niche area where heavy metaprogramming makes a lot of sense: the monadic bind and map operations. Under the "you only pay for what you use" principle, if you are using those monadic programming operations it means you accept substantial build time costs over doing the same operations manually by hand. ...

52. Friday 19th June 2015
Friday 19th June 2015: 11.31pm. Link shared: http://boost.2283326.n4.nabble.com/next-gen-futures-Lightweight-monad-ready-for-inspection-td4677322.html My lightweight very simple single purpose monad has been sent to boost-dev for community feedback http://boost.2283326.n4.nabble.com/next-gen-futures-Lightweight-monad-ready-for-inspection-td4677322.html.This monad can hold a fixed variant list of empty, a type R, a lightweight error_type or a heavier exception_type at a space cost of max(20, sizeof(R)+4). Features: * Very lightweight on build times and run times up to the point of zero execution cost and just a four byte space overhead. ...

53. Friday 19th June 2015
Friday 19th June 2015: 11.31pm. Link shared: http://boost.2283326.n4.nabble.com/next-gen-futures-Lightweight-monad-ready-for-inspection-td4677322.html My lightweight very simple single purpose monad has been sent to boost-dev for community feedback http://boost.2283326.n4.nabble.com/next-gen-futures-Lightweight-monad-ready-for-inspection-td4677322.html.This monad can hold a fixed variant list of empty, a type R, a lightweight error_type or a heavier exception_type at a space cost of max(20, sizeof(R)+4). Features: * Very lightweight on build times and run times up to the point of zero execution cost and just a four byte space overhead. ...

54. Sunday 28th June 2015
Sunday 28th June 2015: 3.10am. Link shared: https://ci.nedprod.com/view/Boost%20Thread-Expected-Permit/job/Boost.Spinlock%20Test%20Linux%20GCC%204.8/doxygen/classboost_1_1spinlock_1_1lightweight__futures_1_1basic__future.html Some preliminary results from my lightweight non-allocating promise-futures which are heading towards Boost later this month as compared to STL promise-futures:All values are CPU cycles on a i7-3770K @ 3.9Ghz.## clang 3.7:### libstdc++ 4.9 future promise:Simple loop: 761Producer Consumer: 838 Creation and setting: 674 Getting from future: 160 Destruction of future: 4### lightweight future promise:Simple loop: 260Producer Consumer: 378 (2.22x faster) Creation and setting: 281 Getting from future: 51 Destruction of future: 46## GCC 5. ...

55. Tuesday 30th June 2015
Tuesday 30th June 2015: 2.47pm. Link shared: https://github.com/ned14/boost.spinlock/blob/master/Readme.md I have the first set of benchmarks for lightweight non-allocating monadic futures ready which are 98% compliant with the forthcoming ISO Concurrency TS for C++1z (essentially they are missing std::allocator support for obvious reasons). They aren't final, but they are representative of what to expect as compared to the STL future-promise. Note these futures are configured with a superset of the facilities of STL future-promise, so you have all your monadic programming goodness in there as a lightweight future inherits from basic_monad plus you can transport error_code as well as exception_ptr:clang 3. ...

56. Wednesday 8th July 2015
Wednesday 8th July 2015: 12.42pm. As lightweight C++ futures have matured it became painfully obvious that a ground up refactor of its design was required. The code base until very recently employed lots of "safe" undefined behaviour to save me writing code to deal with future to shared_future conversion etc, and of course making use of undefined behaviour always produces faster code, so specifically speaking what I was doing was to use reinterpret_cast to have the compiler not concern itself with whether the future the promise was talking to was really a future or a shared_future state. ...

57. Monday 20th July 2015
Monday 20th July 2015: 2.04am. Location: Dromahane. It's 3am the night before my C++ library proposed Boost.AFIO goes before peer review. This is the culmination of about 30 months of effort, with pretty consistent 60-70 hour weeks since February, and about 100 hours this week. Megan has been amazing to get me this far. Anyway, the final code base to be presented is finally done and right now the CI is testing it, I'm just going to go eat something and then tackle the documentation to be presented for review, hopefully will reach bed before 6am as I'll be minding Clara from 9am onwards all day tomorrow. ...

58. Friday 14th August 2015
Friday 14th August 2015: 11.48am. I just crashed my dev workstation hard drive firmware when running the second tutorial program for proposed Boost.AFIO - as in, drive dropped out and was no longer recognised by the system until the next power off. This is rather worrying - SMART says everything is fine, though it's an old drive at 16,800 hours powered on. I think I might run a backup anyway tonight of all 400Gb, better safe than sorry. ...

59. Sunday 16th August 2015
Sunday 16th August 2015: 4.14pm. Got 97% percentile in this IKM online C++ 11 test I had to take for a job interview. I really didn't think much of the quality of the exam, and said so in the feedback form.I also rather like how poor I am at compiler optimisation heh ...#cplusplus #cpp #boostcpp ...

60. Friday 21st August 2015
Friday 21st August 2015: 5.40pm. Just sent proposed Boost.AFIO off for its final CI pass before it is submitted for Boost peer review starting later today and lasting until 31st August. The last few days have been stressful - the new workshop tutorial for AFIO is a step-by-step workshop on implementing an asynchronous key-value store, and that meant running many benchmarks which heavily stressed my mechanical hard drive, which began to hang itself until power cycle. ...

61. Friday 21st August 2015
Friday 21st August 2015: 9.13pm. Location: Dromahane. And proposed Boost.AFIO is submitted for peer review (the one failing test is a test timeout and can be disregarded)!#boostcpp#cplusplus#boostafio ...

62. Sunday 23rd August 2015
Sunday 23rd August 2015: 9.19pm. Yay just got a direct-from-mmap dense hash map implementation working, so this hash table works straight from a memory mapped file which means it can scale out to really huge hash tables - like billions of entries. On modification, it rehashes the entries into a new hash table which can also go straight into a mmap, though I suspect the linear complexity would make modifying billion entry hash tables rather slow. ...

63. Wednesday 14th October 2015
Wednesday 14th October 2015: 10.52am. CppCon videos are up, and here is mine on Racing the File System which is a beginner's level workshop on race free filing system techniques leading up to proposed Boost.AFIO, an asynchronous file and race free filesystem library for C++. As much as it's "beginner's level", it's more really "from first principles", so it gets into more interesting stuff by the end including the transactional key-value store I'd like to be standardised into the C++ runtime based on AFIO. ...

64. Monday 8th February 2016
Monday 8th February 2016: 12.30am. Link shared: https://github.com/BoostGSoC13/boost.afio/tree/master/fs_probe I reached a major milestone in the post peer review Boost.AFIO v2 rewrite today which has consumed most of my free time since November: it now has working Windows and POSIX AIO async file i/o backends with file open, close, clone, scatter-gather read/writes and truncate implemented, so a long, long way still from AFIO v1's comprehensive facilities but still an achievement. The POSIX AIO backend is 100% pure, and so therefore has awful performance because POSIX AIO has a terrible design, but it does work on FreeBSD and Linux without surprises and the storage profile probing yielded many interesting answers to long standing questions about concurrent file i/o atomicity which are now answering the many questions about this on Stackoverflow. ...

65. Saturday 9th April 2016
Saturday 9th April 2016: 7.33am. Link shared: http://accu.org/index.php/conferences/accu_conference_2016/accu2016_sessions#Distributed_Mutual_Exclusion_using_Proposed_Boost.AFIO_(asynchronous_filesystem_and_file_io) The ACCU conference is only ten days away! Proposed Boost.AFIO v2, which I'll be presenting for the first time at ACCU, has the functionality I'm presenting written as of yesterday but it most definitely is not working - as the final part I added all required itself to work, I spent two weeks writing code, only checking to see if it compiles, not if it works until now so I have a raft of debugging to do this weekend. ...

66. Friday 15th April 2016
Friday 15th April 2016: 10.47pm. Employment is on pause from now until I present proposed Boost.AFIO v2 for the first time at the ACCU conference next week. I'm up in Bristol 2 room, Thursday at 11am! The distributed mutual exclusion file system algorithm I'm presenting is completed, the slides have proved to be a bit of a bear though, can't get the structure to where I'm happy with it.#boostafio #boostcpp #c++ #accu ...

67. Monday 18th April 2016
Monday 18th April 2016: 10.08pm. The final slide in my proposed Boost.AFIO v2 talk at the ACCU conference on Thursday showing the colour coded empirical benchmarks for three methods of mutual exclusion on the file system across the file systems NTFS, ReFS, FAT32 and exFAT. The top three are for contended locks, the bottom three for uncontended locks.#accu2015 @ACCUConf #boostafio #boostcpp ...

68. Thursday 21st April 2016
Thursday 21st April 2016: 2.10pm. Link shared: https://github.com/ned14/boost.afio/tree/master/doc/presentations Slides for my ACCU talk on proposed Boost.AFIO are now online at https://github.com/ned14/boost.afio/tree/master/doc/presentations#ACCUConf #accu2016 #boostcpp #boostafio ...

69. Thursday 26th May 2016
Thursday 26th May 2016: 8.20am. Link shared: http://melpon.org/wandbox/permlink/4rJCUypvBbGGFTqx I'm not a natural C++ metaprogrammer, so it took me two mornings before work to come up with this of which I am quite proud:```#include <stdio.h>#include <string>template <class... Args> struct Foo {};template <class T, class... Args> struct Foo<T, Args...> { T v; Foo<Args...> rest;};template <class T> struct Foo<T> { T v; };namespace detail {template <size_t N, class T, class... Args> struct getFoo { constexpr auto operator()(const Foo<T, Args. ...

70. Monday 27th June 2016
Monday 27th June 2016: 10.58am. My CppCon talk "Memory mapped distributed mutual exclusion using Proposed Boost.AFIO (asynchronous filesystem and file i/o)" has been accepted for presentation at CppCon 2016 in Seattle this September. My thanks to the Programme Committee for taking a bit of a risk on this topic, because as you'll see from the proposed abstract it is not certain if the topic is even feasible (if it isn't, I'll present the results of my failure :) )" ...

71. Wednesday 7th September 2016
Wednesday 7th September 2016: 7.27am. Link shared: https://cppcon2016.sched.org/event/7nKi/better-mutual-exclusion-on-the-filesystem-using-boostafio-asynchronous-file-and-filesystem Ten days exactly to go before I depart for CppCon 2016 in Seattle! I am very glad to report that the code I am presenting (link to talk is below) finally passed the last of its unit tests yesterday, so it is finally debugged and I have some performance benchmarks. As expected, this new filesystem locking algorithm is a full order of magnitude (10x-20x) faster than anything else in AFIO v2 that was presented at ACCU 2016 last April. ...

72. Tuesday 13th September 2016
Tuesday 13th September 2016: 11.10am. Link shared: https://cppcon2016.sched.org/event/a36061492fca1e20d6521b6fbbc56e37 Finished writing the talk description of my CppCon workshop next week:"This is the third and likely final part of a "from first principles" series of beginner's workshops based on developing the v2 post-peer-review rewrite of proposed Boost.AFIO, a C++ library wrapping the advanced features of the filesystem intended for eventual ISO C++ standardisation. If you're the kind of library developer who likes building unusual low level concurrent algorithms using the very latest C++ 14-17 (proposed) features and testing them for time and space complexities, this is definitely your kind of talk. ...

73. Wednesday 4th January 2017
Wednesday 4th January 2017: 8.48pm. Link shared: https://github.com/ned14/boost-lite/blob/master/cmake/BoostLiteSetupProject.cmake#L9 Nailed this cunning piece of cmake hackery today, so I thought I would share it. It solves the problem of cmake annoyingly not supporting out of the box per-target setting of C++ exceptions on/off, C++ RTTI on/off and whether to use the static or dynamic C++ runtime. It also, very usefully, stops the warning MSVC makes about overriding the C++ exceptions enable that cmake enforces in the core compile flags on MSVC, this is amazingly useful when you turn on error on warnings and your C++ has exceptions disabled. ...

74. Monday 13th March 2017
Monday 13th March 2017: 6.11pm. Link shared: https://www.reddit.com/r/cpp/comments/5z5r5i/boostoutcome_is_finished_boost_review_manager/?ref=share&ref_source=link One of those big ol personally momentus days today. In the wee small hours last night shivering in Clara's bedroom as I'd stayed there working on the laptop after putting her to bed and it got cold, I finally delivered my Outcome library to Boost peer review. That library has taken me two years of my free time to write, and a never ending long tail of incredibly boring minute detail over the past four months or so to actually deliver the thing. ...

75. Saturday 8th April 2017
Saturday 8th April 2017: 11.49pm. Link shared: http://my.cdash.org/index.php?project=Boost.AFIO Proposed Boost.AFIO v2 is resurrected, and now passes all its unit tests for the first time since Oct 17th. All the work done to proposed Boost.Outcome to get it ready for peer review (which will happen mid-May!) had caused AFIO to suffer hefty code rot given how dependent it is on Outcome, but none of the derotting fixes were hard, just time consuming. ...

76. Tuesday 2nd May 2017
Tuesday 2nd May 2017: 2.47pm. My latest conference video, this one being on the lightweight monadic transport expected<T, E> proposed for C++. This is my first conventional "knowledge transfer" talk where I simply pour knowledge out of my brain into the jug that is the audience as is traditional pedagogy, up until now I had argued a case or had done workshops, knowing that conference organisers always feel a lack of the latter and therefore tend to accept workshops quicker. ...

77. Saturday 3rd June 2017
Saturday 3rd June 2017: 9.45pm. The peer review of my proposed Boost.Outcome library ended yesterday after being extended to two weeks to allow more discussion. Some 732 emails were sent on the topic, one of the most vigorous debates on boost-dev in many years, and a very highly productive one I think despite that we did not find consensus.#boostcpp #c++ #boost-outcome ...

78. Wednesday 7th June 2017
Wednesday 7th June 2017: 8.24am. Link shared: http://boost.2283326.n4.nabble.com/review-Outcome-Review-Report-tt4695267.html My proposed Boost.Outcome library's review report: http://boost.2283326.n4.nabble.com/review-Outcome-Review-Report-tt4695267.html. It was rejected after one of the lengthiest reviews in many years. Lots of good feedback on how it ought to look. #boostcpp #c++ #boost-outcome ...

79. Thursday 18th January 2018
Thursday 18th January 2018: 9.40pm. Link shared: https://github.com/ned14/outcome/releases/tag/v2.0-boost-peer-review My third Boost peer review begins tomorrow, and lasts ten days. Let's hope that this time I succeed, only been at this since 2012, and the proposed C++ library only since 2014!#boost-outcome #boostcpp #cpp ...

80. Monday 5th February 2018
Monday 5th February 2018: 9.52am. Link shared: http://boost.2283326.n4.nabble.com/review-Boost-Outcome-v2-Review-Report-td4701728.html #boostoutcome#boost-outcome#boostcppOutcome is accepted into Boost, and http://boost.2283326.n4.nabble.com/review-Boost-Outcome-v2-Review-Report-td4701728.html links to the review manager's report (be warned, it is lengthy). Here is what I wrote in acknowledgement:I'd like to thank Charley for writing such a lengthy and detailed review report, in addition to performing duties in one of the hardest review managements I think I've seen this decade.I'd like to thank the reviewers for their feedback, and all those who have written me emails and sent me their notes and pull requests. ...


Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2018-02-05 09:52:54 +0000 UTC)