Re: Weak Eco System?

2017-05-19 Thread biocyberman via Digitalmars-d
On Wednesday, 17 May 2017 at 00:18:23 UTC, Jonathan M Davis wrote: On Tuesday, May 16, 2017 23:17:10 Mike B Johnson via Digitalmars-d wrote: On Tuesday, 16 May 2017 at 21:08:34 UTC, Benro wrote: > On Tuesday, 16 May 2017 at 17:14:49 UTC, Basile B. wrote: >> For example the build.bat fix could ha

Re: C and memory safety comments by me

2017-05-19 Thread Wulfklaue via Digitalmars-d
On Thursday, 18 May 2017 at 19:33:25 UTC, Walter Bright wrote: Thanks for the link. I don't understand what they mean in saying I don't get Rust's vision. A lot of Rust users seem to think they own the memory safe market. Language with GC = Bad. What they forget is that a good GC can be unnot

Re: Fantastic exchange from DConf

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 18 May 2017 at 12:12:18 UTC, Steven Schveighoffer wrote: [...] We still allow unsafe operations inside @safe code, using @trusted. This is a necessary evil, but it's so very important that the base libraries (druntime and phobos) keep this to a minimum, and that we review those @

Re: Fantastic exchange from DConf

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 18 May 2017 at 18:15:28 UTC, Stanislav Blinov wrote: On Thursday, 18 May 2017 at 17:53:52 UTC, H. S. Teoh wrote: In the long run, I fear that if there are too many @trusted blocks in a given codebase (not necessarily Phobos), it will become too onerous to review, and could lead to

Re: Weak Eco System?

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 19 May 2017 at 08:30:02 UTC, biocyberman wrote: [...] Therefore I definitely suggest this forum to support rich text format and emoticons. Considering that the forum is an NNTP / mailing list frontend I am not sure how viable that is with regards to people using NNTP clients.

Re: Please provide DMD as 64 executable

2017-05-19 Thread Andre Pany via Digitalmars-d
On Thursday, 18 May 2017 at 17:05:49 UTC, Vladimir Panteleev wrote: On Thursday, 18 May 2017 at 13:41:21 UTC, Andre Pany wrote: One issue is that digger does not support proxies If the problem is about git:// URLs, you can configure Git to use https:// instead of git:// globally: https://git

Re: Weak Eco System?

2017-05-19 Thread qznc via Digitalmars-d
On Thursday, 18 May 2017 at 05:43:48 UTC, Manu wrote: On 17 May 2017 at 00:51, Benro via Digitalmars-d < digitalmars-d@puremagic.com> wrote: [...] 4 Hours work. Discouraged and gave up after this. Visual Studio proper is the only IDE that 'just works' well, VisualD is very good. MonoDeve

Re: Fantastic exchange from DConf

2017-05-19 Thread Steven Schveighoffer via Digitalmars-d
On 5/19/17 5:12 AM, Moritz Maxeiner wrote: On Thursday, 18 May 2017 at 12:12:18 UTC, Steven Schveighoffer wrote: [...] We still allow unsafe operations inside @safe code, using @trusted. This is a necessary evil, but it's so very important that the base libraries (druntime and phobos) keep this

Re: C and memory safety comments by me

2017-05-19 Thread Tobias Mueller via Digitalmars-d
On Friday, 19 May 2017 at 08:58:33 UTC, Wulfklaue wrote: On Thursday, 18 May 2017 at 19:33:25 UTC, Walter Bright wrote: Thanks for the link. I don't understand what they mean in saying I don't get Rust's vision. A lot of Rust users seem to think they own the memory safe market. Language with

Re: C and memory safety comments by me

2017-05-19 Thread Nicholas Wilson via Digitalmars-d
On Friday, 19 May 2017 at 13:35:07 UTC, Tobias Mueller wrote: On Friday, 19 May 2017 at 08:58:33 UTC, Wulfklaue wrote: On Thursday, 18 May 2017 at 19:33:25 UTC, Walter Bright wrote: Thanks for the link. I don't understand what they mean in saying I don't get Rust's vision. A lot of Rust users

