{"id":13781604,"url":"https://github.com/m-ender/orthagonal","last_synced_at":"2025-05-11T15:31:55.577Z","repository":{"id":148805996,"uuid":"69803023","full_name":"m-ender/orthagonal","owner":"m-ender","description":"A two-dimensional programming language from 1994.","archived":false,"fork":false,"pushed_at":"2016-10-02T15:07:04.000Z","size":18,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-17T16:43:06.848Z","etag":null,"topics":["esoteric-language","interpreter","programming-language","two-dimensional"],"latest_commit_sha":null,"homepage":null,"language":"C","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/m-ender.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-10-02T14:53:48.000Z","updated_at":"2024-09-24T16:49:21.000Z","dependencies_parsed_at":"2023-05-29T00:45:39.834Z","dependency_job_id":null,"html_url":"https://github.com/m-ender/orthagonal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-ender%2Forthagonal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-ender%2Forthagonal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-ender%2Forthagonal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-ender%2Forthagonal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-ender","download_url":"https://codeload.github.com/m-ender/orthagonal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253588571,"owners_count":21932279,"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":["esoteric-language","interpreter","programming-language","two-dimensional"],"created_at":"2024-08-03T18:01:27.575Z","updated_at":"2025-05-11T15:31:55.268Z","avatar_url":"https://github.com/m-ender.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"This repository contains the original specification, interpreter code \nand example programs of the 1994 language Orthagonal, kindly provided \nby Jeff Epler. The remainder of this document is the original README.\n\n--------------------------------------------------------------------------------\n\nThis document describes the Orthagonal language.\n\nRecently, in alt.folklore.computers, there have been discussions about a\nlanguage that would be 2 dimensional in nature.  This is my attempt at\nwriting such a language.\n\nPlease forgive the fact that this is hardly 'documentation'.\n\nA program in Orthagonal has two parts:\n1) The grid.\n2) The stack.\n\nWhen the Orthagonal interpreter is invoked, the grid is read from standard\ninput, the PC is loaded with (0,0),(1,0) and the stack is initialized to be\nempty.  The bottom row of the grid, (0,255)(1,0) is loaded with up to 256\ncharacters from argv[1].\n\n(The format of the PC is (grid coordinate),(delta coordinate))\n\nThen, the interpreter performs the following steps:\n1) Interpret the contents of the current grid coordinate\n a) If the element is an operator, perform the action associated with\n    the operator\n b) If the element is a quantity, push the quantity onto the stack (The stack\n    can hold at most 256 elements)\n2) Add the delta coordinate to the grid coordinate, wrap around if\nnecessary. (The grid size is 256x256 -- I wonder if this will be adequate?)\n3) go to 1\n\nProgram execution terminates when there is a stack underflow, or when the\nRET operator returns the top element of the stack as a result code to the\noperating system\n\nAll quantities are 32 bit signed.  (Well, actually, they're the size of your\ncompiler's int until you change the definition of s32)\n\nThese are the operators: \nNOP do nothing\n+ add top two elements on the stack and push result\n- subtract the top element from the second element\n* multiply top two elements\n/ divide second element by top element, result is integer quotient\n% divide second element by top element, result is integer remainder\n~ Exchange top two stack elements\n! Perform logical NOT on top stack element\n\u0026 Perform binary AND on top two stack elements\n| Perform binary OR on two top stack elements\n^ Perform binary XOR on two top stack elements\n@ Duplicate top stack element\n$ discard top stack element\n= Push an absolute element -- Top of stack names x, second on stack names y\n# Set an absolute element -- Top of stack names x, second on stack names y,\n  third on stack names value to store\n? if top element is zero, add (delta coordinate) to (grid coordinate) (Net\n  effect is a double-step)\ndx Load the delta coordinate X with the top stack value\ndy Load the delta coordinate Y with the top stack value\nx Load the grid coordinate X with the top stack value\ny Load the grid coordinate Y with the top stack value\nc Output the top stack element as a character, or newline if character is 0\ns Output stack elements as characters until a 0 is popped, then output a\n  newline\nd Output top stack element as a decimal quantity\nccw Change delta coordinate: (dx,dy) becomes (-dy,dx)\ncw Change delta coordinate: (dx,dy) becomes (dy,-dx)\nrev Change delta coordinate: (dx,dy) becomes (-dx,-dy)\nh Delta coordinate becomes (-1,0)\nj Delta coordinate becomes (0,1)\nk Delta coordinate becomes (0,-1)\nl Delta coordinate becomes (1,0)\n\nret Terminate execution.  Return top stack element to OS\n\nIn the input file:\n;comment lines begin with a semicolon\n;other lines have the form:\nx y element\n\nwhere x and y are integers in the valid range, and element is one of:\n1) An integer quantity\n -1\n 0\n 36\n etc.\n2) A character, enclosed in single quotes\n 'a'\n 'z'\n '0'\n etc.\n3) An operator\n ccw\n +\n -\n etc.\n\nIf a line can't be figured out by the parser, parsing stops and the number\nof the line is printed.  Informative error messages are out of the scope of\nthe interpreter.\n\nTo run a program:\north [arg] \u003c program.or\ngorth [arg] \u003c program.or\n\ngorth is like orth, except it prints debuggering info about the input file and\nsubsequent execution.\n\nEnjoy.  (Or, as we say, spok dein fifi)\n\nFeel free to contact me at jepler@herbie.unl.edu if you have any comments about\nthis language.\n\nI hope to hear soon that an enlightenend computer science teacher will\nuse this language in one of his 100-level comp sci courses, instead of pascal.\nAfter all, the looping constructs are very elegant.  (Yes, I've been waiting\nall day to say that)\n\nJeff Epler\nthe reluctant creator of orthagonal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-ender%2Forthagonal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-ender%2Forthagonal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-ender%2Forthagonal/lists"}