Add JavaScript!

Discuss whatever you'd like!
Post Reply
User avatar
lamefun
Tyrant
Posts: 371
Joined: Mon Jun 04, 2012 10:29 am UTC

Add JavaScript!

Post by lamefun »

JavaScript is the programming language of the future, the programming language for people, the official programming language of the planet Earth!

User avatar
kharnov
Granger
Posts: 1851
Joined: Tue Mar 06, 2012 10:54 pm UTC
Clan: GT
Location: New York City

Re: Add JavaScript!

Post by kharnov »

I thought that was supposed to be Java.

In any case, we're likely adding Lua support for custom scenarios.

User avatar
KenuR
Tyrant
Posts: 369
Joined: Thu Mar 15, 2012 1:54 pm UTC

Re: Add JavaScript!

Post by KenuR »

Oooh that's good, I have experience with lua.

User avatar
velociostrich
Dragoon
Posts: 318
Joined: Thu Mar 08, 2012 6:24 pm UTC

Re: Add JavaScript!

Post by velociostrich »

I don't think any JavaScript interpreter could be fast enough for our needs, though there was a modified version of Sauerbraten called Systensity that had Google's v8 interpreter zip-tied and duct-taped to it. My problem with JavaScript is the mutability of every function/object; you need a hash table for every instance and every class, and somehow you need to store all that data in a readily mutable way, which means linked lists that get changed a lot. I think a simpler language would be much more appropriate for us considering that performance is a serious issue.

User avatar
lamefun
Tyrant
Posts: 371
Joined: Mon Jun 04, 2012 10:29 am UTC

Re: Add JavaScript!

Post by lamefun »

velociostrich wrote:

I don't think any JavaScript interpreter could be fast enough for our needs, though there was a modified version of Sauerbraten called Systensity that had Google's v8 interpreter zip-tied and duct-taped to it. My problem with JavaScript is the mutability of every function/object; you need a hash table for every instance and every class, and somehow you need to store all that data in a readily mutable way, which means linked lists that get changed a lot. I think a simpler language would be much more appropriate for us considering that performance is a serious issue.

The problem is, JavaScript has been prescribed for PEOPLE by the Global Government and there's a possibility that all other languages and platforms except HTML5 and JavaScript will be banned.

User avatar
velociostrich
Dragoon
Posts: 318
Joined: Thu Mar 08, 2012 6:24 pm UTC

Re: Add JavaScript!

Post by velociostrich »

lamefun wrote:

The problem is, JavaScript has been prescribed for PEOPLE by the Global Government and there's a possibility that all other languages and platforms except HTML5 and JavaScript will be banned.

Is there a reason you like to waste our time?

Superuser
Posts: 5
Joined: Thu Jan 10, 2013 6:58 pm UTC

Re: Add JavaScript!

Post by Superuser »

LOL. JavaScript is an {
abomination
}
of a language (so many curly brackets!).

ON a more serious note, since you intend to integrate some form of scripting, what do you think of Ruby? I won't even link you to it, it's so famous as it's so excellently designed. The 'poor performance' of Ruby is a long-running myth that is no longer true as of Ruby 1.9, which uses merged the reference implementation with YARV and made some changes to the syntax. It also started working well with Unicode, and no problems exist with that.

Ruby is probably the most well-designed language I have ever used. Please take a look at using it instead of Lua for scripting! Much friendlier than Lua's ubiquitous but difficult-for-newbies C-like syntax, too. Not to mention that Lua does not support objects.

User avatar
Fuma
Programmer
Posts: 58
Joined: Wed Mar 07, 2012 6:49 pm UTC

Re: Add JavaScript!

Post by Fuma »

velociostrich wrote:

I don't think any JavaScript interpreter could be fast enough for our needs, though there was a modified version of Sauerbraten called Systensity that had Google's v8 interpreter zip-tied and duct-taped to it. My problem with JavaScript is the mutability of every function/object; you need a hash table for every instance and every class, and somehow you need to store all that data in a readily mutable way, which means linked lists that get changed a lot. I think a simpler language would be much more appropriate for us considering that performance is a serious issue.

With a modern JIT compiler ( Mozilla's Jaeger/IonMonkey, Webkit's DFG, Google's V8 ), JS is one of the fastest dynamically typed languages available.
The way you describe JS working is completely and totally wrong to a modern implementation of the language.

Using an interpreter will of course be a lot slower than using a JIT, but this is true for all languages, not just JS.

The biggest problem with JS is its lack of a standardized way to communicate with C code.
Lua is much better in this respect.

Post Reply