Re: colour lib

2016-08-30 Thread Manu via Digitalmars-d
I have this implementation issue, which I'm having trouble applying good judgement, I'd like to survey opinions... So, RGB colours depend on this 'normalised integer' concept, that is: unsigned: luminance = val / IntType.max signed: luminance = max(val / IntType.max, -1.0) So I introduce

Re: colour lib

2016-08-30 Thread Manu via Digitalmars-d
On 31 August 2016 at 15:01, rikki cattermole via Digitalmars-d wrote: > > 2. As part of your argument I personally would prefer that it is at least > tested in the context of an image library. We don't want any hidden problems > there even if that is not your goal to

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-30 Thread ketmar via Digitalmars-d
On Tuesday, 30 August 2016 at 22:24:12 UTC, Ali Çehreli wrote: yeah, the whole feature smells for me. the sole need of mixin hack indicates that something is very wrong here. i never ever needed that for normal D code. and now suddenly i have to remember that some thing is a template, that it

Re: Beta D 2.071.2-b3

2016-08-30 Thread ketmar via Digitalmars-d-announce
On Wednesday, 31 August 2016 at 05:23:34 UTC, ketmar wrote: On Tuesday, 30 August 2016 at 23:54:45 UTC, Martin Nowak wrote: As in needs private members in __traits(allMembers). and in the end it just producing excessive noise in common loops that does `is(typeof(__traits(getMember, ...)))`.

Re: Beta D 2.071.2-b3

2016-08-30 Thread ketmar via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 23:54:45 UTC, Martin Nowak wrote: As in needs private members in __traits(allMembers). and in the end it just producing excessive noise in common loops that does `is(typeof(__traits(getMember, ...)))`. it would be better to either leave that alone and allow all

Re: colour lib

2016-08-30 Thread rikki cattermole via Digitalmars-d
So I'm replying without your post, so I will put my thoughts here: 1. Trust your gut on this one, your the expert in the problem domain, we're not. 2. As part of your argument I personally would prefer that it is at least tested in the context of an image library. We don't want any hidden

colour lib

2016-08-30 Thread Manu via Digitalmars-d
I'm blowing the dust off my colour proposal implementation. I want to get it into a state where it may be accepted into std.experimental, but I'm having trouble deciding on the scope of the initial offering. Some people are arguing for 'complete', and I tend to argue for minimal/un-contentious. It

Re: Why D is not popular enough?

2016-08-30 Thread Walter Bright via Digitalmars-d
On 8/30/2016 6:30 PM, ZombineDev wrote: Your change just went live http://tour.dlang.org ;) Thanks! Note that the other languages need updating, too.

Re: Joakim Intreviews Walter for the D Blog

2016-08-30 Thread Mike Parker via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 19:44:19 UTC, Jacob Carlborg wrote: Some of the links have pretty long text, is that intended? Yes. Joakim submitted the text with the links already formatted and I left them in place.

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-30 Thread Jon Degenhardt via Digitalmars-d-announce
On Monday, 29 August 2016 at 17:03:34 UTC, Andrei Alexandrescu wrote: We're happy to report that the D Language Foundation is now a public charity operating under US Internal Revenue Code Section 501(c)(3). The decision is retroactive to September 23, 2015. This has wide-ranging implications,

Re: Why D is not popular enough?

2016-08-30 Thread ZombineDev via Digitalmars-d
On Wednesday, 31 August 2016 at 01:12:10 UTC, Walter Bright wrote: On 8/30/2016 2:41 PM, mate wrote: [...] Thanks for your help! https://github.com/dlang-tour/english/pull/91 Your change just went live http://tour.dlang.org ;)

Re: Why D is not popular enough?

2016-08-30 Thread Walter Bright via Digitalmars-d
On 8/30/2016 2:41 PM, mate wrote: On Tuesday, 30 August 2016 at 20:25:42 UTC, Walter Bright wrote: On 8/30/2016 12:56 AM, Markus wrote: The tour https://tour.dlang.org/ is nearly empty, but on the first page it states that D is an "evolution of C++ (without the mistakes)" (the real content is

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-30 Thread Andrej Mitrovic via Digitalmars-d
On 8/31/16, Ali Çehreli via Digitalmars-d wrote: > v2.071.2-b3 is bringing a change for this bug: > >https://issues.dlang.org/show_bug.cgi?id=15907 PSA: If all one cares about are UDAs for fields and not functions then .tupleof is still a viable workaround.

