Re: Can you access the same classes from C++ and D and vise versa, or do the classes have to not form dependency cycle?

2022-09-14 Thread Tejas via Digitalmars-d-learn
On Tuesday, 13 September 2022 at 03:13:59 UTC, Daniel Donnell, Jr wrote: On Sunday, 11 September 2022 at 02:14:51 UTC, zjh wrote: On Saturday, 10 September 2022 at 22:07:32 UTC, Ali Çehreli wrote: On 9/10/22 13:04, Daniel Donnell wrote: > https://dlang.org/spec/cpp_interface.html At DConf,

Re: can not take const struct member address at CTFE , is this a bug?

2022-09-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/14/22 12:53 AM, test123 wrote: On Wednesday, 14 September 2022 at 00:40:38 UTC, Ruby The Roobster wrote: The addresses of items stored in memory are by definition not constant.  This isn't a bug. If so why this can work ? ```d struct c { uint a, b;} __gshared const c d = { 3, 4};

Re: plot api

2022-09-14 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 14 September 2022 at 19:34:56 UTC, Alain De Vos wrote: Let's say i want to plot the function f(x)=sin(x)/x. Which API would you advice, in order for me to not re-invent the wheel. Have you tried ggplotd? https://code.dlang.org/packages/ggplotd

Building Example Project with `raylib-d`

2022-09-14 Thread jwatson-CO-edu via Digitalmars-d-learn
Hello, I used the following steps to build the example `raylib-d` program. (https://github.com/schveiguy/raylib-d#example) ### Install Raylib (Ubuntu/Debian) 1. `sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev` 1.

plot api

2022-09-14 Thread Alain De Vos via Digitalmars-d-learn
Let's say i want to plot the function f(x)=sin(x)/x. Which API would you advice, in order for me to not re-invent the wheel.

Re: C function taking two function pointers that share calculation

2022-09-14 Thread JG via Digitalmars-d-learn
On Wednesday, 14 September 2022 at 17:23:47 UTC, jmh530 wrote: There is a C library I sometimes use that has a function that takes two function pointers. However, there are some calculations that are shared between the two functions that would get pointed to. I am hoping to only need to do

Re: Poste some interesting vibe.d webpages

2022-09-14 Thread Alain De Vos via Digitalmars-d-learn
Although the framework is good. There is no community. Or general acceptance. Which is a pitty. Currently I ask myself how to do "sessions" with vibe.d.

C function taking two function pointers that share calculation

2022-09-14 Thread jmh530 via Digitalmars-d-learn
There is a C library I sometimes use that has a function that takes two function pointers. However, there are some calculations that are shared between the two functions that would get pointed to. I am hoping to only need to do these calculations once. The code below sketches out the general

Re: C function taking two function pointers that share calculation

2022-09-14 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 14 September 2022 at 18:02:07 UTC, JG wrote: [snip] Maybe others know better but I would have thought the only way is to use globals to do this. Often c libraries that I have used get round this by taking a function and a pointer and then the library calls your function on the

Re: Building Example Project with `raylib-d`

2022-09-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/14/22 4:17 PM, jwatson-CO-edu wrote: Hello, I used the following steps to build the example `raylib-d` program. (https://github.com/schveiguy/raylib-d#example) ### Install Raylib (Ubuntu/Debian) 1. `sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev

Re: Building Example Project with `raylib-d`

2022-09-14 Thread jwatson-CO-edu via Digitalmars-d-learn
On Wednesday, 14 September 2022 at 23:42:57 UTC, Steven Schveighoffer wrote: On 9/14/22 4:17 PM, jwatson-CO-edu wrote: Hello, I used the following steps to build the example `raylib-d` program. (https://github.com/schveiguy/raylib-d#example) ### Install Raylib (Ubuntu/Debian) 1. `sudo apt

Re: can not take const struct member address at CTFE , is this a bug?

2022-09-14 Thread test123 via Digitalmars-d-learn
On Wednesday, 14 September 2022 at 14:41:38 UTC, Steven Schveighoffer wrote: On 9/14/22 12:53 AM, test123 wrote: On Wednesday, 14 September 2022 at 00:40:38 UTC, Ruby The Roobster wrote: The addresses of items stored in memory are by definition not constant.  This isn't a bug. If so why this