{"id":20993186,"url":"https://github.com/mkirchner/stutter","last_synced_at":"2025-05-14T20:33:30.660Z","repository":{"id":37730886,"uuid":"182472099","full_name":"mkirchner/stutter","owner":"mkirchner","description":"Implement a Lisp, in C, from scratch, no libs","archived":false,"fork":false,"pushed_at":"2022-06-22T07:12:47.000Z","size":1425,"stargazers_count":81,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-02T23:22:49.186Z","etag":null,"topics":["ast","c","from-scratch","lexer","lisp","make-a-lisp","parser"],"latest_commit_sha":null,"homepage":"","language":"C","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/mkirchner.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}},"created_at":"2019-04-21T01:41:12.000Z","updated_at":"2025-03-21T10:57:43.000Z","dependencies_parsed_at":"2022-08-08T21:30:35.826Z","dependency_job_id":null,"html_url":"https://github.com/mkirchner/stutter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchner%2Fstutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchner%2Fstutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchner%2Fstutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchner%2Fstutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkirchner","download_url":"https://codeload.github.com/mkirchner/stutter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254222546,"owners_count":22034898,"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":["ast","c","from-scratch","lexer","lisp","make-a-lisp","parser"],"created_at":"2024-11-19T07:14:01.171Z","updated_at":"2025-05-14T20:33:30.339Z","avatar_url":"https://github.com/mkirchner.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/mkirchner/stutter/workflows/C/C++%20CI/badge.svg)\n\nStutter - Lisp, from scratch, in C\n==================================\n\n![screenshot](doc/screenshot.png)\n\n`stutter` is an educational Lisp interpreter implementation in C, written\nentirely from scratch, not using any libraries (with the notable exception of\n`editline` to maintain my sanity).\n\nIn other words, `stutter` is a practical exercise in a broad set of CS topics\nincluding\n\n* formal languages (lexing, parsing, abstract syntax trees)\n* metalinguistic evaluation (eval/apply, macros)\n* data structures (lists, trees, maps, arrays)\n* automatic memory management (mark \u0026 sweep garbage collection)\n\nAll of it is implemented in one of the most bare-bones, down-to-earth\n(and unforgiving) languages out there: C99.\n\n`stutter` is a work in progress (and will be, for the forseeable future). See\n[the tests](test/lang/) to get an idea of what the language is already capable\nof.\n\n\nThe Rules\n---------\n\nObviously, in modern our modern times, writing a Lisp interpreter is not\nas challenging as it used to be since there are a lot of libraries that can\nhelp us to achieve that goal. Hence, two rules:\n\n1. Write everything from scratch.\n2. Do not question the rules.\n\n\nGetting started\n---------------\n\nClone the repo and its submodules (submodules because the garbarge collector is in a [separate repo](https://github.com/mkirchner/gc)).\n\n```bash\n$ git clone --recursive git@github.com:mkirchner/stutter.git\n$ cd stutter\n$ make \u0026\u0026 make test\n```\n\nThis should work on a Mac with a recent `clang`. No efforts to make it portable\n(yet).\n\n\n### Next steps\n\n- [ ] Add a VM and support to compile to bytecode\n- [ ] Document core language\n- [ ] Better error reporting\n  - [ ] Surface lexer token line/col info in the reader\n- [ ] Core capabilities\n  - [ ] `keyword` support\n  - [ ] `vector` support (`Array` C type is implemented but not surfaced)\n  - [ ] `hash-map` support (`Map` C type is available but not surfaced)\n- [ ] Add a type system\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkirchner%2Fstutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkirchner%2Fstutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkirchner%2Fstutter/lists"}