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

2018-07-13 Thread Vladimir Panteleev via Digitalmars-d-learn
On Friday, 13 July 2018 at 07:51:51 UTC, Dukc wrote: I know about Vladimir's d-scripten tools library which would help, but it's based on Alawains library copyleft library, which makes also Vladimir's work copyleft, so I won't use it. Hmm, I wasn't aware of this. I wonder if the decision to

Anyone here heard about leon valley?

2018-07-13 Thread Mr.Bingo via Digitalmars-d
Or just don't care?

Re: Weird bugs in DMD 2.81.0

2018-07-13 Thread solidstate1991 via Digitalmars-d
On Saturday, 14 July 2018 at 00:58:08 UTC, solidstate1991 wrote: I found a temporary workaround. Basically I just save the content of the AA, then reapply it after the application's constructor finished, before that it always generated an exception when I tried to check its content e.g. via

Re: Copy Constructor DIP

2018-07-13 Thread Manu via Digitalmars-d
On Fri, 13 Jul 2018 at 18:00, Andrei Alexandrescu via Digitalmars-d wrote: > > On 7/13/18 5:49 PM, rikki cattermole wrote: > > On 14/07/2018 9:28 AM, Manu wrote: > >> I've already contributed other points to this DIP in the way you > >> describe. > >> This one however is very strange, and I'm

Re: Copy Constructor DIP

2018-07-13 Thread Manu via Digitalmars-d
On Fri, 13 Jul 2018 at 17:45, Andrei Alexandrescu via Digitalmars-d wrote: > > On 7/13/18 5:28 PM, Manu wrote: > > As I originally said, my feedback is concrete: specify @implicit, this > > DIP depends on it. > > The specification of @implicit is in the DIP in full: a constructor that > takes by

Re: Weird bugs in DMD 2.81.0

2018-07-13 Thread solidstate1991 via Digitalmars-d
On Saturday, 7 July 2018 at 02:21:31 UTC, solidstate1991 wrote: I'll upload code tomorrow, but here's the premise: Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations. My engine (PixelPerfectEngine) has a style sheet for

Re: Copy Constructor DIP

2018-07-13 Thread Andrei Alexandrescu via Digitalmars-d
On 7/13/18 5:49 PM, rikki cattermole wrote: On 14/07/2018 9:28 AM, Manu wrote: I've already contributed other points to this DIP in the way you describe. This one however is very strange, and I'm surprised you can find the hand-wavy introduction of a new attribute without any sense of where

Re: Copy Constructor DIP

2018-07-13 Thread Andrei Alexandrescu via Digitalmars-d
On 7/13/18 5:28 PM, Manu wrote: As I originally said, my feedback is concrete: specify @implicit, this DIP depends on it. The specification of @implicit is in the DIP in full: a constructor that takes by reference a qualified typeof(this) and has the @implicit attribute will be callable

[Issue 19086] New: Bad stack trace for exceptions

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19086 Issue ID: 19086 Summary: Bad stack trace for exceptions Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1

Re: DIP 1014--Hooking D's struct move semantics--Final Review

2018-07-13 Thread Dukc via Digitalmars-d
On Thursday, 12 July 2018 at 10:38:52 UTC, Shachar Shemesh wrote: On 12/07/18 04:17, Jonathan M Davis wrote:> I'm also> not sure if going to copy constructors means that we should do something> different with this. It don't think that it's affected by it, but I could be> missing something. I

Re: dpp now compiles julia.h headers

2018-07-13 Thread Meta via Digitalmars-d-announce
On Friday, 13 July 2018 at 19:02:56 UTC, Laeeth Isharc wrote: Atila Neves' d++ now compiles julia.h. Modulo bugs this makes it possible to embed Julia in D (and probably the other way around, but I have not tried). https://github.com/kaleidicassociates/juliad Very cool. It's awesome to be

Re: @safe - why does this compile?

2018-07-13 Thread Dukc via Digitalmars-d-learn
On Friday, 13 July 2018 at 13:52:27 UTC, Timoses wrote: I suppose this is another good example of how casting can be dangerous? E.g. also: immutable int i = 3; int* j = cast(int*) assert(i == 3); *j = 4; assert(j == ); // data occupies same address space assert(i

Re: Copy Constructor DIP

