Re: Deserialising JSON with asdf when a field is unexpectedly null

2025-04-05 Thread Anonymouse via Digitalmars-d-learn
On Wednesday, 2 April 2025 at 16:47:36 UTC, Sergey wrote: ```d struct S { static struct Inner { string s = "foo"; } @serdeOptional Nullable!(Inner) inner = Inner.init; } ``` seems working Thanks!

alias to connect with superclass's constructor

2025-04-05 Thread Andy Valencia via Digitalmars-d-learn
Consider the following, totally contrived, code. The compiler tells me: tst39.d(21): Error: constructor `tst39.B.this(string s)` is not callable using argument types `()` tst39.d(21):constructor `tst39.B.this` hides base class function `tst39.A.this` tst39.d(21):add `alias thi

Re: bindbc, SDL

2025-04-05 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 27 March 2025 at 14:10:21 UTC, Richard (Rikki) Andrew Cattermole wrote: The bindbc family of packages, usually can link against a shared library both during compilation (statically), or during runtime (dynamically). The import library serves no purpose if you are linking dynami

I think there's an issue with dub / visuald (not dagon), but how can I get dagon Tutorial1 Simple App to build?

2025-04-05 Thread Daniel via Digitalmars-d-learn
I posted this issue in the GitHub issue tracker: https://github.com/gecko0307/dagon/issues/100 But it looks like it has something to do with dub changing folder structure (so that the shaders folder isn't immediately where it should be). Any idea how to fix this?

Deserialising JSON with asdf when a field is unexpectedly null

2025-04-05 Thread Anonymouse via Digitalmars-d-learn
I'm trying to replace my use of `std.json` with `asdf`. I ran into an issue where some JSON I throw at it has fields that are sometimes null and sometimes not. I don't know how to tell asdf not to throw when deserialising it. Minimal example: ```d { "inner": { "s": "foo" } }

How does one use toString() inside of the class's hash function? Compiler error

2025-04-05 Thread Daniel via Digitalmars-d-learn
``` module def; class Def { public: this(string latex) { this.latex = latex; } this() { this.latex = ""; } override string toString() const { return latex; } string opUnary(string op="*")() const { return toString(); } override bo

Re: derelict-gl3 + derelict-glfw3 + derelict-util (version?) - need instructions on handling basic package version dependency conflicts

2025-04-05 Thread Daniel via Digitalmars-d-learn
On Thursday, 3 April 2025 at 04:43:59 UTC, Mike Parker wrote: On Thursday, 3 April 2025 at 04:41:14 UTC, Daniel Donnelly, Jr. wrote: [...] Derelict is no longer maintained. It was replaced by the BindBC project and that's what you should be using. As for the issue, in case you see it somewh

Update to MacOS Sequoia Version 15.4 (24E248) broke dmd and ldmd2 for me

2025-04-05 Thread Christian Köstlin via Digitalmars-d-learn
Hi, I just updated to said version on Apple silicon and neither dmd nor ldmd2 work anymore for me (as installed by the dlang install script https://dlang.org/install.html, which in turn used dmd.2.111.0.osx.tar.xz and ldc2-1.40.1-osx-arm64.tar.xz). On one hand I hope this is a local problem of

Re: Guidance on how to contribute to D lang for GSOC 2025?

2025-04-05 Thread user1234 via Digitalmars-d-learn
On Saturday, 5 April 2025 at 07:48:27 UTC, Aditya Vir wrote: Hello everyone, I am Aditya, a computer science undergrad from India. I want to push my application to D lang for this year's Google summer of Code. I seek tips and advice regarding how should I frame my application. Here is my cur

Guidance on how to contribute to D lang for GSOC 2025?

2025-04-05 Thread Aditya Vir via Digitalmars-d-learn
Hello everyone, I am Aditya, a computer science undergrad from India. I want to push my application to D lang for this year's Google summer of Code. I seek tips and advice regarding how should I frame my application. Here is my current tech stack --> C/C++, Python, Linux and MERN(mern won't