Re: getopt short-options documentation

2018-11-29 Thread Daniel Kozak via Digitalmars-d-learn
Are you sure? Can you show me an example? I always forgot on this limitation and somtimes it cause really nesty things :D On Thu, Nov 29, 2018 at 6:05 PM Antonio Corbi via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > Hi! > > Reading through the `getopt` documentation at one

Re: Why does nobody seem to think that `null` is a serious problem in D?

2018-11-29 Thread SimonN via Digitalmars-d-learn
On Monday, 19 November 2018 at 21:23:31 UTC, Jordi Gutiérrez Hermoso wrote: When I was first playing with D, I managed to create a segfault What's the reasoning for allowing this? 100 % agree that there should be non-nullable class references, they're my main missing feature in D.

Re: D & C++ class question

2018-11-29 Thread kinke via Digitalmars-d-learn
On Thursday, 29 November 2018 at 16:24:58 UTC, bauss wrote: Are there no support for references with mangling in D? Like what about int&? Of course, that's `ref int`. But a `ref CppClass` is C++-mangled as `CppClass* &`.

Re: D & C++ class question

2018-11-29 Thread bauss via Digitalmars-d-learn
On Thursday, 29 November 2018 at 17:12:28 UTC, kinke wrote: On Thursday, 29 November 2018 at 16:24:58 UTC, bauss wrote: Are there no support for references with mangling in D? Like what about int&? Of course, that's `ref int`. But a `ref CppClass` is C++-mangled as `CppClass* &`. I was

Re: How to debug FinalizeError?