2018-07-13 Thread Meta via Digitalmars-d
On Friday, 13 July 2018 at 21:49:57 UTC, rikki cattermole wrote: On 14/07/2018 9:28 AM, Manu wrote: I've already contributed other points to this DIP in the way you describe. This one however is very strange, and I'm surprised you can find the hand-wavy introduction of a new attribute without

Re: Copy Constructor DIP

2018-07-13 Thread rikki cattermole via Digitalmars-d
On 14/07/2018 9:28 AM, Manu wrote: I've already contributed other points to this DIP in the way you describe. This one however is very strange, and I'm surprised you can find the hand-wavy introduction of a new attribute without any sense of where it's going to be okay. Or maybe, I'm surprised

[Issue 19085] New: std.experimental.allocator.makeArray should work with void

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19085 Issue ID: 19085 Summary: std.experimental.allocator.makeArray should work with void Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Orange not working?

2018-07-13 Thread JN via Digitalmars-d-learn
On Friday, 13 July 2018 at 19:03:32 UTC, Jacob Carlborg wrote: On 2018-07-13 20:52, Jacob Carlborg wrote: Orange master is working properly. The tests are run on each push and PR with the latest DMD compiler. I just added a cron job in Travis CI as well to make sure it every month even

Re: Copy Constructor DIP

2018-07-13 Thread Manu via Digitalmars-d
On Fri, 13 Jul 2018 at 07:35, Andrei Alexandrescu via Digitalmars-d wrote: > > On 7/12/18 11:45 PM, Manu wrote: > > > > I can see myself getting behind 2 possibilities, no @implicit, or > > @implicit done right. > > A couple of simple ideas are making the process productive. One is to > rely on

Re: Copy Constructor DIP

2018-07-13 Thread Luís Marques via Digitalmars-d
On Friday, 13 July 2018 at 18:54:48 UTC, Manu wrote: As a marker used in this one case, it's a terrible name, as a generalised concept, it's perfect. Exactly.

Re: I have a plan.. I really DO

2018-07-13 Thread Ecstatic Coder via Digitalmars-d-announce
On Friday, 13 July 2018 at 19:30:07 UTC, RhyS wrote: On Friday, 13 July 2018 at 13:15:07 UTC, Ecstatic Coder wrote: At the moment, developing in Rust can be quite painful because of too much focus on its borrow checker, as the reference counting system is just a side feature, which is not

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-13 Thread Patrick Schluter via Digitalmars-d
On Friday, 13 July 2018 at 20:12:36 UTC, Steven Schveighoffer wrote: On 7/13/18 3:53 PM, Paolo Invernizzi wrote: On Friday, 13 July 2018 at 13:15:39 UTC, Steven Schveighoffer wrote: On 7/13/18 8:55 AM, Adam D. Ruppe wrote: [...] But it doesn't scale if you use OS processes, it's too

Re: dpp now compiles julia.h headers

2018-07-13 Thread Laeeth Isharc via Digitalmars-d-announce
On Friday, 13 July 2018 at 19:42:56 UTC, bachmeier wrote: On Friday, 13 July 2018 at 19:02:56 UTC, Laeeth Isharc wrote: Atila Neves' d++ now compiles julia.h. Modulo bugs this makes it possible to embed Julia in D (and probably the other way around, but I have not tried).

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-13 Thread Steven Schveighoffer via Digitalmars-d
On 7/13/18 3:53 PM, Paolo Invernizzi wrote: On Friday, 13 July 2018 at 13:15:39 UTC, Steven Schveighoffer wrote: On 7/13/18 8:55 AM, Adam D. Ruppe wrote: On Wednesday, 11 July 2018 at 12:45:40 UTC, crimaniak wrote: This error handling policy makes D not applicable for creating WEB

Re: Safe Memory Management and Ownership.

2018-07-13 Thread jmh530 via Digitalmars-d
On Friday, 13 July 2018 at 17:12:26 UTC, Atila Neves wrote: Rust can do that because it enforces it at compile-time. A D solution wouldn't be able to do anything more with immutable borrows. Hmm, thinking on this a little more...it does seem difficult...but I don't think the problem is

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

