[Issue 18869] Add Jumia Food to organizations using D

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18869

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #2 from greenify  ---
Cool! Thanks a lot for the ping and excellent news. I am really excited about
your potential open sourcing. 
FYI: I am currently on vacation, but if no one else picks this up before once I
am back at the end of next week. Sorry for the delay.

--


[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115

--- Comment #17 from Walter Bright  ---
I had an idea:

https://github.com/dlang/dmd/pull/8259

--


[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14536

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

https://github.com/dlang/druntime/commit/0d98f69de3e4ef83eac86d8c39dce71053fda008
Fix issue 14536 - destroy() works on extern(C++) classes

https://github.com/dlang/druntime/commit/ace9f08fd743a3fc1bf6d345d05b0ee4929bfb83
Merge pull request #2176 from TurkeyMan/destroy_cpp_class

Fix issue 14536 - destroy() works on extern(C++) classes

--


[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14536

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

   What|Removed |Added

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

--


[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115

Walter Bright  changed:

   What|Removed |Added

   Keywords|CTFE|rejects-valid

--- Comment #16 from Walter Bright  ---
BTW, here's where the constant folding is done:

 dtemplate.d(1586)
// Optimize argument to allow CT-known length matching
farg = farg.optimize(WANTvalue, (fparam.storageClass & (STC.ref_ | STC.out_))
!= 0);
//printf("farg = %s %s\n", farg.type.toChars(), farg.toChars());
--

https://github.com/dlang/dmd/blob/master/src/dmd/dtemplate.d#L1587

I'm not giving up yet, maybe I'll think of something :-) or maybe one of you
guys will.

In any case, it's not a CTFE issue. I'll remark it as rejects-valid for the
time being.

--


[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115

--- Comment #15 from Walter Bright  ---
Tracing this through the compiler, the trouble is more subtle.

  int test()
  {
if (test.stringof.length > 6 &&
test.stringof[$-7..$] == "1234567") {}
return 0;
  }
  enum a = test();

1. The enum declaration says evaluate test() at compile time.
2. test() has not had semantic run on it yet, so the CTFE runs semantic on it
before attempting to execute it.
3. semantic sees the == with arrays on both sides. So it attempts to
instantiate the object.__equals() template with the left and right operands of
the ==.
4. As part of argument matching to the template, the operands get constant
folded.
5. The error is generated by the constant folding.

object.__equals() was added fairly recently, hence the regression.

I don't see any obvious way out of this.

However, there is a simple workaround, as constant folding does not do any flow
analysis:

  int test()
  {
auto i = test.stringof.length;
if (test.stringof.length > 6 &&
test.stringof[i-7..i] == "1234567") {}
return 0;
  }

  enum a = test();

Here, the value of `i` is not propagated to the constant folder. The optimizer
will do that, but later. CTFE will do it, too, but CTFE respects short
circuits.

Note also that the following version:

  int test()
  {
if (test.stringof.length > 6 &&
test.stringof[$-7..$]) {}
return 0;
  }

  enum a = test();

does not issue an error. That's because no template matching is attempted.

--


[Issue 18870] New: Link failure only with -allinst for code in isExpression

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18870

  Issue ID: 18870
   Summary: Link failure only with -allinst for code in
isExpression
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: s...@theartofmachinery.com

Hi, I'm using version 2.080.  Here's a reduced version of some code I had a
problem with:

import std.datetime.date;
import std.stdio;
void main()
{
writef("%s", TimeOfDay());
}

It compiles and runs fine for me with no flags to dmd, but here's what happens
with -allinst:

$ dmd -allinst broken.d 
broken.o: In function
`_D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STaZQDgFNaNbNiNfKQDmKaZv':
broken.d:(.text._D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STaZQDgFNaNbNiNfKQDmKaZv[_D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STaZQDgFNaNbNiNfKQDmKaZv]+0x14):
undefined reference to
`_D3std6format__T11hasToStringTSQBd8datetime4date9TimeOfDayTaZ9__lambda2MFZ1S3putMFNaNbNiNfaZv'
broken.o: In function
`_D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STaZQDgFNaNbNiNfKQDmaZv':
broken.d:(.text._D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STaZQDgFNaNbNiNfKQDmaZv[_D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STaZQDgFNaNbNiNfKQDmaZv]+0x14):
undefined reference to
`_D3std6format__T11hasToStringTSQBd8datetime4date9TimeOfDayTaZ9__lambda2MFZ1S3putMFNaNbNiNfaZv'
broken.o: In function
`_D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STxaZQDhFNaNbNiNfKQDnKxaZv':
broken.d:(.text._D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STxaZQDhFNaNbNiNfKQDnKxaZv[_D3std5range10primitives__T5doPutTSQBh6format__T11hasToStringTSQCj8datetime4date9TimeOfDayTaZ9__lambda2MFZ1STxaZQDhFNaNbNiNfKQDnKxaZv]+0x14):
undefined reference to
`_D3std6format__T11hasToStringTSQBd8datetime4date9TimeOfDayTaZ9__lambda2MFZ1S3putMFNaNbNiNfaZv'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

The missing symbol demangles to this:

pure nothrow @nogc @safe void
std.format.hasToString!(const(std.datetime.date.TimeOfDay),
char).__lambda2().S.put(char)

(That __lambda2 is from an isExpression, so it makes sense for it to be missing
from the object file.)

--


[Issue 18869] Add Jumia Food to organizations using D

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18869

--- Comment #1 from Jorge Meireles  ---
We are thinking in open sourcing our Dlang tools very soon.

--


[Issue 18869] Add Jumia Food to organizations using D

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18869

Jorge Meireles  changed:

   What|Removed |Added

Summary|Add (insert your|Add Jumia Food to
   |organization) to|organizations using D
   |organizations using D   |

--


[Issue 18869] New: Add (insert your organization) to organizations using D

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18869

  Issue ID: 18869
   Summary: Add (insert your organization) to organizations using
D
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: jorge.meire...@jumia.com

Created attachment 1695
  --> https://issues.dlang.org/attachment.cgi?id=1695=edit
Jumia Food Logo

Jumia Food is an instant delivery platform market leader in 11 african
countries. Dlang tremendously helps us to monitor our entire Kubernetes
infrastructure.

Our github:
  http://github.com/JumiaFood 

More info about us:
  https://www.youtube.com/results?search_query=jumia+food

--


[Issue 4559] Disallowing single semicolons

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

Dmitry Olshansky  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||dmitry.o...@gmail.com
 Resolution|--- |WORKSFORME

--- Comment #9 from Dmitry Olshansky  ---
Today this prints:

saa.d(2): Deprecation: use { } for an empty statement, not ;

Which is perfectly fine IMHO.

--


[Issue 4544] Better error-message when expecting string but got a character constant

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4544

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com

--- Comment #3 from Dmitry Olshansky  ---
A tiny bit better but still godawful on v2.080:

saa.d(5): Error: unterminated character constant
saa.d(5): Error: found est when expecting ,
saa.d(5): Error: unterminated character constant
saa.d(5): Error: found ; when expecting ,
saa.d(6): Error: expression expected, not }
saa.d(6): Error: found EOF when expecting ,
saa.d(6): Error: found EOF when expecting )
saa.d(6): Error: found EOF when expecting ; following statement
saa.d(6): Error: found EOF when expecting } following compound statement

--


[Issue 4527] writeln/typeid to not expand aliases (for string types)

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4527

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com
Summary|writeln/typeid to use   |writeln/typeid to not
   |string type names   |expand aliases (for string
   ||types)

--


[Issue 4508] tuples should be indexable with foreach over range

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4508

Dmitry Olshansky  changed:

   What|Removed |Added

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

--- Comment #5 from Dmitry Olshansky  ---
With static foreach you can do this, and AFAICT is exactly what is required:

import std.typecons;

void main() {
auto tup = tuple(1, "foo", 3.0).expand;
static foreach(i; 0..tup.length) {{
auto val = tup[i];
}}
}

--


[Issue 4476] __traits for more kinds of names

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4476

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com

--- Comment #4 from Dmitry Olshansky  ---
Will likely be superseded by forthcoming introspection DIP.

--


[Issue 4393] Very good dotProduct

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4393

Dmitry Olshansky  changed:

   What|Removed |Added

   Keywords||performance
 CC||dmitry.o...@gmail.com

--


[Issue 4380] Poor optimisation of x*x, where x is real

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4380

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com

--- Comment #3 from Dmitry Olshansky  ---
Still a problem in DMD 2.080

--


[Issue 4215] Intrduce auto ref parameters for class template variables

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4215

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com
Summary|auto ref parameters don't   |Intrduce auto ref
   |work with class template|parameters for class
   |variables   |template variables

--


[Issue 17911] UDA to scope cause Error

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17911

--- Comment #4 from Timoses  ---
I apologize in case I have reported the bug incorrectly.


Indeed, I mean Andrea Fontana's version.

The following clarifies a bit more perhaps:

--
struct F 
{
@(1) // works!
{
@(2) int a; // has UDA's (1, 2)
@("string") int b;  // has UDA's (1, "string")
}
}

void func() 
{
@(1) // compilation error
{
@(2) int a; // has UDA's (1, 2)
@("string") int b;  // has UDA's (1, "string")
}
}

void main() 
{ 

struct G 
{
@(1) // works!
{
@(2) int a; // has UDA's (1, 2)
@("string") int b;  // has UDA's (1, "string")
}
}
}
-

I'm not sure whether attribution of local variables makes any sense anyhow.
Does it? If that were the case the error message coule be more descriptive.

--


[Issue 4151] Add weak references to Phobos/druntime

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4151

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com

--- Comment #4 from Dmitry Olshansky  ---
Even in Java Weak references solve about as much problems as they introduce.
But a library based solution could indeed come in handy.

--


[Issue 4098] [AA] Associative Array replacement implementation, ABI documentation and template wrapper

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4098

Dmitry Olshansky  changed:

   What|Removed |Added

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

--- Comment #1 from Dmitry Olshansky  ---
Well, we already replaced original AA and used template-based lowering + better
open addressing hash map.

--


[Issue 4086] Standard struct constructor for the heap

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4086

Dmitry Olshansky  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||dmitry.o...@gmail.com
 Resolution|--- |WORKSFORME

--- Comment #1 from Dmitry Olshansky  ---
I thought it always worked like that. So fixed a long time ago.

--


[Issue 4083] Exception-related code from nothrow destructor

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4083

Dmitry Olshansky  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||dmitry.o...@gmail.com
 Resolution|--- |WORKSFORME

--- Comment #1 from Dmitry Olshansky  ---
Now on DMD 2.079 nothrow is optimized well, so it was fixed in the meantime:


000 <_Dmain>:
   0:   55  push   %rbp
   1:   48 8b ecmov%rsp,%rbp
   4:   48 83 ec 10 sub$0x10,%rsp
   8:   48 8d 45 f8 lea-0x8(%rbp),%rax
   c:   c6 00 00movb   $0x0,(%rax)
   f:   b9 03 00 00 00  mov$0x3,%ecx
  14:   89 4d fcmov%ecx,-0x4(%rbp)
  17:   48 89 c7mov%rax,%rdi
  1a:   e8 00 00 00 00  callq  1f <_Dmain+0x1f>
  1f:   83 7d fc 03 cmpl   $0x3,-0x4(%rbp)
  23:   74 02   je 27 <_Dmain+0x27>
  25:   c9  leaveq
  26:   c3  retq
  27:   31 c0   xor%eax,%eax
  29:   c9  leaveq
  2a:   c3  retq

--


[Issue 4034] pure function calls returning a double do not seem to be optimized away

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4034

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com
Summary|double-double functions |pure function calls
   |seem to not pure-optimize   |returning a double do not
   ||seem to be optimized away

--


[Issue 4025] Making network with the std.stdio.File interface

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4025

Dmitry Olshansky  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||dmitry.o...@gmail.com
 Resolution|--- |WONTFIX

--- Comment #2 from Dmitry Olshansky  ---
Hell no. Network can be done in a multitude of ways and putting the awkward
LibC buffering on top of it is the last thing we'd want. 

Especially in std. There is now quite a few better things on Dub that does
network and I/O.

All that aside - in a Dub package this addition might be simple thing that will
find its users.

--


[Issue 3999] Have enums that do not implicitly convert to an int

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3999

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com
Summary|Enum equality to an int |Have enums that do not
   ||implicitly convert to an
   ||int

--


[Issue 18365] header file generation doesn't include the return attribute

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18365

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

   What|Removed |Added

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

--


[Issue 18365] header file generation doesn't include the return attribute

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18365

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

https://github.com/dlang/dmd/commit/2189034113d3756ae8ceade530a579cbb8ad4163
Fix Issue 18365 - header file generation doesn't include the return attribute

https://github.com/dlang/dmd/commit/abd9cd4a68297166a59010007bc35e777a380a53
Merge pull request #7836 from wilzbach/fix-18365

Fix Issue 18365 - header file generation doesn't include the return attribute
merged-on-behalf-of: Mike Franklin 

--


[Issue 17911] UDA to scope cause Error

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17911

Mike Franklin  changed:

   What|Removed |Added

   Hardware|x86_64  |All
 OS|Windows |All

--


[Issue 3952] pragma(msg,...) has bugs + alternative idea

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3952

Dmitry Olshansky  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||dmitry.o...@gmail.com
 Resolution|--- |WORKSFORME

--- Comment #14 from Dmitry Olshansky  ---
This is getting out of scope real quick.

First the code:

string foo0() {
return "this is a test";
}
string foo1() {
return "";
}
string foo2() {
string result;
return result;
}
string foo3() {
return [];
}
pragma(msg, foo0());
pragma(msg, foo1());
pragma(msg, foo2());
pragma(msg, foo3());
//string hello = "red";
//pragma(msg, hello);
pragma(msg, 12);
void main() {}


Now works as expected no [] literals. Except for static `hello`.

__ctfeWrite is a separate issue so no point in doing it here. 
Lastly any bugs in pragma(msg, ...) are welcome as specific bugs.

--


[Issue 3939] Built-in __vptr attribute for classes too

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3939

Dmitry Olshansky  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||dmitry.o...@gmail.com
 Resolution|--- |WONTFIX

--- Comment #2 from Dmitry Olshansky  ---
Could be taken from typeinfo, see object.d:

class TypeInfo_Class : TypeInfo
{
...
   void*[] vtbl;   /// virtual function pointer table
   Interface[] interfaces; /// interfaces this class implements
...
}

So I believe those who truly need it will find it. And solution provided is
actually fine for such low-level goal.

--


[Issue 18068] No file names and line numbers in stack trace

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18068

Dmitry Olshansky  changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc

--- Comment #10 from Dmitry Olshansky  ---
*** Issue 3933 has been marked as a duplicate of this issue. ***

--


[Issue 17911] UDA to scope cause Error

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17911

Andrea Fontana  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--


[Issue 3933] Array memory allocation error lacks a line number

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3933

Dmitry Olshansky  changed:

   What|Removed |Added

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

--- Comment #2 from Dmitry Olshansky  ---
With DMD 2.079 it shows the following:

core.exception.OutOfMemoryError@src/core/exception.d(702): Memory allocation
failed

??:? _d_arraysetlengthT [0xc1dcfb8e]
??:? _Dmain [0xc1dcdbaa]

I bet linenumbers worked on Linux so it could be a problem with my setup.
In any case it's certainly a separate issue that I'll give in DUPLICATE
resolution

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

--


[Issue 17911] UDA to scope cause Error

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17911

Andrea Fontana  changed:

   What|Removed |Added

 CC||trik...@gmail.com

--- Comment #3 from Andrea Fontana  ---
Probably this is the problem he found:

https://run.dlang.io/is/zim8Z0

--