Re: Beta D 2.071.2-b3

2016-08-30 Thread Ali Çehreli via Digitalmars-d-announce
On 08/30/2016 04:54 PM, Martin Nowak wrote: > On Tuesday, 30 August 2016 at 23:08:58 UTC, Martin Nowak wrote: >> On Tuesday, 30 August 2016 at 21:58:05 UTC, Basile B. wrote: >>> I'm a bit sad to see that >>> https://issues.dlang.org/show_bug.cgi?id=15371 was completely ignored >>> to fix issue

Re: Beta D 2.071.2-b3

2016-08-30 Thread Basile B. via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 23:08:58 UTC, Martin Nowak wrote: On Tuesday, 30 August 2016 at 21:58:05 UTC, Basile B. wrote: I'm a bit sad to see that https://issues.dlang.org/show_bug.cgi?id=15371 was completely ignored to fix issue 15907. Another decision could have been to break the

Re: Beta D 2.071.2-b3

2016-08-30 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 23:08:58 UTC, Martin Nowak wrote: On Tuesday, 30 August 2016 at 21:58:05 UTC, Basile B. wrote: I'm a bit sad to see that https://issues.dlang.org/show_bug.cgi?id=15371 was completely ignored to fix issue 15907. Another decision could have been to break the

Re: Beta D 2.071.2-b3

2016-08-30 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 21:58:05 UTC, Basile B. wrote: I'm a bit sad to see that https://issues.dlang.org/show_bug.cgi?id=15371 was completely ignored to fix issue 15907. Another decision could have been to break the visibility for the traits allMember, getMember, derivedMember and

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-30 Thread Andrej Mitrovic via Digitalmars-d
On 8/31/16, Ali Çehreli via Digitalmars-d wrote: > mixin getSymbolsByUDA!(S, UDA) symbols; This is such a bizarre workaround to be listed in the changelog since mixing in non-mixin templates is not an official feature (am I wrong?). getSymbolsByUDA is a template, not

Re: Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-30 Thread Basile B. via Digitalmars-d
On Tuesday, 30 August 2016 at 22:24:12 UTC, Ali Çehreli wrote: v2.071.2-b3 is bringing a change for this bug: https://issues.dlang.org/show_bug.cgi?id=15907 I don't agree with the current solution: http://dlang.org/changelog/2.071.2.html#traits-members-visibility Modules should be able

Re: Why D is not popular enough?

2016-08-30 Thread Walter Bright via Digitalmars-d
On 8/30/2016 2:41 PM, mate wrote: On Tuesday, 30 August 2016 at 20:25:42 UTC, Walter Bright wrote: On 8/30/2016 12:56 AM, Markus wrote: The tour https://tour.dlang.org/ is nearly empty, but on the first page it states that D is an "evolution of C++ (without the mistakes)" (the real content is

Re: Beta D 2.071.2-b3

2016-08-30 Thread Ali Çehreli via Digitalmars-d-announce
On 08/30/2016 02:58 PM, Basile B. wrote: On Tuesday, 30 August 2016 at 19:37:25 UTC, Martin Nowak wrote: Third beta for the 2.071.2 release. This beta fixes spurious deprecation warnings with templates using getMember (Issue 15907), please read the changelog for more details.

Usability of "allMembers and derivedMembers traits now only return visible symbols"

2016-08-30 Thread Ali Çehreli via Digitalmars-d
v2.071.2-b3 is bringing a change for this bug: https://issues.dlang.org/show_bug.cgi?id=15907 I don't agree with the current solution: http://dlang.org/changelog/2.071.2.html#traits-members-visibility Modules should be able to use library templates without needing to mix them in first.

Re: Battle-plan for CTFE

2016-08-30 Thread tsbockman via Digitalmars-d-announce
On Monday, 29 August 2016 at 08:39:56 UTC, Stefan Koch wrote: I just came up with a nifty little patch that makes it possible to ensure that a function is _only_ used at ctfe. Or the opposite. static assert(__ctfe, "This function is not supposed to be called outside of ctfe"); and static

Re: DIP1000

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 8/30/16 3:42 PM, Timon Gehr wrote: On 30.08.2016 18:12, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort to do DIP1000 rigorously. First we need to reduce D to a bare subset that only has integers, structs, pointers, and functions. That's a working subset of actual

Re: Beta D 2.071.2-b3