Re: C and memory safety comments by me

2017-05-19 Thread Steven Schveighoffer via Digitalmars-d
On 5/19/17 9:35 AM, Tobias Mueller wrote: They do however say that the actual knowledge about Rust in the D community seems to be rather small, compared to the amount of criticism against it. And TBQH I have to agree. To criticize, you should at least have a basic understanding of it. The comm

Re: Fantastic exchange from DConf

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 19 May 2017 at 11:53:57 UTC, Steven Schveighoffer wrote: On 5/19/17 5:12 AM, Moritz Maxeiner wrote: On Thursday, 18 May 2017 at 12:12:18 UTC, Steven Schveighoffer wrote: [...] We still allow unsafe operations inside @safe code, using @trusted. This is a necessary evil, but it's so

Re: C and memory safety comments by me

2017-05-19 Thread bachmeier via Digitalmars-d
On Friday, 19 May 2017 at 13:35:07 UTC, Tobias Mueller wrote: I don't really understand why there is so much bashing of other languages on this forum (not just Rust, but also Java, C, C++, etc). For me personally, this leaves a bad taste and makes the D community look unfriendly. There's room

Re: C and memory safety comments by me

2017-05-19 Thread bachmeier via Digitalmars-d
On Friday, 19 May 2017 at 13:45:04 UTC, Steven Schveighoffer wrote: On 5/19/17 9:35 AM, Tobias Mueller wrote: They do however say that the actual knowledge about Rust in the D community seems to be rather small, compared to the amount of criticism against it. And TBQH I have to agree. To criti

Re: C and memory safety comments by me

2017-05-19 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 19, 2017 1:35:07 PM PDT Tobias Mueller via Digitalmars-d wrote: > I don't really understand why there is so much bashing of other > languages on this forum (not just Rust, but also Java, C, C++, > etc). For me personally, this leaves a bad taste and makes the D > community look unfr

Re: C and memory safety comments by me

2017-05-19 Thread jmh530 via Digitalmars-d
On Friday, 19 May 2017 at 14:18:33 UTC, Jonathan M Davis wrote: (e.g. slicing dynamic arrays and nested functions both exist in D, because Walter saw them in other langauges and liked them), The first languages I learned all had array slicing built-in (Matlab/R/Python). You wouldn't believ

Re: Fantastic exchange from DConf

2017-05-19 Thread Steven Schveighoffer via Digitalmars-d
On 5/19/17 9:46 AM, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 11:53:57 UTC, Steven Schveighoffer wrote: This provides a foundation to build completely @safe libraries. Agreed if you mean libraries being marked completely as @safe (which I assume). Disagreed if you mean libraries that

Re: C and memory safety comments by me

2017-05-19 Thread Tobias Mueller via Digitalmars-d
On Friday, 19 May 2017 at 14:18:33 UTC, Jonathan M Davis wrote: Well, for languages like Java, C, and C++, it's mostly a result of folks using those languages and being unhappy with them (which is then often why they end up using D - it addresses a number of their complaints about thos language

DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Mike Parker via Digitalmars-d
DIP 1008 is titled "Exceptions and @nogc". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on June 2 (3:59 AM GMT June 3), or when I make a post declaring

