Jump to page: 1 2
Thread overview
[phobos] CustomFloat
Jun 05, 2010
David Simcha
Jun 10, 2010
David Simcha
Jun 10, 2010
Brad Roberts
Jun 10, 2010
David Simcha
Jun 10, 2010
Brad Roberts
Jun 10, 2010
David Simcha
Aug 27, 2010
David Simcha
June 05, 2010
Robert Jacques (who I know offline and, in fact, was the person who introduced me to D) has massively improved/debugged CustomFloat and asked me to post it for review and commit it to Phobos.  See the attached file.  If everyone's happy with it, I'll replace the current impl in std.numeric and check it in.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: customfloat.d
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100605/6d8c46fd/attachment-0001.ksh>
June 08, 2010
On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
> Robert Jacques (who I know offline and, in fact, was the person who introduced me to D) has massively improved/debugged CustomFloat and asked me to post it for review and commit it to Phobos.  See the attached file.  If everyone's happy with it, I'll replace the current impl in std.numeric and check it in.

It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times.  (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)

That said, I'm having some problems with it.  Looking at the code and documentation, the following should be correct usage:

        alias CustomFloat!16 float16;

However, compiling it with DMD 2.046, I get the errors

        customfloat.d(430): Error: template instance ToBinary!(real)
        does not match template declaration ToBinary(F) if
        (is(CustomFloat!(F.sizeof * 8)))
        customfloat.d(430): Error: ToBinary!(real) is used as a type
        ...

-Lars

June 09, 2010
I can't reproduce this at all.  At any rate, I'm going to check this in because there were no other issues, I want to get it in for 2.047, and it's a HUGE improvement over what was there before even if it's not perfect.  If you can give some hints on how to reproduce this, please let me know.

On 6/8/2010 4:04 AM, Lars Tandle Kyllingstad wrote:
> On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
> 
>> Robert Jacques (who I know offline and, in fact, was the person who
>> introduced me to D) has massively improved/debugged CustomFloat and
>> asked me to post it for review and commit it to Phobos.  See the
>> attached file.  If everyone's happy with it, I'll replace the current
>> impl in std.numeric and check it in.
>> 
> It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times.  (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)
>
> That said, I'm having some problems with it.  Looking at the code and documentation, the following should be correct usage:
>
>          alias CustomFloat!16 float16;
>
> However, compiling it with DMD 2.046, I get the errors
>
>          customfloat.d(430): Error: template instance ToBinary!(real)
>          does not match template declaration ToBinary(F) if
>          (is(CustomFloat!(F.sizeof * 8)))
>          customfloat.d(430): Error: ToBinary!(real) is used as a type
>          ...
>
> -Lars
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
> 

June 09, 2010
At this point, between the beta and the public release, I think we should consider all three packages frozen except for critical fixes.

So, please hold this one for after the release is out.

My 2 cents,
Brad

On 6/9/2010 7:29 PM, David Simcha wrote:
> I can't reproduce this at all.  At any rate, I'm going to check this in because there were no other issues, I want to get it in for 2.047, and it's a HUGE improvement over what was there before even if it's not perfect.  If you can give some hints on how to reproduce this, please let me know.
> 
> On 6/8/2010 4:04 AM, Lars Tandle Kyllingstad wrote:
>> On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
>> 
>>> Robert Jacques (who I know offline and, in fact, was the person who
>>> introduced me to D) has massively improved/debugged CustomFloat and
>>> asked me to post it for review and commit it to Phobos.  See the
>>> attached file.  If everyone's happy with it, I'll replace the current
>>> impl in std.numeric and check it in.
>>> 
>> It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times.  (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)
>>
>> That said, I'm having some problems with it.  Looking at the code and documentation, the following should be correct usage:
>>
>>          alias CustomFloat!16 float16;
>>
>> However, compiling it with DMD 2.046, I get the errors
>>
>>          customfloat.d(430): Error: template instance ToBinary!(real)
>>          does not match template declaration ToBinary(F) if
>>          (is(CustomFloat!(F.sizeof * 8)))
>>          customfloat.d(430): Error: ToBinary!(real) is used as a type
>>          ...
>>
>> -Lars
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>> 
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

June 09, 2010
I can see your point, though I don't see this as a very risky change given that:

1.  It's in a non-critical module of Phobos.
2.  Its main purpose is to fix something that's horribly broken right now.

