{"id":16195707,"url":"https://github.com/kitlangton/eulerplate","last_synced_at":"2025-07-17T10:37:37.866Z","repository":{"id":25411548,"uuid":"28840606","full_name":"kitlangton/eulerplate","owner":"kitlangton","description":"A tool for generating Haskell boilerplate for solving Hacker Rank challenges.","archived":false,"fork":false,"pushed_at":"2018-08-02T04:46:56.000Z","size":40,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T05:21:12.631Z","etag":null,"topics":["hackerrank","haskell"],"latest_commit_sha":null,"homepage":"","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/kitlangton.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-06T01:24:22.000Z","updated_at":"2022-11-04T11:21:38.000Z","dependencies_parsed_at":"2022-09-09T21:11:06.039Z","dependency_job_id":null,"html_url":"https://github.com/kitlangton/eulerplate","commit_stats":null,"previous_names":["sudokill/eulerplate"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kitlangton/eulerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlangton%2Feulerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlangton%2Feulerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlangton%2Feulerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlangton%2Feulerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitlangton","download_url":"https://codeload.github.com/kitlangton/eulerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlangton%2Feulerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265596034,"owners_count":23794828,"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":["hackerrank","haskell"],"created_at":"2024-10-10T08:45:04.725Z","updated_at":"2025-07-17T10:37:37.818Z","avatar_url":"https://github.com/kitlangton.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eulerplate 🧙‍\n\nA tool for generating Haskell boilerplate for solving Hacker Rank challenges.\n\n- Generates a spec file for a challenge from a challenge's problem sets.\n- Generates a copy-pastable solution stub, inferring the input and output types from the challenge.\n\n## Set Up\n\n1. Clone this repo (`git clone git@github.com:kitlangton/eulerplate.git`).\n2. Then `cd eulerplate` and run `stack install`.\n3. Run `eulerplate --new` where you'd like to create the `hacker-rank-hs` project folder.\n4. Start downloading challenges (see Example).\n\n## Example\n\nSay you're working on the Hacker Rank challenge [Divisble Sum Pairs](https://www.hackerrank.com/challenges/divisible-sum-pairs/problem). \n\n1. Identify the challenge id in the url (`divisible-sum-pairs`)\n2. Execute `eulerplate --download divisible-sum-pairs` in the terminal. This will create two new files (one for your solution and the other for your spec) in your Haskell Project:\n\n```\n-- Eulerplate generated module for DivisibleSumPairs\n-- Challenge url: https://www.hackerrank.com/challenges/divisible-sum-pairs/problem.\nmodule Practice.Algorithms.Implementation.DivisibleSumPairs where\n\n-- Write your solution in here.\n-- We've attempted to parse the types from the problem sets,\n-- but feel free to change it in case we messed up :)\ndivisibleSumPairs :: [Int] -\u003e [Int] -\u003e Int\ndivisibleSumPairs = undefined\n\nmain :: IO ()\nmain = do\n  (a, b) \u003c- getInput\n  printOutput $ divisibleSumPairs a b\n\ngetInput :: IO ([Int], [Int])\ngetInput = do\n  a \u003c- fmap read . words \u003c$\u003e getLine :: IO [Int]\n  b \u003c- fmap read . words \u003c$\u003e getLine :: IO [Int]\n  return (a, b)\n\nprintOutput :: Int -\u003e IO ()\nprintOutput (a) = do\n  print a\n```\n\n```\n-- Eulerplate generated spec for DivisibleSumPairs\n-- Challenge url: https://www.hackerrank.com/challenges/divisible-sum-pairs/problem.\nmodule Practice.Algorithms.Implementation.DivisibleSumPairsSpec where\n\nimport Practice.Algorithms.Implementation.DivisibleSumPairs\nimport Test.Hspec\n\nspec :: SpecWith ()\nspec = describe \"DivisibleSumPairs\" $ do\n  it \"solves Test Case #0\" $\n    divisibleSumPairs [6, 3] [1, 3, 2, 6, 1, 2] `shouldBe` 5\n\n  it \"solves Test Case #12\" $\n    divisibleSumPairs [100, 77] [85, 42, 54, 62, 79, 71, 29, 61, 1, 92, 93, 99, 82, 5, 45, 55, 49, 49, 93, 45, 2, 53, 80, 68, 51, 15, 42, 8, 5, 45, 95, 90, 4, 5, 45, 56, 20, 66, 32, 65, 11, 48, 41, 10, 92, 41, 8, 23, 88, 50, 90, 2, 3, 88, 29, 34, 54, 83, 91, 37, 95, 11, 7, 48, 96, 2, 84, 50, 20, 97, 95, 85, 80, 87, 99, 34, 40, 33, 78, 6, 58, 82, 49, 37, 35, 12, 85, 73, 96, 7, 63, 36, 73, 3, 96, 23, 5, 75, 16, 41] `shouldBe` 44\n```\n\n3. Write your solution.\n4. Run `stack test` to execute the tests.\n5. Copy and paste your solution (everything except for the `module` declaration) into the browser.\n6. Hooray!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitlangton%2Feulerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitlangton%2Feulerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitlangton%2Feulerplate/lists"}