[Issue 18958] extern(C++) wchar, dchar mangling not correct

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18958 Mike Franklin changed: What|Removed |Added See Also||https://issues.dlang.org/sh

"catch" not catching the correct exception

2018-07-25 Thread Shachar Shemesh via Digitalmars-d
Under mecca, we're using GC free exceptions. I have code that uses mkEx (https://github.com/weka-io/mecca/blob/master/src/mecca/lib/exception.d#L307). Essentially, it constructs an exception in place inside a fiber-local buffer. The construction code seems correct, and the parent seems set

Re: Looking for the article comparing D to Ada and others

2018-07-25 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 26 July 2018 at 02:21:58 UTC, Ali Çehreli wrote: On 07/25/2018 04:27 PM, Nicholas Wilson wrote: On Wednesday, 25 July 2018 at 21:59:52 UTC, Ali Çehreli wrote: Somebody had posted an article here on how well different languages matched certain requirements of a certain coding

[Issue 18997] extern(C++) mangling incorrect for wchar_t

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18997 Mike Franklin changed: What|Removed |Added CC||slavo5...@yahoo.com See Also|

Re: Dlangui customize app icon on dock or menu bar

2018-07-25 Thread rikki cattermole via Digitalmars-d-learn
On 26/07/2018 6:13 AM, Jacob Shtokolov wrote: On Wednesday, 25 July 2018 at 09:42:00 UTC, Ivo wrote: I'm a macOs user and I need to build a application with a GUI. Not sure if the author of the DLangUI is visiting this forum so often to be able to answer. If you won't get an answer in the

[Issue 19033] Sign the installer

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19033 Mike Franklin changed: What|Removed |Added CC||slavo5...@yahoo.com See Also|

[Issue 18786] AV program detects malware in windows download of DMD

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18786 Mike Franklin changed: What|Removed |Added See Also||https://issues.dlang.org/sh

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 24 July 2018 at 07:19:21 UTC, Paolo Invernizzi wrote: If I'm not wrong, Python has grown up really slowly and quietly, till the recent big success in the scientific field. Python replaced Perl and to some extent Php... Two very questionable languages, which was a good

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Manu via Digitalmars-d
On Wed, 25 Jul 2018 at 13:55, 12345swordy via Digitalmars-d wrote: > > > It's not a false equivalence fallacy: all the discussion is > > about IMPLICIT conversion or rvalues to lvalues. > Yes it is, the issues regarding rvalue/lvalue conversion is not > the same issues regarding the

Looking for the article comparing D to Ada and others

2018-07-25 Thread Ali Çehreli via Digitalmars-d
Somebody had posted an article here on how well different languages matched certain requirements of a certain coding safety standards. I remember D was doing pretty well and I think Ada (or SPARK?) was included as well. What article? Where? Thank you, Ali

Re: An Optional!T and the implementation of the underlying type's opUnary

