Jump to page: 1 210  
Page
Thread overview
CTFE ^^ (pow)
Mar 18, 2018
Manu
Mar 18, 2018
ketmar
Mar 18, 2018
Rubn
Mar 18, 2018
Manu
Mar 18, 2018
Nicholas Wilson
Mar 18, 2018
ketmar
Mar 18, 2018
Guillaume Piolat
Mar 18, 2018
Manu
Mar 18, 2018
Johan Engelen
Mar 19, 2018
Manu
Mar 19, 2018
Jacob Carlborg
Mar 19, 2018
Manu
Mar 19, 2018
Manu
Mar 19, 2018
Joakim
Mar 19, 2018
Jonathan M Davis
Mar 19, 2018
Manu
Mar 19, 2018
rikki cattermole
Mar 19, 2018
Manu
Mar 19, 2018
rikki cattermole
Mar 19, 2018
Manu
Mar 19, 2018
rikki cattermole
Mar 19, 2018
Manu
Mar 19, 2018
Norm
Mar 19, 2018
rikki cattermole
Mar 19, 2018
Norm
Mar 19, 2018
rikki cattermole
Mar 19, 2018
Norm
Mar 19, 2018
rikki cattermole
Mar 19, 2018
Jonathan M Davis
Mar 19, 2018
rikki cattermole
Mar 19, 2018
Norm
Mar 19, 2018
Paolo Invernizzi
Mar 19, 2018
Danni Coy
Mar 23, 2018
Jonathan M Davis
Mar 23, 2018
Jordan Wilson
Mar 23, 2018
Manu
Mar 23, 2018
Walter Bright
Mar 23, 2018
Manu
Mar 23, 2018
jmh530
Mar 24, 2018
Walter Bright
Mar 24, 2018
H. S. Teoh
Mar 24, 2018
Manu
Mar 25, 2018
Walter Bright
Mar 25, 2018
Manu
Mar 26, 2018
Guillaume Piolat
Mar 26, 2018
Walter Bright
Mar 27, 2018
Jonathan M Davis
Mar 27, 2018
Guillaume Piolat
Mar 23, 2018
Manu
Mar 23, 2018
bachmeier
Mar 19, 2018
Manu
Mar 23, 2018
Norm
Mar 19, 2018
nkm1
Mar 23, 2018
Walter Bright
Mar 23, 2018
Norm
Mar 23, 2018
Walter Bright
Mar 23, 2018
Norm
Mar 23, 2018
Jacob Carlborg
Mar 23, 2018
Timon Gehr
Mar 23, 2018
Walter Bright
Mar 23, 2018
Manu
Mar 23, 2018
Timon Gehr
Mar 23, 2018
bauss
Mar 24, 2018
Jacob Carlborg
Mar 23, 2018
Manu
Mar 23, 2018
Walter Bright
Mar 23, 2018
Manu
Mar 23, 2018
Jonathan M Davis
Mar 24, 2018
Jacob Carlborg
Mar 23, 2018
Manu
Mar 23, 2018
Seb
Mar 23, 2018
Nick Sabalausky
Mar 24, 2018
Jonathan M Davis
Mar 24, 2018
Nick Sabalausky
Mar 24, 2018
Jonathan M Davis
Mar 24, 2018
Jacob Carlborg
Apr 01, 2018
Joakim
Mar 19, 2018
Manu
Mar 19, 2018
bachmeier
Mar 19, 2018
Manu
Mar 19, 2018
Manu
Mar 19, 2018
Jonathan M Davis
Mar 23, 2018
RazvanN
Mar 23, 2018
Walter Bright
Mar 23, 2018
Manu
Mar 23, 2018
Nick Sabalausky
Mar 23, 2018
Jonathan M Davis
Mar 23, 2018
Seb
March 17, 2018
What is so hard about implementing a pow intrinsic that CTFE can use?
It's ridiculous that we can't CTFE any non-linear function...
It's one of those blocker bugs that's been there almost 10 years.
March 18, 2018
Manu wrote:

> What is so hard about implementing a pow intrinsic that CTFE can use?
> It's ridiculous that we can't CTFE any non-linear function...
> It's one of those blocker bugs that's been there almost 10 years.

nobody bothered. it is all done by intercepting calls in CTFE engine (using FQN mangled names), nothing very special. i once did it in my fork (but then mangling scheme was changed, and i never fixed the patch, lol).
March 18, 2018
On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote:
> What is so hard about implementing a pow intrinsic that CTFE can use?
> It's ridiculous that we can't CTFE any non-linear function...
> It's one of those blocker bugs that's been there almost 10 years.

Not all that much. Can you give me an example that does't work yet that you want to use?
March 18, 2018
Nicholas Wilson wrote:

