Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-09 Thread Nicholas Wilson via Digitalmars-d-announce
On Monday, 6 August 2018 at 00:47:12 UTC, Nicholas Wilson wrote: Sure https://github.com/thewilsonator/jupyterd The echo interpreter now works, and the dmd one is there. I've got no idea if it works because I'm on OSX (yay no shared library support) if someone wants to test it that would be

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-05 Thread Nicholas Wilson via Digitalmars-d-announce
On Sunday, 5 August 2018 at 20:01:22 UTC, Nikos wrote: 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

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-05 Thread Laeeth Isharc via Digitalmars-d-announce
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

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-05 Thread Nikos via Digitalmars-d-announce
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

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-07-31 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 31 July 2018 at 09:09:11 UTC, Nicholas Wilson wrote: [snip] Also I'm working on a D kernel for Jupyter notebook which should be done soon. Excellent.

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-07-31 Thread Nicholas Wilson via Digitalmars-d-announce
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 =

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-07-29 Thread Nikos via Digitalmars-d-announce
Eg turn this into a function and try wrapping this instead: auto intp = interpreter(dmdEngine()); Actually, I manage to export the `interpret` method export: auto intp(char[] txt) { return interpreter(dmdEngine()).interpret(txt); } and tested it in ipython

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-07-29 Thread Nikos via Digitalmars-d-announce
Ok, I made a stupid mistake. It works now. Thanks a lot!

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-06-24 Thread Nikos via Digitalmars-d-announce
Eg turn this into a function and try wrapping this instead: auto intp = interpreter(dmdEngine()); Thanks for your help. I'm doing this in my spare time which is, unfortunately, not much. I did what you said export { auto intp = interpreter(echoEngine); } but when I import drepl

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-13 Thread Laeeth Isharc via Digitalmars-d-announce
On Sunday, 13 May 2018 at 16:23:49 UTC, Nikos wrote: I'm trying to wrap drepl (https://github.com/dlang-community/drepl) My dub.sdl files is import autowrap.python; mixin( wrapAll( LibraryName("drepl"), Modules("drepl.interpreter"), ) ); I also flagged `export` the

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-13 Thread Nikos via Digitalmars-d-announce
I'm trying to wrap drepl (https://github.com/dlang-community/drepl) My dub.sdl files is import autowrap.python; mixin( wrapAll( LibraryName("drepl"), Modules("drepl.interpreter"), ) ); I also flagged `export` the interpreter function export Interpreter!Engine

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-12 Thread Nikos via Digitalmars-d-announce
On Friday, 11 May 2018 at 14:16:15 UTC, Atila Neves wrote: On Thursday, 10 May 2018 at 19:50:40 UTC, Nikos wrote: In my dub.sdl file I have configuration "python35" { subConfiguration "autowrap" "python35" } and I run dub build --config=python35 which still tries to find python36. Why

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-11 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 10 May 2018 at 19:50:40 UTC, Nikos wrote: In my dub.sdl file I have configuration "python35" { subConfiguration "autowrap" "python35" } and I run dub build --config=python35 which still tries to find python36. Why doesn't it look for 3.5? Copy + paste error, sorry. Fixed

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-10 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 10 May 2018 at 19:50:40 UTC, Nikos wrote: In my dub.sdl file I have configuration "python35" { subConfiguration "autowrap" "python35" } and I run dub build --config=python35 which still tries to find python36. Why doesn't it look for 3.5? Hi. On my phone so can't copy

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-10 Thread Nikos via Digitalmars-d-announce
In my dub.sdl file I have configuration "python35" { subConfiguration "autowrap" "python35" } and I run dub build --config=python35 which still tries to find python36. Why doesn't it look for 3.5?

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-10 Thread Nikos via Digitalmars-d-announce
Interesting stuff. In http://code.dlang.org/packages/autowrap it says: """ Python versions Since autowrap depends on PyD, the python version must be explicitly stated as a dub configuration and defaults to 3.6. To use another version, pass -c $CONFIG to dub where $CONFIG is one of:

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-04-23 Thread Laeeth Isharc via Digitalmars-d-announce
On Wednesday, 18 April 2018 at 15:28:07 UTC, Atila Neves wrote: http://code.dlang.org/packages/autowrap This came out of the need at work to take existing D code and make it available for both Excel and Python. Both pyd and excel-d make the reasonable assumption that one is using them to

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-04-20 Thread karita via Digitalmars-d-announce
On Wednesday, 18 April 2018 at 15:28:07 UTC, Atila Neves wrote: http://code.dlang.org/packages/autowrap This came out of the need at work to take existing D code and make it available for both Excel and Python. [...] Awesome. I'm also working on numpy.ndarray <-> mir.ndslice automatic

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-04-18 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 18 April 2018 at 15:28:07 UTC, Atila Neves wrote: http://code.dlang.org/packages/autowrap This came out of the need at work to take existing D code and make it available for both Excel and Python. [snip] Cool. I bet something similar would work with embedr as well.