{"id":16196067,"url":"https://github.com/systemfw/befunge-93","last_synced_at":"2025-03-19T05:30:24.438Z","repository":{"id":88027742,"uuid":"118793817","full_name":"SystemFw/Befunge-93","owner":"SystemFw","description":"Purely Functional, Final Tagless interpreter for the Befunge-93 esolang","archived":false,"fork":false,"pushed_at":"2018-02-14T19:53:45.000Z","size":30,"stargazers_count":36,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T16:00:31.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","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/SystemFw.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":"2018-01-24T16:49:55.000Z","updated_at":"2024-10-22T06:17:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"4fb36bd9-8b9e-4b15-803d-15d94efe0018","html_url":"https://github.com/SystemFw/Befunge-93","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/SystemFw%2FBefunge-93","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemFw%2FBefunge-93/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemFw%2FBefunge-93/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemFw%2FBefunge-93/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SystemFw","download_url":"https://codeload.github.com/SystemFw/Befunge-93/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971156,"owners_count":20376784,"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":[],"created_at":"2024-10-10T08:46:30.998Z","updated_at":"2025-03-19T05:30:24.420Z","avatar_url":"https://github.com/SystemFw.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Befunge-93\n\nA purely functional Befunge-93 interpreter, written in final tagless style.\nShowcasing the beauty and power of compositional design.\n\n## The interpreter\n\nGiven a Befunge-93 program, usually expressed as a multiline string\n\n``` scala\nval helloWorld = \n    \"\"\"\n\u003e              v\nv  ,,,,,\"Hello\"\u003c\n\u003e48*,          v\nv,,,,,,\"World!\"\u003c\n\u003e25*,@\n   \"\"\"\n```\n\nyou can run it to completion by calling `befunge.run(helloWorld)`, or\nstep through it in debug mode with `befunge.debug(helloWorld)`. Note\nthat both return a `cats.effect.IO]`, which describes their behaviour\nin a purely functional manner. You can compose the `IO` computations\nin a larger program, or, if you want to actually trigger their\nexecution because you are in `main` or in the `repl`, call\n`.unsafeRunSync` on them.\n\n\nThe `befunge` object also contains some example programs for you to\ntry out.\n\n\n## The language\nBefunge-93 is a stack-based, reflective, bidimensional esoteric programming language.\nThe spec is [here](Befunge-93_spec.md)\n\nA short table of the commands is as follows:\n\n### Command Summary ###\n\n    COMMAND         INITIAL STACK (bot-\u003etop)RESULT (STACK)\n    -------         -------------           -----------------\n    + (add)         \u003cvalue1\u003e \u003cvalue2\u003e       \u003cvalue1 + value2\u003e\n    - (subtract)    \u003cvalue1\u003e \u003cvalue2\u003e       \u003cvalue1 - value2\u003e\n    * (multiply)    \u003cvalue1\u003e \u003cvalue2\u003e       \u003cvalue1 * value2\u003e\n    / (divide)      \u003cvalue1\u003e \u003cvalue2\u003e       \u003cvalue1 / value2\u003e (nb. integer)\n    % (modulo)      \u003cvalue1\u003e \u003cvalue2\u003e       \u003cvalue1 mod value2\u003e\n    ! (not)         \u003cvalue\u003e                 \u003c0 if value non-zero, 1 otherwise\u003e\n    ` (greater)     \u003cvalue1\u003e \u003cvalue2\u003e       \u003c1 if value1 \u003e value2, 0 otherwise\u003e\n    \u003e (right)                               PC -\u003e right\n    \u003c (left)                                PC -\u003e left\n    ^ (up)                                  PC -\u003e up\n    v (down)                                PC -\u003e down\n    ? (random)                              PC -\u003e right? left? up? down? ???\n    _ (horizontal if) \u003cboolean value\u003e       PC-\u003eleft if \u003cvalue\u003e, else PC-\u003eright\n    | (vertical if)   \u003cboolean value\u003e       PC-\u003eup if \u003cvalue\u003e, else PC-\u003edown\n    \" (stringmode)                          Toggles 'stringmode'\n    : (dup)         \u003cvalue\u003e                 \u003cvalue\u003e \u003cvalue\u003e\n    \\ (swap)        \u003cvalue1\u003e \u003cvalue2\u003e       \u003cvalue2\u003e \u003cvalue1\u003e\n    $ (pop)         \u003cvalue\u003e                 pops \u003cvalue\u003e but does nothing\n    . (pop)         \u003cvalue\u003e                 outputs \u003cvalue\u003e as integer\n    , (pop)         \u003cvalue\u003e                 outputs \u003cvalue\u003e as ASCII\n    # (bridge)                              'jumps' PC one farther; skips\n                                            over next command\n    g (get)         \u003cx\u003e \u003cy\u003e                 \u003cvalue at (x,y)\u003e\n    p (put)         \u003cvalue\u003e \u003cx\u003e \u003cy\u003e         puts \u003cvalue\u003e at (x,y)\n    \u0026 (input value)                         \u003cvalue user entered\u003e\n    ~ (input character)                     \u003ccharacter user entered\u003e\n    @ (end)                                 ends program\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemfw%2Fbefunge-93","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemfw%2Fbefunge-93","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemfw%2Fbefunge-93/lists"}