Re: Testing for object property supporting "<" comparison

2021-05-11 Thread Chris Piker via Digitalmars-d-learn
On Wednesday, 12 May 2021 at 00:06:52 UTC, Paul Backus wrote: On Tuesday, 11 May 2021 at 19:42:34 UTC, Chris Piker wrote: std.traits.isOrderingComparable https://phobos.dpldocs.info/std.traits.isOrderingComparable.html Well I feel sheepish, don't know how I missed that one. Hey thanks for

Re: Testing for object property supporting "<" comparison

2021-05-11 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 19:42:34 UTC, Chris Piker wrote: My problem is that I don't know how to specify that properties must be comparable via "<". I took a look at the Traits module, but there are more things that are comparable then Arithmetic or Floating point types. Also, since the

Re: Shutdown signals

2021-05-11 Thread Tim via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 06:59:10 UTC, Patrick Schluter wrote: On Tuesday, 11 May 2021 at 06:44:57 UTC, Tim wrote: On Monday, 10 May 2021 at 23:55:18 UTC, Adam D. Ruppe wrote: [...] I don't know why I didn't find that. I was searching for the full name, maybe too specific? Thanks anyways,

Testing for object property supporting "<" comparison

2021-05-11 Thread Chris Piker via Digitalmars-d-learn
Hi D I'm working on a bit of code that handles selecting one *.front from multiple range-ish objects. It's a select-or-drop algorithm for a data streaming service, the details aren't important. The algorithm takes a range of something I'll call "PriorityRange" objects. PriorityRange

Re: Is ldc not dependent on an a very old version of llvm ?

2021-05-11 Thread Imperatorn via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 12:02:12 UTC, Alain De Vos wrote: We are currently at llvm12. Should i be worried ? Why would that make you worry? You don't like the latest release? 樂

Re: Is ldc not dependent on an a very old version of llvm ?

2021-05-11 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 12:02:12 UTC, Alain De Vos wrote: We are currently at llvm12. Should i be worried ? On the release page you'll find: Supports LLVM 6.0 - 12.0. Note that it doesn't say 6.0, but 6.0 to 12.0. https://github.com/ldc-developers/ldc/releases/tag/v1.26.0

Re: Is ldc not dependent on an a very old version of llvm ?

2021-05-11 Thread cmyka via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 12:02:12 UTC, Alain De Vos wrote: We are currently at llvm12. Should i be worried ? https://github.com/ldc-developers/ldc/tree/master/tools/ldc-profdata it seems they support it on master?

Is ldc not dependent on an a very old version of llvm ?

2021-05-11 Thread Alain De Vos via Digitalmars-d-learn
We are currently at llvm12. Should i be worried ?

Re: Question about property & method access scope.

2021-05-11 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 10:48:03 UTC, Mike Parker wrote: On Tuesday, 11 May 2021 at 09:10:02 UTC, Vinod K Chandran wrote: So in many situations, I need to check some boolean properties of Window class and call some functions of Window class in WndProc. But I don't want to expose those

Re: Question about property & method access scope.

2021-05-11 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 10:47:15 UTC, cc wrote: The `package` protection attribute should work here if the modules reside in the same package (directory)? Thanks. "package" scope worked.

Re: Question about property & method access scope.

2021-05-11 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 09:10:02 UTC, Vinod K Chandran wrote: So in many situations, I need to check some boolean properties of Window class and call some functions of Window class in WndProc. But I don't want to expose those props and functions to the user. So if I make them private, I

Re: Question about property & method access scope.

2021-05-11 Thread cc via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 09:10:02 UTC, Vinod K Chandran wrote: Hi all, I am practising D with a win api GUI hobby project. I have a Window class and it resides in module window.d My WndProc function resides in another module named wnd_proc_module.d Inside my WndProc, I get the Window class

Re: Question about property & method access scope.

2021-05-11 Thread drug via Digitalmars-d-learn
11.05.2021 12:10, Vinod K Chandran пишет: Hi all, I am practising D with a win api GUI hobby project. I have a Window class and it resides in module window.d My WndProc function resides in another module named wnd_proc_module.d Inside my WndProc, I get the Window class like this. ```d Window win

Question about property & method access scope.

2021-05-11 Thread Vinod K Chandran via Digitalmars-d-learn
Hi all, I am practising D with a win api GUI hobby project. I have a Window class and it resides in module window.d My WndProc function resides in another module named wnd_proc_module.d Inside my WndProc, I get the Window class like this. ```d Window win = cast(Window) (cast(void*)

Re: Shutdown signals

2021-05-11 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 06:44:57 UTC, Tim wrote: On Monday, 10 May 2021 at 23:55:18 UTC, Adam D. Ruppe wrote: [...] I don't know why I didn't find that. I was searching for the full name, maybe too specific? Thanks anyways, this is super helpful. I wish it was documented better though :(

Re: Shutdown signals

2021-05-11 Thread Tim via Digitalmars-d-learn
On Monday, 10 May 2021 at 23:55:18 UTC, Adam D. Ruppe wrote: On Monday, 10 May 2021 at 23:35:06 UTC, Tim wrote: [...] dpldocs.info/signal it comes up as the second result. The C function you call from there (on linux anyway) is sigaction. A little copy/paste out of my terminal.d: ```d