• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Javascript to C++?

Obsdark

Member
Joined
Sep 25, 2011
Messages
213
Reaction score
9
https://code.google.com/p/libjspp/

You see, this code link i put here is the code of somebody else, but acording to what he says, this would work to put (i guess) Javascript .js to work with the C++ of the server

If that is true, it gaves more freedom to actualy work & program on the server, don't you think?

I don't know if this was the right place to put it, but i know

This can be usefull

Of course if the code of this guy works, i'm not an expert scripter, nor a expert c++ programmer but... i just think, Why not try at least?
 
Because we have Lua. What is it that you would be able to do in Javascript that you aren't able to in Lua?
 
No offence, but the functions of lua are a little... well... designed for OT's, with Js people with other languajes can sum him's skills easier, instead of need relearn another programing languaje

So, you can have a wider audience that can bring him's knowledgment here and apply it instantly, besides you can make than learning to make a script or a OT server have more teaching value, because u are learning a widly spreaded languaje, totaly differen than lua which... well, it works in another games too... true... but it's not like all the internet have it in one or other way, don't you think?

i'm not saying "Remove .Lua, put Javascript Instead" I'm saying "Let's diversify the people who can come to teach/learn and make it a better way of learning how to program to the people who wanna learn to program through this, let's just add Javascript"
 
What you are able to achieve is totally based on the implementation and not on the language.
Lua is very simple and easy to learn. Someone who understand javascript should also understand Lua pretty soon.
Someone who does not know the language always has to learn the language, so if you don't know javascript you still have to learn it.
 
What you are able to achieve is totally based on the implementation and not on the language.
Lua is very simple and easy to learn. Someone who understand javascript should also understand Lua pretty soon.
Someone who does not know the language always has to learn the language, so if you don't know javascript you still have to learn it.

+1 Agree <3
 
with this, we reduce the lame moment & the need to learn it to anyone intrested in help but not in learn lua, besides Javascript already have a lot of use, i'm not saying "Let's reeplace Lua/C++ by Javascript", i'm saying than that (i.e Add Javascript) make a lot more attracting to people who already know Javascript but don't wanna learn a very little used languaje like lua to help.

That allow have a wider audience, a wider number of people checking ot's to learn both, C++/Java

I'm thinking in a way to attract more people, the center of my argumentation don't dischart eficiency, but also you must consider than help the others is not a duty, and because of that, with this, we improve the chances of increase the numbers of our comunity that's the hole point in this, because that way, people who know how to script in Java and don't wanna learn Lua can help, maybie you are good with C++, but i'm sure than you aren't just so good with other languajes, and even if you are, you lose time learn it, and that's a backstep we can avoid with this, so if you are better in Javascript than in lua, why don't just help others or work with Javascript?.

Guys, not all the people have your time, but some of them can have the same wishes

And with that i'm thinking than some of them can have the wish of make a server, it's totaly selfish from both of you presupose than all the people who use Javascript is an expert programmer, or than all the people have or MUST HAVE the time to learn the languajes, some of them can be already learning to program in Java, and with this, we are giving that people a very big support to continue learning with a proyect & the chance of help this comunity, Plus, learn C++ & Lua, but also empower them own skills with Java, Javascript if you don't notice, is a hook.

We can even, if we do this, put a "Tutorial" about this (i.e. How to make an OT server, Learning Javascript & C++) in Codecademy.com, i don't know, but seems very atractive to me, just put some references from there to here, straight links for example and Voila! free publicity to people who actualy can be intrested in learn/know already languajes that can be usefull for the whole comunity.

So that way we can bring people here & help to difund & teach C++ if we want, at the same time we increase the ammount of players/servers/people intrested in OT's, that way, specialy if we add a proyect after (in CodeCademy for example), we can have a Hook for this, that way WE INCREASE THE CHANCES OF RECEIVE NEW PEOPLE, people of the good ones, that people we need, more people than can cooperate, that's all about.

Besides, we end up for good with that topic of make a server entirely in Java than apparead in time to time because both parts wins. ;)

Don't take me wrong
i like you guys, i think both are good people, but i think you both must consider this in other perspective, to see other kind of advantages ;)

Gratefull of the learned
-Obsdark-
 
Last edited:
I understand what you're saying, but IMO it is bloat to support multiple scripting engines. Lua is a simple and growing language, and with LuaJIT it is very powerful (even without LuaJIT it beats many other scripting languages). I would be interested in seeing benchmarks comparing LuaJIT to V8 or other JS engines. If you would like to add Javascript support and maintain it, feel free to fork OT or TFS on GitHub and do so, I'm just not seeing any advantage other than that it would be easier for people with a JS background to write scripts for OT -- you could use the same argument for any other language. It shouldn't be too hard for a JS programmer to adapt to Lua.
 
I understand what you're saying, but IMO it is bloat to support multiple scripting engines. Lua is a simple and growing language, and with LuaJIT it is very powerful (even without LuaJIT it beats many other scripting languages). I would be interested in seeing benchmarks comparing LuaJIT to V8 or other JS engines. If you would like to add Javascript support and maintain it, feel free to fork OT or TFS on GitHub and do so, I'm just not seeing any advantage other than that it would be easier for people with a JS background to write scripts for OT -- you could use the same argument for any other language. It shouldn't be too hard for a JS programmer to adapt to Lua.

http://factor-language.blogspot.com/2010/05/comparing-factors-performance-against.html


Your welcome
;)
 
Only drawback of lua is pascal syntax
it is easy to learn, easy to link to exec etc

@LuaJIT: I remember having some prob;lems after switching to it, few of my codes needed separating conditional causes like if(n = array[z]) to n = array[z] if (n) or sth like that, but it wasn't that hard
 
Back
Top