Re: Fantastic exchange from DConf

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 19 May 2017 at 15:12:20 UTC, Steven Schveighoffer wrote: On 5/19/17 9:46 AM, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 11:53:57 UTC, Steven Schveighoffer wrote: This provides a foundation to build completely @safe libraries. Agreed if you mean libraries being marked comple

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread rikki cattermole via Digitalmars-d
On 19/05/2017 4:45 PM, Mike Parker wrote: DIP 1008 is titled "Exceptions and @nogc". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on June 2 (3:59 AM GMT J

Re: Fantastic exchange from DConf

2017-05-19 Thread Timon Gehr via Digitalmars-d
On 19.05.2017 17:12, Steven Schveighoffer wrote: I mean libraries which only contain @safe and @system calls. i.e.: $ grep -R '@trusted' libsafe | wc -l 0 mixin("@"~"trusted void nasty(){ corruptAllTheMemory(); }");

Re: Fantastic exchange from DConf

2017-05-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 May 2017 at 16:29:59 UTC, Timon Gehr wrote: On 19.05.2017 17:12, Steven Schveighoffer wrote: I mean libraries which only contain @safe and @system calls. i.e.: $ grep -R '@trusted' libsafe | wc -l 0 mixin("@"~"trusted void nasty(){ corruptAllTheMemory(); }"); dmd -vcg-ast *.

Re: Fantastic exchange from DConf

2017-05-19 Thread Steven Schveighoffer via Digitalmars-d
On 5/19/17 12:29 PM, Timon Gehr wrote: On 19.05.2017 17:12, Steven Schveighoffer wrote: I mean libraries which only contain @safe and @system calls. i.e.: $ grep -R '@trusted' libsafe | wc -l 0 mixin("@"~"trusted void nasty(){ corruptAllTheMemory(); }"); Yeah. There's that. But I think we

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread H. S. Teoh via Digitalmars-d
On Fri, May 19, 2017 at 05:13:34PM +0100, rikki cattermole via Digitalmars-d wrote: [...] > "Code that needs to leak the thrown exception object can clone the > object." > > Errors: > ```D > import std.stdio; > void main() { > auto e = new Exception("foo"); > e = e.dup; > writel

Re: Fantastic exchange from DConf

2017-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 19 May 2017 at 15:52:52 UTC, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 15:12:20 UTC, Steven Schveighoffer I don't expect people to use Phobos and audit all the @trusted blocks personally. As long as they don't actually call them, that's reasonable. But if your application en

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 19 May 2017 at 00:14:05 UTC, Stefan Koch wrote: string enumToString(E)(E v) { static assert(is(E == enum), "emumToString is only meant for enums"); Why that assert? We can check it at compiletime. Doesn't this cry for a constraint? I would use asserts only ever for stuf

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 May 2017 at 17:34:28 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 00:14:05 UTC, Stefan Koch wrote: string enumToString(E)(E v) { static assert(is(E == enum), "emumToString is only meant for enums"); Why that assert? We can check it at compiletime. D

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Stanislav Blinov via Digitalmars-d
On Friday, 19 May 2017 at 17:05:09 UTC, H. S. Teoh wrote: On Fri, May 19, 2017 at 05:13:34PM +0100, rikki cattermole via Digitalmars-d wrote: [...] "Code that needs to leak the thrown exception object can clone the object." Errors: ```D import std.stdio; void main() { auto e = new Exce

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread H. S. Teoh via Digitalmars-d
On Fri, May 19, 2017 at 05:48:55PM +, Stanislav Blinov via Digitalmars-d wrote: > On Friday, 19 May 2017 at 17:05:09 UTC, H. S. Teoh wrote: [...] > > AFAIK, there is no way to clone classes, unless the class writer > > implemented it explicitly. Only arrays support .dup, no other type does > >

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Jack Stouffer via Digitalmars-d
On Friday, 19 May 2017 at 15:45:28 UTC, Mike Parker wrote: ... I have already made my objections known in the other threads, but I'll list them here for posterity. Firstly, and most importantly IMO, this does not solve the surface level problem, which is the lack of @nogc in much of Phobos

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread H. S. Teoh via Digitalmars-d
On Fri, May 19, 2017 at 06:16:33PM +, Jack Stouffer via Digitalmars-d wrote: [...] > Instead, we should be asking > > > How can allocations in Phobos and user code be transferred to an > > allocation strategy of the user's choosing/needs? > > If the user values code simplicity and safety, the

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Stanislav Blinov via Digitalmars-d
On Friday, 19 May 2017 at 18:10:50 UTC, H. S. Teoh wrote: On Fri, May 19, 2017 at 05:48:55PM +, Stanislav Blinov via Digitalmars-d wrote: On Friday, 19 May 2017 at 17:05:09 UTC, H. S. Teoh wrote: [...] > AFAIK, there is no way to clone classes, unless the class > writer implemented it expl

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread nkm1 via Digitalmars-d
On Friday, 19 May 2017 at 15:45:28 UTC, Mike Parker wrote: DIP 1008 is titled "Exceptions and @nogc". As someone who iis interested in @nogc (more precisely: in avoiding GC pauses), I like this proposal... But it looks like people are concerned about 'new' becoming contextual keyword (that i

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Stanislav Blinov via Digitalmars-d
On Friday, 19 May 2017 at 18:16:33 UTC, Jack Stouffer wrote: On Friday, 19 May 2017 at 15:45:28 UTC, Mike Parker wrote: ... Secondly, I'm not a fan of special casing syntax, especially when I don't think the given benefits outweigh the above listed costs... You're raising an extremely impo

Re: Fantastic exchange from DConf

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 19 May 2017 at 17:21:23 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 15:52:52 UTC, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 15:12:20 UTC, Steven Schveighoffer I don't expect people to use Phobos and audit all the @trusted blocks personally. As long as they

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 19 May 2017 at 17:47:42 UTC, Stefan Koch wrote: On Friday, 19 May 2017 at 17:34:28 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 00:14:05 UTC, Stefan Koch wrote: string enumToString(E)(E v) { static assert(is(E == enum), "emumToString is only meant for e

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 May 2017 at 20:23:16 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 17:47:42 UTC, Stefan Koch wrote: On Friday, 19 May 2017 at 17:34:28 UTC, Dominikus Dittes Scherkl wrote: [...] the static assert tells what's going on. It it does result in a simple overload not

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Jack Stouffer via Digitalmars-d
On Friday, 19 May 2017 at 19:46:07 UTC, nkm1 wrote: As someone who iis interested in @nogc (more precisely: in avoiding GC pauses), I like this proposal... But it looks like people are concerned about 'new' becoming contextual keyword (that in some contexts it allocates with GC and in others it

Re: Fantastic exchange from DConf

2017-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 19 May 2017 at 20:19:46 UTC, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 17:21:23 UTC, Dominikus Dittes Scherkl wrote: You cannot promise to the compiler that the code is memory safe since you have no knowledge of what it actually does. No. @trusted is about trust: you cannot rel

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 19, 2017 8:31:52 PM PDT Stefan Koch via Digitalmars-d wrote: > On Friday, 19 May 2017 at 20:23:16 UTC, Dominikus Dittes Scherkl > > wrote: > > On Friday, 19 May 2017 at 17:47:42 UTC, Stefan Koch wrote: > >> On Friday, 19 May 2017 at 17:34:28 UTC, Dominikus Dittes > >> > >> Scherkl wr

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 May 2017 at 21:01:09 UTC, Jonathan M Davis wrote: Wait, what? Doesn't D specifically _not_ have SFINAE? You can use static if to test what compiles, and the branch whose condition compiles is then the on that gets compiled in, which kind of emulates what you'd get with SFINAE,

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 19 May 2017 at 21:04:24 UTC, Stefan Koch wrote: If a template does trigger a static assert, that static assert is ignored if there is another template in the overload set that could match. Wow. Didn't know that. Is this really part of the D grammar? Sometimes D is soo cool. Still

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 19 May 2017 at 19:46:07 UTC, nkm1 wrote: I like this proposal... But it looks like people are concerned about 'new' becoming contextual keyword (that in some contexts it allocates with GC and in others it does something else) It *already* does that. `new` can be overloaded and modif

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 May 2017 at 21:23:11 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 21:04:24 UTC, Stefan Koch wrote: If a template does trigger a static assert, that static assert is ignored if there is another template in the overload set that could match. Wow. Didn't know tha

Re: C and memory safety comments by me

2017-05-19 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 19 May 2017 at 15:20:49 UTC, Tobias Mueller wrote: I imagine that if I would design a language, I would probably try to understand every existing language and take the best out of each. Mmm, yes, people who know what exists realize that the design they come up with is just a rehash

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Basile B. via Digitalmars-d
On Friday, 19 May 2017 at 21:23:11 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 21:04:24 UTC, Stefan Koch wrote: If a template does trigger a static assert, that static assert is ignored if there is another template in the overload set that could match. Wow. Didn't know tha

Re: C and memory safety comments by me

2017-05-19 Thread Patrick Schluter via Digitalmars-d
On Friday, 19 May 2017 at 13:45:04 UTC, Steven Schveighoffer wrote: On 5/19/17 9:35 AM, Tobias Mueller wrote: They do however say that the actual knowledge about Rust in the D community seems to be rather small, compared to the amount of criticism against it. And TBQH I have to agree. To criti

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Stanislav Blinov via Digitalmars-d
On Friday, 19 May 2017 at 21:24:51 UTC, Adam D. Ruppe wrote: "NewExpressions are used to allocate memory on the garbage collected heap (default) or using a class or struct specific allocator. " "If a NewExpression is used as an initializer for a function local variable with scope storage cla

Re: Fantastic exchange from DConf

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 19 May 2017 at 20:54:40 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 20:19:46 UTC, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 17:21:23 UTC, Dominikus Dittes Scherkl wrote: You cannot promise to the compiler that the code is memory safe since you have no knowle

Re: C and memory safety comments by me

2017-05-19 Thread Walter Bright via Digitalmars-d
On 5/19/2017 2:38 PM, Patrick Schluter wrote: The old canard that C is a subset of C++ was never true and has always been imo te thing that made C++ the Frankenstein monster it evolved into. It's not true from a pedantic standpoint, but it is from a practical one. Although this has become slig

Re: C and memory safety comments by me

2017-05-19 Thread Walter Bright via Digitalmars-d
On 5/19/2017 7:18 AM, Jonathan M Davis via Digitalmars-d wrote: A _lot_ of D's featues have been inspired by other languages (e.g. slicing dynamic arrays and nested functions both exist in D, because Walter saw them in other langauges and liked them), Array slicing is an idea by Jan Knepper. Ne

Re: Fantastic exchange from DConf

2017-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 19 May 2017 at 22:06:59 UTC, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 20:54:40 UTC, Dominikus Dittes Scherkl wrote: I take this to mean the programmer who wrote the library, not every user of the library. I take this to mean any programmer that ends up compiling it (if yo

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 19 May 2017 at 21:25:22 UTC, Stefan Koch wrote: On Friday, 19 May 2017 at 21:23:11 UTC, Dominikus Dittes Scherkl wrote: And it's not visible from the API or documentation - you need to look into the source to disambiguate - I'm not convinced and still consider this bad style. If th

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 19, 2017 9:04:24 PM PDT Stefan Koch via Digitalmars-d wrote: > On Friday, 19 May 2017 at 21:01:09 UTC, Jonathan M Davis wrote: > > Wait, what? Doesn't D specifically _not_ have SFINAE? You can > > use static if to test what compiles, and the branch whose > > condition compiles is the

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Meta via Digitalmars-d
On Friday, 19 May 2017 at 15:45:28 UTC, Mike Parker wrote: DIP 1008 is titled "Exceptions and @nogc". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on Ju

Re: Fantastic exchange from DConf

2017-05-19 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 19 May 2017 at 23:56:55 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 22:06:59 UTC, Moritz Maxeiner wrote: On Friday, 19 May 2017 at 20:54:40 UTC, Dominikus Dittes Scherkl wrote: I take this to mean the programmer who wrote the library, not every user of the librar

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 19, 2017 3:45:28 PM PDT Mike Parker via Digitalmars-d wrote: > DIP 1008 is titled "Exceptions and @nogc". > > https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md > > All review-related feedback on and discussion of the DIP should > occur in this thread. The review period will e

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Walter Bright via Digitalmars-d
On 5/19/2017 6:23 PM, Meta wrote: Like others, I do not like the special-casing of `throw new`. However, several designs have already been explored and found lacking. This proposal also has the advantage that it (hopefully) doesn't break existing code and all existing code gets the benefit for fr

[4Walter&Andrei] D is 40 times slower. We need a new language feature!

2017-05-19 Thread 9il via Digitalmars-d
Hello, When users write math code, they expect [2, 3, 4] that the code like -- import mir.ndslice; //[1] ... foreach (i; 0..m) { foreach (j; 0..n) { // use matrix1[i, j], matrix2[i, j], matrix3[i, j] } } -- will be vectorized like in Fortran and other math languages.

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 19, 2017 11:35:54 AM PDT H. S. Teoh via Digitalmars-d wrote: > I agree with this, and having looked at std.experimental.allocator > recently, I think Andrei may even have made certain design decisions > with this in mind. I think the ideal goal (I'm not sure how achievable > it is)

Re: [4Walter&Andrei] D is 40 times slower. We need a new language feature!

2017-05-19 Thread rikki cattermole via Digitalmars-d
On 20/05/2017 4:24 AM, 9il wrote: snip Looks like Rust macro system can do something similar. Just to confirm, in Rust is it calling a function to assign the value? E.g. ```D void opIndexAssign(T v, size_t j, size_t i); ``` Because if the compiler is seeing a function call, it probably won't

Re: [4Walter&Andrei] D is 40 times slower. We need a new language feature!

2017-05-19 Thread Nicholas Wilson via Digitalmars-d
On Saturday, 20 May 2017 at 03:24:41 UTC, 9il wrote: Hello, When users write math code, they expect [2, 3, 4] that the code like [...] I assume you compiled with LDC and used pragma(inline, true). Have you had a chance to look at what `-fsave-optimization-record` gives you? (This was adde

Re: [4Walter&Andrei] D is 40 times slower. We need a new language feature!

2017-05-19 Thread Vladimir Panteleev via Digitalmars-d
On Saturday, 20 May 2017 at 03:24:41 UTC, 9il wrote: What can I do to make it happen? Sounds like you're asking for opIndex currying? https://en.wikipedia.org/wiki/Currying Have you tried implementing opIndex as a function which takes a single argument, and returns an object which then also

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-19 Thread via Digitalmars-d
On Tuesday, 11 April 2017 at 00:47:34 UTC, Jonathan M Davis wrote: Hi folks, Also, what are we even looking to distribute in debian? I would have thought that the normal thing to do would be to build with dub, in which case, having the compiler and dub be debian packages makes sense but not r

Re: [4Walter&Andrei] D is 40 times slower. We need a new language feature!

2017-05-19 Thread 9il via Digitalmars-d
On Saturday, 20 May 2017 at 03:53:19 UTC, Nicholas Wilson wrote: On Saturday, 20 May 2017 at 03:24:41 UTC, 9il wrote: Hello, When users write math code, they expect [2, 3, 4] that the code like [...] I assume you compiled with LDC and used pragma(inline, true). Have you had a chance to lo

Re: [4Walter&Andrei] D is 40 times slower. We need a new language feature!

2017-05-19 Thread 9il via Digitalmars-d
On Saturday, 20 May 2017 at 03:50:31 UTC, rikki cattermole wrote: On 20/05/2017 4:24 AM, 9il wrote: snip Looks like Rust macro system can do something similar. Just to confirm, in Rust is it calling a function to assign the value? I mean that Rust has macro system. I do not know if it can b

Re: [4Walter&Andrei] D is 40 times slower. We need a new language feature!

2017-05-19 Thread 9il via Digitalmars-d
On Saturday, 20 May 2017 at 03:53:42 UTC, Vladimir Panteleev wrote: On Saturday, 20 May 2017 at 03:24:41 UTC, 9il wrote: What can I do to make it happen? Sounds like you're asking for opIndex currying? https://en.wikipedia.org/wiki/Currying Have you tried implementing opIndex as a function w

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-19 Thread via Digitalmars-d
On Tuesday, 11 April 2017 at 12:56:59 UTC, Jonathan M Davis wrote: But if we just use dub - which _is_ the official packaging and build tool - then we avoid these issues. Ideally, the compiler and dub would be part of the distro, but libraries don't need to be. But that would defeat a primar

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-19 Thread via Digitalmars-d
On Tuesday, 11 April 2017 at 12:36:41 UTC, Russel Winder wrote: Most programming languages are going this route, used programming language tools and libraries are decreasingly packaged by the OS. Exactly the reason why we banned Go quite recently. Just far too expensive, especially w/ crossco