{"id":16278110,"url":"https://github.com/rashadphz/penne","last_synced_at":"2026-01-20T02:19:27.858Z","repository":{"id":44774387,"uuid":"492370663","full_name":"rashadphz/penne","owner":"rashadphz","description":"Partial Python Compiler with OCaml and LLVM","archived":false,"fork":false,"pushed_at":"2022-06-09T15:35:20.000Z","size":3361,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-31T22:24:42.877Z","etag":null,"topics":["compiler","llvm"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/rashadphz.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}},"created_at":"2022-05-15T02:40:48.000Z","updated_at":"2024-05-24T03:53:33.000Z","dependencies_parsed_at":"2022-08-21T02:10:34.224Z","dependency_job_id":null,"html_url":"https://github.com/rashadphz/penne","commit_stats":null,"previous_names":["rashadphz/penne"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Fpenne","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Fpenne/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Fpenne/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Fpenne/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rashadphz","download_url":"https://codeload.github.com/rashadphz/penne/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233429666,"owners_count":18674985,"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","llvm"],"created_at":"2024-10-10T18:57:20.837Z","updated_at":"2025-09-17T22:33:28.708Z","avatar_url":"https://github.com/rashadphz.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Penne\nPartial Python compiler written in OCaml. Penne compiles Python programs to LLVM Intermediate Representation which can then be interpreted or converted to machine language. With LLVM Optimizations, Penne can make Python programs run with the speed of C or C++.\n\n## Limitations\nThe Penne compiler is not meant to match the flexibility of CPython. Penne is limited to a small subset of Python functionality. It was an attempt to learn LLVM and OCaml simultaneously and serve as an example of how fast compiled Python can be.\n  ### Supports: \n  - Multiple argument functions\n  - Basic array initialization and element access (No modification)\n  - Conditional If Else Blocks \n  - While Loops\n  - Python style indentation\n  - Arithmetic\n  ### Important but not yet implemented:\n  - Type system (currently only signed 32 bit integers)\n  - Classes\n  - Dynamic lists\n  - List comprehensions\n  - For loops\n  - Sets/Hashtables\n\n## Comparisons\nTime in seconds of Penne includes compile time and run time.\n\n### Fibonacci of 44 (Recursive)\n```\ndef fib(n):\n  if n \u003c= 2:\n    return 1\n  else:\n    return fib(n - 1) + fib(n - 2)\n\nprint(fib(44))\n```\n**Python Interpreter: 77.15 seconds**\n\n**Penne Compiler: 1.60 seconds**\n\n### Greatest Common Denominator (Iterative)\n```\ndef gcd(a, b):\n  while a != b:\n      if a \u003e b:\n          a = a - b\n      else:\n          b = b - a\n  return a\n\nprint(gcd(2147483648, 2))\n```\n**Python Interpreter: 44.92 seconds**\n\n**Penne Compiler: 0.845 seconds**\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashadphz%2Fpenne","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frashadphz%2Fpenne","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashadphz%2Fpenne/lists"}