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

Feat/fuzz #33

Merged
merged 8 commits into from
Oct 13, 2024
Merged

Feat/fuzz #33

merged 8 commits into from
Oct 13, 2024

Conversation

miroim
Copy link
Contributor

@miroim miroim commented Oct 12, 2024

Description

add fuzz

Related Issue

part of #22

Dependencies change

add rand as [dev-dependencies] for test

@miroim
Copy link
Contributor Author

miroim commented Oct 12, 2024

@L-M-Sherlock Would you mind reviewing my recent code changes?

src/scheduler.rs Outdated Show resolved Hide resolved
src/scheduler.rs Outdated
fn init_seed(parameters: &mut Parameters, current: &Card, now: DateTime<Utc>) {
let time = now.timestamp_millis();
fn init_seed(parameters: &mut Parameters, current: &Card) {
let time = Utc::now().timestamp_millis();
let reps = current.reps;
let mul = current.difficulty * current.stability;
parameters.seed = Seed::new(format!("{}_{}_{}", time, reps, mul));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameters.seed = Seed::new(format!("{time}_{reps}_{mul}"));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait. I feel confused. Maybe it's a problem from the source: ts-fsrs.

open-spaced-repetition/ts-fsrs#131

src/lib.rs Outdated Show resolved Hide resolved
src/alea.rs Outdated Show resolved Hide resolved
src/alea.rs Outdated Show resolved Hide resolved
@asukaminato0721
Copy link
Collaborator

I am ok with the code, waiting for @L-M-Sherlock 's opinion.

Copy link
Member

@L-M-Sherlock L-M-Sherlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But the fuzz seed needs refactoring in the future.

@L-M-Sherlock L-M-Sherlock merged commit d4bd8b3 into open-spaced-repetition:master Oct 13, 2024
4 checks passed
@miroim
Copy link
Contributor Author

miroim commented Oct 13, 2024

the fuzz seed needs refactoring in the future.

ok

@miroim miroim deleted the feat/fuzz branch October 13, 2024 16:24
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

Successfully merging this pull request may close these issues.

3 participants