{"id":18952561,"url":"https://github.com/jdan/scheme-to-js","last_synced_at":"2026-03-29T11:30:18.271Z","repository":{"id":145189863,"uuid":"140074326","full_name":"jdan/scheme-to-js","owner":"jdan","description":"a scheme-\u003ejs compiler written in scheme","archived":false,"fork":false,"pushed_at":"2018-07-07T17:41:45.000Z","size":46,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-01T02:41:32.272Z","etag":null,"topics":["compiler","scheme"],"latest_commit_sha":null,"homepage":"","language":"Scheme","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-07T10:22:06.000Z","updated_at":"2024-05-18T02:10:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"f31e4b3b-6f14-4f58-a6c7-cbb1d98ea984","html_url":"https://github.com/jdan/scheme-to-js","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/jdan%2Fscheme-to-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdan%2Fscheme-to-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdan%2Fscheme-to-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdan%2Fscheme-to-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdan","download_url":"https://codeload.github.com/jdan/scheme-to-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239952598,"owners_count":19723922,"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":["compiler","scheme"],"created_at":"2024-11-08T13:33:56.008Z","updated_at":"2026-03-29T11:30:18.200Z","avatar_url":"https://github.com/jdan.png","language":"Scheme","funding_links":[],"categories":[],"sub_categories":[],"readme":"## scheme-to-js\na scheme-\u003ejs compiler written in scheme\n\n### Hi 👋\n\nThis is a Scheme compiler written in Scheme that produces JavaScript.\n\nI've done this before (in JavaScript) - https://github.com/jdan/lispjs. You'll find that writing the\ncompiler in Scheme itself means I can effectively skip parsing.\n\n### Running\n\nI've written this repository with [Chez Scheme](https://github.com/cisco/ChezScheme) in mind. It's pretty\ntiny and easy to install. I typically [build it without X11](https://github.com/cisco/ChezScheme/issues/84#issuecomment-401233680).\n\n### Example\n\n```\n$ cat example.scm\n(load \"compiler.scm\")\n\n(display\n    (scheme-\u003ejs\n        (begin\n            (define (string-join strs joiner)\n                (define (helper strs acc)\n                    (if (null? strs)\n                        acc\n                        (helper (cdr strs)\n                                (+ acc\n                                   (+ joiner (car strs))))))\n                (if (null? strs)\n                    \"\"\n                    (helper (cdr strs) (car strs))))\n            (println (string-join (Array \"apples\" \"bananas\" \"cucumbers\") \",\")))))\n$ scheme --script example.scm | prettier --parser babylon\n(() =\u003e {\n  function string$join(strs, joiner) {\n    return (() =\u003e {\n      function helper(strs, acc) {\n        return 0 === strs.length\n          ? acc\n          : helper(strs.slice(1), acc + (joiner + strs[0]));\n      }\n      return 0 === strs.length ? \"\" : helper(strs.slice(1), strs[0]);\n    })();\n  }\n  return console.log(string$join(Array(\"apples\", \"bananas\", \"cucumbers\"), \",\"));\n})();\n$ scheme --script example.scm  | prettier --parser babylon | node\napples,bananas,cucumbers\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdan%2Fscheme-to-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdan%2Fscheme-to-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdan%2Fscheme-to-js/lists"}