Giter VIP home page Giter VIP logo

Comments (2)

jordwalke avatar jordwalke commented on September 22, 2024

That sounds great! There seems to be area for improvement right now in how CommonML uses js_of_ocaml and debugability/sourcemape. If you can create a backend that produces readable/debuggable JS, that's truly awesome and I'd be really excited about it.

There doesn't appear to be any way to file issues on your branch. (I noticed one critical "optimization" is not yet performed that should probably be prioritized). Can you state how you'd like people to file issues?

Can you explain your general approach for generating JS? If someone were to make a new js backend, it would be really great if someone were able to benefit from the new f-lambda optimizations that are coming. In order for OCaml to be considered a first class player on the web, performance should be a top priority, as well as debugability (I know those can sometimes be at odds with each other but having flags control which side of the spectrum you fall would be ideal). I would guess that it's possible to create JS compilation targets that run much faster than equivalent hand-written JS. There are a couple of issues right now making that more difficult with js_of_ocaml: The record fields are turned into numeric indices because it uses the ocamlc output which has erased the label names by that point. In some JS engines this is good for perf and in others it may be bad. Either way, it makes debugging more difficult.

from commonml.

jordwalke avatar jordwalke commented on September 22, 2024

I see a couple of interesting things in your fork:

  • what looks like a debugger compiled from ml into JS? Does this allow using ocamldebug's time traveling debugger inside of JS?
  • Requires as a way to model modules. Looks like a cool idea to integrate into CommonML - the JS output could automatically create granular modules that can be shared and you could perhaps only generate the small number of modules that actually changed - instead of having to reanalyze all of the JS every build (which takes time).

I'd definitely like to hear more about your general approach and goals.

from commonml.

Related Issues (12)

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.