On 6/9/2010 10:55 PM, Brad Roberts wrote:
> At this point, between the beta and the public release, I think we should consider all three packages frozen except for critical fixes.
>
> So, please hold this one for after the release is out.
>
> My 2 cents,
> Brad
>
> On 6/9/2010 7:29 PM, David Simcha wrote:
> 
>> I can't reproduce this at all.  At any rate, I'm going to check this in because there were no other issues, I want to get it in for 2.047, and it's a HUGE improvement over what was there before even if it's not perfect.  If you can give some hints on how to reproduce this, please let me know.
>>
>> On 6/8/2010 4:04 AM, Lars Tandle Kyllingstad wrote:
>> 
>>> On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
>>>
>>> 
>>>> Robert Jacques (who I know offline and, in fact, was the person who introduced me to D) has massively improved/debugged CustomFloat and asked me to post it for review and commit it to Phobos.  See the attached file.  If everyone's happy with it, I'll replace the current impl in std.numeric and check it in.
>>>>
>>>> 
>>> It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times.  (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)
>>>
>>> That said, I'm having some problems with it.  Looking at the code and documentation, the following should be correct usage:
>>>
>>>           alias CustomFloat!16 float16;
>>>
>>> However, compiling it with DMD 2.046, I get the errors
>>>
>>>           customfloat.d(430): Error: template instance ToBinary!(real)
>>>           does not match template declaration ToBinary(F) if
>>>           (is(CustomFloat!(F.sizeof * 8)))
>>>           customfloat.d(430): Error: ToBinary!(real) is used as a type
>>>           ...
>>>
>>> -Lars
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>>
>>> 
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
> 

June 09, 2010
Yes please. This is great work. Sorry for not saying this later.

Andrei

On 06/09/2010 09:29 PM, David Simcha wrote:
> I can't reproduce this at all.  At any rate, I'm going to check this in because there were no other issues, I want to get it in for 2.047, and it's a HUGE improvement over what was there before even if it's not perfect. If you can give some hints on how to reproduce this, please let me know.
>
> On 6/8/2010 4:04 AM, Lars Tandle Kyllingstad wrote:
>> On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
>>> Robert Jacques (who I know offline and, in fact, was the person who introduced me to D) has massively improved/debugged CustomFloat and asked me to post it for review and commit it to Phobos. See the attached file. If everyone's happy with it, I'll replace the current impl in std.numeric and check it in.
>> It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times. (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)
>>
>> That said, I'm having some problems with it. Looking at the code and documentation, the following should be correct usage:
>>
>> alias CustomFloat!16 float16;
>>
>> However, compiling it with DMD 2.046, I get the errors
>>
>> customfloat.d(430): Error: template instance ToBinary!(real)
>> does not match template declaration ToBinary(F) if
>> (is(CustomFloat!(F.sizeof * 8)))
>> customfloat.d(430): Error: ToBinary!(real) is used as a type
>> ...
>>
>> -Lars
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
June 09, 2010
CustomFloat is pretty much broken now so it's not like we're losing much by checking in the new thing. Let's go for it. Aud Caesar, aud nihil.

Andrei

On 06/09/2010 09:55 PM, Brad Roberts wrote:
> At this point, between the beta and the public release, I think we should consider all three packages frozen except for critical fixes.
>
> So, please hold this one for after the release is out.
>
> My 2 cents,
> Brad
>
> On 6/9/2010 7:29 PM, David Simcha wrote:
>> I can't reproduce this at all.  At any rate, I'm going to check this in because there were no other issues, I want to get it in for 2.047, and it's a HUGE improvement over what was there before even if it's not perfect.  If you can give some hints on how to reproduce this, please let me know.
>>
>> On 6/8/2010 4:04 AM, Lars Tandle Kyllingstad wrote:
>>> On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
>>>
>>>> Robert Jacques (who I know offline and, in fact, was the person who introduced me to D) has massively improved/debugged CustomFloat and asked me to post it for review and commit it to Phobos.  See the attached file.  If everyone's happy with it, I'll replace the current impl in std.numeric and check it in.
>>>>
>>> It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times.  (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)
>>>
>>> That said, I'm having some problems with it.  Looking at the code and documentation, the following should be correct usage:
>>>
>>>           alias CustomFloat!16 float16;
>>>
>>> However, compiling it with DMD 2.046, I get the errors
>>>
>>>           customfloat.d(430): Error: template instance ToBinary!(real)
>>>           does not match template declaration ToBinary(F) if
>>>           (is(CustomFloat!(F.sizeof * 8)))
>>>           customfloat.d(430): Error: ToBinary!(real) is used as a type
>>>           ...
>>>
>>> -Lars
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>>
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
June 09, 2010
Ultimately it's up to Walter.  That it's been broken for most if not all of it's life and that it's not a critical module also suggests that it can just as easily wait for the next release.  It's not like there won't be more releases.

On the other hand, checking it in for this release means re-spinning the beta, re-testing, etc.

