Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed seed for the stream #1

Open
LostKobrakai opened this issue Sep 5, 2018 · 2 comments
Open

Fixed seed for the stream #1

LostKobrakai opened this issue Sep 5, 2018 · 2 comments

Comments

@LostKobrakai
Copy link

For an application of mine I'd like to keep the same colors per section, so that e.g. a reload won't result in different colors being presented.

@nickveys
Copy link
Member

nickveys commented Sep 5, 2018

Good idea, I'll take a look at adding that.

@nickveys
Copy link
Member

nickveys commented Sep 6, 2018

If you were to send a fixed (but most likely different) set of initial values for each stream instance, you should get deterministic results. Otherwise, since these are random and based on a seed that is stored in the current process, this would need to be modified to have one stream per-process and set the seed in that process before starting the streaming values.

If you want to take a crack at it and send a PR, this article seems to have a reasonable approach described (http://learningelixir.joekain.com/stream-patterns-in-elixir-3/). Otherwise I'm not sure when I'd be able to get around to it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants