Jump to content

[Scripting] Changing the programming language.


Recommended Posts

  • 4 weeks later...
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 :D

Link to comment
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
  • 3 weeks later...

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 by Kenix
Link to comment
  • Administrators

So what's the point blocking it for clients but not for the server itself? So much for the trust of community resources :P

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
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

  • Like 1
Link to comment
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

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
  • 2 weeks later...
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 :D ...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...