Re: Threading Questions

2015-10-09 Thread Kagamin via Digitalmars-d-learn
On Friday, 9 October 2015 at 04:04:42 UTC, bitwise wrote: Ah, I see. I thought you meant illegal meant it won't compile. Wouldn't it be more correct to say that it's undefined behaviour? I's probably not as undefined as in C case, i.e. it doesn't break safety guarantees, only the

Re: Comparing arrays of floats?

2015-10-09 Thread Meta via Digitalmars-d-learn
On Friday, 9 October 2015 at 22:14:09 UTC, Straivers wrote: Forgive me if this has already been discussed, but how are arrays of floating point numbers compared in D? i.e. Is it a bit-by-bit comparison, is the std.math.approxEqual function get called for each element, or is it byte-by-byte

Re: Comparing arrays of floats?

2015-10-09 Thread anonymous via Digitalmars-d-learn
On Saturday 10 October 2015 00:14, Straivers wrote: > Is it a bit-by-bit comparison, no > is the std.math.approxEqual function get called for > each element, no > or is it byte-by-byte across the entire array? no After comparing the lengths, the elements are checked for equality one by

Re: Array of BitArrays definition compiles in DMD but not in GDC.

2015-10-09 Thread John Colvin via Digitalmars-d-learn
On Thursday, 8 October 2015 at 21:40:02 UTC, TheGag96 wrote: In my code I'm passing an array of BitArrays to a constructor like this (though mostly as a placeholder): Terrain t = new Terrain(1, 15, [ BitArray([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), BitArray([1, 1, 1, 1, 1, 0, 1, 1,

Comparing arrays of floats?

2015-10-09 Thread Straivers via Digitalmars-d-learn
Forgive me if this has already been discussed, but how are arrays of floating point numbers compared in D? i.e. Is it a bit-by-bit comparison, is the std.math.approxEqual function get called for each element, or is it byte-by-byte across the entire array? -Straivers

Re: AWS API Dlang, hmac sha256 function.

2015-10-09 Thread holo via Digitalmars-d-learn
OK i find out error, in addRequestHeader i was using ":" after header name what casing problem. I removed it and now im getting "unauthorized". Here is how it looks right now: HTTP/1.1 401 Unauthorized\r\n [Expert Info (Chat/Sequence): HTTP/1.1 401 Unauthorized\r\n] Request

Re: Array of BitArrays definition compiles in DMD but not in GDC.

2015-10-09 Thread TheGag96 via Digitalmars-d-learn
On Friday, 9 October 2015 at 07:08:15 UTC, John Colvin wrote: On Thursday, 8 October 2015 at 21:40:02 UTC, TheGag96 wrote: [...] gdc is a bit out of date at the moment. If you do something like this: auto bitArray(bool[] ba) pure nothrow { BitArray tmp; tmp.init(ba); return

lint? for D

2015-10-09 Thread Pradeep Gowda via Digitalmars-d-learn
Is there a lint program for D, similar to say pep8 + pyflakes for python that can warn the programmer about unused imports, unused variables etc.,?

Re: AWS API Dlang, hmac sha256 function.

2015-10-09 Thread holo via Digitalmars-d-learn
I correct typo (thats whats happening when you trying to solve problem after night at 6:00 AM ).But still have same error. When use curl with same generated creditentials im getting "400". What is strange when im using same generated headers and signature with command line curl im getting

Re: lint? for D

2015-10-09 Thread Nordlöw via Digitalmars-d-learn
On Friday, 9 October 2015 at 12:28:50 UTC, Pradeep Gowda wrote: Is there a lint program for D, similar to say pep8 + pyflakes for python that can warn the programmer about unused imports, unused variables etc.,? https://github.com/Hackerpilot/Dscanner dscanner --syntaxCheck or dscanner

Re: Bug? 0 is less than -10

2015-10-09 Thread Ozan via Digitalmars-d-learn
On Thursday, 8 October 2015 at 09:01:32 UTC, Dominikus Dittes Scherkl wrote: On Wednesday, 7 October 2015 at 16:25:02 UTC, Marc Schütz wrote: Lionello Lunesu posted a PR that should fix this: https://github.com/D-Programming-Language/dmd/pull/1913 See also the discussion in the linked bug