> On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote:
>> What is so hard about implementing a pow intrinsic that CTFE can use?
>> It's ridiculous that we can't CTFE any non-linear function...
>> It's one of those blocker bugs that's been there almost 10 years.
>
> Not all that much. Can you give me an example that does't work yet that you want to use?

building gamma tables in CTFE. and LUT tables for XYZ color space.
March 18, 2018
On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote:
> What is so hard about implementing a pow intrinsic that CTFE can use?
> It's ridiculous that we can't CTFE any non-linear function...
> It's one of those blocker bugs that's been there almost 10 years.

It's been available in LDC since 1.6.0.
https://godbolt.org/g/Yx7PyK

- Johan

(PS. The aggressive style of your message would not motivate me to improve things for you.)

March 18, 2018
On Sunday, 18 March 2018 at 07:47:24 UTC, Nicholas Wilson wrote:
> On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote:
>> What is so hard about implementing a pow intrinsic that CTFE can use?
>> It's ridiculous that we can't CTFE any non-linear function...
>> It's one of those blocker bugs that's been there almost 10 years.
>
> Not all that much. Can you give me an example that does't work yet that you want to use?

Hello, I also needed this recently! I was surprised to see that ^^ isn't CTFE but just a pow call.


------------- main.d -----------

T convertDecibelToLinearGain(T)(T dB) pure nothrow @nogc
{
    static immutable T ln10_20 = cast(T)LN10 / 20;
    return exp(dB * ln10_20);
}

void main()
{
    enum foo = convertDecibelToLinearGain!float(-24);
}
March 18, 2018
On Sunday, 18 March 2018 at 04:37:32 UTC, ketmar wrote:
> Manu wrote:
>
>> What is so hard about implementing a pow intrinsic that CTFE can use?
>> It's ridiculous that we can't CTFE any non-linear function...
>> It's one of those blocker bugs that's been there almost 10 years.
>
> nobody bothered. it is all done by intercepting calls in CTFE engine (using FQN mangled names), nothing very special. i once did it in my fork (but then mangling scheme was changed, and i never fixed the patch, lol).

There was a PR a while ago IIRC, it's probably one of those sitting at the back of the queue from 4 years ago or something.
March 18, 2018
On 18 March 2018 at 00:47, Nicholas Wilson via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote:
>>
>> What is so hard about implementing a pow intrinsic that CTFE can use?
>> It's ridiculous that we can't CTFE any non-linear function...
>> It's one of those blocker bugs that's been there almost 10 years.
>
>
> Not all that much. Can you give me an example that does't work yet that you want to use?

x^^y :)
March 18, 2018
On 18 March 2018 at 06:57, Rubn via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>
> There was a PR a while ago IIRC, it's probably one of those sitting at the back of the queue from 4 years ago or something.

Unacceptable if true.
March 18, 2018
On 18 March 2018 at 02:19, Johan Engelen via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote:
>>
>> What is so hard about implementing a pow intrinsic that CTFE can use?
>> It's ridiculous that we can't CTFE any non-linear function...
>> It's one of those blocker bugs that's been there almost 10 years.
>
>
> It's been available in LDC since 1.6.0. https://godbolt.org/g/Yx7PyK
>
> - Johan
>
> (PS. The aggressive style of your message would not motivate me to improve
> things for you.)

It's not aggression, it's a decade of compounded frustration.
I consider myself extremely patient with D, but how far am I supposed
to extend patience before I admit that I'm wasting my precious time
investing in something that's never going to 'get there'?
I still want to love D, but I'm drifting away and using it less and
less these days, and the main reason is that something so trivial as
this, which has been a recorded bug for almost a decade and comes up
often, still never moves. I'm always waiting... and so I find other
things to do with my time.

After being too busy to work on my side projects for a while, I
finally had a small block of time. I jumped in, did a few things, then
hit the same brick wall that I hit 3 years ago. My momentum comes to
an instant halt, and I feel like I'm just less likely to return to the
project again in the future wrt competing for priorities.
Ideally, if I make my blockers known (this one is so simple!!), and
try and re-awaken them semi-regularly... I'd like to think getting
back to something 3 years later, I'm able to move forward. But it's
still most of the same blockers I identified within my first 2-3 days
of using D ~9 years ago; I still can't ARC, I still can't pass an
rvalue by ref, and I still can't x^^y in ctfe.
This one has gotta be by far the simplest thing I've ever complained about!

Anyway, I've pretty much run out of energy to advocate a thing that
still doesn't even solve my own needs (let along the needs of my
companies), based on the assumption that it's fast moving, and
deficiencies will be resolved 'soon enough' after it's made known that
they are a blocker.
I'm sorry, 'soon enough' is not soon enough... I've run out of
patience, and I'm becoming increasingly frustrated and toxic.

I was gonna spend today coding, but I think I'll go outside instead.
« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10