{"id":23080218,"url":"https://github.com/olemorud/forth","last_synced_at":"2025-10-10T17:41:04.188Z","repository":{"id":164475251,"uuid":"639383259","full_name":"olemorud/forth","owner":"olemorud","description":"Interpreter in Haskell for a very simple subset of Forth","archived":false,"fork":false,"pushed_at":"2023-05-12T13:20:31.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T13:44:37.505Z","etag":null,"topics":["forth-like","haskell"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/olemorud.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":"2023-05-11T11:10:55.000Z","updated_at":"2023-05-15T11:31:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"248034e9-0f5a-45b9-b18c-7998059dc75c","html_url":"https://github.com/olemorud/forth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/olemorud/forth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olemorud%2Fforth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olemorud%2Fforth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olemorud%2Fforth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olemorud%2Fforth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olemorud","download_url":"https://codeload.github.com/olemorud/forth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olemorud%2Fforth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004823,"owners_count":26083784,"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-10T02:00:06.843Z","response_time":62,"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":["forth-like","haskell"],"created_at":"2024-12-16T13:05:51.529Z","updated_at":"2025-10-10T17:41:04.114Z","avatar_url":"https://github.com/olemorud.png","language":"Haskell","readme":"\n# Forth Interpreter in Haskell\n\nImplements a very simple subset of Forth\n\nInspired by https://exercism.org/tracks/haskell/exercises/forth\n\n## Run\n```sh\nghci forth.hs\n```\n\n## Usage \n\nCalculate 2 + 8\n```haskell\n*Forth\u003e run \"2 8 +\"\nRight ForthState [10]\n```\n\nPush 1 to stack and duplicate it three times\n```haskell\n*Forth\u003e run \"1 DUP DUP DUP\"\nRight ForthState [1,1,1,1]\n```\n\nCalculate 5 + (5\\*8)\n```haskell\n*Forth\u003e run \"5 8 OVER * +\"\nRight ForthState [45]\n```\n\n## Instructions\n\n| Instruction |                                 | Description                 |\n|:-----------:|---------------------------------|:----------------------------|\n|      +      | [a, b, ...] -\u003e [a+b, ...]     | Pop two items, a and b, from stack. Push a+b to top  |\n|      -      | [a, b, ...] -\u003e [a-b, ...]     | Pop two items, a and b, from stack. Push a-b to top  |\n|     \\*      | [a, b, ...] -\u003e [a\\*b, ...]    | Pop two items, a and b, from stack. Push a\\*b to top |\n|      /      | [a, b, ...] -\u003e [a/b, ...]     |  Pop two items, a and b, from stack. Push a/b to the top\u003cbr /\u003e Returns Left DivisionByZero if b is 0 |\n|    DUP      | [a, b, ...] -\u003e [a, a, b, ...] | Copy the top stack item and push it to the top       |\n|    DROP     | [a, b, ...] -\u003e [b, ...]       | Discard the top of the stack                         |\n|    SWAP     | [a, b, ...] -\u003e [b, a, ...]    | Pop two values, a and b, from the stack.\u003cbr /\u003ePush them back in swapped order |\n|    OVER     | [a, b, ...] -\u003e [b, a, b, ...] | Copy the next value after the top of the\u003cbr /\u003e stack and push it to the top    |\n| Any number  | [a, b, ...] -\u003e [x, a, b, ...] | Push number to top of stack. Integers only |\n\n\n## Read more\n\n#### Forth (programming language), Wikipedia\n\nhttps://en.wikipedia.org/wiki/Forth_(programming_language)#Overview\n\n#### Starting _FORTH_\n\nhttps://www.forth.com/starting-forth/0-starting-forth/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folemorud%2Fforth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folemorud%2Fforth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folemorud%2Fforth/lists"}