2018-07-13 Thread Laeeth Isharc via Digitalmars-d-learn
On Wednesday, 20 June 2018 at 18:47:10 UTC, Jordi Gutiérrez Hermoso wrote: I'm specifically thinking of the GNU Octave codebase: http://hg.savannah.gnu.org/hgweb/octave/file/@ It's a fairly old and complicated C++ codebase. I would like to see if I could slowly introduce some D in it,

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-13 Thread Paolo Invernizzi via Digitalmars-d
On Friday, 13 July 2018 at 13:15:39 UTC, Steven Schveighoffer wrote: On 7/13/18 8:55 AM, Adam D. Ruppe wrote: On Wednesday, 11 July 2018 at 12:45:40 UTC, crimaniak wrote: This error handling policy makes D not applicable for creating WEB applications and generally long-running services. You

Re: Check whether a range is empty

2018-07-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/13/18 3:29 PM, vino.B wrote: On Friday, 13 July 2018 at 19:05:20 UTC, Steven Schveighoffer wrote: On 7/13/18 2:37 PM, vino.B wrote: Hi All,    How do i check whether a range is empty. eg. (!PFResutl.toRange).empty. I tired the below, but it is no printing Empty if the range is empty it

Re: dpp now compiles julia.h headers

2018-07-13 Thread bachmeier via Digitalmars-d-announce
On Friday, 13 July 2018 at 19:02:56 UTC, Laeeth Isharc wrote: Atila Neves' d++ now compiles julia.h. Modulo bugs this makes it possible to embed Julia in D (and probably the other way around, but I have not tried). https://github.com/kaleidicassociates/juliad This is great news for me. A

Re: I have a plan.. I really DO

2018-07-13 Thread RhyS via Digitalmars-d-announce
On Friday, 13 July 2018 at 13:15:07 UTC, Ecstatic Coder wrote: At the moment, developing in Rust can be quite painful because of too much focus on its borrow checker, as the reference counting system is just a side feature, which is not deeply integrated into the language. And Go suffers

Re: Check whether a range is empty

2018-07-13 Thread vino.B via Digitalmars-d-learn
On Friday, 13 July 2018 at 19:05:20 UTC, Steven Schveighoffer wrote: On 7/13/18 2:37 PM, vino.B wrote: Hi All,   How do i check whether a range is empty. eg. (!PFResutl.toRange).empty. I tired the below, but it is no printing Empty if the range is empty it just prints blank line. if

Re: Check whether a range is empty

2018-07-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/13/18 2:37 PM, vino.B wrote: Hi All,   How do i check whether a range is empty. eg. (!PFResutl.toRange).empty. I tired the below, but it is no printing Empty if the range is empty it just prints blank line. if (!(!PFResutl.toRange).empty) { writeln("Empty"); } Without knowing what

Re: Orange not working?

2018-07-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-07-13 20:52, Jacob Carlborg wrote: Orange master is working properly. The tests are run on each push and PR with the latest DMD compiler. I just added a cron job in Travis CI as well to make sure it every month even though there hasn't been a commit. This will make sure it always

dpp now compiles julia.h headers

2018-07-13 Thread Laeeth Isharc via Digitalmars-d-announce
Atila Neves' d++ now compiles julia.h. Modulo bugs this makes it possible to embed Julia in D (and probably the other way around, but I have not tried). https://github.com/kaleidicassociates/juliad

Re: Orange not working?

2018-07-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-07-13 14:59, Timoses wrote: Huh, see this issue on github: https://github.com/jacob-carlborg/orange/issues/39 which references to https://github.com/jacob-carlborg/mambo . Although that repository has last been updated in 2016 whereas Orange's was Oct. 2017. Yeah, Mambo was a

Re: Copy Constructor DIP

2018-07-13 Thread Manu via Digitalmars-d
On Fri, 13 Jul 2018 at 10:35, Atila Neves via Digitalmars-d wrote: > > [...] > > Now that I understand the implicit call `@implicit` makes sense > to me but I'm convinced it'll confuse more people than not. I'll > see if I can come up with a better name. You don't find 'implicit' satisfactory as

Re: Orange not working?

2018-07-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-07-12 22:44, JN wrote: I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of errors:

Re: Copy Constructor DIP

2018-07-13 Thread Manu via Digitalmars-d
On Fri, 13 Jul 2018 at 07:40, Andrei Alexandrescu via Digitalmars-d wrote: > > On 7/12/18 11:01 PM, Manu wrote: > > What existing code are you changing the semantics of? > > It's still not clear to me how accepting `this(ref T)` as a magic > > signature that is a copy constructor can break

