expose sibling method with seed #1

Closed
Roms1383 wants to merge 0 commits from Roms1383:feat/seed into master
Roms1383 commented 1 year ago

expose seed parameter from crc32.

expose seed parameter from crc32.
Roms1383 added 1 commit 1 year ago
Poster

any update on this @jstrong ?

any update on this @jstrong ?
Owner

hey - apologies for the delay in responding, I did not get an alert and didn''t realize this issue existed until now!

Regarding the PR - can you provide "docstring" comment describing the new function which explains what a seed is in this context? I think that would be useful to people looking at the docs initially.

hey - apologies for the delay in responding, I did not get an alert and didn''t realize this issue existed until now! Regarding the PR - can you provide "docstring" comment describing the new function which explains what a seed is in this context? I think that would be useful to people looking at the docs initially.
Poster

apologies too, I spend most of my time on Github and only noticed your reply yesterday.

looking at the commits it seems this branch is outdated and you already applied the changes: if so, it can probably be closed. also, is the "docstring" still required ?

apologies too, I spend most of my time on Github and only noticed your reply yesterday. looking at the commits it seems this branch is outdated and you already applied the changes: if so, it can probably be closed. also, is the "docstring" still required ?
Owner

well - you can just put one here if you know what it should be ... I'll add it ... I published an rc version to crates.io so it would at least exist for you there.

well - you can just put one here if you know what it should be ... I'll add it ... I published an rc version to crates.io so it would at least exist for you there.
Poster

So generally speaking, sometimes providing a seed is useful to guarantee reproductible, deterministic result.

We use crc32 to generate in-game identifiers for Cyberpunk 2077 modding which, under the hood, uses predefined seed based on identifier type.

For example, in the game a TweakDBID uses 0 as its seed.

The exact definition can probably be copied from rand crate, for example from_seed method.

So generally speaking, sometimes providing a seed is useful to guarantee reproductible, deterministic result. We use `crc32` to generate in-game identifiers for Cyberpunk 2077 modding which, under the hood, uses predefined seed based on identifier type. For example, in the game a [TweakDBID](https://github.com/WopsS/RED4ext.SDK/blob/master/include/RED4ext/NativeTypes.hpp#L81) uses `0` as its seed. The exact definition can probably be copied from `rand` crate, for example [from_seed method](https://docs.rs/rand/latest/rand/trait.SeedableRng.html#tymethod.from_seed).
Owner

added docstring + tests and published v1.3.0 to crates.io. Thanks for the PR!

added docstring + tests and published [v1.3.0](https://crates.io/crates/const-crc32/1.3.0) to crates.io. Thanks for the PR!
jstrong closed this pull request 9 months ago
Roms1383 deleted branch feat/seed 9 months ago
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.