[Issue 18220] Allow rt_trapexceptions to be set from the CLI

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18220 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18220] Allow rt_trapexceptions to be set from the CLI

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18220 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/6ca77797f1c5c8bede331cff3a4648288386ce02 Fix Issue 18220 - Allow `rt_trapexceptions` to be

[Issue 19090] New: core.internal.hash.bytesHash unit test uses incorrect test vector on BigEndian machines

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19090 Issue ID: 19090 Summary: core.internal.hash.bytesHash unit test uses incorrect test vector on BigEndian machines Product: D Version: D2 Hardware: Other OS: All

New to GDC on ARM 32-bit Ubuntu

2018-07-16 Thread Cecil Ward via Digitalmars-d-learn
I am getting an error when I try and compile anything with the GDC compiler which is coming up associated with source code within a D include file which is not one of mine I am using a Raspberry Pi with Ubuntu 16.04 and have just done an "apt-get install gdc". Using ldc works fine. The

Re: Is there any tool that will auto publish my changes.

2018-07-16 Thread Venkat via Digitalmars-d-learn
Thankyou Ali. Timoses. I did try DiamondMVC for a bit, but I found that there is more help out there for Vibe.d. So I reverted back to using that. And the Dependency Injection in Diamond MVC brings all the obscurity that spring has which makes debugging more of a guessing game than a

Re: Copy Constructor DIP

2018-07-16 Thread Manu via Digitalmars-d
On Mon., 16 Jul. 2018, 6:00 pm docandrew via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: > On Saturday, 14 July 2018 at 10:53:17 UTC, Andrei Alexandrescu > wrote: > > On 7/14/18 5:03 AM, Luís Marques wrote: > >> If there is "no other meaning of @implicit" (other than the > >>

Re: Copy Constructor DIP

2018-07-16 Thread docandrew via Digitalmars-d
On Saturday, 14 July 2018 at 10:53:17 UTC, Andrei Alexandrescu wrote: On 7/14/18 5:03 AM, Luís Marques wrote: If there is "no other meaning of @implicit" (other than the intersection of those two properties) why don't you just call it something like @copyctor? I'm totally cool with giving

Re: Copy Constructor DIP

2018-07-16 Thread Andrei Alexandrescu via Digitalmars-d
On 7/16/18 3:12 PM, ag0aep6g wrote: On 07/16/2018 09:06 PM, Andrei Alexandrescu wrote: On 7/14/18 11:26 AM, Jacob Carlborg wrote: [...] That's easily fixed by implementing a compiler recognized UDA. That would mean that it would only be a copy constructor if "implicit" is defined in

Re: crash when using in struct constructor

2018-07-16 Thread Ali Çehreli via Digitalmars-d-learn
On 07/16/2018 03:08 PM, Eric wrote: This makes the compiler crash. Always a compiler bug: https://issues.dlang.org/show_bug.cgi?id=19089 Ali

[Issue 19089] New: Compiler crash for using struct

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19089 Issue ID: 19089 Summary: Compiler crash for using struct Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1

Re: crash when using in struct constructor

2018-07-16 Thread Eric via Digitalmars-d-learn
On Monday, 16 July 2018 at 22:16:10 UTC, Adam D. Ruppe wrote: On Monday, 16 July 2018 at 22:08:34 UTC, Eric wrote: This makes the compiler crash. Is it illegal code? Yes, a struct can be moved at any time by the compiler which means pointers to it can be invalidated at random. Unless you

Re: crash when using in struct constructor

2018-07-16 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 16, 2018 at 10:08:34PM +, Eric via Digitalmars-d-learn wrote: > This makes the compiler crash. Is it illegal code? > > struct List { > private List* head; > private List* tail; > > this(int x) { > head = null; > tail = // <-- crasher > } > } > > List2 ls = 2;

Re: crash when using in struct constructor

2018-07-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 16 July 2018 at 22:08:34 UTC, Eric wrote: This makes the compiler crash. Is it illegal code? Yes, a struct can be moved at any time by the compiler which means pointers to it can be invalidated at random. Unless you always allocate it externally yourself...

Re: crash when using in struct constructor

2018-07-16 Thread Eric via Digitalmars-d-learn
Pasted slightly wrong code, last line should be: List ls = 2; Question still stands.

crash when using in struct constructor

2018-07-16 Thread Eric via Digitalmars-d-learn
This makes the compiler crash. Is it illegal code? struct List { private List* head; private List* tail; this(int x) { head = null; tail = // <-- crasher } } List2 ls = 2;

Re: Completely Remove C Runtime with DMD for win32

2018-07-16 Thread Jonathan Marler via Digitalmars-d
On Sunday, 15 July 2018 at 20:29:29 UTC, tcb wrote: I've been trying to compile a trivial program (extern C int main() {return 0;}) without linking parts of the C runtime with no success. I compile with dmd -debuglib= -defaultlib= -v -L=/INFORMATION -betterC but optlink shows a lot of things

Re: Copy Constructor DIP

2018-07-16 Thread ag0aep6g via Digitalmars-d
On 07/16/2018 09:06 PM, Andrei Alexandrescu wrote: On 7/14/18 11:26 AM, Jacob Carlborg wrote: [...] That's easily fixed by implementing a compiler recognized UDA. That would mean that it would only be a copy constructor if "implicit" is defined in core.attribute. This would also avoid any

Re: Copy Constructor DIP

2018-07-16 Thread Andrei Alexandrescu via Digitalmars-d
On 7/14/18 11:26 AM, Jacob Carlborg wrote: On Friday, 13 July 2018 at 01:18:48 UTC, Andrei Alexandrescu wrote: On 7/12/18 2:30 PM, ag0aep6g wrote: You're still potentially changing the semantics of existing code. `@implicit` can be a UDA today: enum implicit = 0; struct C {

Re: What determines if an algorithm goes in std.algorithm or std.range

2018-07-16 Thread Andrei Alexandrescu via Digitalmars-d
On 7/14/18 5:32 PM, aliak wrote: Alo, I'm wondering how phobos devs view or determine what goes in to std.algorithm and what goes in to std.range. To me some of them are quite obvious - well, most things can arguably be an algorithm. But for example "refRange" is clearly a range specific

Re: CJK problem when using console outputs

2018-07-16 Thread ag0aep6g via Digitalmars-d-learn
On 07/16/2018 11:30 AM, zhani wrote: i got some problem about using CJK in windows10 console. here my code(a code file encoded the utf-8): -- import std.stdio; /* static this(){ core.stdc.wchar_.fwide(core.stdc.stdio.stdout, 1);

Re: @safe - why does this compile?

2018-07-16 Thread ketmar via Digitalmars-d-learn
Johan Engelen wrote: On Friday, 13 July 2018 at 14:51:17 UTC, ketmar wrote: yeah. in simple words: safe code is *predictable*, but not "segfault-less". segfaults (null dereferences) in safe code are allowed, 'cause they have completely predictable behavior (instant program termination).

Re: @safe - why does this compile?

2018-07-16 Thread ketmar via Digitalmars-d-learn
Johan Engelen wrote: On Friday, 13 July 2018 at 14:51:17 UTC, ketmar wrote: yeah. in simple words: safe code is *predictable*, but not "segfault-less". segfaults (null dereferences) in safe code are allowed, 'cause they have completely predictable behavior (instant program termination).

Re: @safe - why does this compile?

2018-07-16 Thread Johan Engelen via Digitalmars-d-learn
On Friday, 13 July 2018 at 14:51:17 UTC, ketmar wrote: yeah. in simple words: safe code is *predictable*, but not "segfault-less". segfaults (null dereferences) in safe code are allowed, 'cause they have completely predictable behavior (instant program termination). @safe doesn't free you

Re: Anyone can contact Dmitry Olshansky?

2018-07-16 Thread Mr.Bingo via Digitalmars-d
On Tuesday, 3 July 2018 at 07:31:46 UTC, Nick Sabalausky (Abscissa) wrote: On 07/01/2018 05:34 AM, ag0aep6g wrote: On 07/01/2018 08:00 AM, Ali Çehreli wrote: Apparent from uncharacteristic messages from Dmitry's account to multiple destinations recently, I suspect his gmail account has been

Re: Anyone can contact Dmitry Olshansky?

2018-07-16 Thread Suliman via Digitalmars-d
On Monday, 16 July 2018 at 15:07:20 UTC, rikki cattermole wrote: On 17/07/2018 2:45 AM, Ali wrote: Do we have any updates on Dmitry was anyone able to check on him I hope he is doing better Nope, appears he's gone. I think something happened. He do not getting online since 01.07.2018.

Re: Anyone can contact Dmitry Olshansky?

2018-07-16 Thread rikki cattermole via Digitalmars-d
On 17/07/2018 2:45 AM, Ali wrote: Do we have any updates on Dmitry was anyone able to check on him I hope he is doing better Nope, appears he's gone.

Re: Anyone can contact Dmitry Olshansky?

2018-07-16 Thread Ali via Digitalmars-d
Do we have any updates on Dmitry was anyone able to check on him I hope he is doing better

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-16 Thread bachmeier via Digitalmars-d-learn
On Friday, 13 July 2018 at 19:53:45 UTC, Laeeth Isharc wrote: On Wednesday, 20 June 2018 at 18:47:10 UTC, Jordi Gutiérrez Hermoso wrote: What are your ideas? If you would like to expose C function and type declarations to D, you could take a look at DPP, which allows you to just #include

Re: Safe Memory Management and Ownership.

2018-07-16 Thread Chris M. via Digitalmars-d
On Friday, 13 July 2018 at 20:03:37 UTC, jmh530 wrote: On Friday, 13 July 2018 at 17:12:26 UTC, Atila Neves wrote: [...] Hmm, thinking on this a little more...it does seem difficult...but I don't think the problem is with immutable borrows. I think the issue is with the exclusivity of

[Issue 18620] `error cannot be interpreted at compile time` is missing context where error occurs

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18620 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Implicit conversion of struct with methods to immutable in pure function fails

2018-07-16 Thread Seb via Digitalmars-d-learn
On Monday, 16 July 2018 at 13:13:53 UTC, Timoses wrote: On Monday, 16 July 2018 at 12:00:57 UTC, Simen Kjærås wrote: On Monday, 16 July 2018 at 11:43:03 UTC, Timoses wrote: Why does this fail? It doesn't. Not using DMD 2.081.1 under Windows, at least. I tried adding a bitfield since you

[Issue 18620] `error cannot be interpreted at compile time` is missing context where error occurs

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18620 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/304850d8810f937360a0c1391cb278248cb28f4f Fix Issue 18620 - error cannot be interpreted at compile time

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-16 Thread Seb via Digitalmars-d-learn
On Monday, 16 July 2018 at 13:15:56 UTC, Timoses wrote: On Monday, 16 July 2018 at 11:31:32 UTC, Seb wrote: On Monday, 16 July 2018 at 11:12:20 UTC, Dukc wrote: On Saturday, 14 July 2018 at 03:08:50 UTC, Vladimir Panteleev wrote: I'll follow up with Alawain. Regardless, dscripten-tools

Re: std.experimental.allocator and const etc.

2018-07-16 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 15 July 2018 at 13:06:16 UTC, John Colvin wrote: Currently the API's don't support const(void)[], e.g. import std.experimental.allocator : makeArray, theAllocator, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() { const a =

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-16 Thread Timoses via Digitalmars-d-learn
On Monday, 16 July 2018 at 11:31:32 UTC, Seb wrote: On Monday, 16 July 2018 at 11:12:20 UTC, Dukc wrote: On Saturday, 14 July 2018 at 03:08:50 UTC, Vladimir Panteleev wrote: I'll follow up with Alawain. Regardless, dscripten-tools borrows very little from the redistributable parts of

Re: Implicit conversion of struct with methods to immutable in pure function fails

2018-07-16 Thread Timoses via Digitalmars-d-learn
On Monday, 16 July 2018 at 12:00:57 UTC, Simen Kjærås wrote: On Monday, 16 July 2018 at 11:43:03 UTC, Timoses wrote: Why does this fail? It doesn't. Not using DMD 2.081.1 under Windows, at least. I tried adding a bitfield since you mentioned it, but it compiles nicely for me. Which version

Re: Implicit conversion of struct with methods to immutable in pure function fails

2018-07-16 Thread Simen Kjærås via Digitalmars-d-learn
On Monday, 16 July 2018 at 11:43:03 UTC, Timoses wrote: Why does this fail? It doesn't. Not using DMD 2.081.1 under Windows, at least. I tried adding a bitfield since you mentioned it, but it compiles nicely for me. Which version of DMD are you using, and are you having the issues with the

Implicit conversion of struct with methods to immutable in pure function fails

2018-07-16 Thread Timoses via Digitalmars-d-learn
Why does this fail? struct F { int i; ushort _x; void x(ushort v) pure {_x = v;} ushort x() const { return _x; } } immutable F f1 = () pure { F lf = F(); return lf; }(); // Error: cannot implicitly convert expression

[Issue 19082] Cannot inline "...Slides.numberOfFullFrames", "...Slides.gap"

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19082 Seb changed: What|Removed |Added CC||greeen...@gmail.com --- Comment #4 from Seb --- I'm

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-16 Thread Seb via Digitalmars-d-learn
On Monday, 16 July 2018 at 11:12:20 UTC, Dukc wrote: On Saturday, 14 July 2018 at 03:08:50 UTC, Vladimir Panteleev wrote: I'll follow up with Alawain. Regardless, dscripten-tools borrows very little from the redistributable parts of dscripten - mostly the "minimalistic runtime", which I think

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-16 Thread Dukc via Digitalmars-d-learn
On Saturday, 14 July 2018 at 03:08:50 UTC, Vladimir Panteleev wrote: I'll follow up with Alawain. Regardless, dscripten-tools borrows very little from the redistributable parts of dscripten - mostly the "minimalistic runtime", which I think was itself borrowed from somewhere else. Indeed, it

Re: CJK problem when using console outputs

2018-07-16 Thread zhani via Digitalmars-d-learn
On Monday, 16 July 2018 at 09:30:22 UTC, zhani wrote: howdy :-) i got some problem about using CJK in windows10 console. [...] oh, sorry for my mistake. here: -- writeln("你好"); // C writeln("こんにちは"); // J

Re: Is there any tool that will auto publish my changes.

2018-07-16 Thread aliak00 via Digitalmars-d-learn
On Monday, 16 July 2018 at 08:28:06 UTC, Timoses wrote: On Sunday, 15 July 2018 at 00:25:22 UTC, Venkat wrote: [...] I don't believe there currently exists a tool to rebuild the Diet templates on the fly. The Diet templates require a step during compilation (I think), so that the entire

CJK problem when using console outputs

2018-07-16 Thread zhani via Digitalmars-d-learn
howdy :-) i got some problem about using CJK in windows10 console. here my code(a code file encoded the utf-8): -- import std.stdio; /* static this(){ core.stdc.wchar_.fwide(core.stdc.stdio.stdout, 1); setlocale(0,

[Issue 19088] I am working with the package tinyredis 2.1.1 and I can't compile, dmd exit with exit code 1 because EWOULDBLOCK is not defined

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

Re: UFCS confusion

2018-07-16 Thread vit via Digitalmars-d-learn
On Friday, 13 July 2018 at 11:37:09 UTC, Michael wrote: On Friday, 13 July 2018 at 11:17:32 UTC, Radu wrote: On Friday, 13 July 2018 at 11:12:47 UTC, Michael wrote: On Friday, 13 July 2018 at 10:52:54 UTC, Radu wrote: On Friday, 13 July 2018 at 10:21:54 UTC, Michael wrote: [...] Do you try

Re: I have a plan.. I really DO

2018-07-16 Thread Ecstatic Coder via Digitalmars-d-announce
On Monday, 16 July 2018 at 07:49:33 UTC, Kagamin wrote: On Friday, 13 July 2018 at 19:30:07 UTC, RhyS wrote: If there is a language out there that gaps that C/Java/dynamic fast and easy feel, and offers the ability to compile down with ease. I have not seen it. There's no silver bullet, you

Re: REPL semantics

2018-07-16 Thread aliak00 via Digitalmars-d
On Thursday, 12 July 2018 at 22:17:29 UTC, Luís Marques wrote: On Thursday, 12 July 2018 at 21:51:18 UTC, aliak wrote: Cool, is there on going work to sprucing up the D repl in the dlang-community repo or is this a new attempt? Either way if something is happening here then awesome! Ah, that

[Issue 19088] New: I am working with the package tinyredis 2.1.1 and I can't compile, dmd exit with exit code 1 because EWOULDBLOCK is not defined

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19088 Issue ID: 19088 Summary: I am working with the package tinyredis 2.1.1 and I can't compile, dmd exit with exit code 1 because EWOULDBLOCK is not defined Product: D

Re: Is there any tool that will auto publish my changes.

2018-07-16 Thread Timoses via Digitalmars-d-learn
On Sunday, 15 July 2018 at 00:25:22 UTC, Venkat wrote: I am writing a simple vibe.d app. The following is what I do right now. - I make changes. - build - Restart the server. Is there any tool that will auto publish my changes as I save them ? I am using Visual Studio Code. Thanks Venkat

[Issue 19082] Cannot inline "...Slides.numberOfFullFrames", "...Slides.gap"

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19082 --- Comment #3 from Mitu --- OK, I managed to find a minimal example. The code below builds properly for debug build, but fails with the release build. == /+ dub.sdl: name "main" +/ import std.algorithm; import

[Issue 19082] Cannot inline "...Slides.numberOfFullFrames", "...Slides.gap"

2018-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19082 --- Comment #2 from Mitu --- OK, I managed to find a minimal example. The code below builds properly for debug build, but fails with the release build. = /+ dub.sdl: name "main" +/ import std.algorithm; import

Re: I have a plan.. I really DO

2018-07-16 Thread Kagamin via Digitalmars-d-announce
On Friday, 13 July 2018 at 19:30:07 UTC, RhyS wrote: If there is a language out there that gaps that C/Java/dynamic fast and easy feel, and offers the ability to compile down with ease. I have not seen it. There's no silver bullet, you can choose from what exists or create your own. Recently

Re: Is there any tool that will auto publish my changes.

2018-07-16 Thread evilrat via Digitalmars-d-learn
On Sunday, 15 July 2018 at 00:25:22 UTC, Venkat wrote: I am writing a simple vibe.d app. The following is what I do right now. - I make changes. - build - Restart the server. Is there any tool that will auto publish my changes as I save them ? I am using Visual Studio Code. Thanks Venkat