Techlone / CraftTweaker

Closed. See https://github.com/Techlone/recipenator
0 stars 0 forks source link

"Own crafttweaker" #4

Closed mainrs closed 7 years ago

mainrs commented 7 years ago

What's up?

I had exactly the same idea tbh. I quite dislike the usage of Zenscript. Is has some major design flows within it. I got curious on what your goals/ideas are. Would you create a new DSL for tweaking recipes or just gowith Javascript/Ruby or some other sort of language supported by Java? I have taken a look at MPS, a Meta Programming System developed by JetBrains. It is quite easy once you get a general idea of it and prototyping languages is super fast. I tried out js before but it offers quite a lot of open space for exploits in general (youcan load any js script from the web and since any API for nashorn (the engine) is only for internal usage designed, things canget really clunkly sometimes). The other problem I had was scoping. It's quite messy sometimes and can lead to a lot of unexpected errors if not properly used. Since all is dynamic, bugs are hardly found. I had the idea some kind of lightweight language/DSL for recipe tweaking. This features came into my mind:

What are your thoughts? P.S.: I love MPS but tbh I have no idea if it is possible to generate parsers and lexers. As far as I could figure out after 3 days it looks like you are able to generate Java code quite easliy with it. Maybe there is some way to generate a ScriptEngine implementation out of it.

Techlone commented 7 years ago

Look at https://github.com/Techlone/recipenator. Lua scripts. But I'm little busy and I spend my free time on GregTech and other things. Of course I want back to Recipenator ASAP.