{"id":19297208,"url":"https://github.com/HackerFoo/poprc","last_synced_at":"2025-04-22T08:31:13.985Z","repository":{"id":4958828,"uuid":"6116266","full_name":"HackerFoo/poprc","owner":"HackerFoo","description":"A Compiler for the Popr Language","archived":false,"fork":false,"pushed_at":"2021-01-07T07:06:42.000Z","size":4882,"stargazers_count":242,"open_issues_count":0,"forks_count":10,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-09T23:02:23.287Z","etag":null,"topics":["compiler","concatenative","dependent-types","functional","high-level-synthesis","language","linear-logic","logic-programming","non-deterministic","partial-evaluators","popr","popr-compiler","supercompiler","verilog"],"latest_commit_sha":null,"homepage":"https://popr.dev","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HackerFoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"HackerFoo","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2012-10-07T21:00:46.000Z","updated_at":"2024-10-14T20:30:48.000Z","dependencies_parsed_at":"2022-08-18T05:20:54.319Z","dependency_job_id":null,"html_url":"https://github.com/HackerFoo/poprc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackerFoo%2Fpoprc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackerFoo%2Fpoprc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackerFoo%2Fpoprc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackerFoo%2Fpoprc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HackerFoo","download_url":"https://codeload.github.com/HackerFoo/poprc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250206146,"owners_count":21392194,"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":["compiler","concatenative","dependent-types","functional","high-level-synthesis","language","linear-logic","logic-programming","non-deterministic","partial-evaluators","popr","popr-compiler","supercompiler","verilog"],"created_at":"2024-11-09T23:01:47.931Z","updated_at":"2025-04-22T08:31:12.820Z","avatar_url":"https://github.com/HackerFoo.png","language":"C","funding_links":["https://github.com/sponsors/HackerFoo"],"categories":["Compilers and Interpreters","C"],"sub_categories":["Educational and Toy Projects"],"readme":"Popr Compiler [![Build Status](https://github.com/HackerFoo/poprc/workflows/Test/badge.svg)](https://github.com/HackerFoo/poprc/actions/)\n============\n\nThis project implements a compiler for the Popr language.\n\nPlease see [this presentation](http://hackerfoo.com/presentations/ttpl_slides.html) for more information, and the [tutorial](http://www.hackerfoo.com/posts/popr-tutorial-0-dot-machines.html) to understand the language semantics.\n\nMore examples can be found in [lib.ppr](https://github.com/HackerFoo/poprc/blob/master/lib.ppr) and [tests.ppr](https://github.com/HackerFoo/poprc/blob/master/tests.ppr).\n\nYou can try the compiler online using the [PoprC web version](http://hackerfoo.com/eval.html).\n\nPoprC targets both C and Verilog. For example, the familiar Fibonacci function:\n\n    fib: [dup 1 \u003c= !] [dup 1- dup 1- fib swap fib + swap 1 \u003e !] | pushl head\n\ncan be compiled to Verilog and synthesized or simulated:\n\n![fib wave](pic/fib_wave.png)\n\nNote the stack pointer (sp). Recursion is fully supported, but must be bounded.\n\nHere's a working AXI4-Lite slave:\n\n    stream_read_array: swap [swap read_array swap] map_with\n    \n    stream_write_array: swap2 [-swap2 swap write_array dup True swap seq swap] zip_with\n    \n    stream_read_write_array:\n      swap3 dup_array [-swap2 swap stream_write_array] dip31 swap\n        [swap stream_read_array] dip21\n\nwhen wrapped with a [bit of Verilog](https://github.com/HackerFoo/poprc/blob/master/testbenches/tests_axi_lite_slave_top.v) to map the signals properly.\n\nLicense\n=======\n\nThe license for the Popr Compiler is GPL3.  See LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHackerFoo%2Fpoprc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHackerFoo%2Fpoprc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHackerFoo%2Fpoprc/lists"}