{"id":21660266,"url":"https://github.com/PollRobots/scheme","last_synced_at":"2025-07-17T23:31:07.969Z","repository":{"id":44592643,"uuid":"442609613","full_name":"PollRobots/scheme","owner":"PollRobots","description":"An R7RS Scheme implemented in WebAssembly ","archived":false,"fork":false,"pushed_at":"2023-05-02T06:27:44.000Z","size":1275,"stargazers_count":177,"open_issues_count":109,"forks_count":6,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-08T02:31:37.223Z","etag":null,"topics":["scheme","scheme-interpreter","scheme-language","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"WebAssembly","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/PollRobots.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}},"created_at":"2021-12-28T23:33:22.000Z","updated_at":"2025-03-25T22:16:05.000Z","dependencies_parsed_at":"2024-01-14T17:04:20.639Z","dependency_job_id":"e8e5a357-21a2-488a-9449-cc34e2282436","html_url":"https://github.com/PollRobots/scheme","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PollRobots/scheme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PollRobots%2Fscheme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PollRobots%2Fscheme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PollRobots%2Fscheme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PollRobots%2Fscheme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PollRobots","download_url":"https://codeload.github.com/PollRobots/scheme/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PollRobots%2Fscheme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265678478,"owners_count":23810114,"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":["scheme","scheme-interpreter","scheme-language","wasm","webassembly"],"created_at":"2024-11-25T09:32:36.335Z","updated_at":"2025-07-17T23:31:07.493Z","avatar_url":"https://github.com/PollRobots.png","language":"WebAssembly","funding_links":[],"categories":["WebAssembly","Languages"],"sub_categories":["WASM"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"scheme.wasm.ui/favicon/scheme.wasm.logo.svg?raw=true\" alt=\"scheme.wasm logo\"/\u003e\n\u003c/h1\u003e\n\n[![Node.js CI](https://github.com/pollrobots/scheme/actions/workflows/node.js.yml/badge.svg)](https://github.com/PollRobots/scheme/actions/workflows/node.js.yml)\n[![CodeQL](https://github.com/pollrobots/scheme/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/PollRobots/scheme/actions/workflows/codeql-analysis.yml)\n[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B29853%2Fgithub.com%2FPollRobots%2Fscheme.svg?type=shield)](https://app.fossa.com/projects/custom%2B29853%2Fgithub.com%2FPollRobots%2Fscheme?ref=badge_shield)\n\n[![GitHub stars](https://img.shields.io/github/stars/pollrobots/scheme.svg?style=social\u0026label=Star)](https://github.com/pollrobots/scheme/stargazers)\n\n# scheme.wasm\n\nAn R7RS Scheme implemented in WebAssembly\n\nA partial implementation of [r7rs scheme](https://small.r7rs.org/), written\nentirely in WebAssembly using the WebAssembly Text format. The only external\nimports are for IO (`read`, `write`, and `readFile`), unicode (I have an\nimport that reads information about 256 code-point blocks to enable case\noperations etc.), and process control (`exit`).\n\nYou can try it out at [pollrobots.com/scheme/](https://pollrobots.com/scheme/)\n\n## How Complete Is It?\n\nThe aim is to write a spec complete version of `r7rs`, although I may skip\nsome of the optional features.\n\n### What is done so far\n\n- [x] Numerics\n  - [x] Integers (arbitrary precision)\n  - [x] Real numbers (double precision)\n  - [x] Rationals\n  - [x] Complex Numbers\n- [x] Booleans\n- [x] Strings\n- [x] Characters\n- [x] Pairs and Lists\n- [x] Vectors\n- [x] Bytevectors\n- [x] Values\n- [x] Records\n- [x] Tail call optimization \u0026mdash; internally `eval` uses a continuation passing\n      style, so TCO comes for free.\n- [x] `call/cc` and exceptions\n- [x] Macros\n  - [x] `define-syntax`, `syntax-rules`, `syntax-error`\n  - [x] Hygienic over `let`, `let*`, `letrec`, `letrec*`, and `lambda`\n  - [ ] `let-syntax`, `letrec-syntax`\n- [ ] Modules\n- [ ] Ports\n- [ ] `dynamic-wind`\n- [ ] Everything else\n\n## Credits\n\nWhere practical everything has been implemented from scratch, but there\nare places where it either wasn't practical, or where I tried and failed\nto implement them myself, so credit is due to:\n\n- **xxHash**:\n  It's probably overkill, but the hashing algorithm used for hashtables,\n  which are in turn used for environments and interning symbols, is xxHash\n  translated from the C++ implementation at\n  [github.com/Cyan4973/xxHash](https://github.com/Cyan4973/xxHash)\n- **string-\u003ereal**:\n  Strings are converted to real numbers using _Algorithm M_ from\n  \"How to Read Floating Point Numbers Accurately\",\n  [William D Clinger](https://www.khoury.northeastern.edu/people/william-d-clinger/) 1990. Which is conveniently expressed in scheme in the original\n  [paper](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.45.4152\u0026rep=rep1\u0026type=pdf)\n- **real-\u003estring**:\n  Real numbers are converted to strings using _Grisu 2_ by\n  [Florian Loitsch](https://florian.loitsch.com/home).\n  This was translated from C++ found at [github.com/romange/Grisu](https://github.com/romange/Grisu)\n\nAdditionally inspiration came from a couple of places\n\n- **Lispy**: [Peter Norvig's](https://norvig.com) article\n  [(How to Write a (Lisp) Interpreter (in Python))](https://norvig.com/lispy.html)\n  was a critical source of inspiration.\n- **EPLAiP**: Nearly a decade ago a \u003cspan title=\"Hi Ashley!\"\u003efriend\u003c/span\u003e gave\n  me a copy of\n  [Exploring Programming Language Architecture in Perl](https://billhails.net/EPLAiP.pdf)\n  by [Bill Hails](https://billhails.net). Definitely worth reading regardless of\n  your language of choice (I haven't written PERL this millenium).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPollRobots%2Fscheme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPollRobots%2Fscheme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPollRobots%2Fscheme/lists"}