{"id":19282415,"url":"https://github.com/dvvcz/luastl","last_synced_at":"2025-06-13T16:02:58.430Z","repository":{"id":119396139,"uuid":"596258577","full_name":"DvvCz/LuaSTL","owner":"DvvCz","description":"A small standard library for luajit","archived":false,"fork":false,"pushed_at":"2023-02-28T01:17:50.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-05T17:13:26.965Z","etag":null,"topics":["computer-algebra","lua","luajit","math","solver","standard-library","symbolic-math","vector"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/DvvCz.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":"2023-02-01T19:55:31.000Z","updated_at":"2024-03-17T03:23:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"a22700db-ed87-4ffd-a2f5-49f9b78be539","html_url":"https://github.com/DvvCz/LuaSTL","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/DvvCz%2FLuaSTL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DvvCz%2FLuaSTL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DvvCz%2FLuaSTL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DvvCz%2FLuaSTL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DvvCz","download_url":"https://codeload.github.com/DvvCz/LuaSTL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240386536,"owners_count":19793193,"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":["computer-algebra","lua","luajit","math","solver","standard-library","symbolic-math","vector"],"created_at":"2024-11-09T21:26:47.067Z","updated_at":"2025-02-23T22:22:02.882Z","avatar_url":"https://github.com/DvvCz.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LuaSTL\n\nStandard library for lua, mostly for using lua as a command line tool.  \nInspired by the [Rust](https://www.rust-lang.org/) standard library, alongside projects like [Sympy](https://github.com/sympy/sympy)\n\n## Usage\n\nClone this repository into the same folder where you installed your lua(jit) binary.\nThen `require \"std\"`\n\n### Http\n\nThis has a small helper to easily make synchronous http requests (uses PowerShell/cURL internally)\n\n```lua\nlocal std = require \"std\"\nprint( std.net.http.get(\"https://google.com\") )\n```\n\n### Math\n\nThis has a small symbolic math library (just because)\n\n```lua\nlocal std = require \"std\"\nlocal sin = std.math.symbolic.trig.sin\n\nlocal x, y = Symbol \"x\", Symbol \"y\"\nlocal equation = sin(x * 5) + x * 2 + y\n\nprint( equation:eval { x = 5, y = 2 } ) -- 12\n\n-- Symbolic differentation\nprint( equation:d(x, {}) ) -- cos(x * 5) * 1 * 5 + x * 0 + 1 * 2 + x * 0 + 0 (simplifies to 5cos(5x) + 2)\n```\n\nAnd vector math\n\n```lua\nlocal std = require \"std\" -- Vector (alongside aliases in case of casing/typo errors are exposed with the stl)\nprint( Vector(1, 2, 3) + Vector(-1, -2, -3) ) -- Vector(0.0, 0.0, 0.0)\n```\n\n### Tests\n\n```lua\nlocal T = std.test.Test.new(\"unit test\")\n\nfunction T.__start(state)\n\tstate.x = 10\nend\n\nfunction T.__stop(state)\n\tassert(state.x == 5)\nend\n\nfunction T.test_foo(state)\n\tprint(\"Testing the foo\")\n\tstate.x = state.x / 2\nend\n\nfunction T.test_bar(state)\n\terror(\"the bar\")\nend\n\nT:run()\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvvcz%2Fluastl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvvcz%2Fluastl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvvcz%2Fluastl/lists"}