Re: DIP: Tail call optimization

2016-07-13 Thread Dietrich Daroch via Digitalmars-d-announce
On Tuesday, 12 July 2016 at 10:46:01 UTC, Dmitry Olshansky wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. [...] In contrast to what many folks expect, TCO is affecting

Re: DIP: Tail call optimization

2016-07-12 Thread Dmitry Olshansky via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. In

Re: DIP: Tail call optimization

2016-07-12 Thread ixid via Digitalmars-d-announce
On Monday, 11 July 2016 at 11:19:59 UTC, Dicebot wrote: D language authors don't want to enforce any code of conduct or moderation in the newsgroup which means certain personas have to be simply ignored. This is not a policy that will scale well. Ketmar's behaviour was badly out of line.

Re: DIP: Tail call optimization

2016-07-11 Thread Dietrich Daroch via Digitalmars-d-announce
On Tuesday, 12 July 2016 at 01:42:13 UTC, Andrew Godfrey wrote: On Monday, 11 July 2016 at 17:31:23 UTC, Dietrich Daroch wrote: On Monday, 11 July 2016 at 16:27:38 UTC, Andrew Godfrey wrote: [...] * It must not be ignorable by the compiler. * It must generate an error if that compiler would

Re: DIP: Tail call optimization

2016-07-11 Thread Andrew Godfrey via Digitalmars-d-announce
On Monday, 11 July 2016 at 17:31:23 UTC, Dietrich Daroch wrote: On Monday, 11 July 2016 at 16:27:38 UTC, Andrew Godfrey wrote: [...] * It must not be ignorable by the compiler. * It must generate an error if that compiler would be unable to do the TCO. Otherwise, the compiler *may* (not

Re: DIP: Tail call optimization

2016-07-11 Thread Dietrich Daroch via Digitalmars-d-announce
On Monday, 11 July 2016 at 16:27:38 UTC, Andrew Godfrey wrote: [...] * It must not be ignorable by the compiler. * It must generate an error if that compiler would be unable to do the TCO. Otherwise, the compiler *may* (not "must") apply the TCO, unless compiled under (some optimization

Re: DIP: Tail call optimization

2016-07-11 Thread Andrew Godfrey via Digitalmars-d-announce
On Monday, 11 July 2016 at 15:27:54 UTC, Dietrich Daroch wrote: On Monday, 11 July 2016 at 14:36:22 UTC, Andrew Godfrey wrote: On Monday, 11 July 2016 at 10:25:36 UTC, Tofu Ninja wrote: On Sunday, 10 July 2016 at 13:15:38 UTC, Andrew Godfrey wrote: Btw here's a thread from 2014 that touches on

Re: DIP: Tail call optimization

2016-07-11 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 11 July 2016 at 16:18:47 UTC, Dietrich Daroch wrote: Previous discussion seems to favour @unboundedStack as it can become a requirement to go beyond the stack-size-safe operations effectibly tracking where stack overflow may happen and encourage detailed review of those functions.

Re: DIP: Tail call optimization

2016-07-11 Thread Dietrich Daroch via Digitalmars-d-announce
On Monday, 11 July 2016 at 15:48:08 UTC, Ola Fosheim Grøstad wrote: On Monday, 11 July 2016 at 15:27:54 UTC, Dietrich Daroch wrote: I've been thinking about changing @tco for @boundedStack, as it'll really reflect guarantees on functions while implicitly asking for TCO on functions that

Re: DIP: Tail call optimization

2016-07-11 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 11 July 2016 at 15:27:54 UTC, Dietrich Daroch wrote: I've been thinking about changing @tco for @boundedStack, as it'll really reflect guarantees on functions while implicitly asking for TCO on functions that require it. But the fact that most functions should be marked as

Re: DIP: Tail call optimization

2016-07-11 Thread Dietrich Daroch via Digitalmars-d-announce
On Monday, 11 July 2016 at 14:36:22 UTC, Andrew Godfrey wrote: On Monday, 11 July 2016 at 10:25:36 UTC, Tofu Ninja wrote: On Sunday, 10 July 2016 at 13:15:38 UTC, Andrew Godfrey wrote: Btw here's a thread from 2014 that touches on the idea of a "tailrec" annotation. At the time, Walter viewed

Re: DIP: Tail call optimization

2016-07-11 Thread Andrew Godfrey via Digitalmars-d-announce
On Monday, 11 July 2016 at 10:25:36 UTC, Tofu Ninja wrote: On Sunday, 10 July 2016 at 13:15:38 UTC, Andrew Godfrey wrote: Btw here's a thread from 2014 that touches on the idea of a "tailrec" annotation. At the time, Walter viewed the optimization as the compiler's business and not something

Re: DIP: Tail call optimization

2016-07-11 Thread Seb via Digitalmars-d-announce
On Monday, 11 July 2016 at 12:29:33 UTC, Basile B. wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it

Re: DIP: Tail call optimization

2016-07-11 Thread bachmeier via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. The

Re: DIP: Tail call optimization

2016-07-11 Thread Basile B. via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. The

Re: DIP: Tail call optimization

2016-07-11 Thread Dicebot via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. The

Re: DIP: Tail call optimization

2016-07-11 Thread qznc via Digitalmars-d-announce
On Sunday, 10 July 2016 at 17:10:32 UTC, Dietrich Daroch wrote: On Sunday, 10 July 2016 at 16:52:09 UTC, Ola Fosheim Grøstad wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied.

Re: DIP: Tail call optimization

2016-07-11 Thread Tofu Ninja via Digitalmars-d-announce
On Sunday, 10 July 2016 at 13:15:38 UTC, Andrew Godfrey wrote: Btw here's a thread from 2014 that touches on the idea of a "tailrec" annotation. At the time, Walter viewed the optimization as the compiler's business and not something he'd elevate to a language feature:

Re: DIP: Tail call optimization

2016-07-10 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Sunday, 10 July 2016 at 17:32:32 UTC, Dietrich Daroch wrote: It might be interesting to have proof that the stack is bounded (and won't overflow). Yes, a stack depth guarantee would be useful for D fibers.

Re: DIP: Tail call optimization

2016-07-10 Thread Dietrich Daroch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 17:16:10 UTC, Ola Fosheim Grøstad wrote: On Sunday, 10 July 2016 at 17:10:32 UTC, Dietrich Daroch wrote: Annotating every callsite seems uncomfortable, being able to perform TCO is a property of the function and not something that might look call-site dependant.

Re: DIP: Tail call optimization

2016-07-10 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Sunday, 10 July 2016 at 17:10:32 UTC, Dietrich Daroch wrote: Annotating every callsite seems uncomfortable, being able to perform TCO is a property of the function and not something that might look call-site dependant. You only need to annotate the location where the function calls

Re: DIP: Tail call optimization

2016-07-10 Thread Dietrich Daroch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 16:52:09 UTC, Ola Fosheim Grøstad wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 16:52:09 UTC, Ola Fosheim Grøstad wrote: @tco does not bring any guarantees to the caller, so you might as well annotate the call-site with some compiler specific feature. actually, annotating the call itself seems to have alot more sense judging from described OP

Re: DIP: Tail call optimization

2016-07-10 Thread ixid via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:17:08 UTC, ketmar wrote: your DIP is aimed for is brain-damaged coders who are not able to understand how programs work (and why "scope(exit)" may prevent TCO). it won't help anyone. sorry. This is really unacceptablely rude. Step away from the computer and cool

Re: DIP: Tail call optimization

2016-07-10 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. Why should

Re: DIP: Tail call optimization

2016-07-10 Thread Dietrich Daroch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 12:01:54 UTC, Andrew Godfrey wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement

Re: DIP: Tail call optimization

2016-07-10 Thread Andrew Godfrey via Digitalmars-d-announce
Btw here's a thread from 2014 that touches on the idea of a "tailrec" annotation. At the time, Walter viewed the optimization as the compiler's business and not something he'd elevate to a language feature: http://forum.dlang.org/post/lqp6pu$1kkv$1...@digitalmars.com

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 11:17:17 UTC, ag0aep6g wrote: Your quote leaves out the "because" part, which is the interesting part. because it is irrelevant.

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 10:50:20 UTC, "Smoke" Adams wrote: You are not i am.

Re: DIP: Tail call optimization

2016-07-10 Thread Andrew Godfrey via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. The

Re: DIP: Tail call optimization

2016-07-10 Thread ag0aep6g via Digitalmars-d-announce
On 07/10/2016 12:21 PM, ketmar wrote: On Sunday, 10 July 2016 at 09:46:24 UTC, ag0aep6g wrote: So when one makes a post here saying that "D is aimed at brain-dead people", we shouldn't take that for an insult. absolutely. but "D is crap" is whole different story. Your quote leaves out the

Re: DIP: Tail call optimization

2016-07-10 Thread Smoke Adams via Digitalmars-d-announce
On Sunday, 10 July 2016 at 09:20:07 UTC, ketmar wrote: On Sunday, 10 July 2016 at 09:05:46 UTC, Tofu Ninja wrote: Your joking right? No personal attacks? where do you see personal attack in my words? i'm not saying that OP is dumb, and i'm not saying that his proposal is dumb. but it is

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 09:46:24 UTC, ag0aep6g wrote: So when one makes a post here saying that "D is aimed at brain-dead people", we shouldn't take that for an insult. absolutely. but "D is crap" is whole different story.

Re: DIP: Tail call optimization

2016-07-10 Thread ag0aep6g via Digitalmars-d-announce
On 07/10/2016 11:30 AM, ketmar wrote: On Sunday, 10 July 2016 at 09:24:58 UTC, ag0aep6g wrote: [...] It's no stretch to assume that the one who proposes the feature would make use of it. You called those who would use it "brain-damaged". i am not responsible for people's assumptions. So

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 09:24:58 UTC, ag0aep6g wrote: On 07/10/2016 08:39 AM, ketmar wrote: note that i didn't said this about OP, in no way. so no personal attacks here. It's no stretch to assume that the one who proposes the feature would make use of it. You called those who would use

Re: DIP: Tail call optimization

2016-07-10 Thread ag0aep6g via Digitalmars-d-announce
On 07/10/2016 08:39 AM, ketmar wrote: note that i didn't said this about OP, in no way. so no personal attacks here. It's no stretch to assume that the one who proposes the feature would make use of it. You called those who would use it "brain-damaged".

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 09:05:46 UTC, Tofu Ninja wrote: Your joking right? No personal attacks? where do you see personal attack in my words? i'm not saying that OP is dumb, and i'm not saying that his proposal is dumb. but it is *aimed* to dumb people (which doesn't automatically makes

Re: DIP: Tail call optimization

2016-07-10 Thread Tofu Ninja via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:39:06 UTC, ketmar wrote: On Sunday, 10 July 2016 at 06:37:18 UTC, ketmar wrote: On Sunday, 10 July 2016 at 06:20:59 UTC, Seb wrote: ... guys, please stay friendly, constructive and polite! I thought we are all grown-ups here! i do. someone who is not able to

Re: DIP: Tail call optimization

2016-07-10 Thread Stefan Koch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 07:43:14 UTC, ketmar wrote: we already has one optimization case speced -- NRVO. and it is BAD. adding another implementation detail to the spec will only worsen the situation, i believe. We have other cases cases where optimization is expected but it is poorly

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 07:30:32 UTC, Dietrich Daroch wrote: If attributes look messy, pragma can be used. It may look as an addition with little gain, but one of the reasons of compiling is to prevent runtime errors as early as possible and this seeks exactly that. then TCO should be

Re: DIP: Tail call optimization

2016-07-10 Thread Dietrich Daroch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:59:21 UTC, ketmar wrote: On Sunday, 10 July 2016 at 06:44:22 UTC, Dietrich Daroch wrote: Yes, there is no cure for poor skills, but the point is to prevent the need to avoid recursion to ensure there are no stack overflows. It seems reasonable considering D

Re: DIP: Tail call optimization

2016-07-10 Thread A.B via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:47:47 UTC, Jack Stouffer wrote: On Sunday, 10 July 2016 at 06:29:43 UTC, A.B wrote: Get fucked by yourself asshole ! Your penance is that you'll have to review all the crappy DIPs that will come on GH until your death, now that anyone can post his fantastic idea

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:44:22 UTC, Dietrich Daroch wrote: Yes, there is no cure for poor skills, but the point is to prevent the need to avoid recursion to ensure there are no stack overflows. It seems reasonable considering D targets systems programming. i see "system programmer" as

Re: DIP: Tail call optimization

2016-07-10 Thread Jack Stouffer via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:29:43 UTC, A.B wrote: Get fucked by yourself asshole ! Your penance is that you'll have to review all the crappy DIPs that will come on GH until your death, now that anyone can post his fantastic idea easily. Hahahahaha. Go back to >>>/g/

Re: DIP: Tail call optimization

2016-07-10 Thread Dietrich Daroch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:17:08 UTC, ketmar wrote: On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote: Yes, it probably does TCO. The problem is what if you think it does and it cannot do it because of a misunderstanding on when it can be applied or a bug? there can't be any

Re: DIP: Tail call optimization

2016-07-10 Thread Dietrich Daroch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:18:41 UTC, Jack Stouffer wrote: On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote: Yes, it probably does TCO. The problem is what if you think it does and it cannot do it because of a misunderstanding on when it can be applied or a bug? Then file a

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:37:18 UTC, ketmar wrote: On Sunday, 10 July 2016 at 06:20:59 UTC, Seb wrote: ... guys, please stay friendly, constructive and polite! I thought we are all grown-ups here! i do. someone who is not able to understand when and how TCO works is clearly

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:20:59 UTC, Seb wrote: ... guys, please stay friendly, constructive and polite! I thought we are all grown-ups here! i do. someone who is not able to understand when and how TCO works is clearly brain-damaged. if he isn't, why did he become programmer in the

Re: DIP: Tail call optimization

2016-07-10 Thread A.B via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:20:59 UTC, Seb wrote: On Sunday, 10 July 2016 at 06:17:17 UTC, A.B wrote: On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote: On Sunday, 10 July 2016 at 05:24:49 UTC, A.B wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: [...]

Re: DIP: Tail call optimization

2016-07-10 Thread Seb via Digitalmars-d-announce
On Sunday, 10 July 2016 at 06:17:17 UTC, A.B wrote: On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote: On Sunday, 10 July 2016 at 05:24:49 UTC, A.B wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: [...] That's crap...I disassemble DMD output some time to

Re: DIP: Tail call optimization

2016-07-10 Thread Jack Stouffer via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote: Yes, it probably does TCO. The problem is what if you think it does and it cannot do it because of a misunderstanding on when it can be applied or a bug? Then file a bug report?

Re: DIP: Tail call optimization

2016-07-10 Thread A.B via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote: On Sunday, 10 July 2016 at 05:24:49 UTC, A.B wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is

Re: DIP: Tail call optimization

2016-07-10 Thread ketmar via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote: Yes, it probably does TCO. The problem is what if you think it does and it cannot do it because of a misunderstanding on when it can be applied or a bug? there can't be any "misunderstanding" from compiler side. either it is a

Re: DIP: Tail call optimization

2016-07-10 Thread Dietrich Daroch via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:24:49 UTC, A.B wrote: On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also

Re: DIP: Tail call optimization

2016-07-09 Thread A.B via Digitalmars-d-announce
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote: Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. The

DIP: Tail call optimization

2016-07-09 Thread Dietrich Daroch via Digitalmars-d-announce
Hi everyone (= I've just added a new proposal to add a new attribute to ensure TCO is applied. The proposal is really simple, but I'm clueless on how to implement it and also interested on getting feedback on it. The proposal it's ready for merge on the new [DIPs