{"id":13895066,"url":"https://github.com/d-tsuji/gosdlisp","last_synced_at":"2025-12-30T04:05:34.638Z","repository":{"id":100745048,"uuid":"264956671","full_name":"d-tsuji/gosdlisp","owner":"d-tsuji","description":"Mini lisp interpreter written in Go.","archived":false,"fork":false,"pushed_at":"2020-05-27T12:18:05.000Z","size":94,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T08:02:05.178Z","etag":null,"topics":["go","golang","interpreter","lisp","lisp-interpreter","mini-lisp"],"latest_commit_sha":null,"homepage":"","language":"Go","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/d-tsuji.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-18T14:00:40.000Z","updated_at":"2022-11-25T16:08:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e37c64b0-6627-4318-8288-ef80c7284e55","html_url":"https://github.com/d-tsuji/gosdlisp","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/d-tsuji%2Fgosdlisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-tsuji%2Fgosdlisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-tsuji%2Fgosdlisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-tsuji%2Fgosdlisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-tsuji","download_url":"https://codeload.github.com/d-tsuji/gosdlisp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214235928,"owners_count":15703407,"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":["go","golang","interpreter","lisp","lisp-interpreter","mini-lisp"],"created_at":"2024-08-06T18:01:58.171Z","updated_at":"2025-12-30T04:05:34.625Z","avatar_url":"https://github.com/d-tsuji.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"Mini Go Lisp\r\n============\r\n\r\n[![Go Report Card](https://goreportcard.com/badge/github.com/d-tsuji/gosdlisp)](https://goreportcard.com/report/github.com/d-tsuji/gosdlisp)\r\n[![Actions Status](https://github.com/d-tsuji/gosdlisp/workflows/test/badge.svg)](https://github.com/d-tsuji/gosdlisp/actions)\r\n\r\nMini lisp interpreter written in Go. It is implemented with reference to the [d-tsuji/SDLisp](https://github.com/d-tsuji/SDLisp) repository written in Java.\r\n\r\n## Support\r\n\r\n- System Functions\r\n    - `car`\r\n    - `cdr`\r\n    - `cons`\r\n    - `eq`\r\n    - `if` \r\n    - arithmetic operations (`+`, `-`, `*`, `/`)\r\n    - comparative operation (`\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `=`)\r\n- Special\r\n    - `symbol-function`\r\n    - `quote` or `'`\r\n    - `setq`\r\n    - `defun`\r\n\r\n## Usage\r\n\r\n```\r\n$ go run github.com/d-tsuji/gosdlisp/cmd/gosdlisp\r\n```\r\n\r\n## Some examples\r\n\r\n```lisp\r\n\u003e (+ 1 2)\r\n3\r\n```\r\n\r\n```lisp\r\n\u003e (cons 1 '(2 3))\r\n(1 2 3)\r\n```\r\n\r\n```lisp\r\n\u003e (defun 1+ (n) (+ n 1))\r\n1+\r\n\u003e (1+ 10)\r\n11\r\n```\r\n\r\n```lisp\r\n\u003e (defun abs (n) (if (\u003c n 0) (- 0 n) n))\r\nABS\r\n\u003e (abs -1)\r\n1\r\n```\r\n\r\n```lisp\r\n\u003e (defun gcd (m n) (if (= (mod m n) 0) n (gcd n (mod m n))))\r\nGCD\r\n\u003e (gcd 12 18)\r\n6\r\n```\r\n\r\n```lisp\r\n\u003e (defun fact (n) (if (\u003c n 1) 1 (* n (fact (- n 1)))))\r\nFACT\r\n\u003e (fact 10)\r\n3628800\r\n```\r\n\r\n```lisp\r\n\u003e (defun fib (n) (if (\u003c= n 1) n (+ (fib (- n 1)) (fib (- n 2)))))\r\nFIB\r\n\u003e (fib 11)\r\n89\r\n```\r\n\r\nSee [eval_test.go](https://github.com/d-tsuji/gosdlisp/blob/master/eval_test.go) for other examples of how it works.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-tsuji%2Fgosdlisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-tsuji%2Fgosdlisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-tsuji%2Fgosdlisp/lists"}