Rurik: JS is a dynamic.

Garzon: The game runs on a server so, it must not be js at all. much more he needs a webAPI. a webservice for posting scripts that would be executed serverside.

Falha: Hagb4rd: I ran a javascript mp service that would run your game’s js server code in a v8 vm all controlled by a single python Eisenzimmer process

Geeting: Sounds plausible. fair enough.

Falha: The idea was that you wrote your game code once and it ran on the server and the client in the same way

Falha: Not exactly the same of course

Stelk: Well. i guess i got it. you have to validate client input of course. server and clientside most probably.

Schueren: Rou: anything you do here will be significantly hard : The least hard path is to write a very simple DSL, specially if you can make it total

Falha: Hagb4rd: yeah basically, on the client, the input code would just get shipped over the wire but also act locally. the server would get the input and simulate the game locally and the nthe client the result, and the client would just update its simulation based on updates from the client

Falha: Dash: this is very similar

Mikos: Neonakis: What about intepreting this?

Falha: The nice thing is that you can make python functionality available to the js running the pyv8 vm

Rosich: Rou: it doesn’t matter which general-purpose programming language you choose. Making sure no one misuses it is going to be hard.

Fritzpatrick: It’s an important use case and it’s sad no one has made this easy

Falha: I think an embedded vm is pretty much safe

Falha: This is why I suggested shovel

Cabezas: Well it would still allow you to create infinite loops for instance

Priode: But yes. it would be a start.

Garmire: How would you prevent this?

Falha: Since the vm is stepped by the application itself, it has full control

Falha: The vm is just an object, almost like an iterator

Falha: You have full controll on it running

Falha: Its running tiny shovel bytecode, etc

Falha: You can make specific ‘native’ functions js functions available to the shovel vm extending the shovel language

Falha: You can serialize the vm completely, and load it up on some other machine on the network

Falha: Its a pretty sweet spec

Nhek: So you can disable loops completely?

Falha: If a user’s loop doesn’t actually interrupt or otherwise block the host application why do you care that’s what they spend their time doing with their user code?

Falha: And at anytime you can impose time quotas, or any other quota you can come up with by ****yzing the user’s shovel vm

Protas: Well. in the end you won’t be able to block gms from creating bull**** logic anyway.

Falha: Shovel would make the perfect metaverse language

Falha: Like you’d compile other stuff down to shovel

Falha: And then run it in whatever host language you implement your metaverse server in

Thielemann: Can anyone explain the rationale behind Array.sort sorting an array of numbers by unicode

Falha: As a user crosses regional server boundries you could cleanly serialize all the scripts ***ociated with them and start them up on the new server they just walked into

Falha: Https://

Fritzpatrick: Falha: i have an even better one in mind

Fritzpatrick: Falha: but it’s taking Effort

Mikos: Well yeah I mean they could potentially just make the instance just a giant picture of genetalia

Kevern: Rurik: afaik mozilla uses “mergesort” now

Mikos: My concern is more whether they could make something functionally malicious

Mikos: Like crashing the browser

Kulbeth: I am asking why 1,5,20,10.sort would give me 1, 10, 20, 5

Babilonia: Rurik: JS is a dynamic language, arrays are always arrays of *objects* not numbers, not strings: objects. When you invoke Array#sort, it needs to convert those objects to some common representation. It just so happened that they’ve decided that this common representation was the textual representation of those objects, so they’re sorted lexicographically