[Issue 11118] undefined identifier in template structs functions

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/ba6fddd46d0ba3bac410905feba62c4b6933c751
Fix issue #8 - Correct lookup for template parameters.

https://github.com/dlang/dmd/commit/f64b42f3832e3e49e338918cbb55cf1f32a82331
Merge pull request #6345 from LemonBoy/b8

Fix issue #8 - Correct lookup for template parameters.

--


[Issue 11118] undefined identifier in template structs functions

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 12647] Lazy parameter evaluation should be marked as nothrow

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12647

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #6 from greenify  ---
This a really annoying limitation during the process of annotating Phobos
unittests.
It leads from a nice one-liner, e.g.

assertThrown!AssertError(arr.stride(0));

to be replaced with 10 lines:

bool passed = false;
scope (success) assert(passed);
try
{
cast(void) arr.stride(0);
}
catch (AssertError unused)
{
passed = true;
}

--


[Issue 16746] Please output Makefile-style depfiles for ninja and make

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16746

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #7 from greenify  ---
> This is indeed what I am looking for - does dmd have this too and I am just 
> not seeing it?
(dmd --help didn't show something useful)

No - it's implemented here:

https://github.com/dlang/tools/blob/master/rdmd.d#L346

You package `rdmd` as well, right? Or is there a problem with using `rdmd`?

--


[Issue 16255] std.algorithm.iteration.each on opApply doesn't support ref

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16255

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #2 from greenify  ---
> Except it doesn't work. When each accepts the iterable, it accepts it by 
> value. It should accept it by reference (if it's a class, it could take the 
> class reference by value). Otherwise, the point of using ref throughout each 
> is kind of useless.

A simple solution with `auto ref` for Iterables:

https://github.com/dlang/phobos/pull/4991

--


[Issue 17020] New: std.parallelism.taskpool amap should accept lambdas

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17020

  Issue ID: 17020
   Summary: std.parallelism.taskpool amap should accept lambdas
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

void main()
{
auto w = iota(0,1_000_000);
int[] foo;

// Not OK, dmd can't infer lambda isn't a delegate
// foo = taskPool().amap!(a => a + 1)(w);

// OK:
foo = taskPool().amap!`a+1`(w); // string lambdas, yeah!
foo = taskPool().amap!(function int(int a) => a + 1)(w);
static int func(int a) { return a + 1; }
foo = taskPool().amap!func(w);
}


In the forum thread a quick & dirty solution was posted:


private auto pmap(alias fun, R)(R range) if(isInputRange!R) {
import std.parallelism;
import core.sync.mutex;

static __gshared Mutex mutex;
if(mutex is null) mutex = new Mutex;
typeof(fun(range.front))[] values;
foreach(i, value; range.parallel) {
auto newValue = fun(value);
synchronized(mutex) {
if(values.length < i + 1) values.length = i + 1;
values[i] = newValue;
}
}

return values;
}


http://forum.dlang.org/post/zkyhyjtyjdyshxyqo...@forum.dlang.org

--


[Issue 17019] New: std.algorithm.iteration.each should be usable with parallel

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17019

  Issue ID: 17019
   Summary: std.algorithm.iteration.each should be usable with
parallel
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

The following test fails:

```
unittest
{
import std.algorithm.iteration : each, sum;
import std.parallelism : parallel;
import std.range : iota;

auto logsIndex = new int[10];
parallel(logsIndex).each!((i, ref e) => e += i);
assert(logsIndex.sum == 10.iota.sum);
}
```

while it passes without parallel:

```
unittest
{
import std.algorithm.iteration : each, sum;
import std.parallelism : parallel;
import std.range : iota;

auto logsIndex = new int[10];
logsIndex.each!((i, ref e) => e += i);
assert(logsIndex.sum == 10.iota.sum);
}
```

of course the foreach alternative works as well

```
unittest
{
import std.algorithm.iteration : sum;
import std.parallelism : parallel;
import std.range : iota;

auto logsIndex = new int[10];
foreach (i, ref e; parallel(logsIndex))
e += i;
assert(logsIndex.sum == 10.iota.sum);
}
```

/usr/include/dlang/dmd/std/algorithm/iteration.d(936): Error: template
foo.__unittestL1_3.__lambda1 cannot deduce function from argument types
!()(int), candidates are:
foo.d(8):foo.__unittestL1_3.__lambda1
foo.d(8): Error: template instance foo.__unittestL1_3.each!((i, ref e) => e +=
i).each!(ParallelForeach!(int[])) error instantiating
Failed: ["dmd", "-unittest", "-g", "-v", "-c",
"-of/tmp/.rdmd-1000/rdmd-foo.d-2E6138563669BF9753765C098C72200E/objs/foo.o",
"foo.d", "-I.", "/tmp/.rdmd-1000/stubmain.d"]


This is probably related to https://issues.dlang.org/show_bug.cgi?id=15357

--


[Issue 17004] std.containers should be usable with @nogc

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17004

greenify  changed:

   What|Removed |Added

Summary|std.containers should be|std.containers should be
   |usable with @nogc or const  |usable with @nogc

--


[Issue 13676] [ddoc] DDoc should wrap each part of function declaration in dedicated macro to allow more readable formatting

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13676

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #6 from greenify  ---
> - Inline runnable examples: They're present on the homepage, why can't the 
> examples provided in the inline docs be runnable as well?

We have this in preview mode now:

https://github.com/dlang/dlang.org/pull/1297

> Link to where the code is implemented in Phobos at the time of compilation. 
> e.g. clicking the name of the function "find" when looking at the signature 
> could link me here

Yeah that would be pretty awesome.

--


[Issue 15295] Another wrong code bug with -inline and foreach/map/all

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15295

greenify  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||greeen...@gmail.com
 Resolution|--- |FIXED

--- Comment #2 from greenify  ---
This has probably been resolved in the meanwhile :)

