Pages tagged #cpp

by . Last updated .

1. Monday 8th July 2013
Monday 8th July 2013: 5.22am. Link shared: https://ci.nedprod.com/ Another long weekend. I got a Windows XP unit test slave mostly working on my new cloud node: I configured a copy of Jenkins CI inside an OpenVZ container with the reverse caching proxy varnish (https://www.varnish-cache.org/) fronted by the web server nginx which you can see at https://ci.nedprod.com/. As one of its backends, I have a snapshotted VM running Windows XP with Visual Studio 2010 Express which is rolled back to the snapshot after every test using some cunning AJAX I wrote which uses the Proxmox REST API. ...

2. 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. ...

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. 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 " ...

5. 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. ...

6. 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. ...

7. 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. ...

8. 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. ...

9. 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. ...

10. 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. ...

11. 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. ...

12. 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. ...

13. 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. ...

14. 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. ...

15. 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. ...

16. 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 " ...

17. 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. ...

18. 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. ...

19. 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. ...

20. 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. ...

21. 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. ...

22. 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 ...

23. 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. ...

24. 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. ...

25. Tuesday 12th September 2017
Tuesday 12th September 2017: 1.16am. Been making great use of my time without employment working on AFIO, my proposed low latency file i/o library for standardisation. I wrote a toy transactional key-value store with AFIO permitting up to 48 concurrent writers, and here is how it performs for 128 bit keys and 1Kb values with 1 thread:1Kb values Windows with NTFS, no integrity, no durability, mmaps: Inserting 1M key-value pairs . ...

26. 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 ...

27. Thursday 13th September 2018
Thursday 13th September 2018: 6.17pm. Link shared: https://www.meetup.com/cppdug/events/254149655/ I'll be speaking at the C++ users group Dublin this coming Monday 17th September. Entire evening will be just me, 90 minutes, no other speakers. I just finished the slides for the talk just there, it shouldn't be too boring for folk hopefully. And it's the only talk I'll give in all of 2018, usually I speak twice a year at conferences, but this year has been unusually quiet for me. ...


Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2018-09-13 18:17:34 +0000 UTC)