On Sunday, 5 August 2018 at 20:01:22 UTC, Nikos wrote:
On Tuesday, 31 July 2018 at 09:09:11 UTC, Nicholas Wilson wrote:
On Sunday, 29 July 2018 at 18:14:31 UTC, Nikos wrote:
But when I try to export the whole dmdEngine
export:
auto engine(char[] txt) {
return interpreter(dmdEngine());
}
Can you export an instance of `interpreter(dmdEngine())`?
e.g.
__gshared auto dmdi = interpreter(dmdEngine());
export ref dmd()
{
return dmdi;
}
or if that doesn't work, proxy it
__gshared auto dmdi = interpreter(dmdEngine());
struct Dmd
{
mixin Proxy!dmdi;
}
export auto dmd()
{
Dmd d;
return d;
}
That is pretty much required if you want to maintain state
across.
Also I'm working on a D kernel for Jupyter notebook which
should be done soon.
Thank you very much for your feedback. Unfortunately, none of
the above worked.
By the way, the reason I'm trying all this is to create a
Jupyter notebook. I've already made a simple version of it some
time ago
(https://github.com/nikoskaragiannakis/d-jupyter-kernel). Since
you are also working on a D kernel, maybe we could work
together?
Working example of Python calling D Repl is here.
https://github.com/kaleidicassociates/pydrepl