{"id":20662380,"url":"https://github.com/evanzhoudev/thedonutproject","last_synced_at":"2025-03-10T05:55:14.725Z","repository":{"id":200393676,"uuid":"705407013","full_name":"EvanZhouDev/TheDonutProject","owner":"EvanZhouDev","description":"Making donut.c in every language.","archived":false,"fork":false,"pushed_at":"2024-07-10T13:33:50.000Z","size":286,"stargazers_count":108,"open_issues_count":8,"forks_count":23,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-17T12:25:56.705Z","etag":null,"topics":["donut","rosetta"],"latest_commit_sha":null,"homepage":"","language":"Brainfuck","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvanZhouDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-10-15T23:33:42.000Z","updated_at":"2025-01-03T17:47:19.000Z","dependencies_parsed_at":"2023-10-16T20:10:30.044Z","dependency_job_id":"9669bef3-acd0-4c81-9b70-34ab91caf6e4","html_url":"https://github.com/EvanZhouDev/TheDonutProject","commit_stats":null,"previous_names":["evanzhoudev/thedonutproject"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanZhouDev%2FTheDonutProject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanZhouDev%2FTheDonutProject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanZhouDev%2FTheDonutProject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanZhouDev%2FTheDonutProject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvanZhouDev","download_url":"https://codeload.github.com/EvanZhouDev/TheDonutProject/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242799115,"owners_count":20186887,"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":["donut","rosetta"],"created_at":"2024-11-16T19:13:58.247Z","updated_at":"2025-03-10T05:55:14.685Z","avatar_url":"https://github.com/EvanZhouDev.png","language":"Brainfuck","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"The Donut Project Banner\" src=\"./assets/banner.svg\"\u003e\n\n## What is The Donut Project?\n\nWatch the introduction video [on YouTube](https://www.youtube.com/watch?v=txWCx1ku_2U).\n\nThis all started with [donut.c](https://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html), the classic C code that looks like, and generates a 3D spinning donut when run. Out of sheer curiosity, I searched up this code in different languages, and noticed that many people have created 3D spinning donuts in those languages... but their code mostly didn't look like a donut.\n\nMy goal at the start was to bring this classic piece of code (and its donut shape) to different languages. I started with a [JavaScript rendition of donut.c](https://github.com/EvanZhouDev/donut-js). Then, after much struggle, I created a [Python version](https://github.com/EvanZhouDev/donut-py).\n\nBecause I thought it would be fun, I posted both of these projects on YouTube, and to my surprise, it caught on quickly, [getting around 90k views in 2 weeks—and counting](https://www.youtube.com/watch?v=tzpfyTFvU6M). People started asking me to make this in different languages. And now I'm asking _you_.\n\nThe Donut Project seeks to replicate donut.c in as many languages as possible, and it's really quite easy to join...\n\n## How do I contribute?\n\nYou can either...\n\n- [Contribute your own donut](#contribute-your-own-donut)\n- [Contribute someone else's donut](#contribute-someone-elses-donut)\n\n### Contribute Your own Donut\n\nDo so in 2 easy steps:\n\n#### Step 1: Bake Your Donut\n\nFirst, find a language that someone hasn't done yet (you can see the finished languages in the `donuts` folder or `info.json`) and recreate donut.c!\n\n##### Helpful resources:\n* [Donut.c blog](https://www.a1k0n.net/2011/07/20/donut-math.html)\n* [Library-less donut.c](https://www.a1k0n.net/2021/01/13/optimizing-donut.html)\n\n##### Alternate-Implementation Donuts\n\nIf you would like to contribute a donut in a language someone has already done with your own spin to it, write the file like this: `donut.[TYPE].[EXTENSION]` with a JSON key in `info.json` of `[TYPE].[EXTENSION]`. For example, if you were to make a JS donut only using fixed-point arithmetic (so-called being \"pure\"), you may call it `donut.pure.js` with a JSON key of `pure.js`. Ensure you place in the PR why you believe this donut is unique enough to be its own separate file.\nAdditionally, please include a short summary in the `description` of why this donut is special.\n\n##### Basic Rules\n\n- Make sure that the output is similar to the original donut.c.\n- Also, importantly, make sure that the code looks like a donut. To make this easier you can use [`donutGenerator`](./tools/README.md#donutgenerator).\n\n##### Recommendations\n\nAdditionally, here are some (decently strong) recommendations about how you should make your donut:\n\n- Make sure the donut is mostly code. It's alright if there are a few lines/places with comments, however.\n\n#### Step 2: Submit Your Donut\n\nNow, fork this repo with the following command.\n\n```bash\ngit clone https://github.com/EvanZhouDev/TheDonutProject.git\n```\n\nAdd your donut to the `donuts` folder. Ensure it is named `donut`, with the proper extension at the end. For example, I may have the file `donut.py`, `donut.js`, or `donut.pure.js` (as mentioned above).\n\nThen, add an entry into `info.json`. The key should be whatever file extension (and potentially additional suffixes) you are using (make sure it matches with your file—it should be everything that follows `donut.`), and the value should look like this:\n\n| Key           | Description                                                           | Required?                                                                           |\n| ------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |\n| `name`        | Your name, or name you would like to associate your donut with        | **Required**                                                                        |\n| `github`      | Your GitHub account                                                   | _Optional_                                                                          |\n| `repo`        | Full link to your GitHub repository where you have your donut         | _Optional_                                                                          |\n| `run`         | Command to run your donut with; refer to the file simply as `donut.*` | _Required if special action needed (i.e. compiler flags, etc.)_                     |\n| `description` | Describe your donut.                                                  | _Required for [alternate-implementation donuts](#alternate-implementation-donuts)._ |\n\nFor example, my `donut.js` would look something like this:\n\n\u003e Please use 4 space indentation in `info.json`.\n\n```json\n\"js\": {\n    \"name\": \"Evan Zhou\",\n    \"github\": \"EvanZhouDev\",\n    \"repo\": \"https://github.com/EvanZhouDev/donut-js\"\n}\n```\n\nFinally, simply submit a PR (with the language you are contributing in the title), and go through the checklist to complete your submission.\n\n### Contribute Someone Else's Donut\n\nAlternatively, you can also submit donuts that you have found floating around the community already. Ensure that it still follows the [basic rules](#basic-rules) and [recommendations](#recommendations).\n\nSubmit it just the same [as above](#step-2-submit-your-donut), but make sure you put _their name_ and _their GitHub and repo_ if applicable in the `info.json`.\n\n## See Also\n\nThank you to [@Rudxain](https://github.com/Rudxain) for the suggestion.\n\n- [small](https://github.com/mathiasbynens/small)\n- [hello-world](https://github.com/leachim6/hello-world)\n- [Rosetta Code](https://rosettacode.org/wiki/Rosetta_Code)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanzhoudev%2Fthedonutproject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevanzhoudev%2Fthedonutproject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanzhoudev%2Fthedonutproject/lists"}