Fixed internal state for serialization #1

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

I needed to store and send mersenne twister objects so I encapsulated the state so it can be serialized to JSON, and unserialized back from the exported state

Owner

jwatte commented Dec 13, 2011

Thanks for the suggestion!
The comments got screwed up by a global search/replace, though -- do you
think you could fix and re-patch?

Sincerely,

jw

Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.

On Mon, Dec 12, 2011 at 9:14 PM, FugueNation <
reply@reply.github.com

wrote:

I needed to store and send mersenne twister objects so I encapsulated the
state so it can be serialized to JSON, and unserialized back from the
exported state

You can merge this Pull Request by running:

git pull https://github.com/FugueNation/node-mersenne master

Or you can view, comment on it, or merge it online at:

#1

-- Commit Summary --

  • encapsulated internal state so the MT object can be serialized and
    unserialized

-- File Changes --

M lib/mersenne.js (106)

-- Patch Links --

https://github.com/jwatte/node-mersenne/pull/1.patch
https://github.com/jwatte/node-mersenne/pull/1.diff


Reply to this email directly or view it on GitHub:
#1

Owner

jwatte commented Dec 13, 2011

Actually, it would be great if you didn't break the API to rand(), where it
expects a value, too.

Sincerely,

jw

Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.

On Mon, Dec 12, 2011 at 9:14 PM, FugueNation <
reply@reply.github.com

wrote:

I needed to store and send mersenne twister objects so I encapsulated the
state so it can be serialized to JSON, and unserialized back from the
exported state

You can merge this Pull Request by running:

git pull https://github.com/FugueNation/node-mersenne master

Or you can view, comment on it, or merge it online at:

#1

-- Commit Summary --

  • encapsulated internal state so the MT object can be serialized and
    unserialized

-- File Changes --

M lib/mersenne.js (106)

-- Patch Links --

https://github.com/jwatte/node-mersenne/pull/1.patch
https://github.com/jwatte/node-mersenne/pull/1.diff


Reply to this email directly or view it on GitHub:
#1

Thanks for the feedback! Fixed the API and comments

Best regards
Robert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment