{"id":20559856,"url":"https://github.com/cxw42/do-not-self-host","last_synced_at":"2026-04-17T18:31:45.012Z","repository":{"id":87958223,"uuid":"131015540","full_name":"cxw42/do-not-self-host","owner":"cxw42","description":"A toolchain starting from assembly so you don't have to self-host your next programming language","archived":false,"fork":false,"pushed_at":"2020-06-05T00:09:32.000Z","size":154,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-06T07:46:10.998Z","etag":null,"topics":["assembler","assembly","bytecode","bytecode-interpreter","interpreter","programming-language","programming-language-development","self-hosting","virtual-machine","vm"],"latest_commit_sha":null,"homepage":"","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/cxw42.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":"2018-04-25T14:03:39.000Z","updated_at":"2024-05-20T03:12:59.000Z","dependencies_parsed_at":"2023-05-22T03:00:25.335Z","dependency_job_id":null,"html_url":"https://github.com/cxw42/do-not-self-host","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cxw42/do-not-self-host","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxw42%2Fdo-not-self-host","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxw42%2Fdo-not-self-host/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxw42%2Fdo-not-self-host/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxw42%2Fdo-not-self-host/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cxw42","download_url":"https://codeload.github.com/cxw42/do-not-self-host/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxw42%2Fdo-not-self-host/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31940736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["assembler","assembly","bytecode","bytecode-interpreter","interpreter","programming-language","programming-language-development","self-hosting","virtual-machine","vm"],"created_at":"2024-11-16T03:52:26.053Z","updated_at":"2026-04-17T18:31:44.996Z","avatar_url":"https://github.com/cxw42.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# do-not-self-host\n\nA development toolchain from the ground up, starting from assembly.\nDon't self-host your next language!  Make it possible for us to build from\nsource, from scratch, without needing a bootstrap package!\n\nThis is a long-term hobby project, so please do not expect regular\nupdates :) .  However, I certainly welcome others who want to contribute.\n\nAssumes a development environment that provides stdin/stdout and redirection.\n\n## Current status\n\n* ngb: VM (in C)\n* ngbasm: assembler (in Python)\n\n## Editor support\n\nngb assembly files have the extension `.nas`.  A Vim syntax configuration\nis available [here](https://github.com/cxw42/ngb-vim).\n\n## I'm not the only one\n\nThe Facebook Buck build system also doesn't self-host by default (although\nit can).  The Buck [FAQ](https://buckbuild.com/concept/faq.html) says, in part:\n\n\u003e Q: Why is Buck built with Ant instead of Buck?\n\u003e\n\u003e A: Self-hosting systems can be more difficult to maintain and debug.\nIf Buck built itself using Buck, then every time a change was made to Buck's source, the commit would have to include a new Buck binary that included that change. It would be easy to forget to include the binary, difficult to verify that it was the correct binary, and wasteful to bloat the Git history of the repository with binaries that could be rebuilt from source. Building Buck using Ant ensures we are always building from source, which is simpler to verify.\n\n## Installation and testing\n\nThe code is currently C and Python, but the infrastructure runs in Perl.\nTests use Perl's [`prove`](https://metacpan.org/pod/prove).\n\n### Building\n\n- If you don't already have it, install Perl\n  (e.g., using [perlbrew](https://perlbrew.pl/)).\n- Install [cpanminus](https://github.com/miyagawa/cpanminus).\n\nThen build using:\n\n    perl Makefile.PL\n    cpanm --installdeps .\n    make\n    cd mtok\n    make\n\nOnce you have run the `perl` and `cpanm` steps, you shouldn't need to do so\nagain if you are only working on the C/Python/ngbasm sources.  Just run\n`make` as necessary.\n\n### Testing\n\nOnce you have done the build steps, run `prove` or `make test` in the top\nlevel of the repository.\n\n## Older notes\n\nBased on [crcx/Nga-Bootstrap](https://github.com/crcx/Nga-Bootstrap), which\nprovides:\n\n* naje - a basic assembler (Python)\n* nmfcx -  a Machine Forth Cross Compiler (Retro)\n\nIn the pipeline:\n\n* NGA+:\n  - Implement NGA VM in x86 assembly (NASM?)\n  - Read/write stdin/stdout (port-based, a la retro?  Maybe not - that's\n    flexible, but perhaps more than we need).\n  - Add support for record blocks A and B - configurable number of fields\n    per block; `aload`, `astore`, `bload`, `bstore`, `aread`, `awrite`,\n    `bread`, `bwrite`\n  - `.const`\n\n* Minimal Infix High-Level Language (Minhi) - `\u003cprogram\u003e::=\u003cexpression\u003e+`, and\n  everything else is an expression.\n  - Why expressions?  Because infix expressions are easy\n  to parse based on a table, as described in\n  [_A Retargetable C Compiler: Design and Implementation_](https://sites.google.com/site/lccretargetablecompiler/).\n  - Lexer written in NGA+ that takes source and outputs token stream\n  - Parser written in NGA+ that takes token stream (block A) and outputs\n    AST (block B)\n  - Compiler that produces NGA+ assembly\n  - Later, a compiler that produces x86 assembly\n\nFuture: to be determined... (but possibly a C compiler written in Minhi)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcxw42%2Fdo-not-self-host","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcxw42%2Fdo-not-self-host","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcxw42%2Fdo-not-self-host/lists"}