Re: New repo for my reusable D Phobos extensions

2016-04-11 Thread Nordlöw via Digitalmars-d-announce

On Sunday, 10 April 2016 at 20:54:31 UTC, ag0aep6g wrote:
No, these are the overloads for non-integer T. The constraint 
says `!(isIntegral!T)`. The integer overloads are above the 
ones I linked, respectively.


Ok. Thanks. Fixed.


Re: New repo for my reusable D Phobos extensions

2016-04-10 Thread ag0aep6g via Digitalmars-d-announce

On Sunday, 10 April 2016 at 20:24:41 UTC, Nordlöw wrote:

On Saturday, 9 April 2016 at 23:49:14 UTC, ag0aep6g wrote:

,
:

Changing arbitrary bits in arbitrary types is the opposite of 
memory-safe.


These operate only on integer types thanks to isIntegral 
template constraint. Are you saying I need to limit to machine 
types u?int{8,16,32,64,12} to not include BigInt? If so is 
there a trait for this?


No, these are the overloads for non-integer T. The constraint 
says `!(isIntegral!T)`. The integer overloads are above the ones 
I linked, respectively.


Re: New repo for my reusable D Phobos extensions

2016-04-10 Thread Nordlöw via Digitalmars-d-announce

On Sunday, 10 April 2016 at 20:24:41 UTC, Nordlöw wrote:
These operate only on integer types thanks to isIntegral 
template constraint. Are you saying I need to limit to machine 
types u?int{8,16,32,64,12} to not include BigInt? If so is 
there a trait for this?


Further, perhaps we could/should do range checking on the bit 
index parameter(s).


Re: New repo for my reusable D Phobos extensions

2016-04-10 Thread Nordlöw via Digitalmars-d-announce

On Saturday, 9 April 2016 at 23:49:14 UTC, ag0aep6g wrote:

,
:

Changing arbitrary bits in arbitrary types is the opposite of 
memory-safe.


These operate only on integer types thanks to isIntegral template 
constraint. Are you saying I need to limit to machine types 
u?int{8,16,32,64,12} to not include BigInt? If so is there a 
trait for this?


Re: New repo for my reusable D Phobos extensions

2016-04-10 Thread Nordlöw via Digitalmars-d-announce

On Saturday, 9 April 2016 at 18:25:54 UTC, Nordlöw wrote:

I've packaged my reusable extensions to Phobos at

https://github.com/nordlow/phobos-next


Also at http://code.dlang.org/packages/phobos-next


Re: New repo for my reusable D Phobos extensions

2016-04-09 Thread FreeSlave via Digitalmars-d-announce

On Saturday, 9 April 2016 at 18:25:54 UTC, Nordlöw wrote:

I've packaged my reusable extensions to Phobos at

https://github.com/nordlow/phobos-next

PRs are very welcome.

There are lots of goodies here. Some of them should probably be 
moved to standard Phobos. I currently have lots of other D 
things to do, but you guys are welcome to try to integrate them 
into Phobos.


Enjoy or Destroy!


Not all functions have documentation comments.
But most have unittests. You can add empty documentation comments 
before each unittest to make them appear in docs as examples of 
usage.


New repo for my reusable D Phobos extensions

2016-04-09 Thread Nordlöw via Digitalmars-d-announce

I've packaged my reusable extensions to Phobos at

https://github.com/nordlow/phobos-next

PRs are very welcome.

There are lots of goodies here. Some of them should probably be 
moved to standard Phobos. I currently have lots of other D things 
to do, but you guys are welcome to try to integrate them into 
Phobos.


Enjoy or Destroy!