{"id":13779574,"url":"https://github.com/txus/calc","last_synced_at":"2025-04-28T10:25:56.932Z","repository":{"id":41344711,"uuid":"10890012","full_name":"txus/calc","owner":"txus","description":"Simple arithmetic language interpreter with JIT compilation, using LLVM.","archived":false,"fork":false,"pushed_at":"2013-07-23T15:56:49.000Z","size":144,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T14:35:24.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/txus/calc","language":"C","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/txus.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":"2013-06-23T18:55:23.000Z","updated_at":"2023-05-13T00:51:52.000Z","dependencies_parsed_at":"2022-09-19T00:41:12.602Z","dependency_job_id":null,"html_url":"https://github.com/txus/calc","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/txus%2Fcalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txus%2Fcalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txus%2Fcalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txus%2Fcalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/txus","download_url":"https://codeload.github.com/txus/calc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251293534,"owners_count":21566108,"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-08-03T18:01:06.605Z","updated_at":"2025-04-28T10:25:56.907Z","avatar_url":"https://github.com/txus.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# calc\n\nCalc is a proof of concept to implement a simple arithmetic language\ninterpreter with JIT compilation, using either LLVM or a more low-level JIT\nbased on GNU Lightning.\n\nA fun weekend project, if you ask me!\n\n# Install\n\nYou need LLVM and GNU Lightning installed. On Mac OSX:\n\n    $ brew install llvm\n\nUnfortunately the version of Lightning in Homebrew is broken. Download and\ninstall lightning from its [mirror git repository][lightning].\n\nNow:\n\n    $ git clone git://github.com/txus/calc.git calc\n    $ cd calc\n    $ make\n\nYou get the `calc` executable.\n\n## Usage\n\nUsing the AST-walking interpreter:\n\n    $ ./calc \"3 * (4 + 5)\"\n\nUsing the LLVM JIT compiler:\n\n    $ ./calc --llvm \"3 * (4 + 5)\"\n\nUsing the lower-level, GNU-lightning based JIT compiler:\n\n    $ ./calc --jit \"3 * (4 + 5)\"\n\n## Syntax\n\nIt's just integers, these operators: `+ - * /`, and parentheses for precedence.\n\n## Who's this\n\nThis was made by [Josep M. Bach (Txus)](http://txustice.me) under the MIT\nlicense. I'm [@txustice][twitter] on twitter (where you should probably follow\nme!).\n\n[twitter]: https://twitter.com/txustice\n[lightning]: https://github.com/bonzini/lightning","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftxus%2Fcalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftxus%2Fcalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftxus%2Fcalc/lists"}