I'm definitely not suggesting that it not be fixed, just wait a day or so.

On 6/9/2010 8:50 PM, Andrei Alexandrescu wrote:
> CustomFloat is pretty much broken now so it's not like we're losing much by checking in the new thing. Let's go for it. Aud Caesar, aud nihil.
> 
> Andrei
> 
> On 06/09/2010 09:55 PM, Brad Roberts wrote:
>> At this point, between the beta and the public release, I think we should consider all three packages frozen except for critical fixes.
>>
>> So, please hold this one for after the release is out.
>>
>> My 2 cents,
>> Brad
>>
>> On 6/9/2010 7:29 PM, David Simcha wrote:
>>> I can't reproduce this at all.  At any rate, I'm going to check this in because there were no other issues, I want to get it in for 2.047, and it's a HUGE improvement over what was there before even if it's not perfect.  If you can give some hints on how to reproduce this, please let me know.
>>>
>>> On 6/8/2010 4:04 AM, Lars Tandle Kyllingstad wrote:
>>>> On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
>>>>
>>>>> Robert Jacques (who I know offline and, in fact, was the person who introduced me to D) has massively improved/debugged CustomFloat and asked me to post it for review and commit it to Phobos.  See the attached file.  If everyone's happy with it, I'll replace the current impl in std.numeric and check it in.
>>>>>
>>>> It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times.  (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)
>>>>
>>>> That said, I'm having some problems with it.  Looking at the code and documentation, the following should be correct usage:
>>>>
>>>>           alias CustomFloat!16 float16;
>>>>
>>>> However, compiling it with DMD 2.046, I get the errors
>>>>
>>>>           customfloat.d(430): Error: template instance ToBinary!(real)
>>>>           does not match template declaration ToBinary(F) if
>>>>           (is(CustomFloat!(F.sizeof * 8)))
>>>>           customfloat.d(430): Error: ToBinary!(real) is used as a type
>>>>           ...
>>>>
>>>> -Lars
>>>>

June 10, 2010
These are the steps to reproduce:  First, create a file "test.d":

        import customfloat;
        alias CustomFloat!16 float16;

Then compile it together with customfloat.d like this:

        dmd -c test customfloat

        customfloat.d(430): Error: template instance ToBinary!(real)
        does not match template declaration ToBinary(F) if
        (is(CustomFloat!(F.sizeof * 8)))
        customfloat.d(430): Error: ToBinary!(real) is used as a type
        ...

However, I'm starting to suspect it may be a compiler issue, because if I change the order of the input files, I get a different message:

        dmd -c customfloat test

        customfloat.d(357): Error: template instance opUnary!("+") does
        not match template declaration opUnary(string op) if
        ((__traits(compiles,mixin(op ~ "(get!real)"))) || op == "++" ||
        op == "--")

I'm using DMD 2.046 on Linux.

-Lars



On Wed, 2010-06-09 at 22:29 -0400, David Simcha wrote:
> I can't reproduce this at all.  At any rate, I'm going to check this in because there were no other issues, I want to get it in for 2.047, and it's a HUGE improvement over what was there before even if it's not perfect.  If you can give some hints on how to reproduce this, please let me know.
> 
> On 6/8/2010 4:04 AM, Lars Tandle Kyllingstad wrote:
> > On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
> > 
> >> Robert Jacques (who I know offline and, in fact, was the person who
> >> introduced me to D) has massively improved/debugged CustomFloat and
> >> asked me to post it for review and commit it to Phobos.  See the
> >> attached file.  If everyone's happy with it, I'll replace the current
> >> impl in std.numeric and check it in.
> >> 
> > It's awesome that someone's working on this -- I've seen people complaining about the state of CustomFloat several times.  (I think the last time was when we discussed the possibility of using an 80-bit CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on systems that don't support them.)
> >
> > That said, I'm having some problems with it.  Looking at the code and documentation, the following should be correct usage:
> >
> >          alias CustomFloat!16 float16;
> >
> > However, compiling it with DMD 2.046, I get the errors
> >
> >          customfloat.d(430): Error: template instance ToBinary!(real)
> >          does not match template declaration ToBinary(F) if
> >          (is(CustomFloat!(F.sizeof * 8)))
> >          customfloat.d(430): Error: ToBinary!(real) is used as a type
> >          ...
> >
> > -Lars
> >
> > _______________________________________________
> > phobos mailing list
> > phobos at puremagic.com
> > http://lists.puremagic.com/mailman/listinfo/phobos
> >
> > 
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


June 10, 2010
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100610/a0b100cf/attachment.html>
« First   ‹ Prev
1 2