Re: What the heck am i doing wrong? I'm just trying to create a 8 bit unsigned variable.

2025-05-18 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, May 17, 2025 at 07:09:40AM -0600, Jonathan M Davis via Digitalmars-d-learn wrote: [...] > Given that Java and C# disallow narrowing conversions, I expect that > they have similar restrictions, but I haven't done much with either of > them any time recently, so I'm not sure what they do wit

Re: What the heck am i doing wrong? I'm just trying to create a 8 bit unsigned variable.

2025-05-18 Thread monkyyy via Digitalmars-d-learn
On Sunday, 18 May 2025 at 15:30:39 UTC, H. S. Teoh wrote: ``` import nopromote; byte b = 120; b = b.np + 5; // .np overtly marks this as narrow int arithmetic b = b.np * 2; // you're on your own here when this overflows // Though you should't be using narrow ints if you didn't know how to

Why is my image not rendering in a simple HTML page served with D?

2025-05-18 Thread Damjan via Digitalmars-d-learn
Hi I'm experimenting with using D to serve a basic HTML page (using vibe.d), and while the HTML loads fine, none of my image files are rendering in the browser — I only see broken icons. Here’s the relevant part of my D code that serves the HTML: import vibe.vibe; void handleRequest(HTTPSer

Re: Why is my image not rendering in a simple HTML page served with D?

2025-05-18 Thread Hipreme via Digitalmars-d-learn
On Sunday, 18 May 2025 at 21:40:17 UTC, Damjan wrote: Hi I'm experimenting with using D to serve a basic HTML page (using vibe.d), and while the HTML loads fine, none of my image files are rendering in the browser — I only see broken icons. [...] Your logo.png is not inside the folder "im

Re: Why is my image not rendering in a simple HTML page served with D?

2025-05-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On Sunday, 18 May 2025 at 21:40:17 UTC, Damjan wrote: Do I need to explicitly configure vibe.d to serve static files from the public folder? Yes https://vibed.org/api/vibe.http.fileserver/serveStaticFiles -Steve

Re: Looking for Feedback (3D engine)

2025-05-18 Thread drug007 via Digitalmars-d-learn
On 17.05.2025 11:00, Danny Arends wrote: On Saturday, 17 May 2025 at 07:20:06 UTC, drug007 wrote: On 17.05.2025 01:26, Danny Arends wrote: [...] This patch fixed the issue: ```bash root@1be5cfa937c3:/DImGui#  git diff diff --git a/src/math/lsystem.d b/src/math/lsystem.d index 394e902..02c085d

Re: What the heck am i doing wrong? I'm just trying to create a 8 bit unsigned variable.

2025-05-18 Thread Ali Çehreli via Digitalmars-d-learn
On 5/16/25 12:19 PM, H. S. Teoh wrote: > Basically, `a + 5` gets promoted to int, and that's why it can't be > assigned back to `a`. (Don't ask me why, that's just the way it is and > Walter has refused and probably will continue to refuse to change it.) Overloaded functions must also be consid