{"id":15047719,"url":"https://github.com/namberino/nimble","last_synced_at":"2025-04-10T01:06:41.361Z","repository":{"id":249223378,"uuid":"825374660","full_name":"namberino/nimble","owner":"namberino","description":"The NIMBLE Programming Language","archived":false,"fork":false,"pushed_at":"2024-10-01T09:32:40.000Z","size":3425,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T01:06:32.576Z","etag":null,"topics":["cpp","cpp20","interpreter","lexical-analysis","parsing","programming-language"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/namberino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-07T15:51:27.000Z","updated_at":"2024-10-01T09:32:44.000Z","dependencies_parsed_at":"2024-07-26T04:28:41.878Z","dependency_job_id":"3843ed9e-02a1-4bf3-b6fe-67feaa61e3b3","html_url":"https://github.com/namberino/nimble","commit_stats":null,"previous_names":["namberino/nimble"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namberino%2Fnimble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namberino%2Fnimble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namberino%2Fnimble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namberino%2Fnimble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namberino","download_url":"https://codeload.github.com/namberino/nimble/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137887,"owners_count":21053775,"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":["cpp","cpp20","interpreter","lexical-analysis","parsing","programming-language"],"created_at":"2024-09-24T21:03:28.056Z","updated_at":"2025-04-10T01:06:41.345Z","avatar_url":"https://github.com/namberino.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The NIMBLE Programming Language\n\n![logo](doc/img/logo.png)\n\nNIMBLE (Nam's Interpreted Modular Basic Language Engine) is a dynamically typed, interpreted programming language with C-like syntax. This repository contains the source code for the NIMBLE programming language's interpreter.\n\nI started this project at the beginning of June 2024 with the goal of learning more about programming language design and practicing my C++ skills. It then gradually became one of my biggest projects yet. \n\nThe interpreter is not very optimized and there may be some bugs that I might have overlooked, but I'm quite happy with how it turned out.\n\n## Syntax\n\n```nimble\nimport \"core:math\";\n\n// collatz conjecture function\nfun collatz_conjecture(n)\n{\n    if (n % 2 == 0)\n    {\n        n = floordiv(n, 2);\n        return n;\n    }\n    else if (n % 2 == 1)\n    {\n        n = 3 * n + 1;\n        return n;\n    }\n}\n\nmut n = input(\"Enter number: \");\nmut i = 0;\nmut li = [];\n\n// main loop\nwhile (n != 1)\n{\n    n = collatz_conjecture(n);\n    li[i] = n;\n    i += 1;\n}\n\nprint(li);\n```\n\nNIMBLE is a dynamically typed programming language, featuring C-like syntax with class support and C++ inheritance syntax. It has a very \"*fun*\" syntax (because the function keyword is *fun*)\n\n## Requirements\n\nBefore compilation, you'll need to have these tools installed first:\n- [Clang](https://clang.llvm.org/) or [GCC](https://gcc.gnu.org/) (I built this with Clang but GCC works just fine)\n- [GNU Make](https://www.gnu.org/software/make/)\n\n## Project structure\n\n| Directory | Description |\n| --- | --- |\n| [benchmark](benchmark/) | Benchmark programs |\n| [doc](doc/) | Documentation |\n| [examples](examples/) | Example programs |\n| [include](include/) | Header files |\n| [lib](lib/) | Core library |\n| [src](src/) | Source code |\n| [tests](tests/) | Test cases |\n| [tools](tools/) | Useful tools and scripts |\n| [web](web/) | Code runner website |\n\n## Compiling and Running\n\nIf you're using `make`:\n- `make compile` to compile the program into the `bin/` directory\n- `make run` to run the program\n- `make clean` to clean up the object and binary files\n- `make test` to run test cases\n- `make bench` to run benchmarks\n\nYou can run the interpreter with `make run` or `./bin/nimble \u003cfilename\u003e.nbl`\n\n## Benchmark\n\nElapsed time of computationally intensive programs:\n\n| Program | Mininum | Average | Maximum |\n| --- | :---: | :---: | :---: |\n| bintree.nbl | 1.13 | 1.19 | 1.30 |\n| count.nbl | 0.57 | 0.61 | 0.64 |\n| fibonacci.nbl | 1.01 | 1.04 | 1.10 |\n| prime.nbl | 0.34 | 0.34 | 0.35 |\n\n## Documentation\n\nYou can find the documentation in the [doc](doc/) directory. You can also learn about the syntax of the language through example programs found in the [examples](examples/) directory.\n\n## Plans for this project\n\nFor now, most of the features of the language and the interpreter is complete. Currently, I'm working on the documentation for this interpreter.\n\nHopefully I could integrate this project with [LLVM](https://llvm.org/) and create a compiler for this language for improved performance and speed in the future.\n\n## VSCode syntax support\n\nI've created a VSCode extension for the language. You can checkout the extension [here](https://github.com/namberino/nimble-vscode)\n\n## References\n\n- [Making a Programming Language \u0026 Interpreter in under 10 minutes](https://www.youtube.com/watch?v=A3gTw1ZkeK0)\n- [Writing An Interpreter In Go](https://www.amazon.com/Writing-Interpreter-Go-Thorsten-Ball/dp/3982016118)\n- [Crafting Interpreters](https://craftinginterpreters.com/)\n- [Make YOUR OWN Programming Language in Python](https://youtube.com/playlist?list=PLZQftyCk7_SdoVexSmwy_tBgs7P0b97yD\u0026si=cr5N8m9Ybknj0Pvr)\n- [Let's Write an Interpreter (in 168 Lines of Python)](https://www.youtube.com/watch?v=LgsW0eGk-6U)\n- [My First Language Frontend with LLVM Tutorial](https://www.llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamberino%2Fnimble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamberino%2Fnimble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamberino%2Fnimble/lists"}