2016-08-30 Thread Basile B. via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 19:37:25 UTC, Martin Nowak wrote: Third beta for the 2.071.2 release. This beta fixes spurious deprecation warnings with templates using getMember (Issue 15907), please read the changelog for more details. http://dlang.org/changelog/2.071.2.html

Re: Template not seeming to instantiate a second time with default alias parameter

2016-08-30 Thread ag0aep6g via Digitalmars-d-learn
On 08/30/2016 11:28 PM, wobbles wrote: I'll have to try find a workaround for now :/ This also seems to work, but has a slightly different meaning: class Node(T, alias func = t => t*t) {/* ... */} The default func is a template here. Equivalent to this: auto square(T)(T t) {

[Issue 15371] __traits(getMember) should bypass the protection

2016-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15371 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Why D is not popular enough?

2016-08-30 Thread mate via Digitalmars-d
On Tuesday, 30 August 2016 at 20:25:42 UTC, Walter Bright wrote: On 8/30/2016 12:56 AM, Markus wrote: The tour https://tour.dlang.org/ is nearly empty, but on the first page it states that D is an "evolution of C++ (without the mistakes)" (the real content is hidden in the menu-sections). I

Re: Template not seeming to instantiate a second time with default alias parameter

2016-08-30 Thread ag0aep6g via Digitalmars-d-learn
On 08/30/2016 11:28 PM, wobbles wrote: I'll have to try find a workaround for now :/ This seems to work and isn't too ugly: class Node(T, alias func) {/*...*/} alias Node(T) = Node!(T, (T t) => t*t);

Re: Template not seeming to instantiate a second time with default alias parameter

