{"id":16067933,"url":"https://github.com/juanitofatas/cheryl","last_synced_at":"2025-06-11T18:32:23.678Z","repository":{"id":141916540,"uuid":"121301446","full_name":"JuanitoFatas/cheryl","owner":"JuanitoFatas","description":"Ruby translation of Peter Norvig's solution to When is Cheryl's birthday problem","archived":false,"fork":false,"pushed_at":"2018-02-13T07:02:35.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T12:10:41.439Z","etag":null,"topics":["cheryl","ruby"],"latest_commit_sha":null,"homepage":"https://github.com/JuanitoFatas/cheryl","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuanitoFatas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-02-12T21:02:18.000Z","updated_at":"2018-02-13T14:46:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e623eab2-4a62-4bfe-b5dd-4d9dcb12639e","html_url":"https://github.com/JuanitoFatas/cheryl","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"70b6b8dd03b701293d3482a6ca0a98f7fdae36cc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JuanitoFatas/cheryl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoFatas%2Fcheryl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoFatas%2Fcheryl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoFatas%2Fcheryl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoFatas%2Fcheryl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuanitoFatas","download_url":"https://codeload.github.com/JuanitoFatas/cheryl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoFatas%2Fcheryl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259316589,"owners_count":22839525,"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","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":["cheryl","ruby"],"created_at":"2024-10-09T06:06:53.861Z","updated_at":"2025-06-11T18:32:23.635Z","avatar_url":"https://github.com/JuanitoFatas.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is my Ruby translation to Peter Norvig's [solution to When is Cheryl's Birthday problem][norvig-cheryl-py].\n\n# When is Cheryl's Birthday?\n\n1. Albert and Bernard just became friends with Cheryl, and they want to know when her birthday is. Cheryl gave them a list of 10 possible dates:\n\n    ```\n        May 15     May 16     May 19\n       June 17    June 18\n       July 14    July 16\n     August 14  August 15  August 17\n    ```\n\n2. Cheryl then tells Albert and Bernard separately the month and the day of the birthday respectively.\n3. Albert: I don't know when Cheryl's birthday is, but I know that Bernard does not know too.\n4. Bernard: At first I don't know when Cheryl's birthday is, but I know now.\n5. Albert: Then I also know when Cheryl's birthday is.\n6. So when is Cheryl's birthday?\n\nView Peter Norvig's solution translate in Ruby:\n\n- [Create abstraction for cheryl's possible dates](https://github.com/JuanitoFatas/cheryl/commit/5979188)\n- [Cheryl tells part of birthday](https://github.com/JuanitoFatas/cheryl/commit/32f1943)\n- [Person knows birthday if possible date only one](https://github.com/JuanitoFatas/cheryl/commit/34e3e2d)\n- [Statement 3 - Albert: I don't know when Cheryl's birthday is, but I know that Bernard does not know too](https://github.com/JuanitoFatas/cheryl/commit/78382b7)\n- [Statement 4 - Bernard: At first I don't know when Cheryl's birthday is, but I know now](https://github.com/JuanitoFatas/cheryl/commit/8289a1c)\n- [Statement 5 - Albert: Then I also know when Cheryl's birthday is](https://github.com/JuanitoFatas/cheryl/commit/7057899)\n- [So when is Cheryl's birthday?](https://github.com/JuanitoFatas/cheryl/commit/5240c10)\n\n## Credits\n\nSee [norvig/pytudes - Python programs to practice or demonstrate skills][pytudes], it's gold.\n\n[norvig-cheryl-py]: https://github.com/norvig/pytudes/blob/master/ipynb/Cheryl.ipynb\n[pytudes]: https://github.com/norvig/pytudes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanitofatas%2Fcheryl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuanitofatas%2Fcheryl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanitofatas%2Fcheryl/lists"}