{"id":15517333,"url":"https://github.com/skx/turtle","last_synced_at":"2025-04-11T01:42:18.337Z","repository":{"id":150430554,"uuid":"297370908","full_name":"skx/turtle","owner":"skx","description":"A simple turtle-implementation, using FORTH as a scripting-language","archived":false,"fork":false,"pushed_at":"2020-09-24T03:31:05.000Z","size":603,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-21T10:59:02.433Z","etag":null,"topics":["forth","forth-like","go","golang","scripting-engine","scripting-language"],"latest_commit_sha":null,"homepage":"","language":"Go","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/skx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"skx","custom":"https://steve.fi/donate/"}},"created_at":"2020-09-21T14:49:18.000Z","updated_at":"2024-06-19T07:59:34.770Z","dependencies_parsed_at":"2023-04-24T17:27:14.061Z","dependency_job_id":null,"html_url":"https://github.com/skx/turtle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fturtle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fturtle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fturtle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fturtle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skx","download_url":"https://codeload.github.com/skx/turtle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248327486,"owners_count":21085251,"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":["forth","forth-like","go","golang","scripting-engine","scripting-language"],"created_at":"2024-10-02T10:12:37.882Z","updated_at":"2025-04-11T01:42:18.305Z","avatar_url":"https://github.com/skx.png","language":"Go","readme":"# turtle\n\nThis repository contains a trivial implementation of a turtle-graphics\nthing.\n\nWe've embedded a simple [FORTH Interpreter](https://github.com/skx/foth) and\nwe use that to allow the user to run scripts to control the standard turtle.\n\n\n## Usage\n\nRun the application with the path to a script:\n\n      ./turtle ./foo.in\n\nThe generated output will be saved in `turtle.png`, and an animation will be saved alongside it as `turtle.gif`:\n\nRendered output of [_examples/squares.4th](_examples/squares.4th):\n\n![Result](turtle.png)\n\nAnimated output of [_examples/squares.4th](_examples/squares.4th), showing how it was created:\n\n![Result Animated](turtle.gif)\n\nYou can find example scripts beneath [_examples/](_examples/)\n\n\n\n## Words\n\nThe following words are defined in [words.go](words.go) (and connected to the interpreter in `main.go`):\n\n* `direction`\n  * Pop one word from the stack, set the direction to that value.\n* `forward`\n  * Pop one word from the stack, move that much forward.\n* `move`\n  * Pop two words off the stack, move to the specified coordinates.\n  * Note `move` is like a teleport, there is no drawing involved.\n* `pen`\n  * Pope one word from the stack, if 0 lift the pen, else lower it.\n  * Drawing only occurs when the pen is down.\n* `save`\n  * Saves the current state of the paper, and the animation of how we got there.\n* `turn`\n  * Pop one word from the stack, increase the movement direction by that many degrees.\n\n\n# Github Setup\n\nThis repository is configured to run tests upon every commit, and when pull-requests are created/updated.  The testing is carried out via [.github/run-tests.sh](.github/run-tests.sh) which is used by the [github-action-tester](https://github.com/skx/github-action-tester) action.\n","funding_links":["https://github.com/sponsors/skx","https://steve.fi/donate/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Fturtle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskx%2Fturtle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Fturtle/lists"}