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

Re: [4Walter] 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

Re: [4Walter] 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

Re: [4Walter] 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

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

Re: [4Walter] 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: [4Walter] 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

Re: [4Walter] 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: 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)

[4Walter] 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

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

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

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

[Issue 17413] New: Deadlock if allocation fails during runtime initialization

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17413 Issue ID: 17413 Summary: Deadlock if allocation fails during runtime initialization Product: D Version: D2 Hardware: All OS: All Status: NEW

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

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

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

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

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.

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

Re: Code improvement for DNA reverse complement?

2017-05-19 Thread crimaniak via Digitalmars-d-learn
On Friday, 19 May 2017 at 12:55:05 UTC, Biotronic wrote: revComp6 seems to be the fastest, but it's probably also the least readable (a common trade-off). Try revComp7 with -release :) string revComp7(string bps) { char[] result = new char[bps.length]; auto p1 = result.ptr; auto p2

Re: Prettify and Resync are now open source too

2017-05-19 Thread aberba via Digitalmars-d-announce
On Friday, 19 May 2017 at 16:22:36 UTC, Ecstatic Coder wrote: I have released a few other tools on Github under the GNU GPL, including : * Resync : a local folder synchronizer. * Prettify : a source code prettifier for D and other languages. https://github.com/senselogic I don't know if some

[Issue 14246] RAII - proper destruction of partially constructed objects/structs

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14246 --- Comment #6 from Walter Bright --- Shachar Shemesh wrote this example: import std.stdio; struct A { int a = 3; this( int var ) { a += var; } ~this() { writeln("A down ", a); } } struct B { A a;

[Issue 14246] RAII - proper destruction of partially constructed objects/structs

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14246 --- Comment #5 from Walter Bright --- Relevant discussion: http://www.digitalmars.com/d/archives/digitalmars/D/What_is_going_on_here_257862.html --

[Issue 14246] RAII - proper destruction of partially constructed objects/structs

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14246 Walter Bright changed: What|Removed |Added OS|Linux |All --

[Issue 14246] RAII - proper destruction of partially constructed objects/structs

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14246 Walter Bright changed: What|Removed |Added CC|

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

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

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

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

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

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

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

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: [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 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

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

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

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: [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

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

[Issue 14246] proper destruction of partially constructed objects/structs

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14246 --- Comment #4 from Andrei Alexandrescu --- Also loosely related: https://issues.dlang.org/show_bug.cgi?id=2590 --

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

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

Re: 5 reasons the D programming language is a great choice for development

2017-05-19 Thread Quentin Ladeveze via Digitalmars-d-announce
On Friday, 19 May 2017 at 16:21:10 UTC, Walter Bright wrote: https://opensource.com/article/17/5/d-open-source-software-development Nice article ! If I translated it to french, what would be the ideal platform to publish it ?

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

[Issue 17412] New: D Jenkins plugin

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17412 Issue ID: 17412 Summary: D Jenkins plugin Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

[Issue 16652] [Reg 2.071] returned rvalue destroyed too early

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16652 Walter Bright changed: What|Removed |Added CC|

[Issue 17399] core.checkedint.addu cannot inline function

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17399 Walter Bright changed: What|Removed |Added See Also|

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,

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

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 >

[Issue 17399] core.checkedint.addu cannot inline function

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17399 Walter Bright changed: What|Removed |Added CC|

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

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.

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

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

[Issue 16301] CTFE execution of opApply keeps wrong "this" context in foreach's body

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16301 --- Comment #7 from Walter Bright --- Don Clugston writes about this problem: I bet the problem is around dinterpret.d line 4966. --- else if (ecall.op == TOKdelegate) { // Calling a delegate

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; >

Re: DIP 1008 Preliminary Review Round 1 Begins

2017-05-19 Thread Mike Parker via Digitalmars-d-announce
On Friday, 19 May 2017 at 16:03:29 UTC, Martin Tschierschke wrote: For more convenience - please think about naming the DIPs with an additional keyword/name, in "Announce", too. Best Regards mt. From now on, I'll add the DIP title (or summary) in both the announcement & review thread

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

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: DIP 1008: Exceptions and @nogc

2017-05-19 Thread Walter Bright via Digitalmars-d-announce
Saved everyone a click to figure out what the DIP is about :-)

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(); }");

Prettify and Resync are now open source too

2017-05-19 Thread Ecstatic Coder via Digitalmars-d-announce
I have released a few other tools on Github under the GNU GPL, including : * Resync : a local folder synchronizer. * Prettify : a source code prettifier for D and other languages. https://github.com/senselogic I don't know if some of you will be interested in them, but here they are...

5 reasons the D programming language is a great choice for development

2017-05-19 Thread Walter Bright via Digitalmars-d-announce
https://opensource.com/article/17/5/d-open-source-software-development

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

Re: DIP 1008 Preliminary Review Round 1 Begins

2017-05-19 Thread Martin Tschierschke via Digitalmars-d-announce
On Friday, 19 May 2017 at 15:50:19 UTC, Mike Parker wrote: The first preliminary review round of DIP 1008 has begun. http://forum.dlang.org/post/blvfxcbfzoyxowsfz...@forum.dlang.org Also, don't forget that the feedback period of the formal review of DIP 1003 is underway and ends on May 26.

DIP 1008 Preliminary Review Round 1 Begins

2017-05-19 Thread Mike Parker via Digitalmars-d-announce
The first preliminary review round of DIP 1008 has begun. http://forum.dlang.org/post/blvfxcbfzoyxowsfz...@forum.dlang.org Also, don't forget that the feedback period of the formal review of DIP 1003 is underway and ends on May 26.

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

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: 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

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 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

