{"id":15032028,"url":"https://github.com/jarkonik/rocklang","last_synced_at":"2025-04-09T22:41:11.998Z","repository":{"id":38240920,"uuid":"409349622","full_name":"jarkonik/rocklang","owner":"jarkonik","description":"JIT-compiled programming language. https://jarkonik.github.io/rocklang/","archived":false,"fork":false,"pushed_at":"2023-08-10T13:09:20.000Z","size":283,"stargazers_count":23,"open_issues_count":15,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T00:38:13.634Z","etag":null,"topics":["compiler","compilers","interpreter","jit","jit-compilation","jit-compiler","jit-interpreter","language","programming-language","rust","rust-lang","rust-language","script","scripting","scripting-language","scripts"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jarkonik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-09-22T20:39:24.000Z","updated_at":"2025-02-25T07:08:27.000Z","dependencies_parsed_at":"2025-02-21T07:31:16.760Z","dependency_job_id":null,"html_url":"https://github.com/jarkonik/rocklang","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkonik%2Frocklang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkonik%2Frocklang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkonik%2Frocklang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkonik%2Frocklang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarkonik","download_url":"https://codeload.github.com/jarkonik/rocklang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248124848,"owners_count":21051757,"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","compilers","interpreter","jit","jit-compilation","jit-compiler","jit-interpreter","language","programming-language","rust","rust-lang","rust-language","script","scripting","scripting-language","scripts"],"created_at":"2024-09-24T20:17:09.105Z","updated_at":"2025-04-09T22:41:11.975Z","avatar_url":"https://github.com/jarkonik.png","language":"Rust","funding_links":["https://www.paypal.com/donate?hosted_button_id=Y25KDXY4LJYQ2"],"categories":[],"sub_categories":[],"readme":"# Rock\n\n⚠️The project is at a very early stage, lots of things will not work.\n\n[![Github all releases](https://img.shields.io/github/downloads/jarkonik/rocklang/total.svg)](https://GitHub.com/jarkonik/rocklang/releases/)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?hosted_button_id=Y25KDXY4LJYQ2)\n[![Continuous integration](https://github.com/jarkonik/rocklang/actions/workflows/main.yml/badge.svg)](https://github.com/jarkonik/rocklang/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/jarkonik/rocklang/branch/main/graph/badge.svg?token=DW07IRWGG0)](https://codecov.io/gh/jarkonik/rocklang)\n[![Rocklang\nDiscord](https://badgen.net/discord/members/NK3baHRTve)](https://discord.gg/NK3baHRTve)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003cimg src=\"./rock.svg\" width=\"100\" height=\"100\"\u003e\n\nJIT-compiled programming language.\n\n## Getting started\n\n### Linux\n\n1. Copy and paste the following command in a shell:\n```\nsudo sh -c 'curl -L https://github.com/jarkonik/rocklang/releases/latest/download/rocklang-ubuntu-latest -o /usr/local/bin/rocklang \u0026\u0026 chmod +x /usr/local/bin/rocklang'\n```\n2. Create a file named `main.rck` in a directory of your choice, with following\n   content:\n```\nprint(\"Hello from rocklang\")\n```\n3. While being in the same directory, that you've created the source file in, run `rocklang main.rck` from a shell.\n4. You should see text `Hello from rocklang` printed in your terminal.\n\n### Windows\n\n1. [Download and run the installer.](https://github.com/jarkonik/rocklang/releases/latest/download/rocklang-windows-latest.msi)\n2. Create a file named `main.rck` in a directory of your choice, with the following\n   content:\n```\nprint(\"Hello from rocklang\")\n```\n3. While being in the same directory, that you've created the source file in, run `rocklang main.rck` from PowerShell or\n   Command Prompt.\n4. You should see text `Hello from rocklang` printed in your terminal.\n\n### MacOS\n\n1. Copy and paste the following command in a shell:\n```\nsudo sh -c 'curl -L https://github.com/jarkonik/rocklang/releases/latest/download/rocklang-macos-latest -o /usr/local/bin/rocklang \u0026\u0026 chmod +x /usr/local/bin/rocklang'\n```\n2. Create a file named `main.rck` in a directory of your choice, with the following\n   content:\n```\nprint(\"Hello from rocklang\")\n```\n3. While being in the same directory, that you've created the source file in, run `rocklang main.rck` from a shell.\n4. You should see text `Hello from rocklang` printed in your terminal.\n\n## Example\n\nSample implementation of Sieve of Eratosthenes written in Rock\n\n```c\nmem_set = (vec: vec, val: number, n: number): vec =\u003e {\n\ti = 0\n\twhile i \u003c n {\n\t\tvec_set(vec, i, val)\n\t\ti = i + 1\n\t}\n\tvec\n}\n\nsieve = (n: number): void =\u003e {\n\tv = vec_new()\n\tprime = mem_set(v, 1, n + 1)\n\n\tp = 2\n\n\twhile p * p \u003c= n {\n\t\tif vec_get(prime, p) == 1 {\n\t\t\ti = p * p\n\t\t\twhile i \u003c= n {\n\t\t\t\tvec_set(prime, i, 0)\n\t\t\t\ti = i + p\n\t\t\t}\n\t\t}\n\n\t\tp = p + 1\n\t}\n\n\tp = 2\n\n\twhile p \u003c= n {\n\t\tif vec_get(prime, p) == 1 {\n\t\t\tprint(string(p))\n\t\t\tprint(\"\\n\")\n\t\t}\n\n\t\tp = p + 1\n\t}\n}\n\nsieve(10)\n```\n\n## Building from source\n1. Install Rust compiler that supports Rust Edition 2021, along with `cargo` tool, in your favorite fashion.\n2. Install llvm 13\n3. Run `cargo build` to build binaries or `cargo run examples/sieve.rck` to run a sample program.\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarkonik%2Frocklang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarkonik%2Frocklang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarkonik%2Frocklang/lists"}