Re: UI Library

2022-05-27 Thread Jack via Digitalmars-d-learn
On Friday, 20 May 2022 at 12:32:37 UTC, ryuukk_ wrote: Avoid GTK, it's bloated, GTK4 looks like a toolkit to design mobile apps, and you need runtime dependencies on windows adam's gui library is very nice, 0 dependencies I personally prefer IMGUI, 0 dependencies, you bring the could you se

Re: Inferred attributes errors in template function.

2022-05-27 Thread user1234 via Digitalmars-d-learn
On Friday, 27 May 2022 at 09:41:32 UTC, user1234 wrote: [...] on a side note that's funny how dmd manages to systematically print the less interesting message in both case. They are actually correct, I dont know why at some point I thought there was a problem. For the float one it's oviousl

Re: Inferred attributes errors in template function.

2022-05-27 Thread Paul Backus via Digitalmars-d-learn
On Friday, 27 May 2022 at 08:39:08 UTC, vit wrote: Is in dmd some flag that print errors similarly to this?: ```d void main()@safe pure{ foo!long(); foo!float(); //Error: `pure` function `D main` cannot call impure function `onlineapp.foo!float.foo` //Error: potent

Re: Tracing/Profiling D Applications

2022-05-27 Thread Christian Köstlin via Digitalmars-d-learn
On 2022-05-26 22:19, Ali Çehreli wrote: On 5/26/22 12:54, Christian Köstlin wrote: > I want to be able to dump > tracings even while the program is still running. Then I would have to > collect the tls data of all still running threads. I am not sure without testing but I am under the impres

Re: Inferred attributes errors in template function.

2022-05-27 Thread Tejas via Digitalmars-d-learn
On Friday, 27 May 2022 at 08:39:08 UTC, vit wrote: Hello, I have this problem: ```d static int i; void bar(T)(){ static if(is(T == int)) (()@system => 1)(); static if(is(T == float)) i = 42; } void foo(T)(){ bar!T(); } void main()@safe pure{ foo!lon

Why is the compiled file size so huge?

2022-05-27 Thread Alexander Zhirov via Digitalmars-d-learn
I'm trying to compile a file that weighs 3 kilobytes. I'm also linking a self-written dynamic library. I don't understand why the resulting executable file is so huge? After all, all libraries are present: ```sh -rwxr-xr-x 1 root root 6.3M May 27 13:39 app -rw-r--r-- 1 root root 2.9K May 27 12

Re: Inferred attributes errors in template function.

2022-05-27 Thread user1234 via Digitalmars-d-learn
On Friday, 27 May 2022 at 08:39:08 UTC, vit wrote: Hello, I have this problem: ```d static int i; void bar(T)(){ static if(is(T == int)) (()@system => 1)(); static if(is(T == float)) i = 42; } void foo(T)(){ bar!T(); } void main()@safe pure{ foo!lon

Inferred attributes errors in template function.

2022-05-27 Thread vit via Digitalmars-d-learn
Hello, I have this problem: ```d static int i; void bar(T)(){ static if(is(T == int)) (()@system => 1)(); static if(is(T == float)) i = 42; } void foo(T)(){ bar!T(); } void main()@safe pure{ foo!long(); foo!float(); //Error: `pure` function `D main`