Re: GDC options

2017-06-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 5 June 2017 at 18:22:31 UTC, Sebastien Alaiwan wrote: On Wednesday, 22 March 2017 at 13:42:21 UTC, Matthias Klumpp wrote: This is why most of my work in Meson to get D supported is adding weird hacks to translate compiler flags between GNU <-> non-GNU <-> DMD. It sucks quite badly, a

Re: Can assumeSafeAppend() grab more and more capacity?

2017-06-05 Thread Ali Çehreli via Digitalmars-d-learn
On 06/05/2017 03:16 PM, ag0aep6g wrote: > The spec says [1]: "one may use the .capacity property to determine how > many elements can be appended to the array without reallocating." So the > space indicated by `.capacity` is reserved for the array. Cool. Thanks! >> 3) Bonus: Shouldn't the array

Re: Can assumeSafeAppend() grab more and more capacity?

2017-06-05 Thread ag0aep6g via Digitalmars-d-learn
On 06/05/2017 11:08 PM, Ali Çehreli wrote: Imagine an array that wants to reuse its buffer after removing elements from it. For example, a PID waiting list can remove completed elements and add new ones at the end. The code would call assumeSafeAppend like this: arr = arr.remove!(e => e

Can assumeSafeAppend() grab more and more capacity?

2017-06-05 Thread Ali Çehreli via Digitalmars-d-learn
Imagine an array that wants to reuse its buffer after removing elements from it. For example, a PID waiting list can remove completed elements and add new ones at the end. The code would call assumeSafeAppend like this: arr = arr.remove!(e => e % 2); arr.assumeSafeAppend(); 1) Assumin

Re: GDC options

2017-06-05 Thread Sebastien Alaiwan via Digitalmars-d-learn
On Wednesday, 22 March 2017 at 13:42:21 UTC, Matthias Klumpp wrote: This is why most of my work in Meson to get D supported is adding weird hacks to translate compiler flags between GNU <-> non-GNU <-> DMD. It sucks quite badly, and every now and then I hit a weird corner case where things brea

Re: Avast virus warning?

2017-06-05 Thread Anonymouse via Digitalmars-d-learn
On Monday, 5 June 2017 at 16:40:25 UTC, rikki cattermole wrote: It would be nice to get in touch with their engineers to find out what is really going on. Tried an email and hit a paywall. :c "We’re sorry, but we can’t seem to find a record of your license in our system."

Re: D and GDB

2017-06-05 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jun 05, 2017 at 05:34:14AM +, Basile B. via Digitalmars-d-learn wrote: > On Monday, 5 June 2017 at 01:07:51 UTC, H. S. Teoh wrote: > > > > It can't be any more trivial than just running ddemangle, which is > > found in the dlang/tools repo on github. [...] > > (Arguably this should be

Re: Avast virus warning?

2017-06-05 Thread rikki cattermole via Digitalmars-d-learn
On 05/06/2017 5:31 PM, Anonymouse wrote: I just sent a pre-compiled .exe of my project to a friend, and his Avast anti-virus promptly quarantined it and sent it off for analysis. I tried sending him a Hello World[1] with the same results. Is this something common for d programs? Anything I can

Avast virus warning?

2017-06-05 Thread Anonymouse via Digitalmars-d-learn
I just sent a pre-compiled .exe of my project to a friend, and his Avast anti-virus promptly quarantined it and sent it off for analysis. I tried sending him a Hello World[1] with the same results. Is this something common for d programs? Anything I can do to work around it from my end? [1]

Re: rawRead using a struct with variable leght

2017-06-05 Thread Era Scarecrow via Digitalmars-d-learn
On Monday, 5 June 2017 at 16:04:28 UTC, ade90036 wrote: Unfortunately the struct doesn't know at compile time what the size of the constant_pool array, or at-least was not able to specify it dynamically. It also won't know ahead of time how many fields, methods or attributes you have either

rawRead using a struct with variable leght

2017-06-05 Thread ade90036 via Digitalmars-d-learn
Hi everyone, I'm trying out Dland, always been and have been a big fan. So to give it a good run i wanted to create is a java class parser, based on the spec released here. ( https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html.) The class file can be represented in the following "

Re: difference between x = Nullable.init and x.nullify

2017-06-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, June 05, 2017 10:46:39 Kagamin via Digitalmars-d-learn wrote: > On Sunday, 4 June 2017 at 08:51:44 UTC, Jonathan M Davis wrote: > >> On Saturday, 3 June 2017 at 06:19:29 UTC, Jonathan M Davis > >> > >> wrote: > >> > Assigning Nullable!Test.init is equivalent to setting the > >> > interna

Re: Linker cannot find malloc and free on OS X

2017-06-05 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-06-05 13:48, bvoq wrote: So I ran: dmd -unittest -main -v -L-lgmp -L-lc -g gmp/* The error seems to stem from: cc dbgio.o -o dbgio -g -m64 -Xlinker -no_compact_unwind -lgmp -lc -L/usr/local/Cellar/dmd/2.074.0/lib -lgmp -lgmp -lgmp -lgmp -lc -lphobos2 -lpthread -lm Full invocation of com

Re: Linker cannot find malloc and free on OS X

2017-06-05 Thread bvoq via Digitalmars-d-learn
On Monday, 5 June 2017 at 10:34:12 UTC, Jacob Carlborg wrote: On 2017-06-05 01:14, bvoq wrote: The flag -L-lc seems to have been passed to the library. This is the full error message after running it with dub test --verbose You need to continue to invoke the sub commands, that is, DMD, Clan

Re: Implicit casting of int enum members to int

2017-06-05 Thread Mike Bierlee via Digitalmars-d-learn
On Monday, 5 June 2017 at 01:23:22 UTC, Mike B Johnson wrote: On Monday, 3 October 2016 at 09:21:37 UTC, Jonathan M Davis wrote: Is this bug ever going to be fixed? I've filed this issue under https://issues.dlang.org/show_bug.cgi?id=16586 a while ago, seems to have not been picked up yet.

Re: difference between x = Nullable.init and x.nullify

2017-06-05 Thread Kagamin via Digitalmars-d-learn
On Sunday, 4 June 2017 at 08:51:44 UTC, Jonathan M Davis wrote: On Saturday, 3 June 2017 at 06:19:29 UTC, Jonathan M Davis wrote: > Assigning Nullable!Test.init is equivalent to setting the > internal value to Test.init and setting _isNull to false. T _value; bool _isNull = true; So it was

Re: Linker cannot find malloc and free on OS X

2017-06-05 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-06-05 01:14, bvoq wrote: The flag -L-lc seems to have been passed to the library. This is the full error message after running it with dub test --verbose You need to continue to invoke the sub commands, that is, DMD, Clang and the linker with the verbose flag (-v) added. There's no po

Re: D and GDB

2017-06-05 Thread Mike Wey via Digitalmars-d-learn
On 06/05/2017 03:07 AM, H. S. Teoh via Digitalmars-d-learn wrote: It can't be any more trivial than just running ddemangle, which is found in the dlang/tools repo on github. (Arguably this should be shipped by default with dmd... or is it already?) Recent? versions of gdb also support demangli

Re: iOS Apps in D

2017-06-05 Thread Joakim via Digitalmars-d-learn
On Wednesday, 31 May 2017 at 12:49:38 UTC, Oleksii wrote: Hi everybody, Perhaps this topic has been raised many times before, but I'm going to go back to it anyways :-P Are there any good reference materials and/or tutorials on programming for iOS and Android in D? Other than this wiki pag