Re: SIGUSR1 in clock_nanosleep()? how to isolate this issue?

2020-08-20 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Thursday, 20 August 2020 at 18:58:43 UTC, mw wrote: Hi, I run into an issue: it's SIGUSR1 in clock_nanosleep() [...] Anyone has some suggestions on how to isolate this issue? Thanks. Try "handle SIGUSR1 nostop noprint" and "handle SIGUSR2 nostop noprint" in gdb.

Re: vibe.d and my first web service

2020-08-20 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 20 August 2020 at 18:13:46 UTC, ddcovery wrote: On Monday, 17 August 2020 at 15:45:05 UTC, aberba wrote: [...] After 18 years following DLang, and some disagrees about productivity lacks at the beggining (no IDE, Debugging?, an standard library battle, not a good database connec

Re: Is using floating point type for money/currency a good idea?

2020-08-20 Thread Steven Lee via Digitalmars-d-learn
Me and my financial adviser think not. Unfortunately, this is not the best way..

Re: vibe.d and my first web service

2020-08-20 Thread ddcovery via Digitalmars-d-learn
"After 18 years following DLang," its not well expressed...may be "at first Dlang stages, after 2 years following its evolution, and ..."

Re: SIGUSR1 in clock_nanosleep()? how to isolate this issue?

2020-08-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/20/20 2:58 PM, mw wrote: Hi, I run into an issue: it's SIGUSR1 in clock_nanosleep() The GC uses SIGUSR1 (and SIGUSR2). Maybe that's the issue? https://github.com/dlang/druntime/blob/e1fb19829ebef0419782de43ce4b0e2a1ba140be/src/core/thread/osthread.d#L1946 -Steve

Re: how stdin stream works?

2020-08-20 Thread Ali Çehreli via Digitalmars-d-learn
On 8/19/20 11:46 AM, Flade wrote: Try instead getting a line via readln, and then trying to read that into your expected input. -Steve Thanks Steve! I will get the input a string then as you said and then I'll try to convert it! Thanks a lot, have a nice day! In some cases clearerr() and

SIGUSR1 in clock_nanosleep()? how to isolate this issue?

2020-08-20 Thread mw via Digitalmars-d-learn
Hi, I run into an issue: it's SIGUSR1 in clock_nanosleep() --- ... [New Thread 0x70ae0700 (LWP 36860)] [New Thread 0x7fffcbfff700 (LWP 36861)] [Detaching after fork from child process 36862] [New Thread 0x7fffd2eff700 (LWP 36863)] [New Thread 0x7fffd26fe700 (LWP 36864

Re: vibe.d and my first web service

2020-08-20 Thread ddcovery via Digitalmars-d-learn
On Monday, 17 August 2020 at 15:45:05 UTC, aberba wrote: On Thursday, 13 August 2020 at 09:54:06 UTC, Mr. Backup wrote: On Wednesday, 12 August 2020 at 13:46:06 UTC, James Blachly wrote: Unfortunately the problem still occurs with Vibe.d 0.9.0 IMO **this is the single most important problem t

Re: vibe.d and my first web service

2020-08-20 Thread Ben via Digitalmars-d-learn
On Thursday, 13 August 2020 at 09:54:06 UTC, Mr. Backup wrote: And as soon as I came across it, I wanted to use it in my project. But it has many packages for the same things, but these packages are unfinished. Everyone creates their own. You start comparing them and don't know what to choose f

Re: Disjoint slices of an array as reference

2020-08-20 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 20 August 2020 at 08:26:59 UTC, Ali Çehreli wrote: On 8/19/20 9:11 PM, data pulverizer wrote: Thanks. I might go for a design like this: ``` struct View(T){   T* data;   long[2][] ranges; } ``` [...] I implemented the same idea recently; it's a fun exercise. :) I didn't bother

Re: Disjoint slices of an array as reference

2020-08-20 Thread Ali Çehreli via Digitalmars-d-learn
On 8/19/20 9:11 PM, data pulverizer wrote: On Thursday, 20 August 2020 at 03:47:15 UTC, Paul Backus wrote: double[][] y; y ~= x[0..5]; Thanks. I might go for a design like this: ``` struct View(T){   T* data;   long[2][] ranges; } ``` The ranges are were the slices are stored and T* (maybe

Re: Disjoint slices of an array as reference

2020-08-20 Thread Ali Çehreli via Digitalmars-d-learn
On 8/19/20 7:40 PM, data pulverizer wrote: > An array in D is either two pointers or one pointer and a length (I > don't know which) It is the length, followed by the pointer, equivalent of the following struct: struct A { size_t length_; void * ptr; size_t length() { return length