Compiling the examples throw no error with v2.072.1 (and prints [0] if an
writeln) is added. Thus closing, please reopen if is still valid for you.

--


[Issue 15357] std.algorithm.iteration.each should mirror the behavior of foreach.

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15357

greenify  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from greenify  ---
closing this as std.algorithm.iteration.each supports n-aray opApply since
2.072 thanks to @Ryan: https://github.com/dlang/phobos/pull/3837 

Please reopen or create a new issue if you still experience troubles.

--


[Issue 15358] std.range.each does not support opApply methods with arbitrary arity

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15358

greenify  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||greeen...@gmail.com
 Resolution|--- |FIXED

--- Comment #1 from greenify  ---
This was fixed with https://github.com/dlang/phobos/pull/3837 and is part of
DMD since 2.072 ;-)

--


[Issue 15357] std.algorithm.iteration.each should mirror the behavior of foreach.

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15357

--- Comment #7 from greenify  ---
> I think each should mirror the behavior of foreach.


I agree - renamed the issue accordingly.

> If we can return a tuple through a range interface that allows modifying 
> elements by ref, then I think we could entirely deprecate lockstep in favor 
> of zip.

As far as I understand: with DIP1000 in master we should be able to do so :)

--


[Issue 16746] Please output Makefile-style depfiles for ninja and make

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16746

