{"id":13782690,"url":"https://github.com/thea-leake/crisp","last_synced_at":"2025-05-11T16:31:00.166Z","repository":{"id":73639670,"uuid":"128028396","full_name":"thea-leake/crisp","owner":"thea-leake","description":"A Lisp interpreter/dialect written in C.","archived":false,"fork":false,"pushed_at":"2023-02-08T17:02:27.000Z","size":282,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T18:16:46.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thea-leake.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":"2018-04-04T08:00:09.000Z","updated_at":"2023-02-08T17:02:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfbb807d-9a29-4a29-b0e8-f5e5a3988a59","html_url":"https://github.com/thea-leake/crisp","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/thea-leake%2Fcrisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thea-leake%2Fcrisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thea-leake%2Fcrisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thea-leake%2Fcrisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thea-leake","download_url":"https://codeload.github.com/thea-leake/crisp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225068725,"owners_count":17416122,"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":[],"created_at":"2024-08-03T18:01:41.767Z","updated_at":"2024-11-17T17:31:57.650Z","avatar_url":"https://github.com/thea-leake.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"A Lisp interpreter written in C built around recursing - hence the name crisp.\n\nIt originally started using the [Build Your Own Lisp](http://www.buildyourownlisp.com/) book as a reference but switched early on to personal exploration as I found I wanted the interpretor to behave internally more like Scheme.  This was created as an exercise to learn C, and to write an interpreter, as I've wanted to do both for a while.  Any recommendations and pointers are welcome, but keep in mind this wasn't written for use in the wild :).\n\n# Notes:\n - It currently uses Clangs TCO build option, however many of the recursive functions are currently not TCO compatible.\n - It still has one loop - for the repl - the l part of 'repl'.\n - Numeric functions automatically downcast return to int when return val can be losslessly converted to int.\n - Repo for documentation is [here](https://github.com/thea-leake/crispy-docs).\n - Documentation is hosted [here](https://thea-leake.github.io/crisp/).\n\n# Build:\n``` make build```\nBuilds interpreter and places it in ```bin/crispy```\n\n``` make debug```\nBuilds interpreter with debug symbols and places at ```bin/crispy-debug```\n\n# Clean:\n``` make clean```\n\n# Dependencies:\nDependencies are stored in `deps/` and should be included in the repo by default.\nDependencies are pulled in by [clib](https://github.com/clibs/clib)\nDependencies can be pulled in again via `make deps`, or removed w/ `make cleandeps`.\n\nCurrent external dependencies are:\n - [mpc](https://github.com/orangeduck/mpc): for parsing code into AST.\n\n# Example usage:\n```lisp\n./bin/crispy\nCrispy lisp interpreter.  Type (quit) to exit.\ncrispy\u003e (define nil? (lambda '(x) '(if (= nil x) true false)))\nnil\ncrispy\u003e (nil? 5)\nfalse\ncrispy\u003e (nil? nil)\ntrue\ncrispy\u003e (define true? (lambda '(x) '(if x true false)))\nnil\ncrispy\u003e (true? 1)\ntrue\ncrispy\u003e (true? nil)\nfalse\ncrispy\u003e (true? true)\ntrue\ncrispy\u003e (define false? (lambda '(x) '(if x false true)))\nnil\ncrispy\u003e (false? 1)\nfalse\ncrispy\u003e (false? nil)\ntrue\ncrispy\u003e (false? false)\ntrue\ncrispy\u003e (define range (lambda '(r) '(let '(b (lambda '(c d) '(if (= c 0) d (b (- c 1 ) (cons c d )) )))  b r '()  )))\nnil\ncrispy\u003e (range 25)\n(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)\ncrispy\u003e ((lambda '() '( + 1 4 )))\n5\ncrispy\u003e (or false false nil )\nnil\ncrispy\u003e (or false  \"grr\" 1 true)\n\"grr\"\ncrispy\u003e (define b \"rarr\")\nnil\ncrispy\u003e (= \"grr\" b)\nfalse\ncrispy\u003e (define c 1)\nnil\ncrispy\u003e (and true c 3 false 4)\nfalse\ncrispy\u003e (and true c 3 )\n3\ncrispy\u003e ^D\nEnding session.\nGoodbye.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthea-leake%2Fcrisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthea-leake%2Fcrisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthea-leake%2Fcrisp/lists"}