2018-11-29 Thread unDEFER via Digitalmars-d-learn
On Thursday, 29 November 2018 at 14:51:40 UTC, Steven Schveighoffer wrote: You need to compile druntime in debug mode. One thing you can do is implement the function locally, and then break on it (it's a C linkage, so I think the linker will grab your copy instead of the one in druntime)

Re: gcc 9 vs. dmd?

2018-11-29 Thread mawk via Digitalmars-d-learn
On Friday, 30 November 2018 at 00:43:59 UTC, Andrew Pennebaker wrote: Given that gcc v9 should have built-in support for compiling D code, and that dmd requires gcc, will dmd continue to be supported? Or perhaps have its guts incorporated completely into gcc? DMD doesn't really require GCC,

gcc 9 vs. dmd?

2018-11-29 Thread Andrew Pennebaker via Digitalmars-d-learn
Given that gcc v9 should have built-in support for compiling D code, and that dmd requires gcc, will dmd continue to be supported? Or perhaps have its guts incorporated completely into gcc?

Re: gcc 9 vs. dmd?

2018-11-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 30 November 2018 at 00:43:59 UTC, Andrew Pennebaker wrote: Given that gcc v9 should have built-in support for compiling D code, and that dmd requires gcc, will dmd continue to be supported? dmd will continue to be supported.

Re: Why pow() won't go beyond 2^31?

2018-11-29 Thread Alex via Digitalmars-d-learn
On Thursday, 29 November 2018 at 07:07:06 UTC, Murilo wrote: I am using the function pow() from std.math but if I try pow(2, 32) it returns 0, it doesn't compute beyond the maximum value of an int(2^31) and I am working with long. What should I do? what exactly is your input? ´´´ import

Re: Function signature as string

2018-11-29 Thread John Chapman via Digitalmars-d-learn
On Thursday, 29 November 2018 at 21:31:57 UTC, Neia Neutuladh wrote: On Thu, 29 Nov 2018 21:11:06 +, John Chapman wrote: Is there any way to get a string representing a function's exact signature as declared in the source? I can generate it myself using reflection but it might not be 100%

Function signature as string

2018-11-29 Thread John Chapman via Digitalmars-d-learn
Is there any way to get a string representing a function's exact signature as declared in the source? I can generate it myself using reflection but it might not be 100% verbatim so wanted to know if there's anything built in? foreach (m; __traits(allMembers, T)) { alias member =

Re: Function signature as string

2018-11-29 Thread Neia Neutuladh via Digitalmars-d-learn
On Thu, 29 Nov 2018 21:11:06 +, John Chapman wrote: > Is there any way to get a string representing a function's exact > signature as declared in the source? I can generate it myself using > reflection but it might not be 100% verbatim so wanted to know if > there's anything built in? > >

Re: Why does nobody seem to think that `null` is a serious problem in D?

2018-11-29 Thread O-N-S (ozan) via Digitalmars-d-learn
On Monday, 19 November 2018 at 21:23:31 On Monday, 19 November 2018 at 21:23:31 UTC, Jordi Gutiérrez Hermoso wrote: I'm not the only one who has done this. I can't find it right now, but I've seen at least one person open a bug report because they misunderstood this as a bug in dmd. I have

Re: gcc 9 vs. dmd?

2018-11-29 Thread Andrew Pennebaker via Digitalmars-d-learn
On Friday, 30 November 2018 at 01:31:12 UTC, mawk wrote: On Friday, 30 November 2018 at 00:43:59 UTC, Andrew Pennebaker wrote: Given that gcc v9 should have built-in support for compiling D code, and that dmd requires gcc, will dmd continue to be supported? Or perhaps have its guts

Re: Why pow() won't go beyond 2^31?

2018-11-29 Thread Daniel Kozak via Digitalmars-d-learn
On Thu, Nov 29, 2018 at 8:10 AM Murilo via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > I am using the function pow() from std.math but if I try pow(2, > 32) it returns 0, it doesn't compute beyond the maximum value of > an int(2^31) and I am working with long. What should I

Re: How to debug FinalizeError?

2018-11-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/29/18 2:07 AM, unDEFER wrote: No I'm not preallocating any exceptions. It was idea, but I removed all calls which can make throw. I'm using very old dmd 2.074.1, so as I have patched it for my text editor with IDE functions. I had a year break in development, so now I need to rewrite all

Re: How to center dlangui Window on screen

2018-11-29 Thread John Chapman via Digitalmars-d-learn
On Thursday, 29 November 2018 at 13:42:28 UTC, greatsam4sure wrote: Which class in dlangui is use to obtain the screen height and width? A Windom of dimension 280 x 445 in dlangui is the same as a Windom of 350 x 550 in Javafx and adobe air. What could be responsible for this wide difference?

Re: How to center dlangui Window on screen

2018-11-29 Thread greatsam4sure via Digitalmars-d-learn
On Thursday, 29 November 2018 at 05:54:37 UTC, bauss wrote: On Wednesday, 28 November 2018 at 23:07:50 UTC, greatsam4sure wrote: On Wednesday, 28 November 2018 at 17:23:21 UTC, Edgar Huckert wrote: On Wednesday, 28 November 2018 at 08:55:11 UTC, greatsam4sure wrote: [...] For a little bit

Re: LDC2 win64 calling convention

2018-11-29 Thread realhet via Digitalmars-d-learn
On Wednesday, 28 November 2018 at 21:58:16 UTC, kinke wrote: You're not using naked asm; this entails a prologue (spilling the params to stack etc.). Additionally, LDC doesn't really like accessing params and locals in DMD-style inline asm, see

Re: D & C++ class question

2018-11-29 Thread bauss via Digitalmars-d-learn
On Wednesday, 28 November 2018 at 13:42:43 UTC, Nicholas Wilson wrote: On Wednesday, 28 November 2018 at 13:13:40 UTC, bauss wrote: Well unfortunately I cannot control the C++ side of things, but I assume that it'll work properly with extern(C++) so I guess I will just go ahead and try and see

getopt short-options documentation

2018-11-29 Thread Antonio Corbi via Digitalmars-d-learn
Hi! Reading through the `getopt` documentation at one point it says: "Forms such as -t 5 and -timeout=5 will be not accepted." But I'm able to to use short options like '-t 5' (with spaces between the 't' and the '5'). It seems that this limitation has been eliminated and it