{"id":33919419,"url":"https://github.com/itsfoxstudio/durbat","last_synced_at":"2026-04-07T17:31:49.119Z","repository":{"id":323267661,"uuid":"1087118082","full_name":"itsfoxstudio/durbat","owner":"itsfoxstudio","description":"🦀︱Black Speech Syntax","archived":false,"fork":false,"pushed_at":"2025-10-31T12:06:25.000Z","size":7,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T15:15:07.570Z","etag":null,"topics":["alternative-syntax","black-speech","lord-of-the-rings","proc-macro","procedural-macro","rust","rust-macros","tolkien"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/itsfoxstudio.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-10-31T12:06:04.000Z","updated_at":"2025-12-04T04:58:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/itsfoxstudio/durbat","commit_stats":null,"previous_names":["itsfoxstudio/durbat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsfoxstudio/durbat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsfoxstudio%2Fdurbat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsfoxstudio%2Fdurbat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsfoxstudio%2Fdurbat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsfoxstudio%2Fdurbat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsfoxstudio","download_url":"https://codeload.github.com/itsfoxstudio/durbat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsfoxstudio%2Fdurbat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31522254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["alternative-syntax","black-speech","lord-of-the-rings","proc-macro","procedural-macro","rust","rust-macros","tolkien"],"created_at":"2025-12-12T08:50:48.692Z","updated_at":"2026-04-07T17:31:49.105Z","avatar_url":"https://github.com/itsfoxstudio.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# durbat\n\n[![Crates.io](https://img.shields.io/crates/v/durbat.svg)](https://crates.io/crates/durbat)\n[![Documentation](https://docs.rs/durbat/badge.svg)](https://docs.rs/durbat)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nDurbat is a Rust procedural macro that enables writing Rust using Black Speech keywords, identifiers, and module paths. It maps Black Speech constructs to their Rust equivalents while remaining fully interoperable with standard Rust.\n\nForged to bind syntax and meaning, it offers a spare, unlit aesthetic without compromising correctness or tooling.\n\n## Etymology\n\nThe name durbat derives from the Ring inscription \"Ash nazg durbatulûk\" — \"to bind them\" — reflecting the macro's role in binding Black Speech syntax to Rust.\n\n## Features\n\n- Black Speech keywords: e.g., gimb (fn), krimp (let), ishi (if)\n- ASCII and diacritic forms supported: krîmp/krimp, dûrbat/durbat\n- Translated module paths: std::collections → Zud::Gakh\n- Interoperable with standard Rust; mix as needed\n- Self-hosted implementation (the macro uses its own surface)\n\n## Examples\n\n### goth and krimpash (trait and impl)\n\n```rust\ndurbat::durbat! {\n    aghul Zud::Gakh::Lugburz azh Lugdic;\n\n    goth KrimpValeur {\n        gimb skrith(\u0026lat, kri: Ghash, valeur: Ghash);\n        gimb lath(\u0026lat, kri: Ghash) -\u003e Krimpat\u003cGimbat\u003c\u0026Ghash\u003e, Ghash\u003e;\n    }\n\n    stuk snaga LUGDIC: Gimbat\u003cLugdic\u003cGhash, Ghash\u003e\u003e = Nar;\n\n    kruk Konkret;\n\n    krimpash KrimpValeur agh Konkret {\n        gimb skrith(\u0026lat, kri: Ghash, valeur: Ghash) {\n            krimp lugdic = ghash {\n                LUGDIC.mazg(Durbat::ugl)\n            };\n            lugdic.nakh(kri, valeur);\n        }\n        gimb lath(\u0026lat, kri: Ghash) -\u003e Krimpat\u003cGimbat\u003c\u0026Ghash\u003e, Ghash\u003e {\n            ishi krimp Gimb(lugdic) = ghash { LUGDIC.iskh() } {\n                Ash(lugdic.gruk(\u0026kri))\n            } dush {\n                Burz(\"nazg agh lugdic\".zug())\n            }\n        }\n    }\n}\n```\n\n### Control flow\n\n```rust\ndurbat::durbat! {\n    gimb shakh() {\n        krimp snaga x = 31;\n\n        durb x {\n            42 =\u003e krimpat!(\"ash nazg durbatuluk\"),\n            _ =\u003e krimpat!(\"burzum ishi\")\n        }\n\n        agh i ish 0..10 {\n            krimp val = nazg {\n                rakh i;\n            };\n\n            dur x \u003c val {\n                x += 1;\n            }\n        }\n    }\n}\n```\n\n### Panic macros\n\n```rust\n#[lug(caldush)]\ngimb thrakulat() {\n    ghazh!(\"oh nar\");        // standard\n    pushdug!(\"burzum ishi\"); // alias\n    pushduk!(\"nazg\");        // sanitized variant\n}\n```\n\n## Keyword Mapping Table\n\n### Core Keywords\n\n| Black Speech (both forms work) | Rust |\n|-------------------------------|------|\n| gimb | fn |\n| krîmp / krimp | let |\n| ishi | if |\n| dush | else |\n| durb | match |\n| nazg | loop |\n| thrak | return |\n| rakh | break |\n| snaga | mut |\n| agh | for |\n| dûr / dur | while |\n| goth | trait |\n| krimpash | impl |\n| burzum | mod |\n| gûb / gub | pub |\n| ghâsh / ghash | unsafe |\n| dûshat / dushat | async |\n| dûshatishi / dushatishi | await |\n| mok | move |\n| ish | in |\n| azh | as |\n| kûrz / kurz | const |\n| dûl / dul | dyn |\n| khor | where |\n| stûk / stuk | static |\n| kruk | struct |\n| zhûm / zhum | enum |\n| ruk | ref |\n| lat | self |\n| aghul | use |\n| uzg | extern |\n| cagdûl / cagdul | crate |\n\n### Types and Constructors\n\n| Black Speech | Rust |\n|-------------|------|\n| Ash | Ok |\n| Bûrz / Burz | Err |\n| Gimbat | Option |\n| Gimb | Some |\n| Nar | None |\n| Krîmpat / Krimpat | Result |\n| Lat | Self |\n| Ghâsh / Ghash | String |\n| Lugbúrz / Lugburz | HashMap |\n| Urûk / Uruk | Vec |\n| Durbat | Default |\n| Nazgûl / Nazgul | Error |\n\n### Module Paths\n\n| Black Speech | Rust | Mnemonic |\n|-------------|------|----------|\n| Zûd / Zud | std | standard |\n| Zôg / Zog | core | core (guttural) |\n| Gâkh / Gakh | collections | gather |\n| esh | io | (lowercase special) |\n| Ûrz / Urz | time | hours |\n| Grûb / Grub | fs | grub/dig (files) |\n| Zâg / Zag | path | zig-zag |\n| Lôk / Lok | sync | lock |\n| Râg / Rag | thread | rag/woven |\n| Shâg / Shag | mem | memory |\n| Pîk / Pik | ptr | pike/pointer |\n| Skâk / Skak | slice | slash/cut |\n| Zûl / Zul | str | string slice |\n| Dûm / Dum | process | doom |\n| Môrg / Morg | env | dark/ambient |\n| Snâr / Snar | net | snare/network |\n\nExamples:\n- `aghul Zud::Gakh::Lugburz;` → `use std::collections::HashMap;`\n- `aghul Zud::Gakh::Lugburz azh Lugdic;` → `use std::collections::HashMap as Lugdic;`\n- `aghul Zud::esh;` → `use std::io;`\n- `aghul Zud::Urz::Instant;` → `use std::time::Instant;`\n- `aghul Zud::Grub::File;` → `use std::fs::File;`\n- `aghul Zud::Lok::Mutex;` → `use std::sync::Mutex;`\n- `aghul Zog::Pik;` → `use core::ptr;`\n\nNote: Lugburz (Lugbúrz) is used here as the Black Speech translation of HashMap.\n\n### Pure Black Speech Methods\n\n| Black Speech | Rust | Meaning/Mnemonic |\n|-------------|------|------------------|\n| shakh | main | \"chief/head\" |\n| nûk / nuk | new | crisp, orcish \"new\" |\n| mokh | from | kin to \"mok\" |\n| zug | into | terse, forceful |\n| gruk | get | \"grab/gruk\" |\n| nakh | insert | \"thrust/place\" |\n| iskh | as_ref | ties to \"ish\" |\n| zagh | as_str | sharp sound |\n| grîsh / grish | to_string | nod to Grishnákh |\n| ûzbag / uzbag | unwrap | \"unbag\" value |\n| ûrg / urg | expect | stern |\n| mazg | get_or_insert_with | compact |\n| akh | true | affirmative |\n| mâz / maz | false | negative |\n| ugl | default | terse |\n\n### Macros\n\n| Black Speech | Rust |\n|-------------|------|\n| krimpat! | println! |\n| ghâzh! / ghazh! | panic! |\n| pushdug! / pushduk! | panic! (aliases) |\n\n### Attributes\n\n| Black Speech | Rust |\n|-------------|------|\n| lûg / lug | allow |\n| caldûsh / caldush | unreachable_code |\n\n### Proc Macro Internals (for advanced users)\n\n| Black Speech | Rust |\n|-------------|------|\n| Gurûp / Gurup | Group |\n| Nazgid | Ident |\n| Ishiflûx / Ishiflux | TokenStream |\n| Ishidûrb / Ishidurb | TokenTree |\n| Pûnk / Punk | Punct |\n| Litrâl / Litral | Literal |\n| makro | proc_macro |\n| portul | span |\n| flûx / flux | stream |\n| thruk | push |\n| zand | extend |\n| delîm / delim | delimiter |\n\n## ASCII vs Diacritics\n\nYou can use either style or mix them freely:\n\n```rust\n// With diacritics\ndûrbat::dûrbat! {\n    gimb shakh() {\n        krîmp x = 42;\n        aghul Zûd::Gâkh::Lugbúrz;\n    }\n}\n\n// ASCII-only (for compatibility)\ndurbat::durbat! {\n    gimb shakh() {\n        krimp x = 42;\n        aghul Zud::Gakh::Lugburz;\n    }\n}\n```\n\nBoth work identically.\n\n## Installation\n\nAdd durbat to your `Cargo.toml`:\n\n```toml\n[dependencies]\ndurbat = \"1.0.0\"\n```\n\nOr for development from source:\n\n```toml\n[dependencies]\ndurbat = { git = \"https://github.com/itsfoxstudio/durbat\" }\n```\n\n## Usage\n\nWrap your code in the `durbat!` macro:\n\n```rust\ndurbat::durbat! {\n    gimb shakh() {\n        krimpat!(\"Ash nazg durbatulûk, ash nazg gimbatul!\");\n    }\n}\n```\n\n## Design Philosophy\n\nUnlike hybrids that graft foreign prefixes onto English identifiers, durbat uses pure Black Speech throughout.\n\nPreferred:\n- `nakh` (insert)\n- `Zud::Gakh` (std::collections)\n\nAvoid:\n- `snagainsert` (hybrid)\n- `std::collections` (when Black Speech is intended)\n\nEvery keyword is a standalone, pronounceable Black Speech word with guttural consonants (gh, sh, kh, z, r, k) that feel authentically orcish.\n\n## Inspiration\n\n- J.R.R. Tolkien's _The Lord of the Rings_ and the Black Speech language\n- [unirust](https://github.com/charyan/unirust) - Rust in multiple languages\n\n## License\n\nMIT License\n\nCopyright (c) 2025 Fox Studio (Oskar Cieslik)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Legal Notice\n\nThis project is a playful homage to J.R.R. Tolkien's legendarium. It is not affiliated with or endorsed by the Tolkien Estate. All Black Speech terms are used nominatively.\n\n## Contributing\n\nContributions are welcome. Propose additional Black Speech translations or improvements that preserve the guiding principle: pure, pronounceable Black Speech terms mapped consistently to Rust semantics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsfoxstudio%2Fdurbat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsfoxstudio%2Fdurbat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsfoxstudio%2Fdurbat/lists"}