Re: Windows X64 Calling conventions

2017-04-20 Thread Tofu Ninja via Digitalmars-d-learn
On Thursday, 20 April 2017 at 08:36:32 UTC, kinke wrote: On Thursday, 20 April 2017 at 01:16:11 UTC, Tofu Ninja wrote: My question is, why is it passed twice, both in xmm0 and rcx? The MSDN docs say floating point are passed in xmm registers, why is it also copied in into rcx? Is it necessary

Re: Can we disallow appending integer to string?

2017-04-20 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Apr 20, 2017 at 10:39:01PM +, Stanislav Blinov via Digitalmars-d-learn wrote: > On Thursday, 20 April 2017 at 19:20:28 UTC, H. S. Teoh wrote: > > > > Another pernicious thing I encountered recently, related to implicit > > conversions, is this: > > > >

Re: Can we disallow appending integer to string?

2017-04-20 Thread Stanislav Blinov via Digitalmars-d-learn
On Thursday, 20 April 2017 at 19:20:28 UTC, H. S. Teoh wrote: Another pernicious thing I encountered recently, related to implicit conversions, is this: https://issues.dlang.org/show_bug.cgi?id=17336 It drew a very enunciated "WAT?!" from me. Yeah, that one is annoying. I've dealt

Re: GC: Understanding potential sources of false pointers

2017-04-20 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 04/20/2017 09:00 AM, Kagamin wrote: https://issues.dlang.org/show_bug.cgi?id=15723 Hmm, so apparently embedded data (even if it's from a C lib) can also be a source of false pointers. Thanks, good to know.

Re: Problems with Zlib - data error

2017-04-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 20 April 2017 at 20:19:31 UTC, Era Scarecrow wrote: I took the UnCompress example and tried to make use of it, however it breaks midway through my program with nothing more than 'Data Error'. See the tip of the week here: http://arsdnet.net/this-week-in-d/2016-apr-24.html In

Problems with Zlib - data error

2017-04-20 Thread Era Scarecrow via Digitalmars-d-learn
I took the UnCompress example and tried to make use of it, however it breaks midway through my program with nothing more than 'Data Error'. [code] //shamelessly taken for experimenting with UnCompress decmp = new UnCompress; foreach (chunk; stdin.byChunk(4096).map!(x => decmp.uncompress(x)))

Re: Can we disallow appending integer to string?

2017-04-20 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 04/19/2017 01:34 PM, Jonathan M Davis via Digitalmars-d-learn wrote: Yeah, which reduces the number of casts required when doing arithmetic on characters and thus reduces bugs there, Ugh, because apparently doing arithmetic on characters is such a common, important use-case in this modern

Re: Can we disallow appending integer to string?

2017-04-20 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Apr 20, 2017 at 11:05:00AM +, Nick Treleaven via Digitalmars-d-learn wrote: [...] > This is also a problem for overloading: > > alias foo = (char c) => 1; > alias foo = (int i) => 4; > > static assert(foo(7) == 4); // fails > > I would like to see some small changes to mitigate

Re: GC: Understanding potential sources of false pointers

2017-04-20 Thread Kagamin via Digitalmars-d-learn
https://issues.dlang.org/show_bug.cgi?id=15723

Re: Can we disallow appending integer to string?

2017-04-20 Thread Nick Treleaven via Digitalmars-d-learn
On Wednesday, 19 April 2017 at 14:50:38 UTC, Stanislav Blinov wrote: Because integrals implicitly convert to characters of same width (byte -> char, short -> wchar, int -> dchar). Despite char.min > byte.min, char.max < byte.max. Anyway, appending an integer is inconsistent because

Re: Windows X64 Calling conventions

2017-04-20 Thread kinke via Digitalmars-d-learn
On Thursday, 20 April 2017 at 01:16:11 UTC, Tofu Ninja wrote: My question is, why is it passed twice, both in xmm0 and rcx? The MSDN docs say floating point are passed in xmm registers, why is it also copied in into rcx? Is it necessary for anything? That is only required for variadics,

Re: GC: Understanding potential sources of false pointers

2017-04-20 Thread thedeemon via Digitalmars-d-learn
On Thursday, 20 April 2017 at 02:27:37 UTC, Nick Sabalausky (Abscissa) wrote: According to : "Registers, the stack, and any other memory locations added through the GC.addRange function are always scanned conservatively." 1. Can that be safely