Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 22, 2016 Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me. Adding support in LDC shouldn't be too difficult, as one can emit an i128 and let LLVM do the work. Would that be possible ? There is a bunch of virtual hugs to be won doing so, and if you are in the bay area, definitively a beer or something :) |
July 23, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On 22 Jul 2016, at 23:37, deadalnix via digitalmars-d-ldc wrote: > I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me. Kai has worked on that before: https://github.com/ldc-developers/ldc/pull/1355 — David |
July 24, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On Friday, 22 July 2016 at 22:37:46 UTC, deadalnix wrote:
> I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me.
>
> Adding support in LDC shouldn't be too difficult, as one can emit an i128 and let LLVM do the work. Would that be possible ?
>
> There is a bunch of virtual hugs to be won doing so, and if you are in the bay area, definitively a beer or something :)
Out of curiosity, what sort of things do you do that would use cent/ucent?
|
July 26, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Friday, 22 July 2016 at 23:42:20 UTC, David Nadlinger wrote:
> On 22 Jul 2016, at 23:37, deadalnix via digitalmars-d-ldc wrote:
>> I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me.
>
> Kai has worked on that before: https://github.com/ldc-developers/ldc/pull/1355
>
> — David
<3
|
July 26, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Marler | On Sunday, 24 July 2016 at 07:04:01 UTC, Jonathan Marler wrote:
> On Friday, 22 July 2016 at 22:37:46 UTC, deadalnix wrote:
>> I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me.
>>
>> Adding support in LDC shouldn't be too difficult, as one can emit an i128 and let LLVM do the work. Would that be possible ?
>>
>> There is a bunch of virtual hugs to be won doing so, and if you are in the bay area, definitively a beer or something :)
>
> Out of curiosity, what sort of things do you do that would use cent/ucent?
Mostly for 64 bits operation that can overflow. Like when you want the mulhi of 2 longs for instance.
|
July 26, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On Friday, 22 July 2016 at 22:37:46 UTC, deadalnix wrote: > I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me. > > Adding support in LDC shouldn't be too difficult, as one can emit an i128 and let LLVM do the work. Would that be possible ? How does this avoid the "fork the language" department? I ask because I have a similar issue with vector operations (https://github.com/ldc-developers/ldc/pull/1485). |
July 27, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Engelen | On Tuesday, 26 July 2016 at 22:38:50 UTC, Johan Engelen wrote:
> On Friday, 22 July 2016 at 22:37:46 UTC, deadalnix wrote:
>> I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me.
>>
>> Adding support in LDC shouldn't be too difficult, as one can emit an i128 and let LLVM do the work. Would that be possible ?
>
> How does this avoid the "fork the language" department?
> I ask because I have a similar issue with vector operations
> (https://github.com/ldc-developers/ldc/pull/1485).
I say it is for the better. This isn't forking the language, cent/ucent have been in the spec like forever. Having some competition is good.
And TBH, I think this is also fine for the vector thing. We can't wait for DMD to reinvent the wheel for every backend feature.
|
July 27, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Marler | On Sunday, 24 July 2016 at 07:04:01 UTC, Jonathan Marler wrote:
> On Friday, 22 July 2016 at 22:37:46 UTC, deadalnix wrote:
>> I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me.
>>
>> Adding support in LDC shouldn't be too difficult, as one can emit an i128 and let LLVM do the work. Would that be possible ?
>>
>> There is a bunch of virtual hugs to be won doing so, and if you are in the bay area, definitively a beer or something :)
>
> Out of curiosity, what sort of things do you do that would use cent/ucent?
bit sets up to 128 elements, on the stack and without the indirection that a BitArray would imply.
|
August 01, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On Friday, 22 July 2016 at 22:37:46 UTC, deadalnix wrote: > I know that DMD doesn't support it, but it has been a pain in the ass to not have cent/ucent for me. > > Adding support in LDC shouldn't be too difficult, as one can emit an i128 and let LLVM do the work. Would that be possible ? > > There is a bunch of virtual hugs to be won doing so, and if you are in the bay area, definitively a beer or something :) Hi deadalnix, the PR against ltsmaster (ldc 0.17.x) is already usable: https://github.com/ldc-developers/ldc/pull/1355 If you can life with the restrictions then I like to get some feedback on it. I already created a PR for master https://github.com/ldc-developers/ldc/pull/1659 but this one requires much more work. Regards, Kai |
September 07, 2016 Re: Boys can we get cent/ucent | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kai Nacke | On Monday, 1 August 2016 at 04:59:03 UTC, Kai Nacke wrote:
> Hi deadalnix,
>
> the PR against ltsmaster (ldc 0.17.x) is already usable:
>
> https://github.com/ldc-developers/ldc/pull/1355
>
> If you can life with the restrictions then I like to get some feedback on it.
>
> I already created a PR for master
>
> https://github.com/ldc-developers/ldc/pull/1659
>
> but this one requires much more work.
>
> Regards,
> Kai
I'm sorry I missed your message. I'd be happy with that. If the codegen works, that's good enough for me.
|
Copyright © 1999-2021 by the D Language Foundation