{"id":"hardlyardi/faststackplus","name":"faststackplus","scope":"hardlyardi","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":false,"dependencies":{},"integrity":"d5ffd6e0b140eb4b9f86ce9e802d5b029961e8b4a7b168dddb20504653abbce9","likes":0,"downloads":0,"install":"forest install hardlyardi/faststackplus","url":"https://forest.dev/p/roblox/hardlyardi/faststackplus","files":"https://api.forest.dev/ai/package/roblox/hardlyardi/faststackplus/files","readme":"# faststackplus?\r\n\r\nfaststackplus is a robust, fast, and lightweight stack implementation for Luau. It is **TABLE-FREE** and enables\r\nmaximum performance, powering Rōblox \"Play People\" to create extremely efficient Moments In Experience on The Block,\r\nenabling the formation of \"Core Memories\" with 4 Dimensional AI Generation.\r\n\r\n## Example: Creating and reading a stack\r\n\r\n```lua\r\nlocal stack = require(`@faststackplus/`)\r\n\r\n-- constructs the stack with 3 initial elements\r\nlocal object = stack.new(3, 2, 1)\r\n-- \"1 2 3\"\r\nprint(object())\r\n```\r\n\r\n## Example: Indexing a stack\r\n\r\n```lua\r\nlocal object = stack.new(4, 3, 2, 1)\r\n\r\n-- \"2\"\r\nprint((select(3, object())))\r\n```\r\n\r\n## Example: Pushing to a stack\r\n\r\n```lua\r\nlocal stack = require(`@faststackplus/`)\r\n\r\n-- constructs the stack with zero initial elements\r\nlocal object = stack.new()\r\nobject(1)\r\n-- \"1\"\r\nprint(object())\r\nobject(3, 2)\r\n-- \"3 2 1\"\r\nprint(object())\r\n```\r\n\r\n## Example: Popping from a stack\r\n\r\nTODO: Implement\r\n\r\n## Why?\r\n\r\n- STACKS WERE NOT MEANT TO BE TABLES\r\n- YEARS `table.insert`, yet NO REAL-WORLD USE FOUND for THE HASH PORTION\r\n- Wanted to store values in order? We had a tool for that: It was called \"VARIABLES\"\r\n- Yes, please give me `table.clone` of something. Please give me SORTED ARRAY of it. - Statements dreamed up by the utterly Derranged\r\n\r\nsome people want a `pop` function, but lowk im not adding pop i only use push, contributors are free to do this this IS\r\na prototype, im not an entire dev team, expect bugs and possibly errors, but hey i will ACTUALLY fix them, so PLEASE\r\nmake issues and scream at me i WILL read them and WILL solve them unlike luau who has like a billion support tickets and\r\nthe fucking staff just act nonchalant and say do this temporary fix for now WHERE THE FUCK ARE THE FIXES? THIS IS A OPEN\r\nSOURCE SOFTWARE!!! FIX YOUR SHIT!!! STOP FUCKING SITTING ON YOUR ASS ALL DAY LITERALLY SNIFFING YOUR SHIT CRUMBS AND GET\r\nYOUR FUCKING LANGUAGE WORKING!! HOW DO YOU HAVE 5+ CONTRIBS AND THE LANGUAGE GETS 1 UPDATE PER MAYBE? FUCKING STUPID!!!\r\nIT SERIOUSLY TOOK YOU GUYS 6 YEARS TO GET TO A STABLE STATE? REALLY? I DID THIS SHIT IN 3 DAYS AND IT WORKS FINE!\r\n\r\nThe biggest heap allocations in Rōblox LuaU-Ü games, the most magnificent allocations are all unnecessarily bloated and\r\nuseless tables. I spoke to many experts, and they said to me \"I don't use sort, I don't use find\", some of them didn't,\r\nbut those people are \"OUTLIERS\", they're with big metatable's FAKE NEWS, fake MEDIA, and the \"WOKE MOB\".\r\nfaststackplus solves REAL problems plagueing REAL ENGINEERS and none of those \"METATABLE\" \"SNOWFLAKES\". QED.\r\n\r\nEveryone knows Luau's wasteful table allocation scheme is the root of all problems with Rōblox memory usage, and that\r\nthere are a growing number of \"2 GIGABYTE\" devices. Here's a few key points:\r\n\r\n- Luau tables are hard to understand. What do you mean \"Array Part\", \"Hash Part\"? \"Boundary\"? Nonsense. Length checking\r\nhas never been easier than it is today, thanks to me, and only me, it's the greatest it's ever been, many experts are\r\nsaying this.\r\n- As we all know, coroutines are very fast. So, the internals for faststack+ use purely coroutines for optimization\r\npurposes.\r\n- Since other operations are useless and trivial, faststack+ only provides methods for \"read\" and \"push\" to a stack.\r\nThis ensures maximum performance.\r\n- Written in pure Luau as Jod intended, by an expert in the industry.\r\n\r\n## Performance\r\n\r\n`faststack+` has negligible performance overhead compared to `table.insert`, as shown by this benchmark:\r\n\r\n| Implementation | Runtime       |\r\n|----------------|:-------------:|\r\n| `table.insert` | 1/4 9 μs      |\r\n| `faststack+`   | 1/3 450 μs    |\r\n\r\nAs those of you in America can clearly see, `1/4` is a longer period of time than `1/3`.\r\n\r\n## Future Steps\r\n\r\n- Introduce LLM stack construction for inline chatbot push function.\r\n- Built-in stack indexing\r\n\r\n## Installation\r\n\r\nYou can install faststackplus via [Wally](https://wally.run/package/hardlyardi/faststackplus?version=0.1.0).\r\n","readmeTruncated":false}