Re: I do not understand what the problem is in this code.

2017-03-03 Thread steven kladitis via Digitalmars-d-learn
On Friday, 3 March 2017 at 04:14:02 UTC, Jordan Wilson wrote: On Friday, 3 March 2017 at 03:11:24 UTC, steven kladitis wrote: [...] I saw this answer for a similar question from Adam D. Ruppe: Quote: "...it is anything that Phobos considers "bidirectional" and "swappable" - an array it can

Split Real / Float into Mantissa, Exponent, and Base

2017-03-03 Thread Jonathan M. Wilbur via Digitalmars-d-learn
I have tried to come up with a good way to get the mantissa, exponent, and base from a real number, and I just can't come up with a good cross-platform way of doing it. I know about std.math.frexp(), but that function only gives you another real as the mantissa. I need an integral mantissa,

Re: Floating point rounding

2017-03-03 Thread ag0aep6g via Digitalmars-d-learn
On 03/02/2017 10:49 PM, Guillaume Chatelet wrote: Thx for the investigation! Here is the code for FloatingPointControl https://github.com/dlang/phobos/blob/master/std/math.d#L4809 Other code (enableExceptions / disableExceptions) seems to have two code path depending on "version(X86_Any)",

Re: Building a project with CMAKE

2017-03-03 Thread Ali Çehreli via Digitalmars-d-learn
On 03/03/2017 06:58 AM, berni wrote: > On Friday, 3 March 2017 at 13:21:56 UTC, Seb wrote: >> Is there any specific reason why you can't use DMD or LDC? > > gdc produces faster binaries. ;-) I've got installed the other two > compilers too and they work. I haven't compared them myself but I am

How to get dub to work when I have dlang installed in custom directory?

2017-03-03 Thread Jamal via Digitalmars-d-learn
I have successfully compiled and installed dmd, druntime and phobos and installed them all in /opt/dlang/dmd /opt/dlang/druntime /opt/dlang/phobos Everything works, I can compile and run d programs just fine. I use this in my .bashrc to make everything work: # Dlang export

Re: Split Real / Float into Mantissa, Exponent, and Base

2017-03-03 Thread pineapple via Digitalmars-d-learn
On Friday, 3 March 2017 at 18:09:02 UTC, Jonathan M. Wilbur wrote: I have tried to come up with a good way to get the mantissa, exponent, and base from a real number, and I just can't come up with a good cross-platform way of doing it. I know about std.math.frexp(), but that function only

Re: How to get dub to work when I have dlang installed in custom directory?

2017-03-03 Thread sarn via Digitalmars-d-learn
On Friday, 3 March 2017 at 20:35:04 UTC, Jamal wrote: I have no idea what is is wrong and or how to fix it. Any help? It would be the alias. When you're running dmd from your shell, you're using an alias that includes a bunch of flags to make dmd work. When dub runs, it'll run the dmd

Re: How to get dub to work when I have dlang installed in custom directory?

2017-03-03 Thread Jamal via Digitalmars-d-learn
On Friday, 3 March 2017 at 23:22:07 UTC, sarn wrote: On Friday, 3 March 2017 at 20:35:04 UTC, Jamal wrote: I have no idea what is is wrong and or how to fix it. Any help? It would be the alias. When you're running dmd from your shell, you're using an alias that includes a bunch of flags to

Re: Building a project with CMAKE

2017-03-03 Thread berni via Digitalmars-d-learn
On Friday, 3 March 2017 at 20:10:25 UTC, Ali Çehreli wrote: Which would put gdc in between the two. Is your experience different? Actually, I've got not much experience. A few weeks ago I ran a test where ldc was in between dmd and gdc. But I missed the -release flags then. With that flag

Re: Building a project with CMAKE

2017-03-03 Thread berni via Digitalmars-d-learn
On Thursday, 2 March 2017 at 09:13:40 UTC, berni wrote: Just a note: I now asked the same question on the cmake mailing list. Maybe, it's the better place to do so... After some help of cmake people and a morning of more investigations, I'm quite sure I found a bug in gdc. Meanwhile I've got

Re: Building a project with CMAKE

2017-03-03 Thread Seb via Digitalmars-d-learn
On Friday, 3 March 2017 at 10:21:51 UTC, berni wrote: On Thursday, 2 March 2017 at 09:13:40 UTC, berni wrote: Just a note: I now asked the same question on the cmake mailing list. Maybe, it's the better place to do so... After some help of cmake people and a morning of more investigations,

Re: Building a project with CMAKE

2017-03-03 Thread berni via Digitalmars-d-learn
On Friday, 3 March 2017 at 13:21:56 UTC, Seb wrote: Is there any specific reason why you can't use DMD or LDC? gdc produces faster binaries. ;-) I've got installed the other two compilers too and they work.

Problem with send / receive

2017-03-03 Thread crimaniak via Digitalmars-d-learn
Hi all! I make vibe-d based project and now I have problem passing messages between threads. First some words about architecture. Each event in the system has a corresponding class that validates and performs the required actions. Each class has a nested structure with the parameters that