{"id":37213442,"url":"https://github.com/vito/dang","last_synced_at":"2026-01-15T00:37:39.113Z","repository":{"id":308049697,"uuid":"1019154413","full_name":"vito/dang","owner":"vito","description":"Experimental GraphQL scripting language","archived":false,"fork":false,"pushed_at":"2026-01-13T19:53:08.000Z","size":5534,"stargazers_count":6,"open_issues_count":6,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T21:44:30.969Z","etag":null,"topics":["dagger","graphql","hindley-milner","language"],"latest_commit_sha":null,"homepage":"","language":"Go","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/vito.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-13T21:24:58.000Z","updated_at":"2026-01-13T19:53:12.000Z","dependencies_parsed_at":"2025-08-03T21:27:31.706Z","dependency_job_id":"e96f1996-e6ea-4121-b778-bbf7c21281b5","html_url":"https://github.com/vito/dang","commit_stats":null,"previous_names":["vito/dang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vito/dang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fdang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fdang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fdang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fdang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vito","download_url":"https://codeload.github.com/vito/dang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fdang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:34:46.850Z","status":"ssl_error","status_checked_at":"2026-01-15T00:34:46.551Z","response_time":107,"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":["dagger","graphql","hindley-milner","language"],"created_at":"2026-01-15T00:37:38.568Z","updated_at":"2026-01-15T00:37:39.094Z","avatar_url":"https://github.com/vito.png","language":"Go","readme":"# dang.\n\n`dang` is a statically typed language for scripting GraphQL, where the types and functions are loaded directly from the schema.\n\n## sample\n\nHere's `.dagger/main.dang` at the time of this writing:\n\n```graphql\ntype Dang {\n  pub source: Directory! @defaultPath(path: \"/\") @ignorePatterns(patterns: [\n    \"Session.vim\"\n    \"/dang\"\n    \"/zed-dang/grammars/\",\n    \"/.env\"\n  ])\n\n  pub build: File! {\n    go(source).binary(\"./cmd/dang\")\n  }\n\n  pub test: Container! {\n    go(source).base.\n      withDirectory(\"/src\", source).\n      withWorkdir(\"/src\").\n      withExec([\"go\", \"test\", \"-v\", \"./...\"], experimentalPrivilegedNesting: true)\n  }\n}\n```\n\n\n## why?\n\nThe initial goal was a native language for [Dagger]. Dagger is a polyglot\nfunction engine with an underlying GraphQL API serving as the common layer where\nfunctions written in different languages call one another.\n\nCombining Dang with Dagger gives you a polyglot language with an ecosystem of\nmodules developed in any language that has a [Dagger SDK]. Dang is one such\nDagger SDK, so it's perfect for writing Dagger modules that simply glue together\nAPIs and don't need a heavy full-blown language runtime. As a result of not\nneeding a codegen phase, it has potential to be much, much faster than the other\nSDKs.\n\nArchitecturally, Dang is decoupled from Dagger; it just speaks GraphQL, so you\ncan point it at any API endpoint you want.\n\n[Dagger]: https://dagger.io\n[Dagger SDK]: https://docs.dagger.io/api/sdk/\n\n\n## design philosophy\n\n* **familiarity** over theory\n  - I've had my fun with language design/impl, time to make one people might actually use. :)\n* **ergonomics** over syntactic purity\n  - Embrace keywords and first-class syntax for common patterns. Don't obsess over homoiconicity and macros.\n* **expressiveness** over performance\n  - This is a glue language; it's unlikely to be the bottleneck. Dev performance is more important than runtime performance.\n* **safety** over ... uh ... danger\n  - I should be able to have some confidence in my \"production-shipping glue code\" without having to ship to production.\n* **be a leaf in the wind**\n  - Dang shouldn't take too much brain juice; that's already been spent on the product that it's used to build/test/ship.\n\n\n### cute bits\n\n* **multi-field selection**\n  - `user.{name, posts.{title, createdAt}}}` fetches everything in one query\n* **null tracking**\n  - `String` does not satisfy `String!`, but `String!` satisfies `String`\n* **optional parentheses** for functions without required args\n  - `container() == container`\n* **named arguments** with **positional shorthand**\n  - `container.from(address: \"foo\") == container.from(\"foo\")`\n* **directives**\n  - structural type-checked metadata (`@defaultPath(...)`) instead of comment pragmas\n* **prototype-based objects**\n  - `type Foo(bar: String!) { ... }` declares a new `Foo` type and `Foo(\"xyz\")` constructor\n* **directory-level loading**\n  - Similar to Go; split your code up at your liesure.\n\n\n## how the meat was made\n\nThis language needs to be maintainable in very limited time as a side project.\nTo that end:\n\n* There's a single [Pigeon] grammar from which a [Tree-sitter] grammar is\n  generated, so I don't have to maintain both. Feel free to steal this for your\n  own esolang!\n* The language has a built-in `assert { ... }` syntax so that I can test it at\n  a very high level (a Big Pile of Dang Scripts).\n* Large swathes of the codebase have been implemented with AI. The language\n  design is still my fault, but I've let AI do a lot of the typing.\n\n  Personally, having already created [Bass] recently I didn't feel the\n  motivation to start all over again. It didn't seem like I'd learn much along\n  the way, so it wasn't worth spending whatever mileage my fingers have left.\n  This was a great opportunity to learn about AI and reach my project goals at\n  the same time, so I took that direction instead.\n\n  This project sat unfinished for 2 years, and in a day of AI crunching I was\n  finally able to bring it to life. If you have ethical concerns with this or\n  think that makes the project lame, I respect that. If you can, just pretend\n  this project stayed in that unfinished state. Maybe check out [Bass] instead,\n  which may be more interesting to language nerds anyway. :)\n\n  If it's any consolation, I will not be using AI for the parts that interface\n  with humans. This README is 100% farm-raised, and the documentation and logo\n  will be, too. (I might use AI for tedious website stuff, but not the\n  content.)\n\n[Bass]: https://github.com/vito/bass\n[Pigeon]: https://github.com/mna/pigeon\n[Tree-sitter]: https://tree-sitter.github.io/tree-sitter/\n\n\n## thanks\n\nSpecial thanks to [@chewxy] for writing the [hm] package - having never\nimplemented a typed language before, I initially leaned on this heavily.\nEventually I had AI re-write a local version so I can better integrate it into\nDang's local dialect, but I learned a lot from the original package, and its\nexistence was the spark that led to Dang's creation.\n\n[@chewxy]: https://github.com/chewxy\n[hm]: https://github.com/chewxy/hm\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvito%2Fdang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvito%2Fdang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvito%2Fdang/lists"}