Re: dxorshift: random number generators from the extended Xorshift family

2016-05-18 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Wednesday, 18 May 2016 at 16:12:35 UTC, jmh530 wrote: On Sunday, 15 May 2016 at 23:34:46 UTC, Joseph Rushton Wakeling wrote: Wrapper implemented here, together with documentation and tests: https://github.com/WebDrake/dxorshift/pull/1 N.B. I'm sticking with the explicit wrapper, because

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-18 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 18 May 2016 at 16:12:35 UTC, jmh530 wrote: Thought you might find this interesting: http://news.utexas.edu/2016/05/16/computer-science-advance-could-improve-cybersecurity and reddit discussion:

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-18 Thread jmh530 via Digitalmars-d-announce
On Sunday, 15 May 2016 at 23:34:46 UTC, Joseph Rushton Wakeling wrote: Wrapper implemented here, together with documentation and tests: https://github.com/WebDrake/dxorshift/pull/1 N.B. I'm sticking with the explicit wrapper, because I want to be really, really certain that what comes out is

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 15 May 2016 at 11:15:38 UTC, Joseph Rushton Wakeling wrote: On Sunday, 15 May 2016 at 10:43:55 UTC, Joseph Rushton Wakeling wrote: Probably the best way to handle this is to handle the take-the-address side of things by a @trusted wrapper that uses `return ref` to guarantee the

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread ag0aep6g via Digitalmars-d-announce
On 05/15/2016 05:33 PM, Joseph Rushton Wakeling wrote: Ah, interesting. I think you may have discovered a bug in `isForwardRange`, because that test _should_ have detected that, if BaseRNG is a forward range, the RNG accessed via `alias this` is also `save`able. For a forward range, save must

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 15 May 2016 at 15:33:24 UTC, Joseph Rushton Wakeling wrote: I think you may have discovered a bug in `isForwardRange` Less a bug than a subtlety, it seems. Because of this line:

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 15 May 2016 at 15:15:30 UTC, Basile B. wrote: I confirm that all of them are run. As in your original paste. All pass, 100% coverage. No problem. Anyway, NVM I should just take care of my own buisness... Ah, interesting. I think you may have discovered a bug in `isForwardRange`,

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Basile B. via Digitalmars-d-announce
On Sunday, 15 May 2016 at 14:49:16 UTC, Joseph Rushton Wakeling wrote: On Sunday, 15 May 2016 at 14:25:44 UTC, Basile B. wrote: The wrapper could be smaller with an alias this: [... snip ...] even if I'm not 100% sure if this is conform with previous version. At least the tests pass. I'm

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 15 May 2016 at 14:25:44 UTC, Basile B. wrote: The wrapper could be smaller with an alias this: [... snip ...] even if I'm not 100% sure if this is conform with previous version. At least the tests pass. I'm surprised that one passes the test, static

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Basile B. via Digitalmars-d-announce
On Sunday, 15 May 2016 at 13:26:52 UTC, Joseph Rushton Wakeling wrote: On Sunday, 15 May 2016 at 11:15:38 UTC, Joseph Rushton Wakeling wrote: On Sunday, 15 May 2016 at 10:43:55 UTC, Joseph Rushton Wakeling wrote: Probably the best way to handle this is to handle the take-the-address side of

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 15 May 2016 at 11:15:38 UTC, Joseph Rushton Wakeling wrote: On Sunday, 15 May 2016 at 10:43:55 UTC, Joseph Rushton Wakeling wrote: Probably the best way to handle this is to handle the take-the-address side of things by a @trusted wrapper that uses `return ref` to guarantee the

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 15 May 2016 at 10:43:55 UTC, Joseph Rushton Wakeling wrote: Probably the best way to handle this is to handle the take-the-address side of things by a @trusted wrapper that uses `return ref` to guarantee the pointer remains valid for the lifetime of the wrapper itself. Note, I've

Re: dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 15 May 2016 at 10:35:11 UTC, Basile B. wrote: The "@disable this" is really a concern, because pointers have to be used (for example if the seed comes from a program option and that the gen is a global var then global var must be a pointer to the stuff). I see that you are

dxorshift: random number generators from the extended Xorshift family

2016-05-15 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
http://code.dlang.org/packages/dxorshift https://github.com/WebDrake/dxorshift Following my earlier list posting , I'm pleased to announce an initial release of a dub package providing some of the RNGs from the extended family of