@OPAL following our discussion yesterday I had a go at making a functional specification, attached. There are a few things I wasn't sure about (highlighted in yellow) and some discussion (italicised).
@ext-rogers_c : Thanks for the document. I added a few comments in the Dropbox document.
But maybe the following can be discussed here, you wrote no support for OPAL-Cycl. But I think as long as OPAL-cycl is not merged with OPAL-T, I think it is important to support OPAL-Cycl as well. Same for OPAL-map by the way. Depending on the chosen solution, I don't think it will be much additional work.
@snuverink_j: Support for OPAL-Cycl: why don't I put it in as an extension? Best to get something working, for people to look at (and criticise). If it turns out not to be much extra work, then should turn around Opal-Cycl/Map quite quickly.
tiny self-contained version of Boost.Python ... thanks to some of the new C++11 language features ...
dramatically simpler binding code in many common situations
It does sound good (although it means supporting another library). I will have a go at implementing something.
@ext-rogers_c: okay, sure one probably wants to start with a few commands and use cases anyway, that's fine.
But I think the final final version is not complete without OPAL-Cycl and OPAL-Map support. Since if we have that working, then also the MadX parser stuff can become deprecated and later removed. Once you have something for OPAL-T, I am happy to help out with the OPAL-Cycl and OPAL-Map parts.
The documentation for Boost::Python was better (in pybind11 I had to fish around on stackexchange for 30 minutes finding how to do a python tuple, and in the end guessed the answer).
My guess is Boost::Python will be more stable/better supported as it is part of a big package.
The overhead is probably a bit bigger for Boost::Python support because it has to link against system python - which means passing some command line arguments to the bjam stuff and less portability. pybind11 is a "headers only" package.
I would also use Boost:Python since we already depend on Boost (as @ext-rogers_c also pointed out during the OPAL webinar). We used pybind11 since it is a more lightweight package.
@ext-rogers_c thanks again for spearheading this.
What's the next step? Is there anything I can do to help?
Will a pyopal repo be started here under OPAL?