{"id":17196121,"url":"https://github.com/huwdp/huwinterpreter","last_synced_at":"2025-04-13T20:43:27.302Z","repository":{"id":45458838,"uuid":"141811186","full_name":"huwdp/huwinterpreter","owner":"huwdp","description":"Huwinterpreter","archived":false,"fork":false,"pushed_at":"2023-12-05T00:49:09.000Z","size":59092,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T19:43:20.463Z","etag":null,"topics":["imperative-programming-language","interpreted-programming-language","interpreters","recursive-descent-parser","scripting-engine","scripting-language"],"latest_commit_sha":null,"homepage":"https://huwdp.github.io/huwcode-documentation/","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/huwdp.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}},"created_at":"2018-07-21T12:41:41.000Z","updated_at":"2025-04-09T18:36:58.000Z","dependencies_parsed_at":"2025-02-24T02:37:40.647Z","dependency_job_id":"5e60c99f-6c44-4a20-a7dc-27de3fe1636e","html_url":"https://github.com/huwdp/huwinterpreter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huwdp%2Fhuwinterpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huwdp%2Fhuwinterpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huwdp%2Fhuwinterpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huwdp%2Fhuwinterpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huwdp","download_url":"https://codeload.github.com/huwdp/huwinterpreter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782283,"owners_count":21160716,"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":["imperative-programming-language","interpreted-programming-language","interpreters","recursive-descent-parser","scripting-engine","scripting-language"],"created_at":"2024-10-15T01:52:26.864Z","updated_at":"2025-04-13T20:43:27.278Z","avatar_url":"https://github.com/huwdp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n# HuwInterpreter\n\u003e HuwInterpreter is a hand written interpreter designed to parse and execute HuwCode script.\n\nHuwInterpreter is an interpreter built in C++ for a custom language I developed named HuwCode. The project was built out of self-interest and understanding on how interpreters work and written. The language supports 70+ built in functions, custom user defined functions, scopes (each function has a scope), variables with types of double (number), string (text) and associated array.\n\nUser documentation can be found [here](https://huwdp.github.io/huwcode-documentation/).\n\nWASM version can be found here (https://huwdp.co.uk/huwcode-wasm/output.html). Press Cancel button to see result after executing code.\n\n![](https://huwdp.co.uk/sites/default/files/inline-images/huwinterpreter-in-action_0.png)\n## Code Example\n```\nfunction fac(n)\n{\n    return facRec(1, n);\n}\n\nfunction facRec(acc, n)\n{\n    if (n \u003c 2)\n    {\n        return acc;\n    }\n    return facRec(n * acc, n - 1);\n}\nprint(fac(14));\n```\n\n## Dependencies\n\n - libcurl4-openssl-dev \n - libcurl4\n - libreadline\n - libreadline-dev\n\n## Installation\n\n#### Building\n```\nsudo apt-get install git g++ cmake make libcurl5-openssl-dev curl pkg-config\nsudo apt-get install lib32readline8 lib32readline-dev libreadline-dev\ngit clone https://github.com/huwdp/huwinterpreter.git\ncd huwinterpreter/source\n./build.sh\n```\n*Files will be put in source/build location.*\n\n\n#### Install\nCopy binary into sbin folder. *Binary is in build directory.*\n```\nsudo cp ./HuwInterpreter /usr/sbin/huw\n```\n\n#### Build App-Image\n```\nsudo apt-get install wget\ncd huwinterpreter/build-appimage/\nwget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage\nchmod a-x linuxdeployqt-continuous-x86_64.AppImage\nchmod 777 linuxdeployqt-continuous-x86_64.AppImage\n./build-app-image.sh\n```\n\n## Usage example\n```\n1. Usage: [filename] to run file.\n2. Usage: -t [text] to run text.\n3. Usage: --hc for HuwCode formatter\n4. Usage: -h for help.\n```\n_For more examples and usage, please refer to the user documentation [here](https://huwdp.github.io/huwcode-documentation/)._\n\n### Releases\nBinaries can be downloaded here (https://github.com/huwdp/huwinterpreter/releases).\n\nWindows build available although some functionality is disabled. \nList of things disabled in Windows build:\n\n- Readline user input\n - sleep\n - weekday\n - weekdayName\n - year\n - monthName\n - random\n - month\n - currentTime\n - clock\n - regexSearch\n - regexReplace\n - regexMatch\n - timeFormat\n - httpGet\n - httpPost\n - httpPut\n - httpDelete\n - now\n\n## Meta\nHuw Pritchard – [@huwdp](https://twitter.com/huwdp) – [huwdp.co.uk](https://huwdp.co.uk)\nGNU GENERAL PUBLIC LICENSE Version 3 (GPL 3).. See [license.txt](https://github.com/huwdp/huwinterpreter/blob/master/license.txt) for more information.\n## Contributing\n1. Fork it [here](https://github.com/huwdp/huwinterpreter/fork)\n2. Create your branch (`git checkout -b xxx`)\n3. Commit your changes (`git commit -am 'Comment'`)\n4. Push branch (`git push origin xxx`)\n5. Create a new pull request\n\n## Personal notes\n\nThe project should have been structured different. This project started while the famous Crafting interpreters book was in-progress so I had took no guidance on how the system architecture should look like. This project should have used a single Cpp file for interpreting the AST rather than have the logic inside each of the nodes. This change would allow me to add Classes to the system due to the dependency hell I got myself into. Overall I’m happy with HuwCode so I’ll leave it as it is.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuwdp%2Fhuwinterpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuwdp%2Fhuwinterpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuwdp%2Fhuwinterpreter/lists"}