{"id":28609498,"url":"https://github.com/chaosarium/ocaml-fsrs","last_synced_at":"2025-10-07T03:43:19.403Z","repository":{"id":293185511,"uuid":"980390875","full_name":"chaosarium/ocaml-fsrs","owner":"chaosarium","description":"OCaml implementation of the FSRS algorithm (scheduler only)","archived":false,"fork":false,"pushed_at":"2025-05-24T17:37:14.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T13:10:14.427Z","etag":null,"topics":["fsrs","spaced-repetition-algorithm"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaosarium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-09T03:50:34.000Z","updated_at":"2025-05-24T17:33:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"b722edf0-67da-416c-ae60-52f8a40fa0c4","html_url":"https://github.com/chaosarium/ocaml-fsrs","commit_stats":null,"previous_names":["chaosarium/ocaml-fsrs"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/chaosarium/ocaml-fsrs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaosarium%2Focaml-fsrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaosarium%2Focaml-fsrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaosarium%2Focaml-fsrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaosarium%2Focaml-fsrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaosarium","download_url":"https://codeload.github.com/chaosarium/ocaml-fsrs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaosarium%2Focaml-fsrs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717435,"owners_count":26033539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fsrs","spaced-repetition-algorithm"],"created_at":"2025-06-11T22:01:39.411Z","updated_at":"2025-10-07T03:43:19.382Z","avatar_url":"https://github.com/chaosarium.png","language":"OCaml","funding_links":[],"categories":["Implementation"],"sub_categories":[],"readme":"# fsrs-ocaml\n\nOCaml implementation of the [FSRS](https://github.com/open-spaced-repetition/fsrs4anki) [algorithm](https://github.com/open-spaced-repetition/fsrs4anki/wiki/The-Algorithm).\n\nFor OCaml practice... and for... if someone on planet Earth ever wants an SRS library for their OCaml project[^1].\n\n[^1]: Who knows if that someone would be ourself some day.\n\n## Setup\n\n```sh\nopam install cmdliner\nopam install ocamlformat\nopam install base\n```\n\n## Quickstart\n\n```ocaml\nopen Models\n\nlet () = \n  let params = Parameters.default () in\n  let fsrs = Fsrs.create params in\n  let card = Models.new_card () in\n  \n  let record_log = Fsrs.repeat fsrs card (Timedesc.Timestamp.now ()) in\n  Models.RatingMap.iter (fun rating sched_info -\u003e\n    Printf.printf \"If you answer \\\"%s\\\":\\n\" (Models.show_rating rating);\n    Printf.printf \"  Next card: %s\\n\" (Models.show_card sched_info.card);\n    Printf.printf \"  Review log: %s\\n\" (Models.show_review_log sched_info.review_log);\n    print_endline \"\"\n  ) record_log\n```\n\nRefer to `demo.ml` for the same example, or run the example by running `dune exec demo`.\n\n## Development\n\n```sh\n# to build\ndune build\n# to run unit tests\ndune runtest\n# to run the quickstart example\ndune build \u0026\u0026 dune exec demo\n```\n\nOr refer to commands in `justfile`.\n\n## Release stuff\n\nSomething like\n\n```sh\ngit tag 0.1.0-alpha3\ngit push --tags\nopam publish\n```\n\n## Acknowledgements\n\nThis implementation is largely based on the Rust implementation [rs-fsrs](https://github.com/open-spaced-repetition/rs-fsrs) (MIT license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaosarium%2Focaml-fsrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaosarium%2Focaml-fsrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaosarium%2Focaml-fsrs/lists"}