{"id":21866892,"url":"https://github.com/rootmos/silly-joy","last_synced_at":"2025-04-14T22:21:03.020Z","repository":{"id":82434333,"uuid":"99135659","full_name":"rootmos/silly-joy","owner":"rootmos","description":"Interpreter for Joy  in Haskell using extensible-effects","archived":false,"fork":false,"pushed_at":"2017-08-26T17:31:36.000Z","size":137,"stargazers_count":34,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-16T02:02:09.641Z","etag":null,"topics":["concatenative","concatenative-language","extensible-effects","haskell","joy"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootmos.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}},"created_at":"2017-08-02T15:58:40.000Z","updated_at":"2024-02-05T04:31:51.000Z","dependencies_parsed_at":"2023-06-15T16:30:36.354Z","dependency_job_id":null,"html_url":"https://github.com/rootmos/silly-joy","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/rootmos%2Fsilly-joy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootmos%2Fsilly-joy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootmos%2Fsilly-joy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootmos%2Fsilly-joy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootmos","download_url":"https://codeload.github.com/rootmos/silly-joy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248969054,"owners_count":21191183,"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":["concatenative","concatenative-language","extensible-effects","haskell","joy"],"created_at":"2024-11-28T05:07:49.745Z","updated_at":"2025-04-14T22:21:02.974Z","avatar_url":"https://github.com/rootmos.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# silly-joy\n[![Build, test and push image](https://github.com/rootmos/silly-joy/actions/workflows/build-test-push.yaml/badge.svg)](https://github.com/rootmos/silly-joy/actions/workflows/build-test-push.yaml)\n\n`silly-joy` is an interpreter for the concatenative programming\nlanguage Joy, implemented in Haskell using\n[extensible-effects](https://hackage.haskell.org/package/extensible-effects).\n\n## What's Joy?\nHere are some resources:\n* *Mathematical foundations of Joy* by *Manfred von Thun*\n  ([archived here](https://web.archive.org/web/20111007025556/http://www.latrobe.edu.au/phimvt/joy/j02maf.html), the paper that sparked this project)\n* On [Wikipedia](https://en.wikipedia.org/wiki/Joy_(programming_language))\n* [Official page](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language)\n* Over at [http://www.concatenative.org](http://www.concatenative.org/wiki/view/Joy)\n\n## Try it out!\nSimplest way to try it out is by using Docker:\n```\ndocker run -it rootmos/silly-joy --tui\n```\nYou'll be greeted by a terminal UI with the REPL as well as\na window showing the current stack. Very convenient when learning stack-based\nlanguages!\n\n![demo](../master/demo.gif)\n\n\n## Example session\n\n```\n\u003e 1 2 +\n\u003e :stack\n3\n\u003e 12 *\n\u003e print\n36\n\u003e fact := [[pop 0 =] [pop pop 1] [ [dup 1 -] dip dup i *] ifte] dup i\n\u003e 10 fact\n\u003e :st\n3628800\n\u003e [\"foo\" \"bar\" strcat] [strlen] b\n\u003e dup print\n6\n\u003e 1 swap - print\n-5\n\u003e even := 2 % 0 =\n\u003e odd := even not\n\u003e 3 odd 2 even and print\ntrue\n\u003e prime := [dup even [3 \u003c] dip or] [2 =] [prime_trial_division] ifte\n\u003e prime_trial_division := 3 [[pop % null] [pop =] [[2 +] dip x] ifte] x\n\u003e [2 3 4 5 6 7 8 9 10 11 12 13] [prime] map print\n[true true false true false true false false false true false true]\n\u003e sum := 0 [+] fold\n\u003e div-3-5 := [dup [3 % null] dip 5 % null or] filter\n\u003e up-to := pred [[]] [cons] primrec\n\u003e 10 up-to div-3-5 sum print\n23\n\u003e next-fib := dup [+] dip swap\n\u003e add-if-even := [even] [dup [rotate] dip + rotate] [] ifte\n\u003e 0 1 1 [100 \u003e] [pop pop] [next-fib add-if-even] [i] genrec print\n188\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootmos%2Fsilly-joy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootmos%2Fsilly-joy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootmos%2Fsilly-joy/lists"}