{"id":20425278,"url":"https://github.com/catseye/nhohnhehr","last_synced_at":"2025-03-05T04:45:09.153Z","repository":{"id":3559032,"uuid":"4620384","full_name":"catseye/Nhohnhehr","owner":"catseye","description":"MIRROR of https://codeberg.org/catseye/Nhohnhehr : A remotely fungeoid language based on rotated rooms","archived":false,"fork":false,"pushed_at":"2023-12-10T17:30:44.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-15T15:11:51.872Z","etag":null,"topics":["esolang","esoteric-language","esoteric-programming-language","fungeoid"],"latest_commit_sha":null,"homepage":"https://catseye.tc/node/Nhohnhehr","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catseye.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,"publiccode":null,"codemeta":null}},"created_at":"2012-06-11T02:47:31.000Z","updated_at":"2023-10-27T13:23:44.000Z","dependencies_parsed_at":"2025-01-15T15:08:45.384Z","dependency_job_id":"d1526b4b-eb39-4488-9edd-2dfdb0211c83","html_url":"https://github.com/catseye/Nhohnhehr","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FNhohnhehr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FNhohnhehr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FNhohnhehr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FNhohnhehr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catseye","download_url":"https://codeload.github.com/catseye/Nhohnhehr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241966977,"owners_count":20050324,"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":["esolang","esoteric-language","esoteric-programming-language","fungeoid"],"created_at":"2024-11-15T07:12:45.597Z","updated_at":"2025-03-05T04:45:09.135Z","avatar_url":"https://github.com/catseye.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"The Nhohnhehr Programming Language\n==================================\n\nVersion 1.0\n| _Wiki entry_ [@ esolangs.org](https://esolangs.org/wiki/Nhohnhehr)\n| _See also:_ [Flobnar](https://codeberg.org/catseye/Flobnar#flobnar)\n∘ [Wunnel](https://codeberg.org/catseye/Wunnel#wunnel)\n∘ [Gemooy](https://codeberg.org/catseye/Gemooy#gemooy)\n∘ [Jolverine](https://codeberg.org/catseye/Jolverine#jolverine)\n\n- - - -\n\nNhohnhehr is a remotely fungeoid esoteric programming language designed\nby Chris Pressey between December 4 and December 8, 2010.\n\nOverview\n--------\n\nA Nhohnhehr program consists of a single object called a *room*, which\nis a 2-dimensional, square grid of cells of finite, and usually small,\nextent. To emphasize its bounds, the single room in a Nhohnhehr program\ntext must be delimited with an ASCII box, in the manner of the\nfollowing:\n\n    +----+\n    |    |\n    |    |\n    |    |\n    |    |\n    +----+\n\nArbitrary text, including comments, may occur outside this bounding box;\nit will not be considered part of the Nhohnhehr program.\n\nOnce defined, the contents of a room are immutable. Although only a\nsingle room may appear in a program text, new rooms may be created\ndynamically at runtime and adjoined to the edges of existing rooms (see\nbelow for details on how this works.)\n\nExecution of Instructions\n-------------------------\n\nIn a running Nhohnhehr program there is an instruction pointer. At any\ngiven time it has a definite position inside one of the rooms of the\nprogram, and is traveling in one of the four cardinal directions. It is\nalso associated with a five-state variable called the *edge mode*. As\nthe instruction pointer passes over non-blank cells, it executes them,\nheeding the following meanings:\n\n     / causes the pointer to travel north if it was traveling east,\n       south if travelling west.\n     \\ causes the pointer to travel north if it was traveling west,\n       south if travelling east.\n     = sets wrap edge mode.\n     \u0026 sets copy-room-verbatim edge mode.\n     } sets copy-room-rotate-cw-90 edge mode.\n     { sets copy-room-rotate-ccw-90 edge mode.\n     ! sets copy-room-rotate-180 edge mode.\n     # causes the instruction pointer to skip over the next cell\n       (like # in Befunge-93.)\n     ? inputs a bit.  If it is 0, rotate direction of travel 90 degrees\n       counterclockwise; if it is 1, rotate direction of travel 90 degress\n       clockwise; if no more input is available, the direction of travel\n       does not change.\n     0 outputs a 0 bit.\n     1 outputs a 1 bit.\n     @ halts the program.\n     $ only indicates where initial instruction pointer is located;\n       otherwise it has no effect.  The initial direction of travel is east.\n\nBlank cells are NOPs.\n\nEdge Crossing\n-------------\n\nIf the instruction pointer reaches an edge of the room and tries to\ncross it, what happens depends on the current edge mode:\n\n-   In wrap edge mode (this is the initial edge mode), the pointer wraps\n    to the corresponding other edge of the room, as if the room were\n    mapped onto a torus.\n-   In all other modes, if there already exists a room adjoining the\n    current room on that edge, the instruction pointer leaves the\n    current room and enters the adjoining room in the corresponding\n    position. However, if no such adjoining room exists yet, one will be\n    created by making a copy of the current room, transforming it\n    somehow, and adjoining it. The instruction pointer then enters the\n    new room, just as if it had already existed. The details of the\n    transformation depend on the edge mode:\n    -   In copy-room-verbatim edge mode, no translation is done.\n    -   In copy-room-rotate-cw-90 edge mode, the copy of the current\n        room is rotated clockwise 90 degrees before being adjoined.\n    -   In copy-room-rotate-ccw-90 edge mode, the copy of the current\n        room is rotated counterclockwise 90 degrees before being\n        adjoined.\n    -   In copy-room-rotate-180 edge mode, the copy of the current room\n        is rotated 180 degrees before being adjoined.\n\nExamples\n--------\n\nThe following example reads in a sequence of bits and creates a series\nof rooms, where 1 bits correspond to unrotated rooms and 0 bits\ncorrespond to rooms rotated 90 degrees clockwise (though not precisely\none-to-one).\n\n    +------+\n    |    /}|\n    |\u0026#/$?@|\n    |  / \\\u0026|\n    |      |\n    | {    |\n    |\\\\    |\n    +------+\n\nAfter reading a 0 bit and leaving the right edge, the room is copied,\nrotated 90 degrees clockwise, and adjoined, so that the rooms of the\nprogram are:\n\n    +------+------+\n    |    /}|\\   \u0026 |\n    |\u0026#/$?@|\\{  # |\n    |  / \\\u0026|   // |\n    |      |    $ |\n    | {    |   \\?/|\n    |\\\\    |   \u0026@}|\n    +------+------+\n\nAfter leaving the right edge again, the current room is copied, this\ntime rotated 90 degrees counterclockwise, and adjoined, and we get:\n\n    +------+------+------+\n    |    /}|\\   \u0026 |    /}|\n    |\u0026#/$?@|\\{  # |\u0026#/$?@|\n    |  / \\\u0026|   // |  / \\\u0026|\n    |      |    $ |      |\n    | {    |   \\?/| {    |\n    |\\\\    |   \u0026@}|\\\\    |\n    +------+------+------+\n\nSay we were to now read in a 1 bit; we would thus have:\n\n    +------+------+------+------+\n    |    /}|\\   \u0026 |    /}|    /}|\n    |\u0026#/$?@|\\{  # |\u0026#/$?@|\u0026#/$?@|\n    |  / \\\u0026|   // |  / \\\u0026|  / \\\u0026|\n    |      |    $ |      |      |\n    | {    |   \\?/| {    | {    |\n    |\\\\    |   \u0026@}|\\\\    |\\\\    |\n    +------+------+------+------+\n\nIt should be fairly clear at this point that this program will read all\ninput bits, creating rooms thusly, terminating when there are no more\ninput bits.\n\nWe can write a program that is a variation of the above which, when it\nencounters the end of input, writes out the bits in the reverse order\nthey were read in, with the following changes:\n\n* for every `1` in the input, a `1` comes out\n* for every `0` in the input, `10` comes out\n* there's an extra `1` at the end of the output\n\nHere is the program:\n\n    +------------+\n    |    /}      |\n    |\u0026#/$?   \\   |\n    |  / \\\u0026      |\n    |            |\n    |            |\n    |         0  |\n    |         !  |\n    |            |\n    |            |\n    |    {1  /#  |\n    | {          |\n    |\\\\@         |\n    +------------+\n\nComputational Class\n-------------------\n\nThe last example in the previous section was written to demonstrate that\nNhohnhehr is at least as powerful as a push-down automaton.\n\nThe author suspects Nhohnhehr to be more powerful still; at least a\nlinear bounded automaton, but possibly even Turing-complete. A strategy\nfor simulating a Turing machine could be developed from the above\nexamples: create new rooms to represent new tape cells, with each\npossible orientation of the room representing a different tape symbol.\nThe finite control is encoded and embedded in the possible pathways that\nthe instruction pointer can traverse inside each room. Because rooms\ncannot be changed once created, one might have to resort to creative\nmeasures to \"change\" a tape cell; for instance, each tape cell might\nhave a \"stack\" of rooms, with a new room appended to the stack each time\nthe cell is to be \"changed\".\n\nSource\n------\n\nThis document was adapted from [the esolangs.org wiki page for\nNhohnhehr](http://www.esolangs.org/wiki/Nhohnhehr), which, like all\nesowiki articles, has been placed under public domain dedication.\n\nImplementation\n--------------\n\nThe Nhohnhehr distribution contains a Nhohnhehr interpreter, written\nin Python, based on [this implementation of\nNhohnhehr](http://esolangs.org/wiki/User:Marinus/Nhohnhehr_interpreter)\nby [Marinus](http://www.esolangs.org/wiki/User:Marinus).  It\nis effectively the reference interpreter, since it seems to correctly\nimplement the language described here, and there are, to the best of\nmy knowledge, no other implementations of Nhohnhehr in existence.\nLike all content from the esowiki, it too is in the public domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatseye%2Fnhohnhehr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatseye%2Fnhohnhehr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatseye%2Fnhohnhehr/lists"}