Non-blocking keyboard input

2023-12-26 Thread Joe--- via Digitalmars-d-learn
??? Surely there there is a one liner library solution for this? I have a program that spawns a thread for debugging information and uses the keyboard input which allows me to display the information. If I use getchar or readline then it blocks the thread

curl :sending mail via SMTP

2023-12-26 Thread phcute via Digitalmars-d-learn
Greetings! I was trying to translate an example code snippets from curl which demonstrates how to sending an email via smtp using curl api.The orignal c code works fine,but my D code failed at the beginnig when it is running. Appreicate for the help to figure me out what's wrong with the co

Re: FileException when calling getTimes on a DirEntry

2023-12-26 Thread kdevel via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 21:09:05 UTC, Renato wrote: On Sunday, 24 December 2023 at 21:18:44 UTC, kdevel wrote: [...] I would have expected you asking questions like "Which program might have generated that symlink?", "How do I get the meta-data from the symlink and not from the file it

Re: FileException when calling getTimes on a DirEntry

2023-12-26 Thread Renato via Digitalmars-d-learn
On Sunday, 24 December 2023 at 21:18:44 UTC, kdevel wrote: On Sunday, 24 December 2023 at 20:00:15 UTC, Renato wrote: I asked what could be causing an Exception in my code to happen as that was quite unexpected. I would have expected you asking questions like "Which program might have generat

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread Sergey via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 13:58:54 UTC, tony wrote: On Tuesday, 26 December 2023 at 11:19:29 UTC, Sergey wrote: Use typeid, instead of typeof Thanks! Got quite a type but I will worry about that later: std.range.SortedRange!(Result, "a < b").SortedRange Yes, because sort is returnin

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread tony via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 11:19:29 UTC, Sergey wrote: Use typeid, instead of typeof Thanks! Got quite a type but I will worry about that later: std.range.SortedRange!(Result, "a < b").SortedRange

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread Sergey via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 10:53:10 UTC, Tony wrote: I just typed in the program that is on the first page of Learn. It has this line: sort(chain(arr1, arr2, arr3)); I assigned that to a variable: arr4 = sort(chain(arr1, arr2, arr3)); then printed it out writefln("%s",arr4); // works