{"id":13903202,"url":"https://github.com/tekknolagi/scrapscript","last_synced_at":"2025-04-14T23:27:18.722Z","repository":{"id":211196514,"uuid":"719374950","full_name":"tekknolagi/scrapscript","owner":"tekknolagi","description":"A functional, content-addressable programming language.","archived":false,"fork":false,"pushed_at":"2025-02-26T21:18:28.000Z","size":859,"stargazers_count":426,"open_issues_count":56,"forks_count":13,"subscribers_count":7,"default_branch":"trunk","last_synced_at":"2025-04-07T20:06:27.643Z","etag":null,"topics":["compiler","cosmopolitan","functional-programing","functional-programming","interpreter","wasm"],"latest_commit_sha":null,"homepage":"https://scrapscript.fly.dev/repl","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tekknolagi.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":"2023-11-16T02:57:40.000Z","updated_at":"2025-04-05T12:38:31.000Z","dependencies_parsed_at":"2023-12-18T01:23:35.614Z","dependency_job_id":"609f1bd8-022a-40f3-969c-86580bd9490c","html_url":"https://github.com/tekknolagi/scrapscript","commit_stats":{"total_commits":396,"total_committers":2,"mean_commits":198.0,"dds":"0.26010101010101006","last_synced_commit":"89e38bf9505d36a5506d8eeebdeed1e349d4d7a4"},"previous_names":["tekknolagi/scrapscript"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tekknolagi%2Fscrapscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tekknolagi%2Fscrapscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tekknolagi%2Fscrapscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tekknolagi%2Fscrapscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tekknolagi","download_url":"https://codeload.github.com/tekknolagi/scrapscript/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248977011,"owners_count":21192513,"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","cosmopolitan","functional-programing","functional-programming","interpreter","wasm"],"created_at":"2024-08-06T22:01:51.657Z","updated_at":"2025-04-14T23:27:18.693Z","avatar_url":"https://github.com/tekknolagi.png","language":"Python","funding_links":[],"categories":["wasm"],"sub_categories":[],"readme":"# Scrapscript Interpreter\n\nSee [scrapscript.org](https://scrapscript.org/) for some more information. Keep\nin mind that the syntax on the website will change a little bit in the coming\nweeks to match this repository.\n\nTake a look inside [scrapscript.py](scrapscript.py) and all of its tests to get\nan idea for how the language works.\n\n## Usage\n\nWe support python3.8+.\n\n```bash\n# With a file\npython3 scrapscript.py eval examples/0_home/factorial.scrap\n\n# With a string literal\npython3 scrapscript.py apply \"1 + 2\"\n\n# With a REPL\npython3 scrapscript.py repl\n```\n\nor with [Cosmopolitan](https://justine.lol/cosmopolitan/index.html):\n\n```bash\n./util/build-com\n\n# With a file\n./scrapscript.com eval examples/0_home/factorial.scrap\n\n# With a string literal\n./scrapscript.com apply \"1 + 2\"\n\n# With a REPL\n./scrapscript.com repl\n```\n\n(if you have an exec format error and use Zsh, either upgrade Zsh or prefix\nwith `sh`)\n\nor with Docker:\n\n```bash\n# With a file (mount your local directory)\ndocker run --mount type=bind,source=\"$(pwd)\",target=/mnt -i -t ghcr.io/tekknolagi/scrapscript:trunk eval /mnt/examples/0_home/factorial.scrap\n\n# With a string literal\ndocker run -i -t ghcr.io/tekknolagi/scrapscript:trunk apply \"1 + 2\"\n\n# With a REPL\ndocker run -i -t ghcr.io/tekknolagi/scrapscript:trunk repl\n```\n\n### The experimental compiler:\n\n#### Normal ELF\n\n```bash\n./scrapscript.py compile some.scrap  # produces output.c\n./scrapscript.py compile some.scrap --compile  # produces a.out\n```\n\n#### Cosmopolitan\n\n```bash\nCC=~/Downloads/cosmos/bin/cosmocc ./scrapscript.py compile some.scrap  --compile # produces a.out\n```\n\n#### Wasm\n\n```bash\nCC=/opt/wasi-sdk/bin/clang \\\nCFLAGS=-D_WASI_EMULATED_MMAN \\\nLDFLAGS=-lwasi-emulated-mman \\\n./scrapscript.py compile some.scrap --compile  # produces a.out\n```\n\n## Development Workflow\n\n### Running Tests\n\n```bash\npython scrapscript_tests.py\n```\n\n### Type Checking the Python Sources\n```bash\nmypy --strict scrapscript.py\n```\n\n### Formatting the Python Sources\n```bash\nruff format scrapscript.py\n```\n\n### Checking for Format Errors\n```bash\nruff check scrapscript.py\n```\n\n### Using `uv`\nIf you choose to use `uv` to manage development dependencies, you can run any of the previous four commands by prefixing them with `uv run`, e.g.:\n\n```bash\nuv run python scrapscript_tests.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftekknolagi%2Fscrapscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftekknolagi%2Fscrapscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftekknolagi%2Fscrapscript/lists"}