Code Monkey home page Code Monkey logo

Comments (7)

LimpingNinja avatar LimpingNinja commented on June 25, 2024 4

Fair call out; I think I got demoralized last time I went up against the pull requests, given the two maintained versions. I will aim to look at some of the core patches in the next two weeks and see if I can contribute a release.

from moonsharp.

ferib avatar ferib commented on June 25, 2024 1

Cool, sounds similar to #317

from moonsharp.

lofcz avatar lofcz commented on June 25, 2024

@LimpingNinja we did many changes to the bytecode representation, changed some core classes to structs, reduced their runtime size, allocations and overall dramatically improved performance in WattleScript. Currently, we don't have the space to backport changes upstream (probably the scope of changes is at a scale that can't be backported anyway) but if anyone wants just to run a faster version of MoonSharp, we support Lua mode and are 99% backward compatible (just recompile scripts, bytecode will differ).

Some of the core changes:
https://github.com/WattleScript/wattlescript/blob/main/src/WattleScript.Interpreter/DataTypes/DynValue.cs
https://github.com/WattleScript/wattlescript/blob/main/src/WattleScript.Interpreter/DataTypes/Table.cs
https://github.com/WattleScript/wattlescript/blob/main/src/WattleScript.Interpreter/Execution/VM/OpCode.cs
https://github.com/WattleScript/wattlescript/blob/main/src/WattleScript.Interpreter/Execution/VM/Processor/Processor_InstructionLoop.cs

On top of that, WattleScript itself is a C#/JS flavor added to Lua, with some syntax-breaking changes. The language is roughly specified here: https://github.com/WattleScript/wattlescript/wiki/roadmap and here https://github.com/WattleScript/wattlescript/tree/main/src/WattleScript.Tests/EndToEnd/CLike/SyntaxCLike

from moonsharp.

LimpingNinja avatar LimpingNinja commented on June 25, 2024

Sounds nice, I've pulled it down and am going to test on my own project, are you planning on leaving LUA support at the current level or moving towards the next version?

from moonsharp.

lofcz avatar lofcz commented on June 25, 2024

@LimpingNinja the last two things I wanted to add were gradual typing and LSP for Wattle. We hit a major roadblock with the gradual typing implementation, that's why the last commit is from the previous year. I'm planning to take another shot at it when I feel confident enough about the topic - turns out there's a lot of literature about implementing dynamically typed languages but moving into gradual typing with an existing codebase is pretty hard.
Until that is resolved we have no plans to push for a higher LUA version. However, if you were to adopt Wattle in your project, we accept PRs (or it could be implemented upstream and we can backport the changes).

from moonsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.