[Issue 7016] local import does not create -deps dependency

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7016 github-bugzi...@puremagic.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 7016] local import does not create -deps dependency

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7016 --- Comment #30 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6be32270b411d13f49ffccaa055b2cb13060c495 Fix Issue 7016

DConf 2017 Ex Post Facto

2017-05-19 Thread Mike Parker via Digitalmars-d-announce
This is a very brief look back at the four days of DConf 2017. The point is just to share a bit of it with the world and give them some links to click. Little of it will be news to those of you who were there or who followed closely along from home. Thanks to those of you who provided

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

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

Re: "if" is not evaluated for fields of Class.tupleof

2017-05-19 Thread ag0aep6g via Digitalmars-d-learn
On 05/19/2017 03:46 PM, Timoses wrote: foreach (field; fields) { // Here it should actually not enter when field is mbyte (byte) if (isStaticArray!(typeof(field))) You probably want `static if` here. With normal `if`, the body still gets compiled,

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: 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 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

"if" is not evaluated for fields of Class.tupleof

2017-05-19 Thread Timoses via Digitalmars-d-learn
Hey there, trying to read data into the fields of a class. This is what I got so far: ``` import std.traits; import std.bitmanip; class Test { byte[4] marray; byte mbyte; this(ubyte[] data) { auto fields = this.tupleof; foreach (field; fields) {

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

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: Code improvement for DNA reverse complement?

2017-05-19 Thread ag0aep6g via Digitalmars-d-learn
On 05/19/2017 02:55 PM, Biotronic wrote: On Friday, 19 May 2017 at 12:21:10 UTC, biocyberman wrote: 1. Why do we need to use assumeUnique in 'revComp0' and 'revComp3'? D strings are immutable, so if I'd created the result array as a string, I couldn't change the individual characters.

Re: Code improvement for DNA reverse complement?

2017-05-19 Thread Nicholas Wilson via Digitalmars-d-learn
On Friday, 19 May 2017 at 12:21:10 UTC, biocyberman wrote: On Friday, 19 May 2017 at 09:17:04 UTC, Biotronic wrote: On Friday, 19 May 2017 at 07:29:44 UTC, biocyberman wrote: [...] Question about your implementation: you assume the input may contain newlines, but don't handle any other

Re: Getopt default int init and zero

2017-05-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, May 19, 2017 12:09:38 PM PDT Suliman via Digitalmars-d-learn wrote: > I would like to check if user specified `0` as getopt parameter. > But the problem that `int`'s are default in `0`. So if user did > not specified nothing `int x` will be zero, and all other code > will work as if

Re: Code improvement for DNA reverse complement?

2017-05-19 Thread Biotronic via Digitalmars-d-learn
On Friday, 19 May 2017 at 12:21:10 UTC, biocyberman wrote: 1. Why do we need to use assumeUnique in 'revComp0' and 'revComp3'? D strings are immutable, so if I'd created the result array as a string, I couldn't change the individual characters. Instead, I create a mutable array, change the

Re: Code improvement for DNA reverse complement?

2017-05-19 Thread biocyberman via Digitalmars-d-learn
On Friday, 19 May 2017 at 09:17:04 UTC, Biotronic wrote: On Friday, 19 May 2017 at 07:29:44 UTC, biocyberman wrote: [...] Question about your implementation: you assume the input may contain newlines, but don't handle any other non-ACGT characters. The problem definition states 'DNA string'

Getopt default int init and zero

2017-05-19 Thread Suliman via Digitalmars-d-learn
I would like to check if user specified `0` as getopt parameter. But the problem that `int`'s are default in `0`. So if user did not specified nothing `int x` will be zero, and all other code will work as if it's zero. In std.typecons I found Nullable that allow init int to zero. I tried to

Re: How to check a struct exists at a particular memory address?

2017-05-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/18/17 4:20 PM, Gary Willoughby wrote: This might be a really silly question but: I've allocated some memory like this (Foo is a struct): this._data = cast(Foo*) calloc(n, Foo.sizeof); How can I then later check that there is a valid Foo at `this._data` or `this._data + n`? The

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

Re: D for BigData: the first BetterC library by Tamediadigital

2017-05-19 Thread Dsby via Digitalmars-d-announce
On Saturday, 25 February 2017 at 14:32:00 UTC, Ilya Yaroshenko wrote: HyperLogLog++ is advanced cardinality estimation algorithm with normal and compressed sparse representations. It can be used to estimate approximate number of unique elements in an unordered set. hll-d [1, 2] is written in

[Issue 16301] CTFE execution of opApply keeps wrong "this" context in foreach's body

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16301 --- Comment #6 from uplink.co...@googlemail.com --- I figured out what is happing. The delegate support code in the ctfe engine takes the parents scope to try and extract a thisPtr. in the case of walters example struct Foo { int i; int

[Issue 17408] scope and in are considered redundant

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17408 --- Comment #1 from anonymous4 --- Maybe only @safe code should treat in as const? I think @system code should still treat it as const scope. --

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.

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:

[Issue 17351] Static const array can't be evaluated at compile time when passed as ref argument

2017-05-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17351 --- Comment #9 from uplink.co...@googlemail.com --- (In reply to Andrei Alexandrescu from comment #6) > (In reply to ag0aep6g from comment #5) > > You have to initialize the int[3], as you did with the int. I suppose the > > compiler assumes that

  1   2   >