Re: Pre-import version statements

2023-07-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, July 19, 2023 10:56:26 PM MDT Chris Piker via Digitalmars-d- learn wrote: > Hi D > > In my C code I used to typically put the line: > ``` > #define _POSIX_C_SOURCE 200112L > ``` > in the source before importing any standard library headers. Is > there something equivalent for phobos?

Re: Recommendation on plotting library

2023-07-19 Thread anonymouse via Digitalmars-d-learn
On Thursday, 20 July 2023 at 04:41:48 UTC, Chris Piker wrote: On Thursday, 20 July 2023 at 03:58:05 UTC, Andrew wrote: I just tried ggplotd and it was easy to make it work on Linux, only one external apt command needed, but on Windows, even that is a deal breaker. Package management on Windows

Re: having troubles with D and Vulkan.

2023-07-19 Thread Danni Coy via Digitalmars-d-learn
ok found it, I am an idiot, (really not used to working with dynamic libraries). erupted needs a call to load device level functions. loadDeviceLevelFunctions(instance); On Thu, Jul 20, 2023 at 4:22 PM Danni Coy wrote: > > https://pastebin.com/Jc9ZaFFs > Redid the code as an almost exact transl

Re: having troubles with D and Vulkan.

2023-07-19 Thread Danni Coy via Digitalmars-d-learn
https://pastebin.com/Jc9ZaFFs Redid the code as an almost exact translation of the C code. should be easier to test and compare. Same issue is occurring. On Thu, Jul 20, 2023 at 5:30 AM Mike Shah via Digitalmars-d-learn wrote: > > On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote: > > h

Pre-import version statements

2023-07-19 Thread Chris Piker via Digitalmars-d-learn
Hi D In my C code I used to typically put the line: ``` #define _POSIX_C_SOURCE 200112L ``` in the source before importing any standard library headers. Is there something equivalent for phobos? Say `version(phobos2.100)` or similar? I don't particularly need this functionality, just checki

Re: Recommendation on plotting library

2023-07-19 Thread Chris Piker via Digitalmars-d-learn
On Thursday, 20 July 2023 at 03:58:05 UTC, Andrew wrote: If you're already using python, it's probably best to keep using that. Oh of course. Examples *have* to be provided in python, since that's the default language of science these days. But extra examples don't hurt, and it would be nic

Recommendation on plotting library

2023-07-19 Thread Chris Piker via Digitalmars-d-learn
Hi D One of my jobs is to release and maintain public data archives from long-running scientific instruments. In order to help people understand how to process the data, sample code is often included with the archive. Recently this has been in the form of short programs that generate a plot

Re: having troubles with D and Vulkan.

2023-07-19 Thread Danni Coy via Digitalmars-d-learn
On Thu, Jul 20, 2023 at 5:30 AM Mike Shah via Digitalmars-d-learn wrote: > > On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote: > > https://pastebin.com/JxxJufNB > > What platform are you using, and how are you trying to build? > > I can try to replicate on my end. I am on Manjaro Linux

Re: having troubles with D and Vulkan.

2023-07-19 Thread Mike Shah via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote: https://pastebin.com/JxxJufNB What platform are you using, and how are you trying to build? I can try to replicate on my end.

Re: Redirecting standard streams in Windows

2023-07-19 Thread Alexander Zhirov via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 00:13:04 UTC, Adam D Ruppe wrote: How does the cat program know what the encoding of the file is? Try opening it in notepad or something and specifying the encoding. I betcha it is perfectly fine. Strange. Everything works correctly on the command line. And the

Re: Garbage Collectors

2023-07-19 Thread Johan via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 11:27:14 UTC, Richard (Rikki) Andrew Cattermole wrote: [...] you would have to do a new build of druntime/phobos special which isn't the easiest thing to do. Side remark: LDC ships with the ldc-build-runtime tool which should help the user a lot in building drun

Re: Garbage Collectors

2023-07-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/19/23 3:24 AM, IchorDev wrote: So, D’s default garbage collector is the one named “conservative” in DRuntime… I see there’s also “manual” which doesn’t actually function as a GC, which is interesting. Nothing says what ProtoGC is… so I guess it’s useless. Has anyone ever published any cust

Re: Garbage Collectors

2023-07-19 Thread IchorDev via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 11:27:14 UTC, Richard (Rikki) Andrew Cattermole wrote: druntime supports registering of GC's not compiled with druntime. But because some of the machinery isn't available to you, you would have to recreate it. Oh right, so it's more of a matter of making GC-re

Re: Garbage Collectors

2023-07-19 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 19/07/2023 11:13 PM, IchorDev wrote: On Wednesday, 19 July 2023 at 10:50:07 UTC, Richard (Rikki) Andrew Cattermole wrote: Copying out the conservative GC, register it under a different name and getting that to compile and link without recompiling druntime would be a good place to begin wit

Re: Garbage Collectors

2023-07-19 Thread IchorDev via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 10:50:07 UTC, Richard (Rikki) Andrew Cattermole wrote: Copying out the conservative GC, register it under a different name and getting that to compile and link without recompiling druntime would be a good place to begin without having to understand how GC's work.

Re: Garbage Collectors

2023-07-19 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 19/07/2023 9:02 PM, IchorDev wrote: On Wednesday, 19 July 2023 at 08:27:18 UTC, Richard (Rikki) Andrew Cattermole wrote: Its not as simple as porting to the API unfortunately. We don't have barriers of any kind, so that removes most GC designs you would want to use today. We are very close

Re: Garbage Collectors

2023-07-19 Thread IchorDev via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 08:27:18 UTC, Richard (Rikki) Andrew Cattermole wrote: Its not as simple as porting to the API unfortunately. We don't have barriers of any kind, so that removes most GC designs you would want to use today. We are very close to maxing out what we can do as a resul

Re: Garbage Collectors

2023-07-19 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Its not as simple as porting to the API unfortunately. We don't have barriers of any kind, so that removes most GC designs you would want to use today. We are very close to maxing out what we can do as a result. A whole pile of logic is hidden in rt, so you have no choice but to either do th

Re: Garbage Collectors

2023-07-19 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 19/07/2023 7:44 PM, Sergey wrote: Forking GC was introduced some time ago. But I don't think it is quite different from regular (https://forum.dlang.org/post/tf8mbo$1jvp$1...@digitalmars.com) It is a modification of the conservative GC. Rather than a unique GC implementation and is upstrea

Re: Garbage Collectors

2023-07-19 Thread Sergey via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 07:24:06 UTC, IchorDev wrote: So, D’s default garbage collector is the one named “conservative” in DRuntime… I see there’s also “manual” which doesn’t actually function as a GC, which is interesting. Nothing says what ProtoGC is… so I guess it’s useless. Has anyone

Re: having troubles with D and Vulkan.

2023-07-19 Thread Danni Coy via Digitalmars-d-learn
https://pastebin.com/JxxJufNB

Re: having troubles with D and Vulkan.

2023-07-19 Thread Danni Coy via Digitalmars-d-learn
> > I was able to get through the triangle demo a while back. I feel > like it's more of a D question than a Vulkan library question. > You'll have to post your code so people can tell what it is. Just > a hunch, but it's probably something that the gc is collecting > before it is used. What's the