Hi Guys.
I recently implemented __ctfeWriteln.
Based on that experience I have now implemented another pseudo
function called __ctfeTicksMs.
That evaluates to a uint representing the number of milliseconds
elapsed between the start of dmd and the time of semantic
evaluation of this expression.
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
Based on that experience I have now implemented another pseudo
function called __ctfeTicksMs.
[…]
Please tell me what you think.
Please don't. This makes CTFE indeterministic.
To write performance tests, just measure compilation
On Sunday, 4 September 2016 at 00:08:14 UTC, David Nadlinger
wrote:
Please don't. This makes CTFE indeterministic.
Please elaborate on why this would have a negative impact ?
if someone chooses to use a symbol called __ctfeTicksMs they
shoud know what they are doing.
To write performance te
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
I recently implemented __ctfeWriteln.
Sounds like pragma msg. How does it compare?
https://dlang.org/spec/pragma.html#msg
On Sunday, 4 September 2016 at 01:44:40 UTC, sarn wrote:
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
I recently implemented __ctfeWriteln.
Sounds like pragma msg. How does it compare?
https://dlang.org/spec/pragma.html#msg
Pragma msg can only print compiletime constants.
On Sunday, 4 September 2016 at 01:53:21 UTC, Stefan Koch wrote:
Pragma msg can only print compiletime constants.
While __ctfeWriteln can print state while doing CTFE.
Thanks, that makes a lot of sense. Just to check, it prints to
standard error, right?
Also, the issue of non-deterministic c
On Sunday, 4 September 2016 at 02:03:49 UTC, sarn wrote:
On Sunday, 4 September 2016 at 01:53:21 UTC, Stefan Koch wrote:
Pragma msg can only print compiletime constants.
While __ctfeWriteln can print state while doing CTFE.
Thanks, that makes a lot of sense. Just to check, it prints to
stand
On Sunday, 4 September 2016 at 02:06:55 UTC, Stefan Koch wrote:
This works already.
Anything placed in a debug {} block will be considered pure
regardless.
Opps your comment was about the debate.
I would say that __ctfeWriteln and __ctfeTicksMs should not work
outside of debug.
On 04/09/2016 2:08 PM, Stefan Koch wrote:
On Sunday, 4 September 2016 at 02:06:55 UTC, Stefan Koch wrote:
This works already.
Anything placed in a debug {} block will be considered pure regardless.
Opps your comment was about the debate.
I would say that __ctfeWriteln and __ctfeTicksMs should
On Sunday, 4 September 2016 at 04:10:29 UTC, rikki cattermole
wrote:
On 04/09/2016 2:08 PM, Stefan Koch wrote:
On Sunday, 4 September 2016 at 02:06:55 UTC, Stefan Koch wrote:
This works already.
Anything placed in a debug {} block will be considered pure
regardless.
Opps your comment was abo
On 04/09/2016 4:14 PM, Stefan Koch wrote:
On Sunday, 4 September 2016 at 04:10:29 UTC, rikki cattermole wrote:
On 04/09/2016 2:08 PM, Stefan Koch wrote:
On Sunday, 4 September 2016 at 02:06:55 UTC, Stefan Koch wrote:
This works already.
Anything placed in a debug {} block will be considered pu
On Sunday, September 04, 2016 16:24:34 rikki cattermole via Digitalmars-d
wrote:
> On 04/09/2016 4:14 PM, Stefan Koch wrote:
> > On Sunday, 4 September 2016 at 04:10:29 UTC, rikki cattermole wrote:
> >> On 04/09/2016 2:08 PM, Stefan Koch wrote:
> >>> On Sunday, 4 September 2016 at 02:06:55 UTC, St
On 04/09/2016 4:31 PM, Jonathan M Davis via Digitalmars-d wrote:
On Sunday, September 04, 2016 16:24:34 rikki cattermole via Digitalmars-d
wrote:
On 04/09/2016 4:14 PM, Stefan Koch wrote:
On Sunday, 4 September 2016 at 04:10:29 UTC, rikki cattermole wrote:
On 04/09/2016 2:08 PM, Stefan Koch wr
On Sunday, 4 September 2016 at 04:35:15 UTC, rikki cattermole
wrote:
void writeln(T...)(T args) {
if (__ctfe){
debug {
__ctfeWriteln(args);
}
} else {
// ... current implementation
}
}
That will not work.
The signature is void __ctfeWriteln(const string s)
On Sunday, 4 September 2016 at 04:31:09 UTC, Jonathan M Davis
wrote:
He didn't say that it _couldn't_ be done. He said that it
_shouldn't_ be done.
- Jonathan M Davis
Yes exactly.
On 9/4/16 6:10 AM, rikki cattermole wrote:
On 04/09/2016 2:08 PM, Stefan Koch wrote:
On Sunday, 4 September 2016 at 02:06:55 UTC, Stefan Koch wrote:
This works already.
Anything placed in a debug {} block will be considered pure regardless.
Opps your comment was about the debate.
I would say
On 9/4/16 6:14 AM, Stefan Koch wrote:
writeln and __ctfeWriteln are to be regarded as completely different
things.
__ctfeWriteln is a debugging tool only!
It should not be used in any production code.
Well I'm not sure how that would be reasonably enforced. -- Andrei
On Sunday, 4 September 2016 at 12:38:05 UTC, Andrei Alexandrescu
wrote:
On 9/4/16 6:14 AM, Stefan Koch wrote:
writeln and __ctfeWriteln are to be regarded as completely
different
things.
__ctfeWriteln is a debugging tool only!
It should not be used in any production code.
Well I'm not sure ho
On Sunday, 4 September 2016 at 04:24:34 UTC, rikki cattermole
wrote:
void writeln(T...)(T args) {
if (__ctfe){
debug {
__ctfeWriteln(args);
}
} else {
// ... current implementation
}
}
Are you sur
On Sunday, 4 September 2016 at 19:36:16 UTC, Stefan Koch wrote:
On Sunday, 4 September 2016 at 12:38:05 UTC, Andrei
Alexandrescu wrote:
On 9/4/16 6:14 AM, Stefan Koch wrote:
writeln and __ctfeWriteln are to be regarded as completely
different
things.
__ctfeWriteln is a debugging tool only!
It
On Sunday, 4 September 2016 at 00:08:14 UTC, David Nadlinger
wrote:
Please don't. This makes CTFE indeterministic.
Well we already have __TIMESTAMP__, though I think it doesn't
change during compilation.
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
I recently implemented __ctfeWriteln.
Nice, is it only for your interpreter or can we move
https://trello.com/c/6nU0lbl2/24-ctfewrite to done? I think
__ctfeWrite would be a better primitive. And we could actually
consider to sp
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
Hi Guys.
I recently implemented __ctfeWriteln.
Based on that experience I have now implemented another pseudo
function called __ctfeTicksMs.
That evaluates to a uint representing the number of
milliseconds elapsed between the star
On Tuesday, September 06, 2016 10:46:11 Martin Nowak via Digitalmars-d wrote:
> On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
> > Hi Guys.
> >
> > I recently implemented __ctfeWriteln.
> > Based on that experience I have now implemented another pseudo
> > function called __ctfeTic
On Tuesday, 6 September 2016 at 10:42:00 UTC, Martin Nowak wrote:
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
I recently implemented __ctfeWriteln.
Nice, is it only for your interpreter or can we move
https://trello.com/c/6nU0lbl2/24-ctfewrite to done? I think
__ctfeWrite
On Tue, Sep 6, 2016 at 7:42 PM, Stefan Koch via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:
> On Tuesday, 6 September 2016 at 10:42:00 UTC, Martin Nowak wrote:
>
>> On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
>>
>>> I recently implemented __ctfeWriteln.
>>>
>>
>> Nice,
On Wednesday, 7 September 2016 at 06:49:09 UTC, Rory McGuire
wrote:
Seriously Stefan, you make my day!
My libraries will be so much easier to write!
I am glad the time was not wasted.
Let's hope it gets merged :)
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
... I have now implemented another pseudo function called
__ctfeTicksMs.
[Snip]
This does allow meaningful compiletime performance tests to be
written.
spanning both CTFE and template-incitations timeings.
Please tell me what
On Thursday, 8 September 2016 at 16:52:47 UTC, safety0ff wrote:
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
... I have now implemented another pseudo function called
__ctfeTicksMs.
[Snip]
This does allow meaningful compiletime performance tests to be
written.
spanning b
On Thursday, 8 September 2016 at 17:03:30 UTC, Stefan Koch wrote:
I thought of the same thing a while back.
However I have had the time to decipher the gprof data-format
yet.
Is there another profile-format for decent visualization tools
exist ?
I was just using that as an example of what we
On Thursday, 8 September 2016 at 17:15:54 UTC, safety0ff wrote:
On Thursday, 8 September 2016 at 17:03:30 UTC, Stefan Koch
wrote:
I thought of the same thing a while back.
However I have had the time to decipher the gprof data-format
yet.
Is there another profile-format for decent visualizatio
Am Tue, 06 Sep 2016 05:02:54 +
schrieb timepp :
> On Sunday, 4 September 2016 at 04:24:34 UTC, rikki cattermole
> wrote:
> > void writeln(T...)(T args) {
> > if (__ctfe){
> > debug {
> > __ctfeWriteln(args);
> > }
> > } else {
> >
32 matches
Mail list logo