Popular Post Marcosha_ Posted June 18, 2017 Popular Post Share Posted June 18, 2017 Hello everybody! I want to offer you a new language for writing scripts for MTA: SA. By the tags in the topic, you've already seen that it's Puthon 3. Many will say that Python 3 is bad for scripting, but it's not! It is similar to lua but has a wider OOP, and has the ability to connect modules. In the Internet very little material on lua, it is available but only in English, and what to do to the Russian community? The Russian segment in the MTA is very large, and lua materials are very small. Of course, the small amount of materials on the Internet for lua is not the reason for switching to Python 3. I understand that I will have to rewrite all functions from scratch, but this can prolong the life of the MTA. Python 3 is not one language that can be used as scripting under MTA: SA, there is also a wonderful language JavaScript v5. Many multiplayer use it as a language for writing scripts. This is just my opinion. I just suggested that the idea is not bad. Decide for you, dear multiplayer developers. Oh, sorry for my bad English! 4 Link to comment
GodOfPenguins Posted July 12, 2017 Share Posted July 12, 2017 Lua - very simple language. That information on russian language, which available, is enough. And even better to just learn English. 1 Link to comment
Simple0x47 Posted July 12, 2017 Share Posted July 12, 2017 I like the idea I would learn a new programming language via MTA. 1 Link to comment
</Mr.Tn6eL> Posted July 15, 2017 Share Posted July 15, 2017 ES6 is very good to mta http://es6-features.org/#Constants Link to comment
keymetaphore Posted July 16, 2017 Share Posted July 16, 2017 LUA is good and I am sure it's never gonna be changed. Link to comment
</Mr.Tn6eL> Posted July 19, 2017 Share Posted July 19, 2017 On 7/16/2017 at 09:38, Gourmet. said: LUA is good and I am sure it's never gonna be changed. Lua it's for kids, We want machine language Link to comment
iMr.WiFi..! Posted July 20, 2017 Share Posted July 20, 2017 20 hours ago, </Mr.Tn6eL> said: Lua it's for kids, We want machine language xDDDDDDDDDDDD , what about java ?? Link to comment
</Mr.Tn6eL> Posted July 20, 2017 Share Posted July 20, 2017 java it's not programming language just :~! Link to comment
Skully Posted July 21, 2017 Share Posted July 21, 2017 (edited) I think it's a little late to completely rework the language now lmao Edited July 21, 2017 by Skully Link to comment
xeon17 Posted July 21, 2017 Share Posted July 21, 2017 On 7/20/2017 at 04:52, </Mr.Tn6eL> said: java it's not programming language just :~! That's why it is the most searched programming language on the market I guess. Can I see your degree please? You pro. Link to comment
</Mr.Tn6eL> Posted July 22, 2017 Share Posted July 22, 2017 On 7/21/2017 at 10:22, xeon17 said: That's why it is the most searched programming language on the market I guess. Can I see your degree please? You pro. Java is the most programming language because networking and android apps, In my opinion it's ugly but easy and famous and have great support On 7/21/2017 at 10:22, xeon17 said: Can I see your degree please? You pro. I'm 18 and amateur programmer Link to comment
DarkChemical Posted July 22, 2017 Share Posted July 22, 2017 I don't get the fuss, what's so great that LUA can't do in MTA? Link to comment
Simple0x47 Posted July 24, 2017 Share Posted July 24, 2017 On 7/21/2017 at 09:22, xeon17 said: That's why it is the most searched programming language on the market I guess. Can I see your degree please? You pro. Java being real, it's a programming language that shouldn't be used in today tech, It's performance it's far away from C's one, it's resource management is almost nil because it must take away all your computer to work in a regular way. C is the real deal. PD: Python would be a great scripting addon. Link to comment
MTA Anti-Cheat Team Popular Post Dutchman101 Posted July 24, 2017 MTA Anti-Cheat Team Popular Post Share Posted July 24, 2017 I think it's pointless to discuss this, it's been brought up many times before and LUA is powerful enough for something like MTA. It's far too heavily implemented to change it into another language, would take a bigger development team to take it all apart and swap languages and can bring a long time of instability and alpha testing. You guys forget it's more complicated than just swapping the lua lib/dependencies, MTA was designed with using LUA in mind so much of the codebase was made reliant on it, by integrating LUA-specific stuff as deep as in the MTA core. It's practically impossible to revert all of that.. Also it's clear you guys who are discussing in this topic don't have a development spirit (in broader meaning) because if you understood development is 60% planning/researching and 40% coding itself, you'd realise its technically impossible to change the scripting language at this point in MTA development, it's too late. Ofcourse nothing is impossible as you've seen with other big integrations in the past, but as LUA suffices in most needs for MTA (you always have languages believed to be better such as what you suggest here, but as I said before, LUA is a powerful enough lang for MTA) so this versus the big operation/manpower needed to swap languages simply isn't worth it. Other languages don't offer much that LUA for our purposes cannot achieve, so nothing can justify the big codebase overhaul this would be. To conclude what I just wrote, topics like this, are just like topics asking if MTA:V will ever get released, discussions that keep getting launched over and over. So this will be locked. 4 1 Link to comment
Popular Post Jusonex Posted July 24, 2017 Popular Post Share Posted July 24, 2017 While I agree with everything Dutchman101 said, I'd like to add a few aspects from the technical point of view. The requirements that need to be fulfilled by the language are very strict, to mention some: Embeddable into other languages (especially C++) Sandboxed (no unsafe functions e.g. such that can invoke system commands) Well-known, stable and mature enough When thinking a bit about these requirements, there are only a handful of languages left that fulfill all of them. So let's take a closer look at the suggested languages: Java: Embedding works (even if it's not designed for that), but not sandboxed Python: Designed almost equally for embedding and running standalone, but no official/stable sandbox support (available solutions are rather experimental) C#: Microsoft's official implementation is not embeddable. Mono is, but isn't sandboxed either Javascript (V8): Meant to be embedded, sandboxed and well-known ==> fulfills requirements So, as you can see, only Javascript is an imaginable solution, even if it's a huge code base and takes much more time to compile (we're talking about a factor of >50-100x compared to Lua). That's basically the reason why Lua is loved in embedding contexts. Also, in my opinion Lua is actually a pretty good language: It's very easy to learn, it's one of the most flexible languages I know (considering metatables) and easy to embed (even though the C Interface is a bit old-school). 8 Link to comment
Master_MTA Posted August 4, 2017 Share Posted August 4, 2017 (edited) am really didn't understand what is the wrong with lua? Edited August 4, 2017 by Master_MTA Link to comment
Kenix Posted August 23, 2017 Share Posted August 23, 2017 (edited) Sometimes needs more speed in Lua, using LuaJIT will resolve this problem. I don't know a current progress level of LuaJIT integration into MTA, maybe someone can answer on this question? Edited August 23, 2017 by Kenix Link to comment
CrosRoad95 Posted August 23, 2017 Share Posted August 23, 2017 Some advanced functions and addons could be optional, easy to block by hosting. If someone like to destroy own server - no problem. I said that milion times. Link to comment
Administrators Lpsd Posted August 23, 2017 Administrators Share Posted August 23, 2017 Not that simple. You're aware of client side right? Link to comment
CrosRoad95 Posted August 23, 2017 Share Posted August 23, 2017 (edited) i said " destroy own server" not "hack client/players" like web browser, server can ask player "do you agree to load XYZ website". Edited August 23, 2017 by CrosRoad95 Link to comment
Administrators Lpsd Posted August 23, 2017 Administrators Share Posted August 23, 2017 So what's the point blocking it for clients but not for the server itself? So much for the trust of community resources Besides, I can't see any benefits - there are quite a few restrictions in Lua, however it doesn't matter due to the MTA functions provided to us. Link to comment
Jusonex Posted August 23, 2017 Share Posted August 23, 2017 4 hours ago, Kenix said: I don't know a current progress level of LuaJIT integration into MTA It was stopped, because it didn't perform significantly better than without JIT. As far as I recall it's related to the context switches between Lua and C++ being too expensive. @Topic: I've recently stumbled upon a language called Haxe. It's a statically typed language that compiles to other (well-known) languages - including Lua where it's syntax is pretty similar to Java. I also did a few experiments which work quite well: https://github.com/Jusonex/haxe-mtasa-typings/blob/master/Main.hx 1 Link to comment
CrosRoad95 Posted August 24, 2017 Share Posted August 24, 2017 18 hours ago, Jusonex said: It was stopped, because it didn't perform significantly better than without JIT. As far as I recall it's related to the context switches between Lua and C++ being too expensive. @Topic: I've recently stumbled upon a language called Haxe. It's a statically typed language that compiles to other (well-known) languages - including Lua where it's syntax is pretty similar to Java. I also did a few experiments which work quite well: https://github.com/Jusonex/haxe-mtasa-typings/blob/master/Main.hx Nice! But this could be optional example: <script src="main.hv" type="client" language="Hexe" /> Link to comment
Jusonex Posted August 24, 2017 Share Posted August 24, 2017 It's too big to be integrated in MTA directly for the few people that will actually use it. Also, there are plenty of good build tools that can be used to automate the process (e.g. recompile automatically on changes) since Haxe compiles to plain Lua that works without any code modification. If there's more interest on that, I could provide an example pipeline. First, someone has to complete the type definitions though (see https://github.com/Jusonex/haxe-mtasa-typings/blob/master/mtasa/server/Element.hx for an example - it refers MTA's OOP methods). Link to comment
Piorun Posted September 3, 2017 Share Posted September 3, 2017 On 24.08.2017 at 20:34, Jusonex said: It's too big to be integrated in MTA directly for the few people that will actually use it. Ye, cause bitwise operators were sooo important ... Cool feature would be to extend existing MTA classes like Vehicle, Pickup etc. because we could easily make new classes like PoliceVehicle, RacePickup for cleaner code of course. Link to comment
Recommended Posts