{"id":13755929,"url":"https://github.com/isaacvando/gob","last_synced_at":"2026-03-03T01:41:02.131Z","repository":{"id":207988278,"uuid":"696080586","full_name":"isaacvando/gob","owner":"isaacvando","description":"Stack based language written in Roc","archived":false,"fork":false,"pushed_at":"2024-07-28T22:11:40.000Z","size":8780,"stargazers_count":19,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T23:11:31.695Z","etag":null,"topics":["interpreter","roc-lang","stack-based"],"latest_commit_sha":null,"homepage":"","language":"Roc","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaacvando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-09-25T03:25:23.000Z","updated_at":"2025-08-29T08:40:51.000Z","dependencies_parsed_at":"2023-11-18T23:22:05.074Z","dependency_job_id":"50a4963f-a247-4cd0-9b90-224e5a537fa2","html_url":"https://github.com/isaacvando/gob","commit_stats":null,"previous_names":["isaacvando/gob"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/isaacvando/gob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacvando%2Fgob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacvando%2Fgob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacvando%2Fgob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacvando%2Fgob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaacvando","download_url":"https://codeload.github.com/isaacvando/gob/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacvando%2Fgob/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30029706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T00:31:48.536Z","status":"ssl_error","status_checked_at":"2026-03-03T00:30:56.176Z","response_time":60,"last_error":"SSL_read: 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":["interpreter","roc-lang","stack-based"],"created_at":"2024-08-03T11:00:33.029Z","updated_at":"2026-03-03T01:41:02.084Z","avatar_url":"https://github.com/isaacvando.png","language":"Roc","funding_links":[],"categories":["Roc Applications 💾"],"sub_categories":[],"readme":"# Gob 🐱\n\nGob is a very small stack based programming language.\n\nEvery program is a sequence of values that operate on a single global stack. For example, the following program evaluates to 9:\n```\n# examples/sum.gob\n4 5 +\n```\n```bash\n$ gob examples/sum.gob --debug\n | 4 5 +\n4 | 5 +\n4 5 | +\n9 | \n9\n```\n\nEverything on the left of the `|` is the current state of the stack and everything on the right is the current state of the program. First `4` is pushed on the stack, followed by `5`, at which point `+` pops both numbers off the stack, sums them, and pushes the answer back on the stack. At that point the program is complete so the execution finishes by outputting `9`.\n\nMore examples can be found in [./examples](./examples). \n\n## Features\nThe data types Gob currently supports are strings, integers, booleans, and quotations. \n```\n\"Hello World!\"\n-1729\ntrue\n[10 445 +]\n``` \n\nThe full list of supported functions can be found in the code.\n\n### Piping programs\nDue to the nature of stack based programs, you can compose two together simply by concatenating them. Gob takes advantage of this by allowing you to pipe a program into the interpreter and combine it with the program read from a file. \n\nFor example, the factorial program reads its argument from stdin\n```bash\n$ echo 7 | gob examples/factorial.gob --pipe\n5040\n```\n\nThis first argument can be any program, so equivalently we can do:\n```bash\n$ echo [3 4 +] apply | gob examples/factorial.gob --pipe\n5040\n```\n\nI think this idea could be very useful for shell scripting because of the ability to easily compose programs directly on the command line. I have not explored it much however, and right now practical benefits are limited by Gob's very small feature set.\n\n### Defs\nGob programs consist of any number of definitions followed by the body of the program. Defs are useful for readability and easily implementing recursion. When a def is referenced in the body of the program, the reference to the def is replaced by its contents. For example, factorial can be implemented like this:\n```\n# examples/factorialDefs.gob\nfact: 1 - isZero [drop] [dup dig * swap fact] branch apply\nisZero: dup 0 =\n\ndup fact\n```\n```bash\n$ echo 10 | gob examples/factorialDefs.gob --pipe\n3628800\n```\n\n### CLI\nTo see the rest of the CLI options, run \n```\ngob --help\n```\n\n## Building from source\nGob's interpreter is implemented in [Roc](https://roc-lang.org), a delightful functional language.\n\nTo use the language, you will need the [Roc compiler](https://github.com/roc-lang/roc).\n\nTo build the interpreter, run \n```bash\nroc build main.roc --output ./gob\n```\n\n## Inspiration\nGob was originally inspired by the excellent talk _[Concatenative programming and stack-based languages](https://youtu.be/umSuLpjFUf8?si=SV1c_Zwc5F4-cPJS)_ by Douglas Creager at Strange Loop 2023.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacvando%2Fgob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaacvando%2Fgob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacvando%2Fgob/lists"}