{"id":16154727,"url":"https://github.com/idorobots/spartan","last_synced_at":"2026-02-23T15:02:38.874Z","repository":{"id":19110978,"uuid":"22339736","full_name":"Idorobots/spartan","owner":"Idorobots","description":"A small Lisp dialect that serves me as a test bed for programming language features.","archived":false,"fork":false,"pushed_at":"2024-09-16T21:15:28.000Z","size":5519,"stargazers_count":14,"open_issues_count":40,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T22:24:07.673Z","etag":null,"topics":["actor-model","compiler","compiler-design","concurrency","continuations","language-design","lisp-dialect","programming-language","rules-engine","scheme"],"latest_commit_sha":null,"homepage":"","language":"Racket","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/Idorobots.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}},"created_at":"2014-07-28T11:03:34.000Z","updated_at":"2024-10-01T17:30:05.000Z","dependencies_parsed_at":"2024-03-13T20:56:13.269Z","dependency_job_id":"312d07bd-8ad1-4d1b-bb99-cf229cc28c63","html_url":"https://github.com/Idorobots/spartan","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Idorobots/spartan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idorobots%2Fspartan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idorobots%2Fspartan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idorobots%2Fspartan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idorobots%2Fspartan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Idorobots","download_url":"https://codeload.github.com/Idorobots/spartan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idorobots%2Fspartan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29746499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["actor-model","compiler","compiler-design","concurrency","continuations","language-design","lisp-dialect","programming-language","rules-engine","scheme"],"created_at":"2024-10-10T01:18:43.952Z","updated_at":"2026-02-23T15:02:38.858Z","avatar_url":"https://github.com/Idorobots.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\u003cimg align=\"left\" alt=\"foof\" src=\"images/foof.png\" height=\"100\" /\u003eSpartan\u003c/h1\u003e\n\nSpartan is a small Lisp dialect that serves me as a test bed for programming language features.\n\nCurrently implemented features are:\n- executable language grammar defined as a (PEG parser generator)-generated parser,\n- recursion by way of `letrec` conversion with strongly conected components reordering \u0026 assignment conversions,\n- a first-class module system with a shorthand accessor syntax (`module`, `structure` and `foo.bar`).\n- continuations - both delimited (`shift` \u0026 `reset`) as well as undelimited (`letcc`),\n- exception handling with restarts (`raise` \u0026 `handle`) relying on the continuations,\n- actor model (`spawn`, `send`, `recv`),\n- a built-in, Rete-based Rule Based System (`signal!`, `assert!`, `retract!`, `select` and `notify-whenever`),\n- two compilation targets (`ES6`, `r7rs`),\n- extensive compilation error handling with precise error locations and colored terminal output,\n- a CLI tool `sprtn` with support for `compile`, `run` and `repl` commands,\n- an interactive REPL with a twist,\n- Unicode support in identifiers.\n\nSee [here](examples) for some usage examples. You can run these examples with:\n\n\u003cp align=\"center\"\u003e\u003cimg alt=\"hello\" src=\"images/hello.gif\" /\u003e\u003c/p\n\nThere are also numerous [test files](test/data/errors) available showcasing the compilation error handling features:\n\n\u003cp align=\"center\"\u003e\u003cimg alt=\"errors\" src=\"images/errors.gif\" /\u003e\u003c/p\u003e\n\n## Compiler\n\nRun `./build.sh` to build the compiler CLI.\n\nThe compiler is far from being useful, it performs only rudimentary low-hanging fruit optimizations \u0026 validations. It loosely follows the nanopass framework, with currently implemented passes being:\n\n- parsing,\n- built-in macro expansion,\n- syntax tree elaboration,\n- implicit body handling,\n- quasiquote expansion,\n- constant value annotation,\n- free-variable annotation,\n- binding form analysis,\n- syntax tree validation,\n- alpha conversion,\n- built-in function inlining,\n- user function inlining,\n- constant propagation,\n- constant folding,\n- common subexpression elimination,\n- copy propagation,\n- dead code elimination,\n- `letrec` binding reordering,\n- `letrec` conversion,\n- continuation passing style transformation,\n- flat closure conversion,\n- global value hoisting,\n- target-safe name mangling,\n- target code generation.\n\n## REPL\n\nThe REPL supports a traditional flow of read-eval-print - each line entered is executed automatically and the results are printed immediately:\n\n\u003cp align=\"center\"\u003e\u003cimg alt=\"repl\" src=\"images/repl.gif\" /\u003e\u003c/p\u003e\n\n\nThere's also a _basic_ twist - the REPL accepts a full listing and allows editing it line by line:\n\n\u003cp align=\"center\"\u003e\u003cimg alt=\"basic\" src=\"images/basic.gif\" /\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidorobots%2Fspartan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidorobots%2Fspartan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidorobots%2Fspartan/lists"}