Re: Strip Unused Symbols Ldc + Windows

2020-03-21 Thread SrMordred via Digitalmars-d-learn
On Saturday, 21 March 2020 at 18:01:55 UTC, kinke wrote: On Saturday, 21 March 2020 at 17:33:21 UTC, SrMordred wrote: Hmm, ok, my question is in fact relate to this kind of thing: https://godbolt.org/z/NGjyyx Why int example.add(int, int): its still on the binary when all u need is alredy opti

Re: dub and -lowmem: does nothing

2020-03-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/21/20 5:34 AM, Anonymouse wrote: On Saturday, 21 March 2020 at 00:17:37 UTC, kinke wrote: Most likely because dub doesn't actually invoke the listed command, but uses a response file to work around cmdline length limits. -lowmem in response files is ignored by DMD (needs to be parsed and s

Re: Strip Unused Symbols Ldc + Windows

2020-03-21 Thread kinke via Digitalmars-d-learn
On Saturday, 21 March 2020 at 17:33:21 UTC, SrMordred wrote: Hmm, ok, my question is in fact relate to this kind of thing: https://godbolt.org/z/NGjyyx Why int example.add(int, int): its still on the binary when all u need is alredy optimized to main: mov eax, 30 ret ? You're inspecti

Re: Strip Unused Symbols Ldc + Windows

2020-03-21 Thread SrMordred via Digitalmars-d-learn
On Saturday, 21 March 2020 at 15:53:53 UTC, kinke wrote: On Saturday, 21 March 2020 at 01:54:00 UTC, SrMordred wrote: Someone knows how to strip unused symbols on final binary using ldc on windows ? i found this about this topic: https://forum.dlang.org/post/yvmnkvzgoxhcfavja...@forum.dlang.or

Re: Can I get the compiler to warn or fail on uninitialized variables/class members?

2020-03-21 Thread Kagamin via Digitalmars-d-learn
Maybe if you teach dparse to do this check.

Can I get the compiler to warn or fail on uninitialized variables/class members?

2020-03-21 Thread Tomaz via Digitalmars-d-learn
Hello, everyone I would say that disallowing uninitialized variables is a great way increase correctness in a program. Still, I can't seem to find a way to force my members/variables to always be initialized. See, for example: class Enemy{ int strength; int health; this(int stre

Re: Strip Unused Symbols Ldc + Windows

2020-03-21 Thread kinke via Digitalmars-d-learn
On Saturday, 21 March 2020 at 01:54:00 UTC, SrMordred wrote: Someone knows how to strip unused symbols on final binary using ldc on windows ? i found this about this topic: https://forum.dlang.org/post/yvmnkvzgoxhcfavja...@forum.dlang.org that uses --gc-sections and --version-script but this o

Re: Best way to learn 2d games with D?

2020-03-21 Thread Gregor Mückl via Digitalmars-d-learn
On Sunday, 15 March 2020 at 17:58:58 UTC, Steven Schveighoffer wrote: I want to try and learn how to write 2d games. I'd prefer to do it with D. I've found a ton of tutorials on learning 2d gaming with other languages. Is there a place to look that uses D for learning? Should I just start wit

Re: dub and -lowmem: does nothing

2020-03-21 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 21 March 2020 at 00:17:37 UTC, kinke wrote: Most likely because dub doesn't actually invoke the listed command, but uses a response file to work around cmdline length limits. -lowmem in response files is ignored by DMD (needs to be parsed and set before druntime initialization, but