--- Comment #6 from Matthias Klumpp  ---
(In reply to Vladimir Panteleev from comment #4)
> Matthias, have you seen rdmd's --makedepend flag? I think it may do what you
> need.

This is indeed what I am looking for - does dmd have this too and I am just not
seeing it?
(dmd --help didn't show something useful)

--


[Issue 15357] std.algorithm.iteration.each should mirror the behavior of foreach.

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15357

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com
Summary|Cannot call |std.algorithm.iteration.eac
   |std.algorithm.iteration.eac |h should mirror the
   |h on the result of  |behavior of foreach.
   |std.range.lockstep  |

--- Comment #6 from greenify  ---



you could define :

ref front() {
   return 
}

--


[Issue 16746] Please output Makefile-style depfiles for ninja and make

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16746

--- Comment #5 from Matthias Klumpp  ---
(In reply to Johannes Pfau from comment #3)
> @Matthias a GDC test case would be really appreciated. This should be easily
> reducible with Dustmite https://github.com/CyberShadow/DustMite . But if you
> don't have the time to reduce the code you can also send the complete code
> to my email address. Alternatively if it's a OSS project anyway just provide
> some instructions to reproduce the problem and I'll get a reduced test case.

Looks like this is all resolved with GDC 6 \o/ - I can't reproduce any of the
issues and -fmake-deps seems to work pretty well, unless
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807491 is still a thing.

Anyway, I submitted a patch to Meson to use this by default for GDC now:
https://github.com/ximion/meson/commit/0deb7a9e0c5e358dc7d1d07d8ac10b5c82ce33cd

--


[Issue 16423] ModuleInfo missing when linking to static lib with classes

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16423

--- Comment #15 from Ketmar Dark  ---
(just a speculation) maybe ld merges identical symbols from different libraries
by default or something, and optlink doesn't.

--


[Issue 16423] ModuleInfo missing when linking to static lib with classes

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16423

--- Comment #14 from Ketmar Dark  ---
i suspect optlink. sadly, i can't check with ms linker.

(ketmar dreaming of getting rid of optlink and moving the defaults to mingw's
binutils)

--


[Issue 16423] ModuleInfo missing when linking to static lib with classes

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16423

--- Comment #13 from Jacob Carlborg  ---
(In reply to Ketmar Dark from comment #12)
> funny, it doesn't cause any problems on GNU/Linux, only windows builds are
> affected.

It seems to work on all platforms except Windows. Might be something with the
linker that is different.

--


[Issue 16352] dead-lock in std.allocator.free_list unittest

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16352

--- Comment #10 from safety0ff.bugz  ---
(In reply to safety0ff.bugz from comment #9)
> 
> I'm just going to slap core.internal.spinlock on it for now.

https://github.com/dlang/phobos/pull/4988

--


[Issue 16352] dead-lock in std.allocator.free_list unittest

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16352

--- Comment #9 from safety0ff.bugz  ---
(In reply to Rainer Schuetze from comment #8)
> 
> I agree. The actual pattern to use depends on the hardware, but x86 usually
> uses a modification counter modified in lock step.

I'm just going to slap core.internal.spinlock on it for now.
Somebody else can improve it later.
I just don't want the autotester choking on unrelated changes.

There's also the issue on x86_64 that we can't use the upper bits (because
ParentAllocator could be GCAllocator,) and not all x86_64 machines have
cmpxchg16b.

AFAIK shared free lists aren't very good for high contention regardless.

--


[Issue 17008] use ldc/gdc intrinsics in std.math

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17008

ki...@gmx.net changed:

   What|Removed |Added

 CC||ki...@gmx.net

--- Comment #1 from ki...@gmx.net ---
LDC's Phobos has a modified std.math, where we use the LLVM intrinsics, e.g.,
https://github.com/ldc-developers/phobos/blob/ldc/std/math.d#L657. I don't see
a point in upstreaming these backend-specific mods.

--


[Issue 17018] New: Push std.experimental.xml

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17018

  Issue ID: 17018
   Summary: Push std.experimental.xml
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

The proposed std.experimental.xml still needs some cleanup and polishing before
it can be formally proposed as new module:

https://github.com/dlang/phobos/pull/4741

As the author has become unavailable, std.experimental got stalled.

--


[Issue 16352] dead-lock in std.allocator.free_list unittest

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16352

Rainer Schuetze  changed:

   What|Removed |Added

 CC||r.sagita...@gmx.de

--- Comment #8 from Rainer Schuetze  ---
> SharedFreeList.allocate looks ABA prone:

I agree. The actual pattern to use depends on the hardware, but x86 usually
uses a modification counter modified in lock step.

--


[Issue 3725] Add units type to standard library

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3725

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #7 from greenify  ---
Existing work:

https://github.com/nordlow/units-d
https://code.dlang.org/packages/quantities

See also this discussion:

https://github.com/biozic/quantities/issues/2

--


[Issue 17017] New: new std.events module

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17017

  Issue ID: 17017
   Summary: new std.events module
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

Previous work:

https://github.com/etcimon/libasync

--


[Issue 17016] New: new std.decimal module

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17016

  Issue ID: 17016
   Summary: new std.decimal module
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

Previous work:

https://github.com/andersonpd/eris
https://github.com/jaypha/fixed

--


[Issue 17015] New: support final switch in std.variant

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17015

  Issue ID: 17015
   Summary: support final switch in std.variant
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

As e.g. in https://github.com/s-ludwig/taggedalgebraic:


final switch (taggedAny.kind) {
case Tagged.Kind.i:
// It's "int i"
break;

case Tagged.Kind.str:
// It's "string str"
break;

case Tagged.Kind.foo:
// It's "Foo foo"
break;
}

this has the advantage over visit that the compiler can enforce that all types
are covered.

--


[Issue 17014] New: enhance std.uri

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17014

  Issue ID: 17014
   Summary: enhance std.uri
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

There has been work on proposal for a new Uri module, but it never made it to
formal proposal. Moreover, there are many other successful community
implementations in the wild:

-
https://github.com/rikkimax/alphaPhobos/blob/master/source/std/experimental/uri.d
- http://vibed.org/api/vibe.inet.url/
- https://github.com/adamdruppe/arsd/blob/master/http2.d


See also: https://github.com/ikod/dlang-requests/issues/12

--


[Issue 17013] New: a std.streams module and API

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17013

  Issue ID: 17013
   Summary: a std.streams module and API
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

After socketstream was deprecated and removed from Phobos, it's now lacking
support for streams. Currently the best option is to use the Vibe.d streaming
API:

http://vibed.org/api/vibe.core.stream/Stream
http://vibed.org/api/vibe.core.net/TCPConnection
http://vibed.org/api/vibe.core.stream/ConnectionStream

(note that this is related to https://issues.dlang.org/show_bug.cgi?id=17012)

--


[Issue 17012] New: std.io: an io interface with support for streams and ranges

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17012

  Issue ID: 17012
   Summary: std.io: an io interface with support for streams and
ranges
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

There has been a lot of work and libraries like iopipe do like very promising:

- https://github.com/schveiguy/iopipe
- https://github.com/jasonwhite/io
-
https://github.com/rejectedsoftware/vibe.d/blob/master/stream/vibe/stream/stdio.d

--


[Issue 17011] New: cleanup std.signals documentation

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17011

  Issue ID: 17011
   Summary: cleanup std.signals documentation
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

There's no need to explain the history in such a depth for a usual reader,
better describe it's features and what makes it unique/better to other
implementations (or shortcomings), e.g.:

https://code.dlang.org/packages/phobosx "Replacement for std.signals, with more
features and less bugs"

https://code.dlang.org/packages/observe


Also adding a couple of good examples wouldn't hurt.

--


[Issue 17010] New: remove std.net.isemail

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17010

  Issue ID: 17010
   Summary: remove std.net.isemail
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

Very old module and only a port of the C module.

This can be done a lot better via DUB packages, e.g.

-> https://github.com/anton-dutov/mail
-> http://vibed.org/api/vibe.mail.smtp/Mail

Proposed action: deprecate and move to undeaD

--


[Issue 17009] New: remove etc.c.curl (and std.net.curl)

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17009

  Issue ID: 17009
   Summary: remove etc.c.curl (and std.net.curl)
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

At least DConf it was announced that the plan is to remove etc.c.curl (in fact
entire etc).

With the "high-level" API there are many issues as well:

- no response object (it's impossible to access the response for e.g. the error
code or other attributes, only via low-level)
- no simple support for custom header attributes
- no support to build query parameters
- no simple support for custom request parameter
- just throws CurlException (no fine-grained control of exceptions)
- post: no support for user-specified file type, no support for File or stream)
- no simple support for basic auth (only via low-level)
- no high-level support for streams (only ranges)

(I am pretty sure this list is longer)

and btw support of SSL is mandatory in 2016.
In general dlang-requests looks to be a very promising replacement (it does
support linking with SSL or botan too):

https://github.com/ikod/dlang-requests

It's modeled after the successful Python module requests:

http://docs.python-requests.org/en/master/

--


[Issue 7016] local import does not create -deps dependency

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7016

--- Comment #24 from Alexey G  ---
same result on nightly

DMD32 D Compiler v2.073.0-master-cb7f8fe

--


[Issue 7016] local import does not create -deps dependency

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7016

--- Comment #23 from Alexey G  ---
Sorry, loaded latest

>dmd --version
DMD32 D Compiler v2.072.1
Copyright (c) 1999-2016 by Digital Mars written by Walter Bright

Windows 7 32 bit
exact example from first post produce a.deps:

a (a.d) : private : object
(R:\\dmd2\\windows\\bin\\..\\..\\src\\druntime\\import\\object.d)
b (b.d) : private : object
(R:\\dmd2\\windows\\bin\\..\\..\\src\\druntime\\import\\object.d)
a (a.d) : private : b (b.d)

--


[Issue 7016] local import does not create -deps dependency

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7016

--- Comment #22 from Alexey G  ---
>dmd --version
DMD32 D Compiler v2.072.0-master-386ef6d
Copyright (c) 1999-2016 by Digital Mars written by Walter Bright

Windows 7 32 bit

exact example from first post produce a.deps:

a (a.d) : private : object
(R:\\dmd2\\windows\\bin\\..\\..\\src\\druntime\\import\\object.d)
b (b.d) : private : object
(R:\\dmd2\\windows\\bin\\..\\..\\src\\druntime\\import\\object.d)
a (a.d) : private : b (b.d)

--


[Issue 17008] New: use ldc/gdc intrinsics in std.math

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17008

  Issue ID: 17008
   Summary: use ldc/gdc intrinsics in std.math
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

like e.g. used in Mir:
https://github.com/libmir/mir-math/blob/master/source/mir/math/internal.d

--


[Issue 17007] New: let std.math work in CTFE

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17007

  Issue ID: 17007
   Summary: let std.math work in CTFE
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

(There's a lot of custom assembler code)

So there are already community-driven projects out there, e.g.
https://code.dlang.org/packages/ctstdmath

--


[Issue 17006] New: std.data.json (replacement for std.json)

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17006

  Issue ID: 17006
   Summary: std.data.json (replacement for std.json)
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

std.json is pretty outdated and Sönke is working on a replacement for quite a
while (it's based on the Json implementation of Vibe.d). He could use some
help:

https://github.com/s-ludwig/std_data_json

Because std.json is such a pain to work with, there are dozens of replacement
libraries out there, my favorite name is painlessjson [1].

https://github.com/BlackEdder/painlessjson

A fast implementation is here:

https://github.com/tamediadigital/asdf

--


[Issue 17005] New: redesign std.encoding

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17005

  Issue ID: 17005
   Summary: redesign std.encoding
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

std.encoding needs a complete overhaul. Other encoding packages as std.ascii,
std.base64, std.utf8 could be included and a common API should unite them.

This new package could include a comprehensive set of encoder, covering (in
addition to base64 and utf8) all the baseXX encoders, since they are easy
addition (base16, base32, z85) and also domain specific encoders such as
percent encoding (which then could be used in any replacement of the
old-fashioned and incomplete std.uri module) or variable length quantity. 

For base32, there's already this package in the wild:

https://github.com/e10s/d-base32

--


[Issue 17004] New: std.containers should be usable with @nogc or const

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17004

  Issue ID: 17004
   Summary: std.containers should be usable with @nogc or const
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: installer
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

There's a very good library out in the wild that provides an custom Allocator
support and is even faster than Phobos:

https://github.com/economicmodeling/containers

--


[Issue 17003] New: std.bigint: CTFE not available for win32

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17003

  Issue ID: 17003
   Summary: std.bigint: CTFE not available for win32
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

From: https://github.com/andersonpd/eris/issues/6

> The ongoing problem with std.bigint is that CTFE is not available for
the 32-bit Windows version. Because of this eris.decimal will not
compile with std.bigint. The fundamental issue is that std.bigint uses
assembly language routines for speed-up in the 32-bit Windows versions
and asm instructions cannot be evaluated at compile time.

I have, as noted, created a separate big integer type which I am sure is
not as fast as std.bigint, but it is correctly implemented. I just hate
to see two different bigint implementations in phobos, so I have not
pushed to move my eris.decimal to std.decimal until std.bigint is modified.

--


[Issue 17002] New: Lazy std.base64

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17002

  Issue ID: 17002
   Summary: Lazy std.base64
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

This has already been implemented in the wild:

https://code.dlang.org/packages/base-d

Unlike std.base64, this library aims to do encoding and decoding in a lazy
fashion. Of course, this means base-d will be slightly slower than the eager
std.base64, but will operate without having to allocate any memory.

--


[Issue 17001] New: remove etc.c.zlib / std.zip

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17001

  Issue ID: 17001
   Summary: remove etc.c.zlib / std.zip
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

The zip module is outdated and buggy - hell there's even a list of bugs on its
module page (https://dlang.org/phobos/std_zip.html).

This should be removed from Phobos as it can be done a lot better as a user
package and is a quite seldom use case. See e.g.

https://github.com/rcythr/archive

--


[Issue 17000] New: remove etc.c.sqlite

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17000

  Issue ID: 17000
   Summary: remove etc.c.sqlite
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

This should better be part of a DUB library.

There has been some discussion about std.database, see e.g.

-> https://github.com/buggins/ddbc

and: https://wiki.dlang.org/Database_Libraries

but for now it would be the best to leave the choice to the user.

--


[Issue 6583] cast() operation not fully specified

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6583

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 6055] multiple problems with static dtor and ctors in spec

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6055

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 2482] Spec does not reference about special x functions in TypeInfo_Struct

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2482

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 1164] Wrong order of memory deallocation

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1164

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com

--- Comment #6 from Andrei Alexandrescu  ---
Couldn't reproduce on dmd 2.072.1. Any better code sample?

--


[Issue 4347] foreach over range should save range.

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4347

--- Comment #5 from Andrei Alexandrescu  ---
(In reply to Mathias Lang from comment #4)
> @Andrei: Actually, there is already a difference in behavior. When iterating
> over a range which is a reference (e.g. class), the range will be advanced
> by foreach.
> However, for value types (structs), the struct is copied, resulting in an
> implict `.save` most of the time.
> See https://issues.dlang.org/show_bug.cgi?id=15413 for example.

I understand that. Still think we should not change behavior.

--


[Issue 1441] [module] Allow 'private' to restrict class visibility outside module or outer class

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1441

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |FIXED

--- Comment #10 from Andrei Alexandrescu  ---
The issue of cross-module private symbols has been fixed. The issue regarding
nested classes is invalid - protection in D has module-level granularity. If
I'm missing something, please reopen with a precise description of the balance
of the problem. Thanks.

--


[Issue 3108] [meta] Protection

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3108
Issue 3108 depends on issue 1441, which changed state.

Issue 1441 Summary: [module] Allow 'private' to restrict class visibility 
outside module or outer class
https://issues.dlang.org/show_bug.cgi?id=1441

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 1444] Implicit conversions of types

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1444

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |WONTFIX

--- Comment #1 from Andrei Alexandrescu  ---
Such would be too large a breaking change.

--


[Issue 1890] DDOC removes leading space in D_CODE macro

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1890

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||bootcamp
 CC||and...@erdani.com

--


[Issue 2060] some ddoc design typos

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2060

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Andrei Alexandrescu  ---
I think we're doing all of these today. If not, please reopen with a clearer
action list.

--


[Issue 2170] Replace struct "literals" with actual struct literals

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2170

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |WONTFIX

--


[Issue 1253] array initializers as expressions are not allowed in const arrays

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1253
Issue 1253 depends on issue 2170, which changed state.

Issue 2170 Summary: Replace struct "literals" with actual struct literals
https://issues.dlang.org/show_bug.cgi?id=2170

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--


[Issue 2171] errors involving anonymous class literals expose compiler internals

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2171

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||bootcamp

--


[Issue 4347] foreach over range should save range.

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4347

Mathias Lang  changed:

   What|Removed |Added

 CC||mathias.l...@sociomantic.co
   ||m

--- Comment #4 from Mathias Lang  ---
@Andrei: Actually, there is already a difference in behavior. When iterating
over a range which is a reference (e.g. class), the range will be advanced by
foreach.
However, for value types (structs), the struct is copied, resulting in an
implict `.save` most of the time.
See https://issues.dlang.org/show_bug.cgi?id=15413 for example.

--


[Issue 2194] Variadic parameters of non-array types

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2194

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||bootcamp
 CC||and...@erdani.com

--- Comment #3 from Andrei Alexandrescu  ---
We should reject this during semantic checking.

--


[Issue 2447] There's no disconnectall for std.signals

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2447

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||bootcamp, trivial

--


[Issue 2765] module name in .obj file

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2765

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |WONTFIX

--


[Issue 2867] stringof is broken

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2867

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andrei Alexandrescu  ---
I don't think this needs a fix.

--


[Issue 3462] Add a clean way to exit a process.

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3462

Andrei Alexandrescu  changed:

   What|Removed |Added

   Assignee|s...@invisibleduck.org  |alexandru.razva...@gmail.co
   ||m

--


[Issue 2864] intra-module use of deprecated should be allowed

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2864

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |WONTFIX

--- Comment #5 from Andrei Alexandrescu  ---
Workaround suggested by @yebblies should be enough.

--


[Issue 3164] make: double quoted strings are not recognized

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3164

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |WONTFIX

--


[Issue 4264] Support opApply in std.algorithm, std.range where possible

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4264

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |WONTFIX

--- Comment #12 from Andrei Alexandrescu  ---
We don't plan to support internal iteration via opApply in range algorithms. It
would add too much complication for too little benefit.

--


[Issue 4347] foreach over range should save range.

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4347

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andrei Alexandrescu  ---
I'll close this because addressing it may disrupt code. Also it would make
behavior of foreach different across input and other ranges.

--


[Issue 4555] Double newlines with std.file.readText

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4555

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial

--


[Issue 4587] Assert exception should not allocate

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4587

--- Comment #5 from Andrei Alexandrescu  ---
An embarrassment of riches.

https://github.com/dlang/druntime/pull/1714
https://github.com/dlang/druntime/pull/1710

--


[Issue 4646] src/phobos/linux.mak STD_MODULES definition

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4646

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Andrei Alexandrescu  ---
Fixed long ago, in all likelihood closing this was overlooked.

--


[Issue 4960] dmd 2.049 rejects code containing templates with a uint as template parameter

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4960

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |FIXED

--- Comment #5 from Andrei Alexandrescu  ---
All examples given compile and run with 2.072.1.

--


[Issue 16606] [dlang.org] Search field value not propagated to Google

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16606

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 16639] Review std.json wrt this article on JSON edge cases and ambiguities

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16639

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 16657] alias this interacts with generated opCmp and opEquals

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16657

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com
Summary|[The D Bug Tracker] |alias this interacts with
   ||generated opCmp and
   ||opEquals

--


[Issue 16950] [Downloads]

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16950

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 16684] std.getopt, problem with the automatic handling of "h"

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16684

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial

--


[Issue 16966] rdmd: AssertError@rdmd.d(489): should have been created by compileRootAndGetDeps

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16966

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/tools

https://github.com/dlang/tools/commit/2026a509e6896cae4e27100ca7adea08b06843d2
fix issue 16966 - rdmd: AssertError@rdmd.d(489): should have been created by
compileRootAndGetDeps

https://github.com/dlang/tools/commit/3353e636cc31485e6bf321852c6972da794bc26e
Merge pull request #204 from aG0aep6G/16966

fix issue 16966 - rdmd: AssertError@rdmd.d(489): should have been cre…

--


[Issue 16991] Make writeln documentation palatable

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16991

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial

--


[Issue 16992] fromISOString, fromISOExtString, and fromSimpleString do not have examples

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16992

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 16993] Documentation for toSimpleString and toString does not explain how they differ

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16993

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||trivial
 CC||and...@erdani.com

--


[Issue 7157] Optimiser is O(n^2) w.r.t. function length

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7157

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #12 from Walter Bright  ---
There is some quadratic behavior in the function bodies of `updaterd` and
`accumaecpx` (look for the loops). They can both be fixed.

--


[Issue 16824] std.experimental.allocator.dispose leaks memory for arrays of more than 1 dimension

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16824

--- Comment #4 from Andrei Alexandrescu  ---
(In reply to Andrei Alexandrescu from comment #3)
> The owns() method allows allocators to figure that out, but returns true for
> internal pointers as well, which means the following would not end well:
> 
> auto ints2d = allocator.makeArray!(int[])(2);
> auto bulk = allocator.makeArray!(int[])(ints2d.length * 100);
> foreach(i; 0 .. ints2d.length)
> ints2s[i] = bulk[i * 100 .. (i + 1) * 100];
> 
> which is a customary way to save on allocations in multidimensional arrays.
> 
> @Atila, any good argument on how we can make this work? If not, I think we
> should close as invalid.

Corrected code:

auto ints2d = allocator.makeArray!(int[])(2);
auto bulk = allocator.makeArray!int(ints2d.length * 100);
foreach(i; 0 .. ints2d.length)
ints2s[i] = bulk[i * 100 .. (i + 1) * 100];

--


[Issue 16824] std.experimental.allocator.dispose leaks memory for arrays of more than 1 dimension

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16824

--- Comment #3 from Andrei Alexandrescu  ---
The owns() method allows allocators to figure that out, but returns true for
internal pointers as well, which means the following would not end well:

auto ints2d = allocator.makeArray!(int[])(2);
auto bulk = allocator.makeArray!(int[])(ints2d.length * 100);
foreach(i; 0 .. ints2d.length)
ints2s[i] = bulk[i * 100 .. (i + 1) * 100];

which is a customary way to save on allocations in multidimensional arrays.

@Atila, any good argument on how we can make this work? If not, I think we
should close as invalid.

--


[Issue 2396] -O causes very long execution time on foreach loop of large array of structs

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2396

Jack Stouffer  changed:

   What|Removed |Added

   Keywords||performance
 CC||j...@jackstouffer.com

--


[Issue 7157] Optimiser is O(n^2) w.r.t. function length

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7157

Jack Stouffer  changed:

   What|Removed |Added

   Keywords||performance
 CC||j...@jackstouffer.com
   Hardware|x86 |All
 OS|Mac OS X|All

--


[Issue 16824] std.experimental.allocator.dispose leaks memory for arrays of more than 1 dimension

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16824

--- Comment #2 from RazvanN  ---
(In reply to Andrei Alexandrescu from comment #1)
> OK, so what we have here at the core is this:
> 
> auto ints2d = allocator.makeArray!(int[])(2);
> foreach(ref ints1d; ints2d)
> ints1d = allocator.makeArray!(int)(3);
> 
> What I see here by means of manual coding: 
> 
> * Create an array of int[] using an allocator
> * Create a bunch of arrays of int using the same allocator
> 
> This is again by means of manual coding. The individual arrays might have
> been created using a different allocator, or sliced from a larger buffer.
> 
> I don't think we should expect the top-level allocator to "know" (assume
> really) that everything was allocated with the same allocator.

Thing would be great if we could test to see if the inner arrays were allocated
using the same allocator. If that is the case, then we can free the initial
array
entirely, otherwise it's the user's job to do that. Unfortunately, I do not
know
at this point if such a test is possible, but I will investigate further.

--


[Issue 7157] Optimiser is O(n^2) w.r.t. function length

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7157

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com

--- Comment #11 from Andrei Alexandrescu  ---
I just realized that a precise GC using introspection would use exactly this
facility.

--


[Issue 16352] dead-lock in std.allocator.free_list unittest

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16352

--- Comment #7 from safety0ff.bugz  ---
(In reply to safety0ff.bugz from comment #6)
> 
> But the value of `next` could have changed between the load and the cas.

I meant `oldRoot.next`. i.e. next != oldRoot.next after the cas succeeds.

--


[Issue 16352] dead-lock in std.allocator.free_list unittest

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16352

safety0ff.bugz  changed:

   What|Removed |Added

 CC||safety0ff.b...@gmail.com

--- Comment #6 from safety0ff.bugz  ---
SharedFreeList.allocate looks ABA prone:

A thread does:
do
{
oldRoot = _root; // atomic load
if (!oldRoot) return allocateFresh(bytes);
next = oldRoot.next; // atomic load
}
while (!cas(&_root, oldRoot, next));

But the value of `next` could have changed between the load and the cas.

--


[Issue 14939] dmd slow build of botan library with -inline and -O

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14939

Daniel Kozak  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||kozz...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #2 from Daniel Kozak  ---


*** This issue has been marked as a duplicate of issue 7157 ***

--


[Issue 7157] Optimiser is O(n^2) w.r.t. function length

2016-12-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7157

Daniel Kozak  changed:

   What|Removed |Added

 CC||chalu...@gmail.com

--- Comment #10 from Daniel Kozak  ---
*** Issue 14939 has been marked as a duplicate of this issue. ***

--