{"id":19838974,"url":"https://github.com/objectionary/phie","last_synced_at":"2025-05-01T18:31:43.623Z","repository":{"id":50382771,"uuid":"447446664","full_name":"objectionary/phie","owner":"objectionary","description":"Experimental Emulator of a Machine that Understands 𝜑-calculus","archived":false,"fork":false,"pushed_at":"2025-04-16T18:42:00.000Z","size":390,"stargazers_count":11,"open_issues_count":16,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-17T03:36:28.808Z","etag":null,"topics":["compiler","eolang","rust"],"latest_commit_sha":null,"homepage":"https://www.eolang.org","language":"Rust","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/objectionary.png","metadata":{"files":{"readme":"README.md","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-13T03:10:51.000Z","updated_at":"2025-04-12T02:26:58.000Z","dependencies_parsed_at":"2024-03-23T06:26:28.128Z","dependency_job_id":"7bac2445-3b40-4bc5-9031-6377778c7b75","html_url":"https://github.com/objectionary/phie","commit_stats":{"total_commits":193,"total_committers":3,"mean_commits":64.33333333333333,"dds":"0.20725388601036265","last_synced_commit":"8407259d2e527297dd8ff34edc7f5fd8a6422b33"},"previous_names":["yegor256/eoc"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fphie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fphie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fphie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fphie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/objectionary","download_url":"https://codeload.github.com/objectionary/phie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924795,"owners_count":21666039,"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","eolang","rust"],"created_at":"2024-11-12T12:19:48.595Z","updated_at":"2025-05-01T18:31:43.618Z","avatar_url":"https://github.com/objectionary.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"logo\" src=\"https://www.objectionary.com/cactus.svg\" height=\"100px\" /\u003e\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)\n\n[![cargo](https://github.com/objectionary/phie/actions/workflows/cargo.yml/badge.svg)](https://github.com/objectionary/phie/actions/workflows/cargo.yml)\n[![crates.io](https://img.shields.io/crates/v/phie.svg)](https://crates.io/crates/phie)\n[![PDD status](https://www.0pdd.com/svg?name=objectionary/phie)](https://www.0pdd.com/p?name=objectionary/phie)\n[![codecov](https://codecov.io/gh/objectionary/phie/branch/master/graph/badge.svg)](https://codecov.io/gh/objectionary/phie)\n[![Hits-of-Code](https://hitsofcode.com/github/objectionary/phie)](https://hitsofcode.com/view/github/objectionary/phie)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/objectionary/phie/blob/master/LICENSE.txt)\n\nIt's an experimental emulator of a machine that understands\n[𝜑-calculus](https://arxiv.org/abs/2111.13384) expressions,\nwhich is the formalism behind [EO](https://www.eolang.org) programming language.\n\nTo build it, install [Rust](https://www.rust-lang.org/tools/install) and then:\n\n```bash\n$ cargo build --release\n```\n\nIf everything goes well, an executable binary will be in `target/release/fibonacci`:\n\n```bash\n$ target/release/fibonacci 7 40\n```\n\nThis will calculate the 7th Fibonacci number 40 times.\nDon't try to play with much larger numbers, this binary code is very slow. It's just an experiment.\n\nTo compile your own program instead of this primitive recursive Fibonacci calculator, you have to\nconvert EO code into 𝜑-calculus expressions and then pass them to `Emu` struct like this:\n\n```rust\nuse phie::emu::Emu;\npub fn main() {\n    let mut emu: Emu = \"\n        ν0(𝜋) ↦ ⟦ 𝜑 ↦ ν3(𝜋) ⟧\n        ν1(𝜋) ↦ ⟦ Δ ↦ 0x002A ⟧\n        ν2(𝜋) ↦ ⟦ λ ↦ int-add, ρ ↦ 𝜋.𝛼0, 𝛼0 ↦ 𝜋.𝛼1 ⟧\n        ν3(𝜋) ↦ ⟦ 𝜑 ↦ ν2(ξ), 𝛼0 ↦ ν1(𝜋), 𝛼1 ↦ ν1(𝜋) ⟧\n    \".parse().unwrap();\n    let dtz = emu.dataize();\n    print!(\"The result is: {}\", dtz.0);\n}\n```\n\nThis code is equivalent to the following EO code:\n\n```text\n[] \u003e foo\n  42 \u003e x\n  x.add x \u003e @\n```\n\nBut in a more \"functional\" way:\n\n```text\n[] \u003e foo\n  42 \u003e x\n  int-add \u003e @\n    x\n    x\n```\n\nMore tests are in `src/emu.rs` file.\n\n## How to Contribute\n\nFirst, install [Rust](https://www.rust-lang.org/tools/install) and then:\n\n```bash\n$ cargo test -vv --release\n```\n\nIf everything goes well, an executable binary will be in `target/release/phie`:\n\n```bash\n$ target/release/phie --help\n```\n\nThen, fork repository, make changes, send us a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nWe will review your changes and apply them to the `master` branch shortly,\nprovided they don't violate our quality standards. To avoid frustration,\nbefore sending us your pull request please run `cargo test` again. Also,\nrun `cargo fmt` and `cargo clippy`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Fphie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjectionary%2Fphie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Fphie/lists"}