2016-08-30 Thread wobbles via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 20:55:20 UTC, ag0aep6g wrote: On 08/30/2016 10:41 PM, wobbles wrote: class Node(T, alias func = (T t => t*t))(){ //whatever } //instantiate Node!(int) intNode; Node!(float) floatNode; // fails as lambda func expects an int. Am I doing something wrong or is

Re: Template not seeming to instantiate a second time with default alias parameter

2016-08-30 Thread ag0aep6g via Digitalmars-d-learn
On 08/30/2016 10:41 PM, wobbles wrote: class Node(T, alias func = (T t => t*t))(){ //whatever } //instantiate Node!(int) intNode; Node!(float) floatNode; // fails as lambda func expects an int. Am I doing something wrong or is this a bug? Proper test case: class Node(T, alias func =

Re: Error when running vibe.d example application, not sure of the cause.

2016-08-30 Thread e-y-e via Digitalmars-d-learn
On Monday, 29 August 2016 at 20:32:27 UTC, e-y-e wrote: [...] Does anyone know of anywhere else I can get help with this error? It's a blocker on me using vibe.d, which is quite frustrating.

[Issue 259] Comparing signed to unsigned does not generate an error

2016-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=259 --- Comment #63 from Dominikus Dittes Scherkl --- (In reply to Dominikus Dittes Scherkl from comment #58) > So why don't we change to something that simply always works? I have meanwhile improved my solution to something more

Template not seeming to instantiate a second time with default alias parameter

2016-08-30 Thread wobbles via Digitalmars-d-learn
Hi, Code here: https://gist.github.com/grogancolin/066a8a8c105fa473dfee961e2481a30e Basically, it seems when a template has an alias parameter like class Node(T, alias func = (T t => t*t))(){ //whatever } //instantiate Node!(int) intNode; Node!(float) floatNode; // fails as lambda func

Re: Do you like bounded integrals?

2016-08-30 Thread tsbockman via Digitalmars-d
On Tuesday, 30 August 2016 at 14:58:16 UTC, Chris Wright wrote: We can only track types, not values, and that strongly hampers our ability to reduce ranges. Playing with some examples, I think the real issue is that precise bounds tracking requires analyzing the formula as a whole, rather

Re: Prevent copy of range in foreach

2016-08-30 Thread Ali Çehreli via Digitalmars-d-learn
On 08/30/2016 12:06 PM, Yuxuan Shui wrote: Is there a way to use a range defined with disabled post-blit in foreach? In other words, is there a way to prevent foreach from copying the range? It's not possible. You can't do much with such a range anyway. For example, even r.take(10) requires

Re: Joakim Intreviews Walter for the D Blog

2016-08-30 Thread Walter Bright via Digitalmars-d-announce
On 8/30/2016 4:50 AM, Mike Parker wrote: Joakim has put together an interview with Walter that's all about D. It's an enjoyable read. You can parse the interview at [1] and visit the reddit thread at [2]. I anticipate publishing more of Joakim's interviews on the blog in the future. [1]

Re: Why D is not popular enough?

2016-08-30 Thread Walter Bright via Digitalmars-d
On 8/30/2016 12:56 AM, Markus wrote: The tour https://tour.dlang.org/ is nearly empty, but on the first page it states that D is an "evolution of C++ (without the mistakes)" (the real content is hidden in the menu-sections). I was going to fix that, but can't find where it is on github. The

Re: is this a typographical bug?

2016-08-30 Thread Ali Çehreli via Digitalmars-d-learn
On 08/30/2016 10:25 AM, WhatMeWorry wrote: Error: module std.string import 'removeChars' not found, did you mean template 'removechars(S)(S s, in S pattern) if (isSomeString!S)'? Shouldn't it be removeChars? All the other library calls seem to be camelCased. Should i not bother to open a

Re: Do you like bounded integrals?

2016-08-30 Thread tsbockman via Digitalmars-d
On Tuesday, 30 August 2016 at 14:58:16 UTC, Chris Wright wrote: On Tue, 30 Aug 2016 13:24:04 +, tsbockman wrote: Ranges don't always grow. Some operations will also cause them to shrink, if they're really being tracked correctly: We can only track types, not values, and that strongly

Re: DIP1000

2016-08-30 Thread Timon Gehr via Digitalmars-d
On 30.08.2016 21:27, Seb wrote: Sorry, please ignore, but it would still be nice to put it on Github, so that we can make pull requests. A couple of nits from a first pass: - ArgumentList is not defined -> ParameterList No, it should be ArgumentList, which is a comma-separated list of

Re: Joakim Intreviews Walter for the D Blog

2016-08-30 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-08-30 13:50, Mike Parker wrote: Joakim has put together an interview with Walter that's all about D. It's an enjoyable read. You can parse the interview at [1] and visit the reddit thread at [2]. I anticipate publishing more of Joakim's interviews on the blog in the future. [1]

Re: Why D is not popular enough?

2016-08-30 Thread Walter Bright via Digitalmars-d
On 8/30/2016 11:22 AM, Walter Bright wrote: On 8/30/2016 3:42 AM, Chris wrote: [...] I agree it's time to remove comparisons with C++, although there is room for a "D for C++ Programmers" section and, of course, "Interfacing D to C++". https://github.com/dlang/dlang.org/pull/1459

Re: DIP1000

2016-08-30 Thread Timon Gehr via Digitalmars-d
On 30.08.2016 18:12, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort to do DIP1000 rigorously. First we need to reduce D to a bare subset that only has integers, structs, pointers, and functions. That's a working subset of actual D code. The grammar I have in mind is

Re: Low level unit test library in druntime

2016-08-30 Thread Jacob Carlborg via Digitalmars-d
On 2016-08-30 18:31, Dicebot wrote: I definitely wouldn't want to use API like you proposed if I was to write my own test runner. Minimal common ground which would be cool to have is getting range/array of all unittest blocks together with their annotations. Anything more than that is optional

Beta D 2.071.2-b3

2016-08-30 Thread Martin Nowak via Digitalmars-d-announce
Third beta for the 2.071.2 release. This beta fixes spurious deprecation warnings with templates using getMember (Issue 15907), please read the changelog for more details. http://dlang.org/changelog/2.071.2.html http://dlang.org/download.html#dmd_beta Please report any bugs at

[Issue 15907] Unjustified "is not visible from module" deprecation warning when using getMember trait

2016-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15907 --- Comment #8 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/deb87b753a455ae847389642d2835a9fb891ab5a spec change and changelog entry for Issue 15907

Re: DIP1000

2016-08-30 Thread Seb via Digitalmars-d
On Tuesday, 30 August 2016 at 17:46:41 UTC, Andrei Alexandrescu wrote: On 08/30/2016 12:39 PM, Seb wrote: On Tuesday, 30 August 2016 at 16:27:05 UTC, Lodovico Giaretta wrote: On Tuesday, 30 August 2016 at 16:12:19 UTC, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort

Re: Battle-plan for CTFE

2016-08-30 Thread Stefan Koch via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 17:29:19 UTC, deadalnix wrote: worth trying to get it into master ? I would say maybe, but let's keep separate things separate. This is a language change. I would not include it in the same series of patch that change CTFE behavior. Yes. It would be confusing.

Re: Does D have anything like the generators of Python and some other languages?

2016-08-30 Thread A D dev via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 00:57:05 UTC, Meta wrote: There's a Generator class in std.concurrency. I haven't used https://dlang.org/phobos/std_concurrency.html#.Generator Thanks, Meta.

[Issue 16442] FrontTransversal fails with empty ranges

2016-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16442 gruen_tob...@web.de changed: What|Removed |Added Assignee|nob...@puremagic.com|gruen_tob...@web.de --

Re: Debug prints in @nogc

2016-08-30 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 19:03:06 UTC, Nordlöw wrote: https://github.com/nordlow/phobos-next/blob/master/src/dbg.d#L58 Renamed to https://github.com/nordlow/phobos-next/blob/master/src/dbgio.d#L58

Prevent copy of range in foreach

2016-08-30 Thread Yuxuan Shui via Digitalmars-d-learn
Is there a way to use a range defined with disabled post-blit in foreach? In other words, is there a way to prevent foreach from copying the range? Should I use move()?

Re: Debug prints in @nogc

2016-08-30 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 17:11:48 UTC, Johannes Pfau wrote: Nice! Here's a slightly modified version: https://dpaste.dzfl.pl/8c5ec90c5b39 This version does not need an additional delegate. It can be used like this: assumeNogc!writefln("foo %s", 42); assumeNogc!writeln("foo", 42);

Re: Why D is not popular enough?

2016-08-30 Thread CRAIG DILLABAUGH via Digitalmars-d
On Tuesday, 30 August 2016 at 14:19:02 UTC, Adam D. Ruppe wrote: On Tuesday, 30 August 2016 at 14:11:56 UTC, Andrei Alexandrescu wrote: Sadly if this doesn't float your boat you're unlikely to enjoy most of what D has to offer. -- Andrei This might be the most wrong statement you have ever

Re: Why D is not popular enough?

2016-08-30 Thread Walter Bright via Digitalmars-d
On 8/30/2016 3:42 AM, Chris wrote: [...] I agree it's time to remove comparisons with C++, although there is room for a "D for C++ Programmers" section and, of course, "Interfacing D to C++".

Re: DIP1000

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 12:39 PM, Seb wrote: On Tuesday, 30 August 2016 at 16:27:05 UTC, Lodovico Giaretta wrote: On Tuesday, 30 August 2016 at 16:12:19 UTC, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort to do DIP1000 rigorously. [...] If I may suggest, a repository with

Re: Low level unit test library in druntime

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 01:12 PM, jmh530 wrote: On Tuesday, 30 August 2016 at 16:18:30 UTC, Jacob Carlborg wrote: On 2016-08-30 18:17, Seb wrote: There is a bit of work on a closely related topic on the wiki: https://wiki.dlang.org/DIP83 Or https://wiki.dlang.org/DIP50 :) Or that unit-threaded's

Re: DIP1000

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 12:27 PM, Lodovico Giaretta wrote: On Tuesday, 30 August 2016 at 16:12:19 UTC, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort to do DIP1000 rigorously. [...] If I may suggest, a repository with some LaTeX code may be a good idea, especially if the

Re: Battle-plan for CTFE

2016-08-30 Thread deadalnix via Digitalmars-d-announce
On Monday, 29 August 2016 at 08:39:56 UTC, Stefan Koch wrote: On Monday, 29 August 2016 at 08:05:10 UTC, Rory McGuire wrote: On Mon, Aug 29, 2016 at 9:51 AM, Dominikus Dittes Scherkl via The work you are doing is just awesome! Many thanks. +1 your work is key for our success as a

is this a typographical bug?

2016-08-30 Thread WhatMeWorry via Digitalmars-d-learn
Error: module std.string import 'removeChars' not found, did you mean template 'removechars(S)(S s, in S pattern) if (isSomeString!S)'? Shouldn't it be removeChars? All the other library calls seem to be camelCased. Should i not bother to open a change request because this would cause too

Re: Low level unit test library in druntime

2016-08-30 Thread jmh530 via Digitalmars-d
On Tuesday, 30 August 2016 at 16:18:30 UTC, Jacob Carlborg wrote: On 2016-08-30 18:17, Seb wrote: There is a bit of work on a closely related topic on the wiki: https://wiki.dlang.org/DIP83 Or https://wiki.dlang.org/DIP50 :) Or that unit-threaded's @ShouldFail seems very similar to

Re: Debug prints in @nogc

2016-08-30 Thread Johannes Pfau via Digitalmars-d-learn
Am Tue, 30 Aug 2016 16:37:53 + schrieb Cauterite : > On Tuesday, 30 August 2016 at 14:38:47 UTC, Nordlöw wrote: > > Just being able to print a string is not good enough. I want > > the variadic part writeln so I can debug-print values in my > > buggy code. Do you have a

[Issue 14251] synchronized (mtx) doesn't check attributes (pure, const)

2016-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #16 from ZombineDev --- (In reply to Andrei Alexandrescu from comment #15) > (In reply to Lodovico Giaretta from comment #14) > > (In reply to Andrei Alexandrescu from comment #13) > > > Can someone produce an

Re: DIP1000

2016-08-30 Thread Seb via Digitalmars-d
On Tuesday, 30 August 2016 at 16:27:05 UTC, Lodovico Giaretta wrote: On Tuesday, 30 August 2016 at 16:12:19 UTC, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort to do DIP1000 rigorously. [...] If I may suggest, a repository with some LaTeX code may be a good

Re: Debug prints in @nogc

2016-08-30 Thread Cauterite via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 14:38:47 UTC, Nordlöw wrote: Just being able to print a string is not good enough. I want the variadic part writeln so I can debug-print values in my buggy code. Do you have a similar solution? Take a look at the example here:

Re: Low level unit test library in druntime

2016-08-30 Thread Dicebot via Digitalmars-d
On 08/30/2016 07:17 PM, Jacob Carlborg wrote: > The reason to put in the druntime is because that's where the existing > runner is located. > > The advantage of this low level library is that: > > * Third party unit test library don't need to reinvent the wheel > > * All third party libraries

Re: DIP1000

2016-08-30 Thread Lodovico Giaretta via Digitalmars-d
On Tuesday, 30 August 2016 at 16:12:19 UTC, Andrei Alexandrescu wrote: I'd like to initiate collaboration on an effort to do DIP1000 rigorously. [...] If I may suggest, a repository with some LaTeX code may be a good idea, especially if the idea is to write things like << If gamma derives

Re: Low level unit test library in druntime

2016-08-30 Thread Jacob Carlborg via Digitalmars-d
On 2016-08-30 18:17, Seb wrote: There is a bit of work on a closely related topic on the wiki: https://wiki.dlang.org/DIP83 Or https://wiki.dlang.org/DIP50 :) -- /Jacob Carlborg

Re: Low level unit test library in druntime

2016-08-30 Thread Seb via Digitalmars-d
On Tuesday, 30 August 2016 at 16:06:21 UTC, Jacob Carlborg wrote: I'd much rather have `assert` be magical or have AST macros to make the syntax for writing tests better than what it is now. That would be nice to have. There is a bit of work on a closely related topic on the wiki:

Re: Low level unit test library in druntime

2016-08-30 Thread Jacob Carlborg via Digitalmars-d
On 2016-08-30 16:54, Dicebot wrote: Definitely not in druntime. Optional extra test runners in Phobos (or libraries for higher level test suites) are reasonable but I don't want any changes to fundamentals of how _unit_ tests are defined and used. You both are kind of missing the point. This

DIP1000

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
I'd like to initiate collaboration on an effort to do DIP1000 rigorously. First we need to reduce D to a bare subset that only has integers, structs, pointers, and functions. That's a working subset of actual D code. The grammar I have in mind is at http://erdani.com/d/DIP1000.html. There is

Re: Low level unit test library in druntime

2016-08-30 Thread Jacob Carlborg via Digitalmars-d
On 2016-08-30 16:44, Atila Neves wrote: I'm obviously very biased but having written a unit testing library that I'm happy with and proud of I'd just use that instead. I wouldn't be interested in this. The point of this low level library is that a high level unit test library, like your

Re: Low level unit test library in druntime

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 10:44 AM, Atila Neves wrote: I'd much rather have `assert` be magical or have AST macros to make the syntax for writing tests better than what it is now. Same here. BTW I'd like unittests that "must not compile" and unittests that "must fail dynamically". For the former case,

Re: Why D is not popular enough?

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 10:19 AM, Adam D. Ruppe wrote: On Tuesday, 30 August 2016 at 14:11:56 UTC, Andrei Alexandrescu wrote: Sadly if this doesn't float your boat you're unlikely to enjoy most of what D has to offer. -- Andrei This might be the most wrong statement you have ever said on this forum.

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-30 Thread Dicebot via Digitalmars-d-announce
On 08/30/2016 05:25 PM, Andrei Alexandrescu wrote: > Unless we have a sort of branch in other countries, I don't see what we > can do here. -- Andrei EU branch of D foundation would be interesting but I think it is much premature to think about that :) signature.asc Description: OpenPGP

Re: if-expressions

2016-08-30 Thread pineapple via Digitalmars-d
On Tuesday, 30 August 2016 at 13:38:51 UTC, Chris Wright wrote: Placing the condition at the end reflects the fact that the condition is executed at the end of the loop. I'm aware of that, but the syntax is inconsistent and harder to read.

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-30 Thread Russel Winder via Digitalmars-d-announce
On Tue, 2016-08-30 at 10:25 -0400, Andrei Alexandrescu via Digitalmars- d-announce wrote: […] > Unless we have a sort of branch in other countries, I don't see what > we  > can do here. -- Andrei Understood, but without a solution it means no-one outside the USA can contribute and have the D

Re: Do you like bounded integrals?

2016-08-30 Thread Chris Wright via Digitalmars-d
On Tue, 30 Aug 2016 13:24:04 +, tsbockman wrote: > On Tuesday, 30 August 2016 at 03:37:06 UTC, Chris Wright wrote: >> On Mon, 29 Aug 2016 18:20:05 +, tsbockman wrote: >>> They should. Generally speaking, if that doesn't produce reasonable >>> bounds (leaving aside rounding errors) at the

Re: Low level unit test library in druntime

2016-08-30 Thread Dicebot via Digitalmars-d
Definitely not in druntime. Optional extra test runners in Phobos (or libraries for higher level test suites) are reasonable but I don't want any changes to fundamentals of how _unit_ tests are defined and used. signature.asc Description: OpenPGP digital signature

Re: Low level unit test library in druntime

2016-08-30 Thread Atila Neves via Digitalmars-d
On Friday, 26 August 2016 at 17:13:23 UTC, Jacob Carlborg wrote: I've been thinking lately about unit tests in D. The built-in support is a bit lacking. There's been many threads with this topic, even an attempt to get unit-threaded (or parts of it) into druntime/Phobos. [...] I'm

Re: dub test

2016-08-30 Thread Atila Neves via Digitalmars-d
On Wednesday, 24 August 2016 at 12:00:32 UTC, Andrei Alexandrescu wrote: On 08/24/2016 04:14 AM, Edwin van Leeuwen wrote: I might be dense, but the only other thing than integration tests that I can think of is if you use random data for testing, but that would be more correctly solved by

Re: Joakim Intreviews Walter for the D Blog

2016-08-30 Thread Mike Parker via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 13:07:03 UTC, Andrea Fontana wrote: Nice article. PS: "ABEL" link point to mobile version of wikipedia. Andrea Fixed, thanks!

Re: if-expressions

2016-08-30 Thread Cauterite via Digitalmars-d
On Tuesday, 30 August 2016 at 07:41:35 UTC, w0rp wrote: I don't think this particular syntax is desirable. We already have ternary expressions, and anything more complicated than a regular ternary should probably be written with a regular series of if statements. The problem is when you're

Re: Why D is not popular enough?

2016-08-30 Thread John Burton via Digitalmars-d
On Tuesday, 30 August 2016 at 14:11:56 UTC, Andrei Alexandrescu wrote: On 08/30/2016 06:50 AM, John Burrton wrote: This is why the example on the front page put me off for a long time :- stdin .byLineCopy .array .sort!((a, b) => a > b) // descending order

Re: Debug prints in @nogc

2016-08-30 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 11:52:21 UTC, Johannes Pfau wrote: import std.stdio; debug { enum writelnPtr = !string; enum void function(string) @nogc writelnNoGC = cast(void function(string) @nogc)writelnPtr; } void main() @nogc { debug writelnNoGC("foo"); } Just being

Re: Joakim Intreviews Walter for the D Blog

2016-08-30 Thread Mike Parker via Digitalmars-d-announce
On Tuesday, 30 August 2016 at 13:37:34 UTC, Adam D. Ruppe wrote: On Tuesday, 30 August 2016 at 11:50:52 UTC, Mike Parker wrote: Joakim has put together an interview He did four (IIRC) of these for This Week in D too if you want more like that: Sönke Ludwig

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 08/30/2016 08:36 AM, Russel Winder via Digitalmars-d-announce wrote: Andrei, This is splendid news for the purveying of the D Programming language. The question is though: this covers the USA what about the Rest of the World? For the language itself it is almost irrelevant where the owning

Re: Why D is not popular enough?

2016-08-30 Thread Guillaume Piolat via Digitalmars-d
On Tuesday, 30 August 2016 at 14:11:56 UTC, Andrei Alexandrescu wrote: On 08/30/2016 06:50 AM, John Burrton wrote: This is why the example on the front page put me off for a long time :- stdin .byLineCopy .array .sort!((a, b) => a > b) // descending order

Re: D to C++

2016-08-30 Thread eugene via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 13:33:44 UTC, Nick wrote: Is it possible to compile from D to C++? Explanation: I do some competition programming and would like to write it in D instead of C++ :) maybe will help https://wiki.dlang.org/Calypso

Re: Why D is not popular enough?

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 03:56 AM, Markus wrote: On Monday, 29 August 2016 at 14:31:50 UTC, eugene wrote: On Monday, 29 August 2016 at 12:11:34 UTC, Markus wrote: Take a look on this discussion thread and you know WHY D IS NOT SO POPULAR. The community discusses technical details and compares D to C++,

Re: Why D is not popular enough?

2016-08-30 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 30 August 2016 at 14:11:56 UTC, Andrei Alexandrescu wrote: Sadly if this doesn't float your boat you're unlikely to enjoy most of what D has to offer. -- Andrei This might be the most wrong statement you have ever said on this forum. D's biggest appeal to me is that it *doesn't*

Re: Why D is not popular enough?

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 10:04 AM, Adam D. Ruppe wrote: C style example functional style example That doesn't sounds like a good idea. -- Andrei

Re: Why D is not popular enough?

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/30/2016 06:50 AM, John Burrton wrote: This is why the example on the front page put me off for a long time :- stdin .byLineCopy .array .sort!((a, b) => a > b) // descending order .each!writeln; Sadly if this doesn't float your boat you're unlikely to

Re: Do you like bounded integrals?

2016-08-30 Thread Andrei Alexandrescu via Digitalmars-d
On 08/29/2016 11:37 PM, Chris Wright wrote: On Mon, 29 Aug 2016 18:20:05 +, tsbockman wrote: On Tuesday, 23 August 2016 at 20:40:06 UTC, Andrei Alexandrescu wrote: When composing, do the limits compose meaningfully? They should. Generally speaking, if that doesn't produce reasonable

Re: Why D is not popular enough?

2016-08-30 Thread Dicebot via Digitalmars-d
On 08/30/2016 01:50 PM, John Burrton wrote: > This is why the example on the front page put me off for a long time :- > > stdin > .byLineCopy > .array > .sort!((a, b) => a > b) // descending order > .each!writeln; > > It makes the language look like some weird

Re: Why D is not popular enough?

2016-08-30 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 30 August 2016 at 13:42:21 UTC, eugene wrote: i think it will lead to something like: "Why do they have different examples for the same thing?" D is multi paradigm: C style example functional style example With D, your existing expertise carries over from C while opening

[Issue 14251] synchronized (mtx) doesn't check attributes (pure, const)

2016-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #15 from Andrei Alexandrescu --- (In reply to Lodovico Giaretta from comment #14) > (In reply to Andrei Alexandrescu from comment #13) > > Can someone produce an example in which invariants promised by D's system > >

[Issue 14251] synchronized (mtx) doesn't check attributes (pure, const)

2016-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14251 --- Comment #14 from Lodovico Giaretta --- (In reply to Andrei Alexandrescu from comment #13) > Can someone produce an example in which invariants promised by D's system > are broken? immutable provides a strong guarantee,

Re: Why D is not popular enough?

2016-08-30 Thread eugene via Digitalmars-d
On Tuesday, 30 August 2016 at 13:34:05 UTC, Adam D. Ruppe wrote: On Tuesday, 30 August 2016 at 11:29:45 UTC, John Burton wrote: As I said not really a complaint ... But it d make me think d was too high level a language with too much 'magic' . Other people will have different opinions

  1   2   >