April 28

On Friday, 26 April 2024 at 18:41:11 UTC, ryuukk_ wrote:

>

https://loglog.games/blog/leaving-rust-gamedev/

Discussion here: https://news.ycombinator.com/item?id=40172033

We should encourage these people to check out D

I think what is meant by AAA is a concept related to the game world, isn't it? Or is it about Rust Programming Language?

SDB@79

April 27
On Saturday, April 27, 2024 9:49:34 PM MDT Salih Dincer via Digitalmars-d wrote:
> On Friday, 26 April 2024 at 18:41:11 UTC, ryuukk_ wrote:
> > https://loglog.games/blog/leaving-rust-gamedev/
> >
> > Discussion here: https://news.ycombinator.com/item?id=40172033
> >
> > We should encourage these people to check out D
>
> I think what is meant by AAA is a concept related to the game world, isn't it? Or is it about Rust Programming Language?
>
> SDB@79

https://en.wikipedia.org/wiki/AAA_(video_game_industry)

- Jonathan M Davis



April 28
On 4/26/2024 4:14 PM, Matheus Catarino wrote:
> I'm not a game developer, but when it comes to graphics programming dealing with floating point, NaN will be a problem that not everyone has experience or patience in dealing with.

When a NaN shows up unexpectedly in the results, it's indicative of a bug in the program.
April 29
On Monday, 29 April 2024 at 00:55:54 UTC, Walter Bright wrote:
> On 4/26/2024 4:14 PM, Matheus Catarino wrote:
>> I'm not a game developer, but when it comes to graphics programming dealing with floating point, NaN will be a problem that not everyone has experience or patience in dealing with.
>
> When a NaN shows up unexpectedly in the results, it's indicative of a bug in the program.

nans dont show up when programming video games they end in silently failed draw calls
April 29

On Monday, 29 April 2024 at 01:44:20 UTC, monkyyy wrote:

>

On Monday, 29 April 2024 at 00:55:54 UTC, Walter Bright wrote:

>

On 4/26/2024 4:14 PM, Matheus Catarino wrote:

>

I'm not a game developer, but when it comes to graphics programming dealing with floating point, NaN will be a problem that not everyone has experience or patience in dealing with.

When a NaN shows up unexpectedly in the results, it's indicative of a bug in the program.

nans dont show up when programming video games they end in silently failed draw calls

If they're silent how do you know they failed? Also, if you do know they failed why would NaN be unhelpful in localizing the problem? It could be initialization, or it could be something else along the way.

Zero initialization has a few things to recommend it over NaN (consistency with our non-FP types, zero is often (not always) the correct initialization value anyway, aligns with zero fill new-page machinery, simpler if you write bug free code :-) ...).

OTOH, NaNs can be very helpful when trying to track down FP problems, with improper (unthinking) initialization probably near the top of the list.

April 29

On Monday, 29 April 2024 at 03:51:09 UTC, Bruce Carneal wrote:

>

If they're silent how do you know they failed? Also, if you do know they failed why would NaN be unhelpful in localizing the problem? It could be initialization, or it could be something else along the way.

Having a game made in D, NaN is my #1 pain to deal with during graphics development. In other Langs, if I mess up some code, I usually get a picture that is wrong. A wrong colour, wrong position on screen, etc. With NaN, all rendering pipeline silently fails if even a single number was uninitialised somewhere. So I can't even take a guess at what number exactly was not initialised, I have to run a debugger and start from the beginning to see where it went wrong. If floats initialize to 0, you can usually guess what was forgotten because you know the math.

>

OTOH, NaNs can be very helpful when trying to track down FP problems, with improper (unthinking) initialization probably near the top of the list.

NaN was literally never helpful to me, because it removes indirect information from that allows me to take a guess. If you know what kind of math you're doing, you can usually assume where the code went wrong depending on the result you get. With NaNs, you only get one part of this information.

April 29

On Monday, 29 April 2024 at 06:55:16 UTC, GrimMaple wrote:

>

On Monday, 29 April 2024 at 03:51:09 UTC, Bruce Carneal wrote:
NaN was literally never helpful to me, because it removes

New DIP should be "print all NaNs in the code"

April 29

On Monday, 29 April 2024 at 03:51:09 UTC, Bruce Carneal wrote:

>

If they're silent how do you know they failed?

Because you get to debug a silent runtime error all the time, and at this point I just assume it's a float being nan

I'm pretty sure this is just the gpus reaction to nan, draw calls being ignored

April 29

On Monday, 29 April 2024 at 07:57:30 UTC, Sergey wrote:

>

On Monday, 29 April 2024 at 06:55:16 UTC, GrimMaple wrote:

>

On Monday, 29 April 2024 at 03:51:09 UTC, Bruce Carneal wrote:
NaN was literally never helpful to me, because it removes

New DIP should be "print all NaNs in the code"

It's an easy check to add in Dscanner.

Is the variable of FP type ?
  NO  : return;
  YES : Is the variable explicitly initialized ?
          YES : return;
          NO  : emitt a warning;
April 29

On Monday, 29 April 2024 at 10:12:38 UTC, Basile B. wrote:

>

On Monday, 29 April 2024 at 07:57:30 UTC, Sergey wrote:

>

On Monday, 29 April 2024 at 06:55:16 UTC, GrimMaple wrote:

>

On Monday, 29 April 2024 at 03:51:09 UTC, Bruce Carneal wrote:
NaN was literally never helpful to me, because it removes

New DIP should be "print all NaNs in the code"

It's an easy check to add in Dscanner.

Is the variable of FP type ?
  NO  : return;
  YES : Is the variable explicitly initialized ?
          YES : return;
          NO  : emitt a warning;

Well you have also the verify void-initialization but that does not add much more complexity to the check.