Giter Site home page Giter Site logo

write bang-syntax convertor about agoric-sdk HOT 13 CLOSED

agoric avatar agoric commented on August 30, 2024
write bang-syntax convertor

from agoric-sdk.

Comments (13)

michaelfig avatar michaelfig commented on August 30, 2024 1

I may have a go at this for Tessie... I'm already using Babel to do the rewrites from Tessie to Jessie.

(And I would like to use Tessie to write vat code for SwingSet.)

from agoric-sdk.

katelynsills avatar katelynsills commented on August 30, 2024

It looks like we will need to use Babel, and will actually have to fork the Babel parser (formerly Babylon) to be able to do this: https://babeljs.io/docs/en/next/babel-parser.html#will-the-babel-parser-support-a-plugin-system

from agoric-sdk.

warner avatar warner commented on August 30, 2024

I think rollup uses acorn (which I think is a parser), does that help us at all?

from agoric-sdk.

katelynsills avatar katelynsills commented on August 30, 2024

It looks like we could write an acorn parser plugin like this one for bigint. It seems to be a lot cleaner than plugins for the Babel parser (which is explicitly not supported by them.) The only downside I can see is that an acorn plugin is probably only narrowly useful for Rollup and maybe a few other things, but almost everyone uses Babel. Rollup supports Babel, for instance. Still, it might be helpful to get it working with Acorn and then do Babel at some point in the future.

from agoric-sdk.

erights avatar erights commented on August 30, 2024

How similar are their ASTs?

from agoric-sdk.

katelynsills avatar katelynsills commented on August 30, 2024

I'm still early in the investigation, but they appear to be very similar. Babel-parser says it's based heavily on Acorn. https://babeljs.io/docs/en/next/babel-parser.html

from agoric-sdk.

erights avatar erights commented on August 30, 2024

Good. In that case, if one is substantially easier to get working first, do that one. But let's plan to eventually switch to Babel.

from agoric-sdk.

katelynsills avatar katelynsills commented on August 30, 2024

This has been deprioritized, but to record some of my notes:

Once this is done, we will need to add an argument to bundleSource so that the bang transformation is done for vats but not for the kernel. We will also need to throw an error if the bang transformation hasn't been explicitly enabled.

from agoric-sdk.

erights avatar erights commented on August 30, 2024

from agoric-sdk.

katelynsills avatar katelynsills commented on August 30, 2024

Brian might be able to speak to that. I'm not sure myself, but those were the instructions that I got from him. @warner

from agoric-sdk.

warner avatar warner commented on August 30, 2024

We don't have an E() wrapper inside the kernel: it expands to things like syscall.send() and manages a set of per-Vat Promises, none of which is meaningful from outside of a Vat. So I think we want to see an error if ! is used inside kernel code.

from agoric-sdk.

erights avatar erights commented on August 30, 2024

Good

from agoric-sdk.

warner avatar warner commented on August 30, 2024

in the old repo. this was SwingSet issue 6

from agoric-sdk.

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.