Thread overview
Interoperability, code & marketing
Jul 03, 2018
Nicholas Wilson
Jul 03, 2018
jmh530
Jul 03, 2018
Seb
Jul 03, 2018
jmh530
Jul 08, 2018
Nicholas Wilson
July 03, 2018
If [1] gets merged we will have a situation where code[2] is required to interoperate with D's slices from C++. I think we should have an official repository where such code and documentation lives (i.e. on the dlang github). This would also be a good place to have links to other interoperability successes in D like pyd, dpp, embedr, luad,  autowrap etc. and put the D interoperability story out there, coherently and in one place.

Thoughts?

[1]: https://github.com/dlang/dmd/pull/8120
[2]:
template<typename T>
struct __dslice
{
    size_t length;
    T* ptr;

    __dlisce(size_t len, T* p)
    {
        length = len;
        ptr    = p;
    }
    /**
     * Container constructor:
     *
     * Accepts any type U that satisfies `U u; size_t i = u.size(); T* = u.data();`
     * This includes types like:
     *      std::vector,
     *      std::string,
     *      std::string_view
     *      std::span
     *
     * TODO: Constrain this properly such that U::value_type == T (modulo const)
     * TODO: Make this const correct
     */
    template<typename U>
    __dslice(U& u)
    {
        length = u.size();
        ptr    = const_cast<T*>(u.data());
    }
};
July 03, 2018
On Tuesday, 3 July 2018 at 14:40:52 UTC, Nicholas Wilson wrote:
> [snip] I think we should have an official repository where such code and documentation lives (i.e. on the dlang github). This would also be a good place to have links to other interoperability successes in D like pyd, dpp, embedr, luad,  autowrap etc. and put the D interoperability story out there, coherently and in one place.
> [snip]

Sounds like a great idea to me.
July 03, 2018
On Tuesday, 3 July 2018 at 14:40:52 UTC, Nicholas Wilson wrote:
> If [1] gets merged we will have a situation where code[2] is required to interoperate with D's slices from C++. I think we should have an official repository where such code and documentation lives (i.e. on the dlang github). This would also be a good place to have links to other interoperability successes in D like pyd, dpp, embedr, luad,  autowrap etc. and put the D interoperability story out there, coherently and in one place.
>
> Thoughts?

In the past A&W became a bit more conservative with creating new repos in the dlang organization and typically only agree to move things there if it "has been proven to be successfully adopted by the community".

Though I'm more than happy to create a repo (or move repos) to dlang-community to get the ball rolling.
July 03, 2018
On Tuesday, 3 July 2018 at 15:23:48 UTC, Seb wrote:
>
> In the past A&W became a bit more conservative with creating new repos in the dlang organization and typically only agree to move things there if it "has been proven to be successfully adopted by the community".
>
> Though I'm more than happy to create a repo (or move repos) to dlang-community to get the ball rolling.

I would say the value is putting it all together with a consistent experience and story. The final location, dlang-community or otherwise, is maybe less important.
July 08, 2018
On Tuesday, 3 July 2018 at 15:23:48 UTC, Seb wrote:
> In the past A&W became a bit more conservative with creating new repos in the dlang organization and typically only agree to move things there if it "has been proven to be successfully adopted by the community".
>
> Though I'm more than happy to create a repo (or move repos) to dlang-community to get the ball rolling.

https://github.com/thewilsonator/interop to a first approximation.

dmd#8120 is now green, waiting on approval. It will probably also need a spec update as well.