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

2019-05-19 Thread torea via Digitalmars-d-learn
On Monday, 13 May 2019 at 03:06:07 UTC, evilrat wrote: 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

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

2019-05-14 Thread torea via Digitalmars-d-learn
On Monday, 13 May 2019 at 08:33:46 UTC, Russel Winder wrote: 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... PyD works entirely fine for me using Python 3.7. Yes, it seems to work so

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

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: string mixup problem with stdin.byLine

2016-08-10 Thread torea via Digitalmars-d-learn
On Monday, 8 August 2016 at 16:30:39 UTC, Meta wrote: Alternatively you can use std.stdio.byLineCopy and don't need to add the `to!string`. If you are calling to!string on ever line there will probably be no performance difference, but if you are not, such as only calling to!string on every

Re: string mixup problem with stdin.byLine

2016-08-10 Thread torea via Digitalmars-d-learn
On Monday, 8 August 2016 at 12:29:51 UTC, Seb wrote: You should always carefully read the description and Notes ;-) Note: Each front will not persist after popFront is called, so the caller must copy its contents (e.g. by calling to!string) when retention is needed. If the caller needs to

Re: string mixup problem with stdin.byLine

2016-08-08 Thread torea via Digitalmars-d-learn
On Monday, 8 August 2016 at 05:17:24 UTC, Dave Akers wrote: I do believe your problem is with the line... On Monday, 8 August 2016 at 02:44:20 UTC, torea wrote: string cleanLine = strip( cast(string)line ); It's casting a char[] to and immutable(char)[], causing the mutable buffer from

string mixup problem with stdin.byLine

2016-08-07 Thread torea via Digitalmars-d-learn
Hi all, I'm still at beginner level in D and trying to make a simple note program in the terminal. I've been struggling with a simple problem for the last 2 hours so I could use some help! What I want to do is: if I write #m, I record the following lines in a specific string member of a

Re: DerelictOrg and SDL_Mixer

2014-11-25 Thread torea via Digitalmars-d-learn
On Wednesday, 26 November 2014 at 01:25:51 UTC, Mike Parker wrote: Don't think of it that way. Think of it this way: you have to load every library you want to use. SDL2_mixer is a library, SDL2_image is a library, SDL2_ttf is a library, and so on. You have to load them individually.

DerelictOrg and SDL_Mixer

2014-11-24 Thread torea via Digitalmars-d-learn
Hi all, I'm playing a bit with D and SDL using DerelictOrg on debian 6. I've installed SDL2, SDL_mixer2 and the latest packages DerelictUtil and DerelictSDL2. I can display some stuffs and interact with the keys. Now I'm trying to add music and sounds but each time I try to access a function

Re: DerelictOrg and SDL_Mixer

2014-11-24 Thread torea via Digitalmars-d-learn
On Monday, 24 November 2014 at 23:27:58 UTC, Jack wrote: It's a common error but did you load the Mixer and SDL libraries? DerelictSDL2Mixer.load(); DerelictSDL2.load(); And some code or output from gdb would be most helpful. Oh.. I didn't know about the DerelictSDL2Mixer.load()! I thought