{"id":18989422,"url":"https://github.com/source-academy/scm-slang","last_synced_at":"2025-06-20T22:35:03.582Z","repository":{"id":95974844,"uuid":"594367820","full_name":"source-academy/scm-slang","owner":"source-academy","description":"Implementation of the Scheme language in TypeScript","archived":false,"fork":false,"pushed_at":"2025-06-13T09:39:50.000Z","size":1085,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-13T10:42:21.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/source-academy.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-28T10:28:45.000Z","updated_at":"2025-06-13T09:38:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9ddb811-1d03-4784-aab8-89498c2c81f2","html_url":"https://github.com/source-academy/scm-slang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/source-academy/scm-slang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fscm-slang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fscm-slang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fscm-slang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fscm-slang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/source-academy","download_url":"https://codeload.github.com/source-academy/scm-slang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fscm-slang/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261030563,"owners_count":23099966,"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-11-08T17:06:38.254Z","updated_at":"2025-06-20T22:34:58.565Z","avatar_url":"https://github.com/source-academy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scm-slang\n\n## scm-slang?\n\n`scm-slang` is an **experimental** implementation of the [Scheme](https://www.scheme.org/) programming language designed for compatibiity with the online learning environment of [Source Academy](https://sourceacademy.org/). It aims to be faithful to the original *Structure and Interpretation of Computer Programs* (SICP) book whilst maintaining compatibility with modules designed for use with [`js-slang`](https://github.com/source-academy/js-slang), a subset of JavaScript intended for use with the SICP JS book in Source Academy.\n\n`scm-slang` provides a special Scheme parser that is able to parse Scheme code. It also supports standard Scheme data structures such as Lists, Vectors and the Numeric tower.\n\n## How does it work?\n\n`scm-slang` parses a subset of Scheme (minimally, enough to fulfil SICP chapters 1-4) and generates an `estree`-compatible AST. This way, `scm-slang` allows code written in SCM Source Languages to use modules written for JS Source Languages.\n\n## Comparison with Revised⁷ Report on the Algorithmic Language Scheme\n\n`scm-slang` ultimately follows the [R7RS language specification](https://small.r7rs.org/) of Scheme. However, there are several key deviations that differentiate `scm-slang` from a complete implementation of R7RS Scheme:\n\n- Continuations: The parser itself does not support continuations, but in conjunction with the Source Academy Explicit Control Evaluator, continuations are supported within the Source Academy ecosystem.\n\n- Macros: Not implemented at the moment. Set for completion in Autumn-Fall 2024.\n\n- Types: `scm-slang` does not support characters or bytevectors at the moment.\n\n- Parentheses: `scm-slang` supports the use of square brackets (i.e. []) interchangably with parentheses in order to enhance the visual representation of Scheme code, similar to [Racket](https://racket-lang.org/) or [Guile Scheme](https://www.gnu.org/software/guile/). [See relevant discussion here](http://community.schemewiki.org/?scheme-faq-language)\n\n- Named let is not supported.\n\n- Import/Export: `scm-slang` follows a specialised import/export system that deviates from any standard Scheme implementation. It follows more closely to JavaScript syntax so as to maintain compatibility with current Source Academy modules.\n\n```scheme\n;equivalent JavaScript to import:\n;import { stack, beside } from \"runes\";\n(import \"runes\" (stack beside))\n```\n\n```scheme\n;equivalent JavaScript to export:\n;export let foo = \"bar\";\n(export (define foo \"bar\"))\n```\n\n# Requirements\n\n- `node`: known working version: v20.11.0\n\n# Usage\n\nTo build,\n\n```{.}\n$ git clone https://github.com/source-academy/scm-slang.git\n$ cd scm-slang\n$ yarn\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-academy%2Fscm-slang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsource-academy%2Fscm-slang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-academy%2Fscm-slang/lists"}