luau | A fast , small , safe , gradually typed embeddable

 by   Roblox C++ Version: 0.579 License: MIT

kandi X-RAY | luau Summary

kandi X-RAY | luau Summary

luau is a C++ library typically used in Programming Style applications. luau has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              luau has a medium active ecosystem.
              It has 3041 star(s) with 280 fork(s). There are 55 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 82 open issues and 239 have been closed. On average issues are closed in 77 days. There are 28 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of luau is 0.579

            kandi-Quality Quality

              luau has 0 bugs and 0 code smells.

            kandi-Security Security

              luau has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              luau code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              luau is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              luau releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 1876 lines of code, 81 functions and 15 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of luau
            Get all kandi verified functions for this library.

            luau Key Features

            No Key Features are available at this moment for luau.

            luau Examples and Code Snippets

            No Code Snippets are available at this moment for luau.

            Community Discussions

            QUESTION

            {new to lua} How do i make a wait statement in lua programming?
            Asked 2022-Mar-02 at 04:42

            so i have been using roblox luau a custom version of lua and it has a wait() function however, lua does not. My question is how am i supposed to create a wait in a loop? i use lua when i'm offline of roblox studio and i use it to plan my code. Does anyone know how to use a wait() statement in lua?

            the code i have tried so far is this and it does not work this is what roblox uses so i'm not sure how to use a wait statement in regular lua.

            ...

            ANSWER

            Answered 2022-Feb-28 at 14:54

            You could use something like luasocket which lets you call socket.sleep(seconds) which works
            across linux/windows

            Source https://stackoverflow.com/questions/71296720

            QUESTION

            Defining element type in a table
            Asked 2021-Dec-30 at 11:32

            so when i define the type of a variable, it goes totally alright:

            ...

            ANSWER

            Answered 2021-Dec-30 at 11:32

            You can't arbitrary set type to random table member in Luau. You need to set types for all members on table creation or inside its creation scope.

            On creation you can simply set type for each field directly:

            Source https://stackoverflow.com/questions/70528889

            QUESTION

            Finding the hovered asset id from a VS Code extension
            Asked 2021-Nov-25 at 05:24

            I'm trying to display a thumbnail when an asset id is being hovered from a VS Code extension.

            ...

            ANSWER

            Answered 2021-Nov-25 at 05:24

            Apparently document.getWordRangeAtPosition() can return undefined, which seems to cause document.getText() to match the entire document. I was able resolve this issue by adding this after the call to document.getWordRangeAtPosition.

            Source https://stackoverflow.com/questions/70083495

            QUESTION

            Which Roblox/LUAU classes can have malware/scripts hidden inside?
            Asked 2021-Oct-07 at 23:48

            Which Roblox/LUAU classes can have malware/scripts hidden inside? Which classes will still be executed as a script? Which classes cannot contain a malicious script? Audio?

            Since the complaint has been made that it's not clear what I'm asking, I've added emphasis above and put the title in there, too.

            Ok, so I'm trying to learn how to detect and remove malware from things in the Roblox Studio Toolbox. That is a tall order, since I'm still learning LUAU and there are many ways to conceal malware, including obfuscation techniques (spacing, reversed strings, reversed ascii strings, getfenv(), hidden teleports, nested scripts, scripts that were reclassified to something else, like a weld, etc.).

            Reclassified malware is the thing I have the most trouble with, although long scripts and scripts split into different files can be a pain, too. I do things by trial and error, like in the case of the Sakura Tree model by TreelingDeveloper (rbxassetid://6787294322). I stripped it of everything except the Trunk and Mesh, Falling Leaves and Particle Emitter, and Leaves and Mesh, and it is still similar, despite removing a couple dozen pieces, including two scripts that were nested inside several welds and claimed to weld the bark on.

            Edit: I rechecked the Sakura tree after posting. Deleting all those parts reduced its visual appeal, although not completely. There were a lot of "Bark," "Other" and "Welds" that I deleted, and even the ThumbnailCamera. As it turns out, keeping all of the "Bark" and "Others" adds additional details to the trunk. I can't see a use for the ThumbnailCamera or the welds and "auto-weld" scripts.

            It's not terribly hard to use CTRL-SHIFT-F to search for words like "getfenv," "string.reverse," "require," "eriuqer," and "teleport" but it is beyond my level of ability to find everything.

            If you have any suggestions or tips on the question or the larger issues of malware in Roblox assets, I'd love to hear about it. Thanks!

            Antimalware Plug-ins

            Thus far, I have reviewed several (~10) plug-ins for detecting malware. None of them have seem to have behavioral or real-time detection. They all seem to use simplistic heuristic detection, often relying on common words and phrases associated with known malware, as well as certain LUAU commands and obfuscation techniques. Those that I thought were worth using, as inadequate as they were, are GameGuard, Guardian Angel Defender, Mirror Egg and Ro-Protect. Unfortunately, they get a fair number of false positives (Mirror Egg, for example, suggests that anything with the name "Fire," including fire effects I added, may be malware). GAD has the best UI and seems to find more than anything else, but it also finds a lot of "empty objects" that I'm not sure what to make of. None of them are real-time, and none are good enough on their own.

            Explanation

            I'm not artistic, so it really isn't possible for me to develop my own models, meshes and such, and I think people who say those who use the toolbox are lazy and get what they deserve are apparently unaware that not everyone is a master craftsman when it comes to CG.

            Roblox Studio's Toolbox is jam-packed with assets, which is great, except many of them contain malware.

            Beyond this point is mostly a rant. Feel free to ignore, unless you're going to tell me to contact Roblox Customer Service or go to the Roblox DevForum.

            You may ask why I don't post this on the DevForum. I've been there since April and, despite 7 hours of reading and over 1k likes, I still have not become a "regular". I asked customer service about this, but they gave me the run-around, referring me back to the rules to become a regular (which are deliberately vague) and generally being eager to get rid of me as fast as possible without actually helping.

            You may ask why I didn't ask Roblox for help. Having asked both the Appeals team (which had given me a 3-day IP ban and permanently suspended my unlisted, >private< game that is still in development because, they stated, I'd added an "inappropriate model" from the toolbox - a model that I didn't modify, and then rejected my appeal without any valid reason) and Customer Service, which gave me the run-around and did their very best not to help me, and to get rid of me as rapidly as possible, I'm trying to learn how to protect myself. In short, Roblox apparently refuses to take any real steps to deal with the plethora of malware, and help pages DO NOTHING to teach developers how to find malware. I've learned more on my own - which isn't nearly enough.

            If I sound irritated, it's because I am. They have some of the worst customer support I've ever encountered in the 36 years of my adult life, and I've got many years of experience in that field, including tech support.

            The Roblox tutorial pages have this to say when it introduces the toolbox:

            > Anyone can upload an item to the Toolbox, so make sure your game still works after adding an item before settling on it. To learn how to inspect a model before inserting it, see [Item Inspection][1].

            The linked page is woefully inadequate, and the page that Customer Support referred me to is, too. [What Is This Infected Model On My Place? help article.][2]

            [1]: https://developer.roblox.com/en-us/resources/studio/Toolbox#item-inspection [2]: https://en.help.roblox.com/hc/articles/203312920

            ...

            ANSWER

            Answered 2021-Oct-07 at 23:48

            When it comes to things that can execute code, the answer is Scripts and LocalScripts.

            Some things to know, Scripts are only active in a few locations. According to the docs :

            The instant that the following conditions are met, a Script’s Lua code is run in a new thread:

            Similarly for LocalScripts :

            A LocalScript will only run Lua code if it is a descendant of one of the following objects:

            This doesn't apply for Edit Mode, just when you are testing it in Play Mode.

            The thing is, a Script instance can be inserted into the hierarchy of anything. Audio, Meshes, Decals, etc. none of these things execute code on their own, but they are often Trojan Horses for delivering Scripts into the Workspace. And because the Toolbox inserts things into the Workspace by default, it creates the avenue for exploits that you're describing in your question.

            This is why I recommended the Venom plugin by pa00, because it allows you to strip out any and all Scripts that might come with an asset. It is an easy counter measure for when you are only looking for simple things. This suggestion falls apart once you start looking for more complicated assets like vehicles, Tools, and guns, where interactions have to be scripted, but it's a starting point.

            Source https://stackoverflow.com/questions/69474365

            QUESTION

            Python: how to create multiple threads running at the same time
            Asked 2021-Apr-07 at 09:45

            I am creating a game using Python and tkinter, and when I tried to add some music, the function making the music stopped the rest of the script (and also the window). So I need to create a new thread I think to play the audio and keep the window working...

            I tried some things making errors, not running, or stopping the window, I currently have :

            ...

            ANSWER

            Answered 2021-Apr-06 at 15:26

            Try using the module threading. I found this article very useful for understanding the core concepts and setting up my first multithreaded program

            Source https://stackoverflow.com/questions/66971571

            QUESTION

            Is there a "repeat [function] until [property = true]" type of loop in MakeCode JS?
            Asked 2021-Mar-14 at 08:35

            I'm making a game in Microsoft MakeCode Arcade for a school project, and I wanted to know if there was a "repeat [function] until [property = true]" type of loop like there is in Luau. I wanted to use this so that the game waits until my player sprite is at a certain coordinate to run some code. I figured out a way to do this in a different way, but I wanted to know just for future reference.

            If anyone is wondering, this is what the alternative way I am using.

            ...

            ANSWER

            Answered 2021-Mar-14 at 08:35

            You could use either while loop or do...while loop

            For while loop, the following code will keep on running as long as the condition is true.

            Source https://stackoverflow.com/questions/66621796

            QUESTION

            decimals not working with factorials in roblox lua
            Asked 2021-Feb-10 at 19:29

            What do you want to achieve? I want to make a factorial function

            What is the issue? I can't find any way to solve factorials unless they are whole numbers

            What solutions have you tried so far? I have looked on roblox devforum and youtube and google and discord and I literally can't find any way to get decimals to properly work with factorials

            the only thing I know is that you can use gamma functions to solve decimal factorials but I am looking and I have no idea how I would implement that into luau so I am really struggling I even used Stirling's approximation but that is not 100% true as I need something to be completely true to the actual answer

            ...

            ANSWER

            Answered 2021-Feb-10 at 19:29

            Your question title is a little misleading, it's not that decimals aren't working. It's that Stirling's Approximation provides inaccurate numbers for your purposes.

            If you need a gamma function, there's an implementation on Rosetta Code that's pretty easy to use. I've made small adjustments and transcribed it here :

            Source https://stackoverflow.com/questions/66084665

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install luau

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Roblox/luau.git

          • CLI

            gh repo clone Roblox/luau

          • sshUrl

            git@github.com:Roblox/luau.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link