Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Interpreter #65

Open
Checkmate50 opened this issue Oct 24, 2019 · 1 comment
Open

External Interpreter #65

Checkmate50 opened this issue Oct 24, 2019 · 1 comment
Labels
good first issue Good for newcomers

Comments

@Checkmate50
Copy link
Contributor

We are using a simple in-house interpreter right now for Gator, which is getting really annoying to maintain. It would be much better to be able to invoke an interpreter from another language (I'm thinking JS or python).

There are two ways we could go about doing this

  1. Write a translator from the TypedAST to the interpreting language, with operations you want to support having baked-in translations rather than function calls. This will be similar to how Ops is currently written, but using another language as a back-end rather than writing OCaml by hand

  2. Write a library in Gator to mimic the target language, then write a small compiler module to match target language syntax. This should produce code that can be run directly in the interpreting language. I suspect this is harder and will run slower, but should scale better than (1).

@Checkmate50 Checkmate50 added good first issue Good for newcomers hacktober Fun issues for hacktober! labels Oct 24, 2019
@sampsyo
Copy link
Contributor

sampsyo commented Oct 24, 2019

Sorry to be the PL pedant, but if there's a translator from the AST to a different language (like Python), that's not an interpreter—it's a compiler. 😃 And if there is already a working TypeScript compiler (#67), maybe that fulfills the same role?

@Checkmate50 Checkmate50 removed the hacktober Fun issues for hacktober! label Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants