{"id":31689521,"url":"https://github.com/arsngrobg/diorite","last_synced_at":"2025-10-08T11:49:14.286Z","repository":{"id":316041157,"uuid":"1061695819","full_name":"Arsngrobg/Diorite","owner":"Arsngrobg","description":"An industry-grade desktop maths environment that runs in the CLI or a GUI. Designed for high-level mathematics, for professional mathematicians.","archived":false,"fork":false,"pushed_at":"2025-10-07T23:08:03.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"lang","last_synced_at":"2025-10-08T00:23:30.329Z","etag":null,"topics":["csharp","fsharp","graphs","mathematics","plotting","programming-language"],"latest_commit_sha":null,"homepage":"","language":"F#","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/Arsngrobg.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-22T09:05:14.000Z","updated_at":"2025-10-07T23:08:07.000Z","dependencies_parsed_at":"2025-10-08T00:13:45.500Z","dependency_job_id":"eabed36c-aace-4124-8942-ff352889c6a2","html_url":"https://github.com/Arsngrobg/Diorite","commit_stats":null,"previous_names":["arsngrobg/diorite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Arsngrobg/Diorite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arsngrobg%2FDiorite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arsngrobg%2FDiorite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arsngrobg%2FDiorite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arsngrobg%2FDiorite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arsngrobg","download_url":"https://codeload.github.com/Arsngrobg/Diorite/tar.gz/refs/heads/lang","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arsngrobg%2FDiorite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278938947,"owners_count":26072275,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["csharp","fsharp","graphs","mathematics","plotting","programming-language"],"created_at":"2025-10-08T11:49:09.310Z","updated_at":"2025-10-08T11:49:14.277Z","avatar_url":"https://github.com/Arsngrobg.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diorite\nAn industry-grade desktop maths environment that runs in the CLI or a GUI. Designed for high-level mathematics, for\nprofessional mathematicians.\n\n## If Building From Source\nYou are required to install the [.NET 9.0 SDK](https://dotnet.microsoft.com/download) (or higher) in order to build this\nproject from source. If you are not check the [releases](https://github.com/Arsngrobg/Diorite/releases) tab for a\nready-to-use Diorite interpreter/compiler and an *optional* IME (Integrated Mathematics Environment) to quickly and\neasily get into mathematical processing.\n\n# Important\nThe language is designed to run primarily on the **Windows** operating system, as the bundled IME (Integrated\nMathematics Environment) executes on the WPF user interface platform - which is **not** supported on Linux. However,\nyou are still able to utilize the interpreter/compiler on Linux systems if you do so.\n\n# Getting Started\nTo get started with Diorite, execute this command in the command line:\n```fsharp\n$ diorite -i\n```\nThis brings up the interactive REPL environment in the terminal, and you can begin executing mathematical expressions\nand write pure mathematical functions.\n```fsharp\n |\n |  f(x) = {\n |      undefined           if x \u003c 0\n |      x                   if x \u003c 2\n |      f(x - 2) + f(x - 1) otherwise\n |  }\n \u003e  f(20)\n =  6765\n\u003e\u003e\u003e ▮\n```\nThis executes the fibonacci sequence up to the 20th position.\nIf you want to save your state, just press `SHIFT` + `s` and it will give you a prompt, asking you what you would like\nto name your new `.diorite` file.\n\nTo run your `.diorite` file, in the terminal, execute the command:\n```fsharp\n$ diorite -i \u003cname\u003e.diorite\n```\nAfter execution, you will be presented with the REPL exactly as you left it, ready to continue where you left off. Note\nthat if using an IDE, the integrated terminal does not format well with the REPL environment.\n\n# Feature List for an MVP\n- Value Types\n  - Number:    variables storing a value are implicitly `double` under the hood - but can be bound by a `set hint`\n  - Variable:  character with an optional numerical subscript (x, x0, x00 are two different variables)\n  - Constants:\n    - `infinity`/`inf`: any operation applied on it will just return `infinity`\n    - `π`/`pi`:         `3.14159265...`\n    - `τ`/`tau`:        `6.28318530...`  (`2π`)\n    - `e`/`e`:          `2.718281828...` (euler's number)\n- Operations (BIDMAS)\n  - Binary:   exponentiation, multiplication, division, modulo, addition, and subtraction\n  - Unary:    plus, minus, factorial\n  - Brackets: determines order of operations\n- Variables\n  - Initially: `undefined`\n  - Storage:   either a value, function, or expression (auto-solve if trivial - e.g. `x = 2+2`)\n  - Internals: array of size `26` (+ `_`) slots that can contain a value or `undefined` and also a *bucket* for the\n               subscript variables\n- Functions\n  - Storage:    occupies same *memory* as variables\n  - Internals:  the abstract syntax tree (AST) is stored in the *memory* location to be executed\n  - Domain:     definable domains using set notation\n  - Attributes: can be attributed with square brackets and the attribute\n    - `symbol`: allows for a symbol to be assigned to this function, the symbol persists through the programs lifetime\n      - `inline`: inlines the function whenever possible\n      - expression functions are inlined as is\n      - conditional functions only inline the value\n      - `memoized`: function return values are stored in a cache to save CPU cycles on recompute\n      - 'force':  forces the compiler\\interpreter to use these attributes - regardless of the CLI arguments\n        - `inline`\n        - `memoized`\n- Errors\n  - `SyntaxError`: illegal token or illegal sequence of tokens / unexpected token\n  - `MathError`:   division by zero, square root of negative, infinite recursion, executing operations on `undefined`\n- Standard Library\n  - Bootstrapped: written in the language itself\n  - Examples:\n    ```fsharp\n    abs  (x: R)      : Z   functional wrapper for the absolute operation                 (abs(-2) = |-2|)\n    sign (x: R)      : Z   returns the unit multiple of x                                (sign(7612) = 1)\n    pow  (x: R, n: R): R   functional wrapper around the power operation                 (pow(2,4) = 2^4 = 16)\n    floor(x: R)      : Z   returns the greatest integer less-than or equal-to x          (floor(2.45) = 2)\n    ceil (x: R)      : Z   returns the lowest integer greater-than or equal-to x         (ceil(-12.54) = -12)\n    deg  (r: R)      : R   converts the radians r to degress                             (deg(90) = 0.5π)\n    rad  (d: R)      : R   converts the degress d to radians                             (rad(0.5π) = 90)\n    gcd  (a: Z, b: Z): Z   returns the greatest common denominator of a and b            (gcd(8,12) = 4)\n    lcm  (a: Z, b: Z): Z   returns the lowest common multiple of a and b                 (lcm(8,12) = 24)\n    sin  (x: R)      : R   approximates the value of sin(x) using the Taylor Series      (sin(2π) = 0)\n    cos  (x: R)      : R   approximates the value of cos(x) using the Taylor Series      (cos(2π) = 1)\n    tan  (x: R)      : R   approximates the value of tan(x) using the Taylor Series      (tan(2π) = 0)\n    asin (x: R)      : R   approximates the value of arcsin(x) using the Taylor Series   (asin(0) = 0)\n    acos (x: R)      : R   approximates the value of arccos(x) using the Taylor Series   (acos(1) = 0)\n    atan (x: R)      : R   approximates the value of arctan(x) using the Taylor Series   (atan(0) = 0)\n    ```\n  - External: external linkage to the `plot(fn)` function which is implemented in *F#*.\n    ```fsharp\n    plot (fn)  visualises the provided function (fn) in the respective interactive environment\n    ```\n- Optimizations\n  - Memoization: implied if not explicitly by either a function attribute or CLI argument\n  - Inlining:    implied if not explicitly by either a function attribute or CLI argument\n- Compilation\n  - IL:     compiles to C# IL\n  - Method: using ilasm\n- IME\n  - GUI:          modern feel, sleek\n  - Extends:      extends plotting functionality by displaying it in the graphical interface using the GPU\n  - Linting:      display premature `SyntaxError` messages or `MathError` if potential errors may occur\n  - Highlighting: syntax highlighting\n  - Execution:    compilation or interpretation (will interpret as you type)\n  - Formatting:   `pi` -\u003e `π`, `tau` = `τ`, etc...\n- Wiki\n  - Tutorial:      for beginners or experienced mathematicians\n  - Documentation: core library, function attributes, errors, constants\n\n##### Copyright\n*Diorite*, Developed \u0026 Created by Arsngrobg and Borngle, **2025**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsngrobg%2Fdiorite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsngrobg%2Fdiorite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsngrobg%2Fdiorite/lists"}