What devs would like in MP4 for ManiaScript

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

User avatar
Miss
Posts: 1159
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Miss » 08 Jan 2016, 11:33

+1 on all of this.. I've been thinking of writing a Coffeescript to Maniascript transcoder just so that we can have structures and classes, but I can't find the time for it :P

User avatar
toffe
Posts: 660
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by toffe » 08 Jan 2016, 14:23

Miss wrote:+1 on all of this.. I've been thinking of writing a Coffeescript to Maniascript transcoder just so that we can have structures and classes, but I can't find the time for it :P
999. ManiaScript ==> JS (replace)

User avatar
Miss
Posts: 1159
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Miss » 08 Jan 2016, 16:16

toffe wrote:
Miss wrote:+1 on all of this.. I've been thinking of writing a Coffeescript to Maniascript transcoder just so that we can have structures and classes, but I can't find the time for it :P
999. ManiaScript ==> JS (replace)
That would be something.. though if there ever is going to be a secondary way of writing Maniascript, I'd suggest implementing Angelscript, since it's a familiar language (to C++ programmers, at least) and it's also pretty easy to implement into host applications.

User avatar
Dommy
Translator
Translator
Posts: 1809
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Dommy » 08 Jan 2016, 22:31

Replacing MS with another programming language would make a small mess (mostly for people most related to it, guess who), instead the addition of new features is better move imo. :)

oliverde8
Posts: 1321
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: What devs would like in MP4 for ManiaScript

Post by oliverde8 » 08 Jan 2016, 23:34

There have always been discussions about this, what would have happened if Nadeo had integrated LUA ? It was designed to work with C. Simple to program lot's of possibilities and offers lot's of possibilities.

But now to late, we have Maniascript. :(

What we need is someone with some lex/yacc knowledge and lot's of time to build us a compiler from C/C++ to Maniascript. But to do that properly he needs to understand both the input & output language ver well.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
Nerpson
Translator
Translator
Posts: 1380
Joined: 27 Sep 2013, 18:02
Location: France
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Nerpson » 08 Jan 2016, 23:45

ManiaScript is great and fun to code! Replacing it is clearly not a solution. Some things could be improved and that's the aim of this topic, suggestions.
ImageImageImageImage

User avatar
Miss
Posts: 1159
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Miss » 09 Jan 2016, 02:22

I never said replace it, I said add a secondary scripting language (so that old scripts still work and new scripts can be written with either language)

The only thing that would be challenging is that you might not be able to do the whole state/yield thing.. :roll:

zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: What devs would like in MP4 for ManiaScript

Post by zocka » 09 Jan 2016, 12:15

The main issue of the language itself addressed in this thread is the lack of structs and classes. Besides that I agree with previous posts that ManiaScript isn't all that bad once you're a bit into it.

Replacing it definitly isn't an option so some kind of (probably community-driven) transpiler seems to be the best way. In my eyes some alteration of ManiaScript with some extra features and shortcuts would be the most handy option. (Please no JS ._. It's just working completely different from ManiaScript. Callbacks would be nice in ManiaScript though)

As a compromise I can imagine some script translating a "class" structure by prefixing methods and attributes and inserting handles as method-argument and property array-keys so that the remaining code is a bit cleaner to write. Translating some self.method(a,b,c) to class_method(self, a, b, c) and self.attribute to class_attribute[self] shouldn't be too big a problem, but as I am not so much a fan of writing parsers I haven't realized my thoughts on that yet.
Another question is if there really is some general best practice to transpile to: e.g. I can create unlimited "objects" with a handle of type Text for more abstract objects, while I could think of CMlControl for something like Dialogs, where I then can use .Show() or .Hide() directly on the handle the constructor returns. (But maybe that's bad practice as it is inconsistent - and you can't handle show/hide-calls on your own.)
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka

User avatar
Miss
Posts: 1159
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Miss » 09 Jan 2016, 14:23

zocka wrote:The main issue of the language itself addressed in this thread is the lack of structs and classes. Besides that I agree with previous posts that ManiaScript isn't all that bad once you're a bit into it.

Replacing it definitly isn't an option so some kind of (probably community-driven) transpiler seems to be the best way. In my eyes some alteration of ManiaScript with some extra features and shortcuts would be the most handy option. (Please no JS ._. It's just working completely different from ManiaScript. Callbacks would be nice in ManiaScript though)

As a compromise I can imagine some script translating a "class" structure by prefixing methods and attributes and inserting handles as method-argument and property array-keys so that the remaining code is a bit cleaner to write. Translating some self.method(a,b,c) to class_method(self, a, b, c) and self.attribute to class_attribute[self] shouldn't be too big a problem, but as I am not so much a fan of writing parsers I haven't realized my thoughts on that yet.
Another question is if there really is some general best practice to transpile to: e.g. I can create unlimited "objects" with a handle of type Text for more abstract objects, while I could think of CMlControl for something like Dialogs, where I then can use .Show() or .Hide() directly on the handle the constructor returns. (But maybe that's bad practice as it is inconsistent - and you can't handle show/hide-calls on your own.)
Hmm considering I really need this and I've been thinking about doing this before, I might experiment a bit with it later today.

User avatar
Miss
Posts: 1159
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: What devs would like in MP4 for ManiaScript

Post by Miss » 09 Jan 2016, 16:08

I decided to give it a shot, here's what I have now.. still lacks a lot of features but it's something I guess.. not sure if I should continue working on it :roll:

But I guess this is a little bit off-topic, should I make a new thread for this?

Image

Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 4 guests