JavaScript for moddding
JavaScript for moddding
Is there any chance of adding JavaScript as a language used for modding? Programming with Lua is pain. It even doesn't recognize != operator. It blows my mind. I hate Lua. Lua is a bullet that missed it's aim. They wanted simple pretty language but created a freaking brain-eating monster instead.
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
Re: JavaScript for moddding
This has already been discussed here.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: JavaScript for moddding
Please compare Why JavaScript sucks and Why Lua sucks
- BrandonReese
- Member
- Posts: 839
- Joined: Wed Sep 12, 2012 00:44
- GitHub: bremaweb
- IRC: BrandonReese
- In-game: BrandonReese
- Location: USA
Re: JavaScript for moddding
Use ~= instead of !=
Problem solved
Problem solved
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
Re: JavaScript for moddding
No. Just no.
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Re: JavaScript for moddding
Yea sure, we start recoding thousands of lines of the engine and break every single mod because you want to use != instead of ~=.
-
- Member
- Posts: 261
- Joined: Sat Nov 03, 2012 06:40
Re: JavaScript for moddding
I like your passion :-)drkwv wrote:Is there any chance of adding JavaScript as a language used for modding? Programming with Lua is pain. It even doesn't recognize != operator. It blows my mind. I hate Lua. Lua is a bullet that missed it's aim. They wanted simple pretty language but created a freaking brain-eating monster instead.
Re: JavaScript for moddding
PilzAdam wrote:Yea sure, we start recoding thousands of lines of the engine and break every single mod because you want to use != instead of ~=.
Well, I see the point. But, just to satisfy my curiosity, why not Python then? Does the Python has ever been considered before you decided to choose Lua?sfan5 wrote:Please compare Why JavaScript sucks and Why Lua sucks
No. Just no.BrandonReese wrote:Use ~= instead of !=
Problem solved
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: JavaScript for moddding
Lua was chosen because it is more lightweight than Python.drkwv wrote:PilzAdam wrote:Yea sure, we start recoding thousands of lines of the engine and break every single mod because you want to use != instead of ~=.Well, I see the point. But, just to satisfy my curiosity, why not Python then? Does the Python has ever been considered before you decided to choose Lua?sfan5 wrote:Please compare Why JavaScript sucks and Why Lua sucks
Re: JavaScript for moddding
I don't think it would be terribly hard to write bindings for python using the Lua api as a starting point. But not clear enough people would use it to make it worthwhile (you and maybe me). And it would fragment development. And as far as i can tell, most devs are happy enough with lua and the ones who aren't probably want c++ mods.
So unless you are interested in maintaining a Javascript or python or whatever port just stick with lua. Code in it for a week and you will adapt well enough.
So unless you are interested in maintaining a Javascript or python or whatever port just stick with lua. Code in it for a week and you will adapt well enough.
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
Re: JavaScript for moddding
I think that Lua is fine for Minetest, and it is very easy to learn. I did it in one day. (Not very extensively, but hey)...spillz wrote:Code in it for a week and you will adapt well enough.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: JavaScript for moddding
Lua is confusing for programmers:philipbenr wrote:I think that Lua is fine for Minetest, and it is very easy to learn. I did it in one day. (Not very extensively, but hey)...spillz wrote:Code in it for a week and you will adapt well enough.
~= instead of !=
no var++ method
indexing starts at 1 instead of 0
everything is just one type of variable. my first try to define a string
Code: Select all
string test = "Hello world";
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: JavaScript for moddding
Every programming language is a little different. I've worked in Java, C, PRPC, COBOL, VB, Assembler, Pascal, Javascript, Notetab Clips, Jython, and probably at least 8 different forms of Basic. If Lua began it's indexing at 0 instead of 1 it would be confusing to programmers from a different background.Krock wrote:Lua is confusing for programmers
What's tripping me up the most is Lua's requirement for a "then" on an if. But when I first switched from primarily programming in Pascal to primarily programming in Java, it was the LACK of a "then" that confused me. Every programming language has it's individual quirks.
As for everything being one type of variable, yeah, it is still taking me a while to get used to that, but that is one of Lua's strengths. It is designed to be a scripting language that works easily when interacting with just about any other parent language. Because Lua's variables are not strongly typed, they are VERY flexible.
Lua is simple and obvious enough that even non-programmers can work in it pretty quickly with just a few examples.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: JavaScript for moddding
I wouldn't like vanilla Javascript to be used for modding. However, Google makes a version which has classes, and it is open source.
It is best to keep with Lua, though.
It is best to keep with Lua, though.
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
Re: JavaScript for moddding
I second that.rubenwardy wrote:It is best to keep with Lua, though.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: JavaScript for moddding
The reason I say that is not because it is any better (I don't really have an opinion on that), but because it would be a PITA to modify the engine to either:philipbenr wrote:I second that.rubenwardy wrote:It is best to keep with Lua, though.
- Add multiple languages
- Switch to JavaScript.
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
Re: JavaScript for moddding
Plus, adding more languages would make things more complex, make the engine heavier, and take up much more space.
- JPRuehmann
- Member
- Posts: 334
- Joined: Fri Mar 21, 2014 21:40
- Location: Germany
- Contact:
Re: JavaScript for moddding
Hi
<sarcasm>Java script is a pain in th as to! let us use bash.</sarcasm>
have Fun,
JPR
<sarcasm>Java script is a pain in th as to! let us use bash.</sarcasm>
have Fun,
JPR
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: JavaScript for moddding
C++ is confusing for programmers:Krock wrote:Lua is confusing for programmers:philipbenr wrote:I think that Lua is fine for Minetest, and it is very easy to learn. I did it in one day. (Not very extensively, but hey)...spillz wrote:Code in it for a week and you will adapt well enough.
~= instead of !=
no var++ method
indexing starts at 1 instead of 0
everything is just one type of variable. my first try to define a stringCode: Select all
string test = "Hello world";
!= instead of ~=
WTF does var++ do?
indexing starts at 0 instead of 1
every variable needs to have types. my first try to define a string
Code: Select all
test = "Hello world"
- HeroOfTheWinds
- Member
- Posts: 470
- Joined: Wed Apr 23, 2014 23:16
- GitHub: HeroOfTheWinds
- IRC: WindHero
- Location: Hawaii
Re: JavaScript for moddding
The back-and-forth in this thread is making me split my sides in laughter. But seriously.
It's true: every language has its quirks. I started in Python, but then moved to Visual Basic, and couldn't wrap my head around the reason they make you say "dim" before declaring variables. Every language is going to have something that someone doesn't like, and that's not restricted to programming languages either. It just has to be dealt with and move on. I didn't like lua at first either, but I got used to it, and now I'm attempting to code things that I consider pretty neat. I wouldn't go using Lua to program the next Legend of Zelda, but it certainly gets the job done for a lightweight language to code mods for Minetest.
If you really despise Lua that much, do this, which I'm sure you'll find even less agreeable: Code a program that lets you write a mod in JavaScript, and then have that program convert your JS code to Lua automatically. Problem solved, everybody happy. (If you're an optimist.)
It's true: every language has its quirks. I started in Python, but then moved to Visual Basic, and couldn't wrap my head around the reason they make you say "dim" before declaring variables. Every language is going to have something that someone doesn't like, and that's not restricted to programming languages either. It just has to be dealt with and move on. I didn't like lua at first either, but I got used to it, and now I'm attempting to code things that I consider pretty neat. I wouldn't go using Lua to program the next Legend of Zelda, but it certainly gets the job done for a lightweight language to code mods for Minetest.
If you really despise Lua that much, do this, which I'm sure you'll find even less agreeable: Code a program that lets you write a mod in JavaScript, and then have that program convert your JS code to Lua automatically. Problem solved, everybody happy. (If you're an optimist.)
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
Re: JavaScript for moddding
Krock wrote:everything is just one type of variable
Lua Manual wrote:Lua is a dynamically typed language. This means that variables do not have types; only values do. There are no type definitions in the language. All values carry their own type.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
Re: JavaScript for moddding
I write my own programming languages for breakfest.
Lua is ok.
Real programmers (TM) can use any turing complete language, period.
Lua is ok.
Real programmers (TM) can use any turing complete language, period.
Re: JavaScript for moddding
+1. I think somebody will branch Minetest and implement a javascript Modding System.
Last edited by D0431791 on Mon May 19, 2014 07:20, edited 1 time in total.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: JavaScript for moddding
Why the guarantee?D0431791 wrote:+1. Somebody will branch Minetest and implement a javascript Modding System.
-
- New member
- Posts: 7
- Joined: Thu Oct 15, 2020 14:06
- GitHub: moreavy
- In-game: smugler5
- Contact:
Re: JavaScript for moddding
As what I see, JavaScript is an International language support, while LUA has only European Language support. Adding JavaScript as a modding language is not that difficult because Minetest already has LUA Support.
PHP & JavaScript Develepment!
Who is online
Users browsing this forum: No registered users and 11 guests