Please verify: Traceinfo gone

2021-07-26 Thread frame via Digitalmars-d-learn
On Sunday, 25 July 2021 at 11:17:26 UTC, frame wrote: The issue is: w/o calling test() there are stack lines available but when I compile it with the test() call, no stack lines are available? So if my usage is valid I would file a bug report - but maybe my setup is just broken. Could some

Re: __FILE__

2021-07-26 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 26 July 2021 at 11:43:56 UTC, workman wrote: __FILE__[0..$] Why do you have that [0..$] there? It is probably breaking the __FILE__ magic.

Re: Performance issue with fiber

2021-07-26 Thread hanabi1224 via Digitalmars-d-learn
Thank you for your response! I've got some questions tho. On Saturday, 24 July 2021 at 09:17:47 UTC, Stefan Koch wrote: It will not use a fiber pool. Why fiber pool? Isn't fiber a lightweight logical thread which is already implemented with thread pool internally? Spawning a new fiber is

Re: byKeyValue is not available at compilation-time right ?

2021-07-26 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 25 July 2021 at 17:38:23 UTC, someone wrote: i.e. your AA initialization is copy-pasted into each use of it, which means your program is rebuilding this AA at runtime every time it comes up. You probably got to this point as a bare `immutable structureLocations` errored out to the

__FILE__

2021-07-26 Thread workman via Digitalmars-d-learn
file test.d: - module test; import abc; void doTest(){ log!"test"(); } --- file abc.d: - module abc; import test; void log(string fmt, int line = __LINE__, string path = __FILE__[0..$], A...)(A a) {

Re: Performance issue with fiber

2021-07-26 Thread russhy via Digitalmars-d-learn
``` build: ``` dub build --compiler=ldc -brelease --single primesv1.d ``` -brelease is a typo issue, i don't think that produce defired effect, most likely it defaulted to debug build it should be -b release

Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread Tejas via Digitalmars-d-learn
```d import std; import core.thread.osthread; void delegate() f; void main() { void func(){} f = createLowLevelThread(, 2<<30);//works createLowLevelThread(f, 2<<30);// doesn't work!! } ``` Can someone help?

Re: Performance issue with fiber

2021-07-26 Thread jfondren via Digitalmars-d-learn
On Monday, 26 July 2021 at 15:27:48 UTC, russhy wrote: ``` build: ``` dub build --compiler=ldc -brelease --single primesv1.d ``` -brelease is a typo issue, i don't think that produce defired effect, most likely it defaulted to debug build it should be -b release No, it builds a

Re: Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread Tejas via Digitalmars-d-learn
On Monday, 26 July 2021 at 15:42:44 UTC, Paul Backus wrote: On Monday, 26 July 2021 at 15:29:26 UTC, Tejas wrote: ```d import std; import core.thread.osthread; void delegate() f; void main() { void func(){} f = createLowLevelThread(, 2<<30);//works createLowLevelThread(f,

Re: Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread Tejas via Digitalmars-d-learn
On Monday, 26 July 2021 at 16:46:40 UTC, Tejas wrote: On Monday, 26 July 2021 at 15:42:44 UTC, Paul Backus wrote: On Monday, 26 July 2021 at 15:29:26 UTC, Tejas wrote: ```d import std; import core.thread.osthread; void delegate() f; void main() { void func(){} f =

Re: Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread Paul Backus via Digitalmars-d-learn
On Monday, 26 July 2021 at 15:29:26 UTC, Tejas wrote: ```d import std; import core.thread.osthread; void delegate() f; void main() { void func(){} f = createLowLevelThread(, 2<<30);//works createLowLevelThread(f, 2<<30);// doesn't work!! } ``` Can someone help? The

Re: Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread JG via Digitalmars-d-learn
On Monday, 26 July 2021 at 16:46:40 UTC, Tejas wrote: On Monday, 26 July 2021 at 15:42:44 UTC, Paul Backus wrote: On Monday, 26 July 2021 at 15:29:26 UTC, Tejas wrote: ```d import std; import core.thread.osthread; void delegate() f; void main() { void func(){} f =

Re: POST request with std.net.curl

2021-07-26 Thread frame via Digitalmars-d-learn
On Monday, 26 July 2021 at 14:13:53 UTC, bachmeier wrote: In doubt you can turn on the verbose() method on the HTTP object. That's a modest improvement (for the small number of people that find the option in the docs) but definitely not at the same level of information as the curl CLI. I

Re: POST request with std.net.curl

2021-07-26 Thread bachmeier via Digitalmars-d-learn
On Sunday, 25 July 2021 at 15:44:14 UTC, frame wrote: On Sunday, 25 July 2021 at 13:07:36 UTC, bachmeier wrote: On Friday, 23 July 2021 at 18:11:51 UTC, bachmeier wrote: [...] After all this, it turned out the answer was a simple (but not obvious) typo in the header information. It would be

Re: __FILE__

2021-07-26 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 26 July 2021 at 12:01:23 UTC, Adam D Ruppe wrote: On Monday, 26 July 2021 at 11:43:56 UTC, workman wrote: __FILE__[0..$] Why do you have that [0..$] there? It is probably breaking the __FILE__ magic. Correct. The compiler has to evaluate the default argument as constant

Re: Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread Tejas via Digitalmars-d-learn
On Monday, 26 July 2021 at 17:01:13 UTC, JG wrote: On Monday, 26 July 2021 at 16:46:40 UTC, Tejas wrote: On Monday, 26 July 2021 at 15:42:44 UTC, Paul Backus wrote: On Monday, 26 July 2021 at 15:29:26 UTC, Tejas wrote: [...] The delegate must be `nothrow`: ```d void delegate() nothrow f;

Re: Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 26 July 2021 at 17:14:45 UTC, Tejas wrote: Yeah after reading the error diagnostics carefully I realized that the compiler is inferring many attributes when passing ```func``` directly but not when passing via delegate Well, technically, it is inferred there too, but since you

Re: Passing delegate indirectly to createLowLevelThread doesn't work

2021-07-26 Thread Tejas via Digitalmars-d-learn
On Monday, 26 July 2021 at 17:21:04 UTC, Adam D Ruppe wrote: On Monday, 26 July 2021 at 17:14:45 UTC, Tejas wrote: Yeah after reading the error diagnostics carefully I realized that the compiler is inferring many attributes when passing ```func``` directly but not when passing via delegate