2018-07-25 Thread aliak via Digitalmars-d
On Wednesday, 25 July 2018 at 18:01:54 UTC, Atila Neves wrote: This works for me: struct Optional(T) { private T _value; private bool empty = true; this(T value) { _value = value; empty = false; } auto opUnary(string op)() { if(!empty) mixin(op ~

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Ecstatic Coder via Digitalmars-d
On Wednesday, 25 July 2018 at 21:16:40 UTC, Walter Bright wrote: On 7/24/2018 4:53 AM, Ecstatic Coder wrote:     str = str1 + " " + str2; But you have to be careful how it is written: str = "hello" + "world"; str = "hello" + "world" + str1; don't work, etc. Yeah. That's exactly

[Issue 19107] -de produces compilation error, -dw does not

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19107 --- Comment #2 from Mike Franklin --- Further reduced to no longer require Phobos: --- sing.d module sing; alias I(alias A) = A; --- git.d import sing : I; --- manager.d module manager; import git; template all(alias pred = "a") { bool

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread aliak via Digitalmars-d
On Wednesday, 25 July 2018 at 21:55:00 UTC, Manu wrote: On Wed, 25 Jul 2018 at 13:55, 12345swordy via Digitalmars-d wrote: > It's not a false equivalence fallacy: all the discussion is > about IMPLICIT conversion or rvalues to lvalues. Yes it is, the issues regarding rvalue/lvalue conversion

[Issue 19116] dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19116 Alex Braunegg changed: What|Removed |Added Priority|P1 |P2 Severity|enhancement

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Ecstatic Coder via Digitalmars-d
On Wednesday, 25 July 2018 at 20:24:39 UTC, bpr wrote: On Wednesday, 25 July 2018 at 17:23:40 UTC, Ecstatic Coder wrote: But don't be too optimistic about BetterC... I'm too old to get optimistic about these things. In the very best case, D has quite an uphill battle for market share. Any

Re: Looking for the article comparing D to Ada and others

2018-07-25 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 25 July 2018 at 21:59:52 UTC, Ali Çehreli wrote: Somebody had posted an article here on how well different languages matched certain requirements of a certain coding safety standards. I remember D was doing pretty well and I think Ada (or SPARK?) was included as well. What

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread H. S. Teoh via Digitalmars-d
On Wed, Jul 25, 2018 at 11:27:45PM +, Laeeth Isharc via Digitalmars-d wrote: > On Tuesday, 24 July 2018 at 00:41:54 UTC, RhyS wrote: [...] > > I am sorry to say but to succeed as a language beyond being a small > > or hobby language it takes: Being established already or having a > > big name

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 24 July 2018 at 00:41:54 UTC, RhyS wrote: On Monday, 23 July 2018 at 22:45:15 UTC, Walter Bright wrote: I've predicted before that what will kill C is managers and customers requiring memory safety because unsafeness costs them millions. The "just hire better programmers" will

[Issue 19116] dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19116 --- Comment #4 from Alex Braunegg --- Yes - this has been tried - LDC compiled binary runs without issue on Ubuntu / Debian 32bit platforms. The question here however is: Why does the DMD compiled binary not work for Ubuntu / Debian 32bit

Re: Looking for the article comparing D to Ada and others

2018-07-25 Thread Ali Çehreli via Digitalmars-d
On 07/25/2018 04:27 PM, Nicholas Wilson wrote: On Wednesday, 25 July 2018 at 21:59:52 UTC, Ali Çehreli wrote: Somebody had posted an article here on how well different languages matched certain requirements of a certain coding safety standards. I remember D was doing pretty well and I

[Issue 19107] -de produces compilation error, -dw does not

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19107 --- Comment #3 from Mike Franklin --- Even further reduced: --- sing.d module sing; alias I(alias A) = A; --- git.d import sing : I; --- manager.d module manager; import git; template all(alias pred) { void all(T)(T t) if

Re: Struct Initialization syntax

2018-07-25 Thread Jim Balter via Digitalmars-d
On Tuesday, 24 July 2018 at 16:35:32 UTC, H. S. Teoh wrote: On Tue, Jul 24, 2018 at 01:13:16PM +, Dukc via Digitalmars-d wrote: On Tuesday, 24 July 2018 at 12:37:21 UTC, Cym13 wrote: > That argument sounds quite dangerous to me, especially since > my experience is on the contrary that

[Issue 19107] -de produces compilation error, -dw does not

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19107 --- Comment #1 from Mike Franklin --- Further reduced: --- sing.d module sing; alias I(alias A) = A; --- git.d import sing : I; --- manager.d module manager; import std.algorithm; import git; class DManager { void

[Issue 13768] Refused template method instantiation with enum struct field

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13768 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 17778] Creating a static array with duplicates in betterC causes "undefined reference to _memset32" linker failure

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17778 Radu Racariu changed: What|Removed |Added CC||radu.raca...@gmail.com

[Issue 11064] D should support block statements inside functions

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11064 John Hall changed: What|Removed |Added CC||john.michael.h...@gmail.com --- Comment #1 from

[Issue 19116] New: dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19116 Issue ID: 19116 Summary: dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures Product: D Version: D2 Hardware: x86 OS:

[Issue 19116] dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19116 Alex Braunegg changed: What|Removed |Added OS|Windows |Linux --

[Issue 19116] dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19116 --- Comment #1 from Alex Braunegg --- Additionally: Arch Linux 2018.07.01 i686 --

[Issue 19116] dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19116 --- Comment #2 from Alex Braunegg --- Additionally: Arch Linux 2018.07.01 i686 - This works without issue using same compilation method Fedora LXDE i386 28-1.1 - - This works without issue using same compilation method --

[Issue 19116] dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures

2018-07-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19116 Seb changed: What|Removed |Added CC||greensunn...@gmail.com --- Comment #3 from Seb ---

Re: How to avoid inout type constructor with Optional type wrapper undoing string type

2018-07-25 Thread Timoses via Digitalmars-d-learn
On Tuesday, 24 July 2018 at 14:11:51 UTC, Ali Çehreli wrote: On 07/24/2018 02:47 AM, Timoses wrote: > Why does this fail while it works when replacing T with U in struct > W(T)?? It's so odd. Both T and U seem to resolve to "string". > > struct W(T) { > const T value; >

Dlangui customize app icon on dock or menu bar

2018-07-25 Thread Ivo via Digitalmars-d-learn
I'm a macOs user and I need to build a application with a GUI. I started using Dlangui with SDL2. I need to be able to call some functions of my program while working with other applications. So I would like to personalize the app icon on the dock so that when right-clicking such icon the

Re: extern(C++): Unresolved scalar deleting destructor

2018-07-25 Thread Vladimir Marchevsky via Digitalmars-d-learn
Back to questions after homework done :) What I've tested: Made test class in CPP: ---testlib.cpp class __declspec(dllexport) Foo { int *a; public: Foo(int value) { a = new int(value); } ~Foo() { delete a; } }; --- Binding on D side: --- extern(C++) {

Re: extern(C++): Unresolved scalar deleting destructor

2018-07-25 Thread Vladimir Marchevsky via Digitalmars-d-learn
On Wednesday, 25 July 2018 at 12:04:16 UTC, Vladimir Marchevsky wrote: What I've tested: Even more: if I create another trivial class in cpp (say, Bar) and new/delete it in first one ("b = new Bar();" in ctor, "delete b;" in dtor of Foo) - D app with bound Foo just crashes silently for some

-allinst and linker errors

2018-07-25 Thread Anonymouse via Digitalmars-d-learn
I'm trying to build my project with -allinst, after reading the comments of issue 18026[1]. Manjaro/Arch 64-bit, dmd 2.081.1 and ldc 1.0.0. I get a wall of text with linker errors, both with dmd and ldc. Demangled excerpt: characterencodings.o: In function `pure nothrow @nogc @safe void

Re: Dlangui customize app icon on dock or menu bar

2018-07-25 Thread Jacob Shtokolov via Digitalmars-d-learn
On Wednesday, 25 July 2018 at 09:42:00 UTC, Ivo wrote: I'm a macOs user and I need to build a application with a GUI. Not sure if the author of the DLangUI is visiting this forum so often to be able to answer. If you won't get an answer in the next few days, I would recommend to make an

Re: -allinst and linker errors

2018-07-25 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 25 July 2018 at 15:56:50 UTC, Anonymouse wrote: I'm trying to build my project with -allinst, after reading the comments of issue 18026[1]. Manjaro/Arch 64-bit, dmd 2.081.1 and ldc 1.0.0. I get a wall of text with linker errors, both with dmd and ldc. Demangled excerpt: [...]

Re: trait to get the body code of a function?

2018-07-25 Thread Guillaume Lathoud via Digitalmars-d-learn
On Wednesday, 25 July 2018 at 04:46:20 UTC, rikki cattermole wrote: On 25/07/2018 5:32 AM, Guillaume Lathoud wrote: Thanks for all the answers. I've just had a look at an alternative: using dmd as a package. However that's a lot of doc to browse... Maybe someone has experience with dmd as a

Re: trait to get the body code of a function?

2018-07-25 Thread 12345swordy via Digitalmars-d-learn
On Wednesday, 25 July 2018 at 19:05:08 UTC, Guillaume Lathoud wrote: On Wednesday, 25 July 2018 at 04:46:20 UTC, rikki cattermole wrote: On 25/07/2018 5:32 AM, Guillaume Lathoud wrote: Thanks for all the answers. I've just had a look at an alternative: using dmd as a package. However that's a

Re: hasUDA with this

2018-07-25 Thread jmh530 via Digitalmars-d-learn
On Friday, 20 July 2018 at 18:24:11 UTC, Timoses wrote: [snip] It works in module scope https://run.dlang.io/is/OQKYag I don't know why though... This was reported in 2013. IMO, it should be mentioned in the spec if they don't plan on changing it.

Re: Struct Initialization syntax

2018-07-25 Thread Guillaume Lathoud via Digitalmars-d
On Monday, 23 July 2018 at 18:31:03 UTC, John Colvin wrote: On Monday, 23 July 2018 at 16:57:20 UTC, H. S. Teoh wrote: On Mon, Jul 23, 2018 at 04:26:42PM +, Seb via Digitalmars-d wrote: tl;dr: the currently proposed syntax options are: --- struct S { int a = 2, b = 4, c = 6; } void

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Paolo Invernizzi via Digitalmars-d
On Wednesday, 25 July 2018 at 02:21:18 UTC, Marco Leise wrote: Am Sat, 21 Jul 2018 19:22:05 + schrieb 12345swordy : On Saturday, 21 July 2018 at 08:55:59 UTC, Paolo Invernizzi wrote: > Frankly speaking, my feeling is that D is becoming a > horrible mess for the programmer... > /Paolo

Constructing a class in-place

2018-07-25 Thread Shachar Shemesh via Digitalmars-d
Forget the "why" for the moment. T construct(T, ARGS...)(ARGS args) if( is(T==class) ) { auto buffer = new ubyte[__traits(classInstanceSize, T)]; T cls = cast(T)buffer.ptr; // Is this really the best way to do this? buffer[] = cast(ubyte[])typeid(T).initializer()[];

Re: Constructing a class in-place

2018-07-25 Thread rikki cattermole via Digitalmars-d
On 25/07/2018 8:05 PM, Shachar Shemesh wrote: Forget the "why" for the moment. T construct(T, ARGS...)(ARGS args) if( is(T==class) ) {    auto buffer = new ubyte[__traits(classInstanceSize, T)];    T cls = cast(T)buffer.ptr; Allocates the storage space of the fields (both public and

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 24 July 2018 at 09:54:37 UTC, Ecstatic Coder wrote: On Tuesday, 24 July 2018 at 00:41:54 UTC, RhyS wrote: [...] +1 IMO, D in its current state, and with its current ecosystem, even after more than a decade of existence, is still NOT the best alternative to C/C++ where they HAVE

Kaspersky Endpoint Security 10 flags the DMD installer as malicious!

2018-07-25 Thread Rel via Digitalmars-d
To be exact as a "HEUR:Trojan-Downloader.Win32.Agent.gen". Few other AV software does the same: https://www.virustotal.com/#/file/0aa364c5cb90630a5757aacc0c3c05a2273f5fdb88e14e2b80d4c19ee5b16d10/detection I think, we should do something about it, at very least report for false-positive to

Re: Kaspersky Endpoint Security 10 flags the DMD installer as malicious!

2018-07-25 Thread rikki cattermole via Digitalmars-d
On 25/07/2018 8:27 PM, Rel wrote: To be exact as a "HEUR:Trojan-Downloader.Win32.Agent.gen". Few other AV software does the same: https://www.virustotal.com/#/file/0aa364c5cb90630a5757aacc0c3c05a2273f5fdb88e14e2b80d4c19ee5b16d10/detection I think, we should do something about it, at very

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Manu via Digitalmars-d
On Wed., 25 Jul. 2018, 12:30 am Paolo Invernizzi via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: > On Wednesday, 25 July 2018 at 02:21:18 UTC, Marco Leise wrote: > > Am Sat, 21 Jul 2018 19:22:05 + > > schrieb 12345swordy : > > > >> On Saturday, 21 July 2018 at 08:55:59 UTC, Paolo

Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread Zheng Luo (Vic) via Digitalmars-d
Current implementation of compilers assumes libc implementation, which leads to an infinite loop if we want to implement primitives like memset with our own code because the compiler will optimize consecutive set with "memset". This suggests that we cannot write a freestanding program without

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread Zheng Luo (Vic) via Digitalmars-d
Minimal example in D: https://run.dlang.io/is/EYVTzb. Affects at least dmd and ldc.

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Jim Balter via Digitalmars-d
On Monday, 23 July 2018 at 22:45:15 UTC, Walter Bright wrote: On 7/23/2018 5:39 AM, Joakim wrote: In my experience, people never learn, even from the blatantly obvious, _particularly_ when they're invested in the outdated. What inevitably happens is the new tech gets good enough to put them

Re: Kaspersky Endpoint Security 10 flags the DMD installer as malicious!

2018-07-25 Thread Mike Franklin via Digitalmars-d
On Wednesday, 25 July 2018 at 08:27:25 UTC, Rel wrote: To be exact as a "HEUR:Trojan-Downloader.Win32.Agent.gen". Few other AV software does the same: https://www.virustotal.com/#/file/0aa364c5cb90630a5757aacc0c3c05a2273f5fdb88e14e2b80d4c19ee5b16d10/detection I think, we should do something

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread ShadoLight via Digitalmars-d
On Saturday, 21 July 2018 at 08:59:39 UTC, Manu wrote: On Sat, 21 Jul 2018 at 00:15, Johannes Loher via Digitalmars-d wrote: On Saturday, 21 July 2018 at 05:59:37 UTC, Manu wrote: > [...] Let me give a concrete example of one of the situations Jonathan is describing. Consider the following

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread rikki cattermole via Digitalmars-d
On 25/07/2018 8:59 PM, Zheng (Vic) Luo wrote: Minimal example in D: https://run.dlang.io/is/EYVTzb. Affects at least dmd and ldc. https://run.dlang.io/is/8tPOVX Note that switch void* to ubyte* won't matter once its extern(C)'d. My version (_memcpy_impl2) is just the regular old memcpy

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread Zheng Luo (Vic) via Digitalmars-d
On Wednesday, 25 July 2018 at 09:16:19 UTC, rikki cattermole wrote: On 25/07/2018 8:59 PM, Zheng (Vic) Luo wrote: Minimal example in D: https://run.dlang.io/is/EYVTzb. Affects at least dmd and ldc. https://run.dlang.io/is/8tPOVX Note that switch void* to ubyte* won't matter once its

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread Zheng Luo (Vic) via Digitalmars-d
On Wednesday, 25 July 2018 at 09:16:19 UTC, rikki cattermole wrote: On 25/07/2018 8:59 PM, Zheng (Vic) Luo wrote: Minimal example in D: https://run.dlang.io/is/EYVTzb. Affects at least dmd and ldc. https://run.dlang.io/is/8tPOVX Note that switch void* to ubyte* won't matter once its

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread rikki cattermole via Digitalmars-d
On 25/07/2018 9:23 PM, Zheng (Vic) Luo wrote: On Wednesday, 25 July 2018 at 09:16:19 UTC, rikki cattermole wrote: On 25/07/2018 8:59 PM, Zheng (Vic) Luo wrote: Minimal example in D: https://run.dlang.io/is/EYVTzb. Affects at least dmd and ldc. https://run.dlang.io/is/8tPOVX Note that

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread rikki cattermole via Digitalmars-d
On 25/07/2018 9:32 PM, Zheng (Vic) Luo wrote: On Wednesday, 25 July 2018 at 09:16:19 UTC, rikki cattermole wrote: On 25/07/2018 8:59 PM, Zheng (Vic) Luo wrote: Minimal example in D: https://run.dlang.io/is/EYVTzb. Affects at least dmd and ldc. https://run.dlang.io/is/8tPOVX Note that

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread Mike Franklin via Digitalmars-d
On Wednesday, 25 July 2018 at 08:57:41 UTC, Zheng (Vic) Luo wrote: gcc and clang provides an option "-ffreestanding" to bypass optimizations that need libc support. Although we can hack around this issue by making our implementation complicated enough/using assembly to bypass the optimizer,

Re: Kaspersky Endpoint Security 10 flags the DMD installer as malicious!

2018-07-25 Thread Radu via Digitalmars-d
On Wednesday, 25 July 2018 at 08:31:05 UTC, rikki cattermole wrote: On 25/07/2018 8:27 PM, Rel wrote: To be exact as a "HEUR:Trojan-Downloader.Win32.Agent.gen". Few other AV software does the same:

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread Zheng Luo (Vic) via Digitalmars-d
On Wednesday, 25 July 2018 at 09:37:56 UTC, rikki cattermole wrote: You misunderstand. It isn't optimizing anything. You requested the call to memcpy, explicitly when you said 'I want this copied ASAP'. By the looks, the spec doesn't clearly explain this properly. Well, it seems that this

Re: Can't implement conformant memset/memcpy without compiler -ffreestanding support

2018-07-25 Thread rikki cattermole via Digitalmars-d
On 25/07/2018 9:48 PM, Zheng (Vic) Luo wrote: First, IIRC, the name hacking is a technique used to bypass llvm optimizers, I'm not sure if it also applies to gdc. Moreover, I think this *is* a hack around compiler because this forces memset implementer to write all code in that function. I

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Jim Balter via Digitalmars-d
On Saturday, 21 July 2018 at 01:17:40 UTC, Jonathan M Davis wrote: On Friday, July 20, 2018 18:04:26 Manu via Digitalmars-d wrote: On Fri, 20 Jul 2018 at 18:02, Manu wrote: > [...] > > I think you're describing now a bug where a function returns > an lvalue, but it was meant to return an

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Jim Balter via Digitalmars-d
On Wednesday, 25 July 2018 at 08:34:30 UTC, Manu wrote: [snip] It upsets me when people present strong opinions about this who literally have no horse in the race. This is only really meaningful, and only affects you if it actually affects you... It's clearly not important to you, or you

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Paolo Invernizzi via Digitalmars-d
On Wednesday, 25 July 2018 at 08:34:30 UTC, Manu wrote: With UFCS as a super popular feature of D, 'this' is not really much of a special guest at all. It's just as much the first argument of a function as the first argument of *any* UFCS call. Guido van Rossum has raised an objection on

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread rikki cattermole via Digitalmars-d
On 26/07/2018 12:40 AM, Paolo Invernizzi wrote: Just to be clear, I'm also against all the new proposed addition for, named parameter, new struct initialisation and so on You'll go giddy once you hear about what I have planned after named parameters ;) But seriously tho, just because a

An Optional!T and the implementation of the underlying type's opUnary

2018-07-25 Thread aliak via Digitalmars-d
Hi, I'm working on an Optional!T type that is a mixture of Scala's Option[T] (i.e. range based) and Swift's and Kotlin's T? (i.e. safe dispatching). I'm interested in hearing about mutability concerns. So I want operations on the optional to dispatch to the underlying type T if it's present.

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread 12345swordy via Digitalmars-d
On Wednesday, 25 July 2018 at 12:40:16 UTC, Paolo Invernizzi wrote: That proposal is a 'Syntactic Sugar' feature, that simply hide what normally need to be explicitly coded: proved a temp rvalue, pass it to a callable taking ref. What you call 'simplification', I call it 'obfuscation'; what

Re: Kaspersky Endpoint Security 10 flags the DMD installer as malicious!

2018-07-25 Thread FeepingCreature via Digitalmars-d
On Wednesday, 25 July 2018 at 09:13:27 UTC, Mike Franklin wrote: On Wednesday, 25 July 2018 at 08:27:25 UTC, Rel wrote: To be exact as a "HEUR:Trojan-Downloader.Win32.Agent.gen". Few other AV software does the same:

Re: Kaspersky Endpoint Security 10 flags the DMD installer as malicious!

2018-07-25 Thread Uknown via Digitalmars-d
On Wednesday, 25 July 2018 at 14:30:57 UTC, FeepingCreature wrote: On Wednesday, 25 July 2018 at 09:13:27 UTC, Mike Franklin wrote: On Wednesday, 25 July 2018 at 08:27:25 UTC, Rel wrote: Possibly because anything that says "pay money or we'll flag your binary and scare our users about it!"

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Ecstatic Coder via Digitalmars-d
On Wednesday, 25 July 2018 at 08:23:40 UTC, Paulo Pinto wrote: On Tuesday, 24 July 2018 at 09:54:37 UTC, Ecstatic Coder wrote: On Tuesday, 24 July 2018 at 00:41:54 UTC, RhyS wrote: [...] +1 IMO, D in its current state, and with its current ecosystem, even after more than a decade of

Way to override/overload D’s runtime assertions to use custom handlers?

2018-07-25 Thread Alexander Nicholi via Digitalmars-d
Hello, A project I’m helping develop mixes D code along with C and C++, and in the latter two languages we have custom macros that print things the way we need to, along with app-specific cleanup tasks before halting the program. Because it uses multiple languages, two of which have spotty

Re: Way to override/overload D’s runtime assertions to use custom handlers?

2018-07-25 Thread Jonathan Marler via Digitalmars-d
On Wednesday, 25 July 2018 at 15:24:50 UTC, Alexander Nicholi wrote: Hello, A project I’m helping develop mixes D code along with C and C++, and in the latter two languages we have custom macros that print things the way we need to, along with app-specific cleanup tasks before halting the

Re: Way to override/overload D’s runtime assertions to use custom handlers?

2018-07-25 Thread Mike Franklin via Digitalmars-d
On Wednesday, 25 July 2018 at 15:24:50 UTC, Alexander Nicholi wrote: Is there a way to change this to use our own handlers with the D runtime? You can provide your own implementations of the runtime hooks at

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread bpr via Digitalmars-d
On Tuesday, 24 July 2018 at 17:24:41 UTC, Seb wrote: On Tuesday, 24 July 2018 at 17:14:53 UTC, Chris M. wrote: On Tuesday, 24 July 2018 at 16:15:52 UTC, bpr wrote: On Tuesday, 24 July 2018 at 14:07:43 UTC, Ecstatic Coder wrote: [...] No. For many C++ users, tracing GC is absolutely not an

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Paolo Invernizzi via Digitalmars-d
On Wednesday, 25 July 2018 at 13:36:38 UTC, 12345swordy wrote: On Wednesday, 25 July 2018 at 12:40:16 UTC, Paolo Invernizzi wrote: That proposal is a 'Syntactic Sugar' feature, that simply hide what normally need to be explicitly coded: proved a temp rvalue, pass it to a callable taking ref.

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Ecstatic Coder via Digitalmars-d
On Wednesday, 25 July 2018 at 16:39:51 UTC, bpr wrote: On Tuesday, 24 July 2018 at 17:24:41 UTC, Seb wrote: On Tuesday, 24 July 2018 at 17:14:53 UTC, Chris M. wrote: On Tuesday, 24 July 2018 at 16:15:52 UTC, bpr wrote: On Tuesday, 24 July 2018 at 14:07:43 UTC, Ecstatic Coder wrote: [...]

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Atila Neves via Digitalmars-d
On Saturday, 21 July 2018 at 08:59:39 UTC, Manu wrote: On Sat, 21 Jul 2018 at 00:15, Johannes Loher via Digitalmars-d wrote: On Saturday, 21 July 2018 at 05:59:37 UTC, Manu wrote: > [...] Let me give a concrete example of one of the situations Jonathan is describing. Consider the following

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread 12345swordy via Digitalmars-d
On Wednesday, 25 July 2018 at 16:43:38 UTC, Paolo Invernizzi wrote: That's an opinion, naturally. No I am expressing an argument not an opinion. "let's force the programmer to think about what he is doing, passing an rvalue by ref" Nonsense, you have shown no evidence that they don't know

Re: An Optional!T and the implementation of the underlying type's opUnary

2018-07-25 Thread Atila Neves via Digitalmars-d
On Wednesday, 25 July 2018 at 12:51:08 UTC, aliak wrote: Hi, I'm working on an Optional!T type that is a mixture of Scala's Option[T] (i.e. range based) and Swift's and Kotlin's T? (i.e. safe dispatching). I'm interested in hearing about mutability concerns. So I want operations on the

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Manu via Digitalmars-d
On Wed, 25 Jul 2018 at 04:50, Jim Balter via Digitalmars-d wrote: > > On Wednesday, 25 July 2018 at 08:34:30 UTC, Manu wrote: > [snip] > > > Meanwhile I think we have determined that the presumed > > practical trouble > > cases are even less that I suspected up front. > > That's surprising; I

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Manu via Digitalmars-d
On Wed, 25 Jul 2018 at 10:45, Atila Neves via Digitalmars-d wrote: > > > ...all that said, we understand that there is value in > > inhibiting calls with rvalues in some cases. We address this in > > a very nice way with @disable, which is also nicely symmetrical > > such that the limitation may

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Manu via Digitalmars-d
On Wed, 25 Jul 2018 at 10:45, Atila Neves via Digitalmars-d wrote: > > On Saturday, 21 July 2018 at 08:59:39 UTC, Manu wrote: > > [...] > > 3. Scenario depends on introduction of a getter, but any getter > > property that returns a member by-val is almost certainly a > > primitive > > type. A

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread Paolo Invernizzi via Digitalmars-d
On Wednesday, 25 July 2018 at 17:52:00 UTC, 12345swordy wrote: On Wednesday, 25 July 2018 at 16:43:38 UTC, Paolo Invernizzi wrote: That's an opinion, naturally. No I am expressing an argument not an opinion. I don't know what vocabulary you are used to consult, but your 'pointless' it's

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread bpr via Digitalmars-d
On Wednesday, 25 July 2018 at 17:23:40 UTC, Ecstatic Coder wrote: But don't be too optimistic about BetterC... I'm too old to get optimistic about these things. In the very best case, D has quite an uphill battle for market share. Any non mainstream language does. If I were a betting man,

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-25 Thread 12345swordy via Digitalmars-d
On Wednesday, 25 July 2018 at 19:55:50 UTC, Paolo Invernizzi wrote: I don't know what vocabulary you are used to consult, ad hominem attacks is not an argument Actually, by definition, every bug is made by a programmer that THINK to know what he is doing... no? Avoiding burden of proof by

Re: C's Biggest Mistake on Hacker News

2018-07-25 Thread Walter Bright via Digitalmars-d
On 7/24/2018 4:53 AM, Ecstatic Coder wrote:     str = str1 + " " + str2; But you have to be careful how it is written: str = "hello" + "world"; str = "hello" + "world" + str1; don't work, etc.