Re: is there a way to embed python 3.7 code in D program?

2019-05-12 Thread evilrat via Digitalmars-d-learn
On Monday, 13 May 2019 at 01:35:58 UTC, evilrat wrote: I have project using pyd with python 3.7, that also using ptvsd (visual studio debugger for python package) to allow mixed debugging right inside VS Code. I'll reduce the code and upload somewhere later.

Re: is there a way to embed python 3.7 code in D program?

2019-05-12 Thread evilrat via Digitalmars-d-learn
On Sunday, 12 May 2019 at 22:36:43 UTC, torea wrote: ok, I'll do some more tests with pyd then. And if I cannot get it to work, I'll have a look at the package! I have project using pyd with python 3.7, that also using ptvsd (visual studio debugger for python package) to allow mixed

Re: Windows / redirect STDERR to see assert messages

2019-05-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 12 May 2019 at 13:39:15 UTC, Robert M. Münch wrote: If an assert fails, I don't see any output. Is assert using something else? What's wrong about this approach? You might need to catch all the throwable exceptions and print your way instead...

Re: is there a way to embed python 3.7 code in D program?

2019-05-12 Thread torea via Digitalmars-d-learn
On Sunday, 12 May 2019 at 21:01:31 UTC, Nicholas Wilson wrote: On Sunday, 12 May 2019 at 20:06:34 UTC, torea wrote: Hi, I'd like to use D for the "brain" of a small robot (Anki vector) whose API is coded in Python 3.6+. I had a look at Pyd but it's limited to python 2.7... It isn't. You

Re: is there a way to embed python 3.7 code in D program?

2019-05-12 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 12 May 2019 at 20:06:34 UTC, torea wrote: Hi, I'd like to use D for the "brain" of a small robot (Anki vector) whose API is coded in Python 3.6+. I had a look at Pyd but it's limited to python 2.7... It isn't. You may needs to set a dub version, or it may pick up the 2.7 as the

Re: is there a way to embed python 3.7 code in D program?

2019-05-12 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 12 May 2019 at 20:06:34 UTC, torea wrote: Hi, I'd like to use D for the "brain" of a small robot (Anki vector) whose API is coded in Python 3.6+. I had a look at Pyd but it's limited to python 2.7... Would there be other ways to call python functions and retrieve the python

is there a way to embed python 3.7 code in D program?

2019-05-12 Thread torea via Digitalmars-d-learn
Hi, I'd like to use D for the "brain" of a small robot (Anki vector) whose API is coded in Python 3.6+. I had a look at Pyd but it's limited to python 2.7... Would there be other ways to call python functions and retrieve the python objects (including camera image) inside a D program? Best

Re: Compile time mapping

2019-05-12 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 12 May 2019 at 18:47:20 UTC, Bogdan wrote: On Sunday, 12 May 2019 at 17:53:56 UTC, Bastiaan Veelo wrote: If I understand your question correctly, you have two enums of equal length, and you want to convert members across enums according to their position, right? My question was

Re: Compile time mapping

2019-05-12 Thread Bogdan via Digitalmars-d-learn
On Sunday, 12 May 2019 at 17:53:56 UTC, Bastiaan Veelo wrote: If I understand your question correctly, you have two enums of equal length, and you want to convert members across enums according to their position, right? My question was very vague, sorry about that. In my use case I'd like to

Re: Compile time mapping

2019-05-12 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 12 May 2019 at 17:53:56 UTC, Bastiaan Veelo wrote: On Saturday, 11 May 2019 at 15:48:44 UTC, Bogdan wrote: What would be the most straight-forward way of mapping the members of an enum to the members of another enum (one-to-one mapping) at compile time? If I understand your

Re: Compile time mapping

2019-05-12 Thread Bastiaan Veelo via Digitalmars-d-learn
On Saturday, 11 May 2019 at 15:48:44 UTC, Bogdan wrote: What would be the most straight-forward way of mapping the members of an enum to the members of another enum (one-to-one mapping) at compile time? If I understand your question correctly, you have two enums of equal length, and you want

Re: Framework design, initialization and framework usage

2019-05-12 Thread kdevel via Digitalmars-d-learn
On Wednesday, 8 May 2019 at 09:15:41 UTC, Ron Tarrant wrote: On Wednesday, 8 May 2019 at 06:30:56 UTC, Robert M. Münch wrote: Our focus is executable size (I'm an old school guy) and speed. What about correctness? [...] For some simple real-time grid example see:

Re: LDC2 and classic profiling

2019-05-12 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 11 May 2019 at 11:34:35 UTC, Denis Feklushkin wrote: On Saturday, 11 May 2019 at 09:12:24 UTC, Johan Engelen wrote: Those calls are to templated functions I presume? No Then I don't understand how you'd see instrumentation on functions that you did not compile with

Re: windowsx.h

2019-05-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/05/2019 5:00 AM, Robert M. Münch wrote: On 2019-05-12 10:33:16 +, Robert M. Münch said: Is there any reason why windowsx.h seems to be missing from core.sys.windows? Using DStep I now converted windowsx.h into windowsx.d Is creating a pull-request the correct way to submit it to

Re: windowsx.h

2019-05-12 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-05-12 10:33:16 +, Robert M. Münch said: Is there any reason why windowsx.h seems to be missing from core.sys.windows? Using DStep I now converted windowsx.h into windowsx.d Is creating a pull-request the correct way to submit it to druntime so that it can be included? --

Re: dub / debug build / missing symbols

2019-05-12 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-05-12 16:46:10 +, Ron Tarrant said: Not really familiar with this, but at a guess... Have you tried it without the 32-bit references? There are not 32bit references, but 64bit libs. MS was so smart to name the API Win32, doesn't has to do anything with 32 or 64 bit... If I'm

Re: dub / debug build / missing symbols

2019-05-12 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 11 May 2019 at 16:12:34 UTC, Robert M. Münch wrote: I somehow managed to get debug symbols into my dub project in the past. Now I'm trying to extend my dub configuration to use different libs for debug and release versions. "buildTypes" : { "debug" : {

Re: Compile time mapping

2019-05-12 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 11 May 2019 at 15:48:44 UTC, Bogdan wrote: What would be the most straight-forward way of mapping the members of an enum to the members of another enum (one-to-one mapping) at compile time? An example of a Initial enum that creates a derived enum using the same element names but

Windows / redirect STDERR to see assert messages

2019-05-12 Thread Robert M. Münch via Digitalmars-d-learn
When developing Windows GUI applications I use: // detach from console and attach to a new one, works for x86 and x86_64 FreeConsole(); AllocConsole(); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr); so that the GUI

Re: LDC2 and classic profiling

2019-05-12 Thread Denis Feklushkin via Digitalmars-d-learn
On Saturday, 11 May 2019 at 11:38:17 UTC, Denis Feklushkin wrote: Maybe DUB caches binaries and linker links previous non-instrumented object files? I tried "dub clean" and "dub clean-caches" but maybe it is need remove someting else? Checked with "dub -f" and nothing changed.

windowsx.h

2019-05-12 Thread Robert M. Münch via Digitalmars-d-learn
Is there any reason why windowsx.h seems to be missing from core.sys.windows? -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Re: Dub fetch

2019-05-12 Thread Marco de Wild via Digitalmars-d-learn
On Saturday, 11 May 2019 at 14:27:50 UTC, Russel Winder wrote: Hi, Is there a way of asking which version of package XXX "dub fetch XXX" will actually fetch. I would like to avoid checking the contents of ~/.dub/packages before and after. Use the `--annotate` option: $ dub fetch dlangide