[Issue 18955] extern(C++) default struct mangling is overridden when interacting with a `cppmangle = class` template

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18955 --- Comment #6 from Steven Schveighoffer --- Sorry, I fixed a typo in the title of the bug report "tamplate". --

Check whether a range is empty

2018-07-13 Thread vino.B via Digitalmars-d-learn
Hi All, How do i check whether a range is empty. eg. (!PFResutl.toRange).empty. I tired the below, but it is no printing Empty if the range is empty it just prints blank line. if (!(!PFResutl.toRange).empty) { writeln("Empty"); } From, Vino.B

Re: Copy Constructor DIP

2018-07-13 Thread Manu via Digitalmars-d
On Fri, 13 Jul 2018 at 04:05, RazvanN via Digitalmars-d wrote: > > > [...] > > The problem with this approach is that some copy constructors > will also be used as assignment operators while others will not, > but with good error messages it could be handled (error on line > `f = d` : opAssign

[Issue 18955] extern(C++) default struct mangling is overridden when interacting with a `cppmangle = class` template

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18955 --- Comment #5 from Manu --- Not sure what that post means.. --

Re: Fastest JSON parser in the world is a D project

2018-07-13 Thread iris via Digitalmars-d-announce
Any idea about the performance of this json parser? https://jsonformatter.org/json-parser ?

[Issue 18955] extern(C++) default struct mangling is overridden when interacting with a `cppmangle = class` template

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18955 Steven Schveighoffer changed: What|Removed |Added Summary|extern(C++) default struct |extern(C++) default struct

[Issue 19084] New: Symbol not resolved in string mixin in template struct

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19084 Issue ID: 19084 Summary: Symbol not resolved in string mixin in template struct Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

Re: Copy Constructor DIP

2018-07-13 Thread Atila Neves via Digitalmars-d
On Friday, 13 July 2018 at 16:02:51 UTC, Andrei Alexandrescu wrote: On 7/13/18 11:14 AM, Atila Neves wrote: On Friday, 13 July 2018 at 14:12:59 UTC, Andrei Alexandrescu wrote: On 7/13/18 8:31 AM, Atila Neves wrote: On Friday, 13 July 2018 at 03:01:25 UTC, Manu wrote: [...]

Re: REPL semantics

2018-07-13 Thread Luís Marques via Digitalmars-d
On Friday, 13 July 2018 at 16:55:27 UTC, Seb wrote: Did you try the Docker image? No, I just ran it on my Ubuntu VM. Is it important that I try? I was just providing feedback that it doesn't seem to run with LDC either.

Re: Funding code-d

2018-07-13 Thread Greatsam4sure via Digitalmars-d-announce
On Friday, 13 July 2018 at 14:20:19 UTC, Mike Parker wrote: As promised in my tweet of June 30 (and to the handful of people who emailed me), the cloud of mystery surrounding the use of the money raised for code-d and its supporting tools has now been (partially) lifted! In this post, I lay

Re: Funding code-d

2018-07-13 Thread Greatsam4sure via Digitalmars-d-announce
On Friday, 13 July 2018 at 14:20:19 UTC, Mike Parker wrote: As promised in my tweet of June 30 (and to the handful of people who emailed me), the cloud of mystery surrounding the use of the money raised for code-d and its supporting tools has now been (partially) lifted! In this post, I lay

Re: Safe Memory Management and Ownership.

2018-07-13 Thread Atila Neves via Digitalmars-d
On Friday, 13 July 2018 at 14:47:59 UTC, jmh530 wrote: On Friday, 13 July 2018 at 12:43:20 UTC, Atila Neves wrote: The only thing I got from this are that "smooth references" are like Rust's borrows. Which just gave me the idea to add this member function to `Unique`: scope ref T borrow();

Re: REPL semantics

2018-07-13 Thread Seb via Digitalmars-d
On Friday, 13 July 2018 at 16:20:03 UTC, Luís Marques wrote: On Friday, 13 July 2018 at 06:22:41 UTC, Jacob Carlborg wrote: On Friday, 13 July 2018 at 02:26:28 UTC, jmh530 wrote: No Windows support. For drepl: "Works on any OS with full shared library support by DMD (currently linux, OSX,

[Issue 19083] New: make target doc compile error: mach_header conflicts with other

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19083 Issue ID: 19083 Summary: make target doc compile error: mach_header conflicts with other Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status:

Re: mir-optim v0.0.1: betterC nonlinear least squares

2018-07-13 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 10 July 2018 at 02:10:56 UTC, 9il wrote: The algorigbms from https://github.com/JuliaNLSolvers are good candidates. No plans to implement them for now, but PRs are wellcome. Another type of functionality that would be useful: https://www.mathworks.com/help/matlab/ref/fzero.html

Re: Copy Constructor DIP

2018-07-13 Thread Andrei Alexandrescu via Digitalmars-d
On 7/13/18 12:06 PM, xenon325 wrote: From the DIP: The copy constructor declaration will be recognized by the parser when the tokens @, implicit, this are encountered exactly in this order Regarding "exactly in this order". The code below would be allowed and define copy c'tor for `A` and

Re: REPL semantics

2018-07-13 Thread Luís Marques via Digitalmars-d
On Friday, 13 July 2018 at 06:27:08 UTC, Jacob Carlborg wrote: Have you considered using LDC and JIT? [1] [2]. Found this [3] snippet as well, not sure what it is. [1] https://github.com/ldc-developers/ldc/pull/2293 [2] https://github.com/ldc-developers/ldc/releases/tag/v1.8.0 (mentions

Re: REPL semantics

2018-07-13 Thread Luís Marques via Digitalmars-d
On Friday, 13 July 2018 at 06:22:41 UTC, Jacob Carlborg wrote: On Friday, 13 July 2018 at 02:26:28 UTC, jmh530 wrote: No Windows support. For drepl: "Works on any OS with full shared library support by DMD (currently linux, OSX, and FreeBSD)." For macOS that means using LDC. It doesn't

Re: Copy Constructor DIP

2018-07-13 Thread xenon325 via Digitalmars-d
From the DIP: The copy constructor declaration will be recognized by the parser when the tokens @, implicit, this are encountered exactly in this order Regarding "exactly in this order". The code below would be allowed and define copy c'tor for `A` and usual c'tor for `B` ? struct

Re: Copy Constructor DIP

2018-07-13 Thread 12345swordy via Digitalmars-d
On Friday, 13 July 2018 at 16:02:51 UTC, Andrei Alexandrescu wrote: On 7/13/18 11:14 AM, Atila Neves wrote: [...] Great. Razvan, can you please add this example with discussion to the DIP (probably at the end of the Motivation section as an explanation why we need the addition of

Re: Copy Constructor DIP

2018-07-13 Thread Andrei Alexandrescu via Digitalmars-d
On 7/13/18 11:14 AM, Atila Neves wrote: On Friday, 13 July 2018 at 14:12:59 UTC, Andrei Alexandrescu wrote: On 7/13/18 8:31 AM, Atila Neves wrote: On Friday, 13 July 2018 at 03:01:25 UTC, Manu wrote: [...] https://github.com/search?q=%22this%5C%28ref%22+language%3AD=Code The answer seems

Re: Copy Constructor DIP

2018-07-13 Thread Atila Neves via Digitalmars-d
On Friday, 13 July 2018 at 14:12:59 UTC, Andrei Alexandrescu wrote: On 7/13/18 8:31 AM, Atila Neves wrote: On Friday, 13 July 2018 at 03:01:25 UTC, Manu wrote: [...] https://github.com/search?q=%22this%5C%28ref%22+language%3AD=Code The answer seems to be: not many. Most of the results above

Re: Funding code-d

2018-07-13 Thread Michael via Digitalmars-d-announce
On Friday, 13 July 2018 at 14:20:19 UTC, Mike Parker wrote: As promised in my tweet of June 30 (and to the handful of people who emailed me), the cloud of mystery surrounding the use of the money raised for code-d and its supporting tools has now been (partially) lifted! In this post, I lay

Re: Safe Memory Management and Ownership.

2018-07-13 Thread jmh530 via Digitalmars-d
On Friday, 13 July 2018 at 14:47:59 UTC, jmh530 wrote: Sounds interesting. I imagine you could specialize this depending on mutability. Rust allows only one mutable borrow, but eliminated I swear I must have dyslexia or something. Eliminated should be unlimited.

Re: @safe - why does this compile?

2018-07-13 Thread ketmar via Digitalmars-d-learn
Steven Schveighoffer wrote: To emphasize the point, this is @safe as well: X2 x2; // = null x2.run(); D does not consider a segmentation fault due to null dereferencing to be unsafe -- no memory corruption happens. yeah. in simple words: safe code is *predictable*, but not "segfault-less".

Re: Safe Memory Management and Ownership.

2018-07-13 Thread jmh530 via Digitalmars-d
On Friday, 13 July 2018 at 12:43:20 UTC, Atila Neves wrote: The only thing I got from this are that "smooth references" are like Rust's borrows. Which just gave me the idea to add this member function to `Unique`: scope ref T borrow(); I have to think about @safety guarantees but it should

Re: Copy Constructor DIP

2018-07-13 Thread Andrei Alexandrescu via Digitalmars-d
On 7/12/18 11:01 PM, Manu wrote: What existing code are you changing the semantics of? It's still not clear to me how accepting `this(ref T)` as a magic signature that is a copy constructor can break existing code? Is it the unlikely^^2 case that the function exists somewhere and doesn't perform

Re: Copy Constructor DIP

2018-07-13 Thread Andrei Alexandrescu via Digitalmars-d
On 7/12/18 11:45 PM, Manu wrote: On Thu, 12 Jul 2018 at 20:15, Meta via Digitalmars-d wrote: On Friday, 13 July 2018 at 02:32:59 UTC, Manu wrote: Seriously, if I was making this proposal to you, and you were in my position... there is no way in hell that you'd allow any of us to slip

Re: @safe - why does this compile?

2018-07-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/13/18 7:22 AM, ketmar wrote: Piotr Mitana wrote: This code: import std.stdio; class X1 {} class X2 : X1 { void run() @safe { writeln("DONE"); } } void main() @safe { X1 x1 = new X1; X2 x2 = cast(X2)

Funding code-d

2018-07-13 Thread Mike Parker via Digitalmars-d-announce
As promised in my tweet of June 30 (and to the handful of people who emailed me), the cloud of mystery surrounding the use of the money raised for code-d and its supporting tools has now been (partially) lifted! In this post, I lay out the details of how the first $1000 will be paid out to

Re: Copy Constructor DIP

2018-07-13 Thread Andrei Alexandrescu via Digitalmars-d
On 7/13/18 8:31 AM, Atila Neves wrote: On Friday, 13 July 2018 at 03:01:25 UTC, Manu wrote: On Thu, 12 Jul 2018 at 19:15, Andrei Alexandrescu via Digitalmars-d wrote: On 7/12/18 6:34 PM, Manu wrote: > On Thu, 12 Jul 2018 at 06:50, Andrei Alexandrescu via > Digitalmars-d wrote: >> [..]

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

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19082 Issue ID: 19082 Summary: Cannot inline "...Slides.numberOfFullFrames", "...Slides.gap" Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: @safe - why does this compile?

2018-07-13 Thread Timoses via Digitalmars-d-learn
On Friday, 13 July 2018 at 11:04:40 UTC, Piotr Mitana wrote: This code: import std.stdio; class X1 {} class X2 : X1 { void run() @safe { writeln("DONE"); } } void main() @safe { X1 x1 = new X1; X2 x2 = cast(X2)

Re: Guido van Rossum has resigned

2018-07-13 Thread Russel Winder via Digitalmars-d
On Fri, 2018-07-13 at 03:21 +, Meta via Digitalmars-d wrote: > On Thursday, 12 July 2018 at 21:16:02 UTC, Walter Bright wrote: > > as Python's BDFL. > > > > https://mail.python.org/pipermail/python-committers/2018-July/00566 > > 4.html > > I looked up PEP 572 and... *this* is what people are

Re: Safe Memory Management and Ownership.

2018-07-13 Thread Chris M. via Digitalmars-d
On Thursday, 12 July 2018 at 21:31:04 UTC, xray wrote: On Thursday, 12 July 2018 at 14:13:25 UTC, Chris M. wrote: On Wednesday, 11 July 2018 at 22:59:50 UTC, xray wrote: [...] I feel the following should be disallowed, since we've moved some checking to runtime. Ideally this system would

Re: Guido van Rossum has resigned

2018-07-13 Thread Steven Schveighoffer via Digitalmars-d
On 7/12/18 6:40 PM, Adam D. Ruppe wrote: On Thursday, 12 July 2018 at 22:28:00 UTC, Walter Bright wrote: I have no plans to resign until they carry me out in a box. That can be arranged. (lol you guys we should carry walter out of to the stage of the next dconf in a box) That's going to

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-13 Thread Steven Schveighoffer via Digitalmars-d
On 7/13/18 8:55 AM, Adam D. Ruppe wrote: On Wednesday, 11 July 2018 at 12:45:40 UTC, crimaniak wrote: This error handling policy makes D not applicable for creating WEB applications and generally long-running services. You use process isolation so it is easy to restart part of it without

Re: I have a plan.. I really DO

2018-07-13 Thread Ecstatic Coder via Digitalmars-d-announce
On Thursday, 12 July 2018 at 12:07:55 UTC, wjoe wrote: On Tuesday, 10 July 2018 at 17:25:11 UTC, Yuxuan Shui wrote: Whether or not rust, go, etc. are just as or more popular than C++ or Java in 30 years remains to be seen. Rust and Go have their strengths, but also suffer from serious

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-13 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 11 July 2018 at 12:45:40 UTC, crimaniak wrote: This error handling policy makes D not applicable for creating WEB applications and generally long-running services. You use process isolation so it is easy to restart part of it without disrupting others. Then it can crash without

Re: Orange not working?

2018-07-13 Thread Timoses via Digitalmars-d-learn
On Friday, 13 July 2018 at 05:39:24 UTC, JN wrote: On Friday, 13 July 2018 at 05:29:58 UTC, Timoses wrote: On Thursday, 12 July 2018 at 20:44:43 UTC, JN wrote: I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted

Re: @safe - why does this compile?

2018-07-13 Thread bauss via Digitalmars-d-learn
On Friday, 13 July 2018 at 11:04:40 UTC, Piotr Mitana wrote: This code: import std.stdio; class X1 {} class X2 : X1 { void run() @safe { writeln("DONE"); } } void main() @safe { X1 x1 = new X1; X2 x2 = cast(X2)

Re: Safe Memory Management and Ownership.

2018-07-13 Thread Atila Neves via Digitalmars-d
On Wednesday, 11 July 2018 at 22:46:45 UTC, xray wrote: [ .. ] After watching the Dconf 2018 session about "Safe Memory Management", I told myself that, if D can guarantee an exception in the case we delete an already deleted object, then it's a major step forward. So let's assume that.

Re: Copy Constructor DIP

2018-07-13 Thread Atila Neves via Digitalmars-d
On Friday, 13 July 2018 at 03:01:25 UTC, Manu wrote: On Thu, 12 Jul 2018 at 19:15, Andrei Alexandrescu via Digitalmars-d wrote: On 7/12/18 6:34 PM, Manu wrote: > On Thu, 12 Jul 2018 at 06:50, Andrei Alexandrescu via > Digitalmars-d wrote: >> [..] doesn't perform copy construction? 1.

[Issue 19056] UDAs can be added to imports but not retrieved

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19056 Yuxuan Shui changed: What|Removed |Added CC||yshu...@gmail.com

Re: UFCS confusion

2018-07-13 Thread Michael via Digitalmars-d-learn
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 to call member functions? UFCS only works with free

Re: @safe - why does this compile?

2018-07-13 Thread ketmar via Digitalmars-d-learn
Piotr Mitana wrote: This code: import std.stdio; class X1 {} class X2 : X1 { void run() @safe { writeln("DONE"); } } void main() @safe { X1 x1 = new X1; X2 x2 = cast(X2) x1; x2.run(); }

Re: UFCS confusion

2018-07-13 Thread Radu via Digitalmars-d-learn
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 to call member functions? UFCS only works with free functions, meaning declared at module level.

Re: UFCS confusion

2018-07-13 Thread Michael via Digitalmars-d-learn
On Friday, 13 July 2018 at 10:52:54 UTC, Radu wrote: On Friday, 13 July 2018 at 10:21:54 UTC, Michael wrote: Hello, I am nesting some function calls, and I'm pretty used to making use of D's Uniform Function Call Syntax, but I'm getting an error if I try to convert this line:

Re: Copy Constructor DIP

2018-07-13 Thread RazvanN via Digitalmars-d
In a post-blit world, with no opAssign specified, postblit will call for copy construction AND for assignment, thereby assignment is always correct. Once postblit is swapped for a copy-constructor, absence of opAssign will result in invalid behaviour on assignment. Indeed, but this was the

Re: Copy Constructor DIP

2018-07-13 Thread RazvanN via Digitalmars-d
The above code contains a typo. The parameter type of the second copy constructor is meant to be B not A

@safe - why does this compile?

2018-07-13 Thread Piotr Mitana via Digitalmars-d-learn
This code: import std.stdio; class X1 {} class X2 : X1 { void run() @safe { writeln("DONE"); } } void main() @safe { X1 x1 = new X1; X2 x2 = cast(X2) x1; x2.run(); } is obviously wrong gets killed by

Re: UFCS confusion

2018-07-13 Thread Radu via Digitalmars-d-learn
On Friday, 13 July 2018 at 10:21:54 UTC, Michael wrote: Hello, I am nesting some function calls, and I'm pretty used to making use of D's Uniform Function Call Syntax, but I'm getting an error if I try to convert this line: createSet(createVector(langSize, index)).length; which works,

UFCS confusion

2018-07-13 Thread Michael via Digitalmars-d-learn
Hello, I am nesting some function calls, and I'm pretty used to making use of D's Uniform Function Call Syntax, but I'm getting an error if I try to convert this line: createSet(createVector(langSize, index)).length; which works, into this line: createVector(langSize,

Re: How to define syscall() in freebsd?

2018-07-13 Thread Brian via Digitalmars-d
On Friday, 13 July 2018 at 02:56:23 UTC, Heromyth wrote: On Thursday, 12 July 2018 at 20:19:17 UTC, Brian wrote: freebsd syscall() https://www.freebsd.org/cgi/man.cgi?query=syscall=2 How to define it in D? It should be fine like this: extern (C) nothrow @nogc size_t syscall(size_t ident,

Re: asdf json library moved to libmir

2018-07-13 Thread yawniek via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 21:58:29 UTC, WebFreak001 wrote: cool to hear that you don't let that library die. I like asdf but I never really had a usecase for it. When using vibe.d I just parse my json using their serializer. Additionally I never have the case of my input being line

Spam on our darling package repository

2018-07-13 Thread ANtlord via Digitalmars-d
http://code.dlang.org/packages/watch_sicario_day_of_the_soldado_online_full_movie_free It should be removed

Re: asdf json library moved to libmir

2018-07-13 Thread yawniek via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 22:21:32 UTC, Daniel Kozak wrote: I have tried it few days ago and it does not work for me at first. Because I always read only "Simple Example". One of my problem was that I have a struct with little different name that was attribute name used in json

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

2018-07-13 Thread Dukc via Digitalmars-d-learn
On Wednesday, 20 June 2018 at 18:47:10 UTC, Jordi Gutiérrez Hermoso wrote: Now, as I understand it, I would need to begin with making `main` a D function, because D needs to initialise the runtime. Is this correct? No. Some initialization is required if you use the GC, as I understand it.

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

2018-07-13 Thread Dukc via Digitalmars-d-learn
On Thursday, 12 July 2018 at 15:12:51 UTC, Seb wrote: it might also be feasible to simply use normal D. Have you already tried this? There's no strict distinction between using D normally and in systems programming fashion for me, because my main function isn't written in D. But in

Re: Copy Constructor DIP

2018-07-13 Thread meppl via Digitalmars-d
On Thursday, 12 July 2018 at 20:29:43 UTC, Manu wrote: On Wed, 11 Jul 2018 at 23:55, RazvanN via Digitalmars-d wrote: > What's wrong with: > struct S { > this(ref S copyFrom); > } > > That looks like a perfectly good copy constructor > declaration ;) I'm just saying, the DIP needs to

[Issue 19006] Visual Studio 2017 crashes when trying to create project using any project template.

2018-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19006 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de --- Comment #1 from

Re: REPL semantics

2018-07-13 Thread Jacob Carlborg via Digitalmars-d
On Thursday, 12 July 2018 at 22:17:29 UTC, Luís Marques wrote: Ah, that explains why my clone of drepl didn't compile: it was the Martin Novak's repo, not the D community one. Although on macOS it still doesn't compile, because of the lack of _rt_loadLibrary. Have you considered using LDC

Re: REPL semantics

2018-07-13 Thread Jacob Carlborg via Digitalmars-d
On Friday, 13 July 2018 at 02:26:28 UTC, jmh530 wrote: No Windows support. For drepl: "Works on any OS with full shared library support by DMD (currently linux, OSX, and FreeBSD)." For macOS that means using LDC. -- /Jacob Carlborg