Re: Writing a simple text editor in D using a C tutorial

2023-08-29 Thread Răzvan Birișan via Digitalmars-d-learn
On Tuesday, 29 August 2023 at 16:59:57 UTC, Dejan Lekic wrote: On Tuesday, 29 August 2023 at 16:17:56 UTC, Răzvan Birișan wrote: Is there a better way to use `termios.h` inside D? Am I missing the point and there is a way to set these flags in D without using C libraries? I would try to use

Re: Writing a simple text editor in D using a C tutorial

2023-08-29 Thread Dejan Lekic via Digitalmars-d-learn
On Tuesday, 29 August 2023 at 16:17:56 UTC, Răzvan Birișan wrote: Is there a better way to use `termios.h` inside D? Am I missing the point and there is a way to set these flags in D without using C libraries? I would try to use termios from druntime instead. Try: import

Writing a simple text editor in D using a C tutorial

2023-08-29 Thread Răzvan Birișan via Digitalmars-d-learn
Hello, I'm following this [tutorial](https://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode.html#disable-ctrl-s-and-ctrl-q) and I'm having some trouble setting the flags. I have this C program that works properly (exits as soon as I press `q` and `CTRL+C` does not kill it). ```

Re: parallel threads stalls until all thread batches are finished.

2023-08-29 Thread Joe--- via Digitalmars-d-learn
On Monday, 28 August 2023 at 22:43:56 UTC, Ali Çehreli wrote: On 8/28/23 15:37, j...@bloow.edu wrote: > Basically everything is hard coded to use totalCPU's parallel() is a function that dispatches to a default TaskPool object, which uses totalCPUs. It's convenient but as you say, not all

Re: parallel threads stalls until all thread batches are finished.

2023-08-29 Thread Christian Köstlin via Digitalmars-d-learn
On 29.08.23 00:37, j...@bloow.edu wrote: Well, I have 32 cores so that would spawn 64-1 threads with hyper threading so not really a solution as it is too many simultaneous downs IMO. "These properties get and set the number of worker threads in the TaskPool instance returned by taskPool.