Jump to content

K900

Members
  • Posts

    3
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

K900's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Is your implementation ECMAScript compliant (assuming you turn off that check)? No? Then it's not JavaScript. I wanted to use something like this as an educational tool, and I don't think a subset of JavaScript is good for this use case. As for threading, Jython should be able to handle that with greenlets/coroutines, and if that doesn't cut it, there's always PyPy, which scales way better with implementation-native greenlets. Having it on a separate thread means that we don't have to care about scheduling it, but we can still have it run at lower priority. Synchronization needs testing, but I think a context switch every N ticks should be OK. Edit: you also gave me another reason why an existing language should be easier to work with: tools. You'll want an editor with good syntax highlighting, and maybe even basic refactoring support, and that takes quite a lot of coding. For, say, Python or (compliant) JavaScript, there are lots of already existing open source tools and components that can be integrated into the game.
  2. I don't think it's a good idea. A custom language is basically useless outside the mod, and the implementation is quite tricky to get right. Jython shouldn't have the freezing issue, as long as it has at least a thread of its own. ComputerCraft does everything on the main thread and uses Lua coroutines for scheduling, which is a massive hack. I was thinking of a transaction based design for world changes, with the main interpreter running on a different thread, and the game commiting transactions every redstone tick (because no world state can change faster).
  3. I'm kind of interested in this for a certain project of mine. I propose Python for the programming language. Reasoning: easy to learn, has a native Java implementation (Jython), great Java interoperability, lots of standard library features, it's not Lua.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.