{"id":20631041,"url":"https://github.com/gfarrell/random-puzzles-hs","last_synced_at":"2026-04-21T01:31:09.505Z","repository":{"id":142037775,"uuid":"257710131","full_name":"gfarrell/random-puzzles-hs","owner":"gfarrell","description":"Random puzzles in Haskell","archived":false,"fork":false,"pushed_at":"2020-04-23T16:02:47.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T09:06:30.717Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gfarrell.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}},"created_at":"2020-04-21T20:38:19.000Z","updated_at":"2020-04-23T16:02:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"66205810-b144-4356-8878-49ab72fbaf9e","html_url":"https://github.com/gfarrell/random-puzzles-hs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gfarrell/random-puzzles-hs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfarrell%2Frandom-puzzles-hs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfarrell%2Frandom-puzzles-hs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfarrell%2Frandom-puzzles-hs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfarrell%2Frandom-puzzles-hs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gfarrell","download_url":"https://codeload.github.com/gfarrell/random-puzzles-hs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfarrell%2Frandom-puzzles-hs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32072953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-16T14:10:38.046Z","updated_at":"2026-04-21T01:31:09.484Z","avatar_url":"https://github.com/gfarrell.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Random Puzzles\n\nA collection of random puzzles written in Haskell. Some of these will be\nideas for interview challenges.\n\nThere is no executable version of this, it is designed to be run as\ntests only. To run the puzzles, use `stack test`.\n\nIf you can think of more fun puzzles let me know and I'll add them!\n\n## 01: Rectangles\n\n*Aim:* find the top left and bottom right corners of a series of\nrectangles in an image. The image is represented as a matrix of `Pixel`s\n(`[[Pixel]]`), which can be either `On` or `Off`.\n\nTo make this a bit easier, the *only* shapes will be rectangles, and\nthey won't overlap, so you don't have to worry about other polygons.\n\n### Example\n\n```haskell\nlet image = [ [Off, Off, Off, Off, Off, Off, Off]\n            , [Off, Off, Off, Off, Off, Off, Off]\n            , [Off, Off, Off,  On,  On,  On, Off]\n            , [Off, Off, Off,  On,  On,  On, Off]\n            , [Off, Off, Off, Off, Off, Off, Off] ]\n```\n\nWe would expect the result of this to be a pair of coordinates:\n\n- Top left: (3, 2)\n- Bottom right: (5, 3)\n\n### Files:\n\n- [source](src/Rectangles.hs)\n- [proof](test/RectanglesSpec.hs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfarrell%2Frandom-puzzles-hs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgfarrell%2Frandom-puzzles-hs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfarrell%2Frandom-puzzles-hs/lists"}