Boost logo

Boost :

Subject: Re: [boost] [MSM] Is there any interest in C++14 Boost.MSM-eUML like library which compiles up to 60x quicker whilst being a slightly faster too?
From: Paul Fultz II (pfultz2_at_[hidden])
Date: 2016-01-28 14:43:26


On Thursday, January 28, 2016 at 10:20:19 AM UTC-6, Krzysztof Jusiak wrote:
>
> Dear Boosters,
>
> I have recently released 1.0.0 version of experimental C++14
> Boost.MSM-lite.
> Your scalable C++14 header only eUML-like meta state machine library with
> no dependencies, which outperform Boost.MSM - eUML in:
> - faster compilation times - up to 60x times faster!
> - smaller executable size - up to 15x smaller
> - slightly better performance
> - smaller memory usage
> - short error messages
>
> Check it out yourself online!
>
> http://boost-experimental.github.io/msm-lite/examples/index.html#hello-world
>
> Performance Results:
>
> http://boost-experimental.github.io/msm-lite/overview/index.html#performance
>
> Source code:
> https://github.com/boost-experimental/msm-lite
>
> Documentation:
> http://boost-experimental.github.io/msm-lite
>
> Any feedback is more than welcome!
>

The library looks very nice. A couple of things:

First, it's not just C++14 only as it relies on compiler intristics which
just
happen to work on the three major compilers you support. It would be nice if
you just relied on the standard library for these things. Most likely, users
are going to use the standard `type_traits` header anyway so this will
cause a
lot of duplication. Futhermore, the implementation of `make_index_sequence`
can be much slower performance than the standard library since it doesn't
take
advantage of the compiler intristics that are available.

Secondly, the documentation for the concepts seems confusing. In the
documenatation it show the concept as this:

    template <class TResult, class T>
    concept bool callable() {
      return requires(T object) {
        { object(...) } -> TResult;
      }
    }

I assume its written like this for notational purposes. However, the example
shows it being used like this:

    auto guard = [] { return true; };
    auto action = [] { };

    static_assert(callable<bool, decltype(guard)>);
    static_assert(callable<void, decltype(action)>);

Which is incorrect as in the code its an alias to an `integral_constant`,
however, the `integral_constant` doesn't look like its fully implemented, so
this fails as well:

    auto guard = [] { return true; };
    auto action = [] { };

    static_assert(callable<bool, decltype(guard)>());
    static_assert(callable<void, decltype(action)>());

Of course, using `std::integral_constant` would make the above work.

Thirdly, Boost.Hana started out in a similiar fashion, being single header
and
not relying on the standard library. Of course, as it grew, it needed to use
multiple headers and the standard library headers as well.

Finally, I like the documentation setup. I use mkdocs as well for my
documenation, and I created a boost theme to try and match the boost
documentation. You can see it here:

https://github.com/pfultz2/boost-theme

Of course, its still a WIP. I, also, like the code snippets with option to
compile and run the code online in the documentation. I think I am going to
try to setup something similiar for my library as well.

Paul

 

>
> Cheers, Kris
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk