Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

JavaScript (or Monte) Compiler for RChain #427

Open
TrenchFloat opened this issue Feb 26, 2018 · 10 comments
Open

JavaScript (or Monte) Compiler for RChain #427

TrenchFloat opened this issue Feb 26, 2018 · 10 comments
Assignees
Labels
Development splitting into core-dev, developer-education, ...? (guides: @dckc, ...)

Comments

@TrenchFloat
Copy link
Contributor

TrenchFloat commented Feb 26, 2018

A compiler from monte to rholang could ease the transition from the community of programmers familiar with python and the like.

filed on behaof of @dckc

@dckc dckc changed the title Monty Compiler for RChain Monte Compiler for RChain Feb 26, 2018
@rchain rchain deleted a comment from BelovedAquila Feb 26, 2018
@dckc
Copy link
Contributor

dckc commented Feb 26, 2018

@BelovedAquila BelovedAquila added the zz-Operations NEEDS SPONSOR guides: @TrenchFloat, @jimscarver @Tonyprisca13 label Feb 27, 2018
@zsluedem
Copy link
Contributor

I am not really familiar with the Monte language(actually first time touch). I just check it here. So I can understand it like something which compile the Python to Rholang, right?

@dckc
Copy link
Contributor

dckc commented Feb 27, 2018

Yes, that's the idea.

@zsluedem
Copy link
Contributor

That's a nice idea.
As far as I have known, there are always some limits about that kind of compiler.But still it is a good touch for understanding Rholang for Python developers.
I can help with some test once you are done.

@BelovedAquila BelovedAquila added Development splitting into core-dev, developer-education, ...? (guides: @dckc, ...) and removed zz-Operations NEEDS SPONSOR guides: @TrenchFloat, @jimscarver @Tonyprisca13 labels Feb 27, 2018
@dckc
Copy link
Contributor

dckc commented Feb 27, 2018

I got it working in one case:

"feed"; "water"; "grow"

compiles to

new return in {
  new step2Ch in {
    new step1Ch in {
      step1Ch!("feed") | for(step1 <- step1Ch) {
	step2Ch!("water")
      }
    } | for(step2 <- step2Ch) {
      return!("grow")
    }
  }
}

https://gist.github.com/dckc/fb6c0a49361e8502b0be418ec71b44c1

@dckc dckc self-assigned this Feb 28, 2018
@rchain rchain deleted a comment from timxor Mar 3, 2018
@dckc
Copy link
Contributor

dckc commented Mar 28, 2018

I just (re-)discoverd section 3. INTERPRETING CAPABILITIES of Policy as Types has an example of translating javascript to a rho-calculus language. So this idea is not unprecedented. :)

I made some notes on the bibliography section of Mobile process calculi for programming the new blockchain.

Propositions as sessions by Wadler confirmed my understanding of C-H for pi calculus too. This linear logic stuff may take a little getting used to, but I'm starting to grok.

@dckc dckc changed the title Monte Compiler for RChain Monte or JavaScript Compiler for RChain May 7, 2018
@dckc
Copy link
Contributor

dckc commented Jun 18, 2018

or perhaps TinySES https://github.com/Agoric/TinySES

@dckc dckc changed the title Monte or JavaScript Compiler for RChain JavaScript (or Monte) Compiler for RChain Jun 22, 2018
@dckc
Copy link
Contributor

dckc commented Jun 25, 2018

Some progress Jun 21: https://github.com/dckc/tinyses2rho 0e24be8

@dckc
Copy link
Contributor

dckc commented Sep 15, 2018

Mike Stay chatted about continuations in other languages such as JavaScript.

How would garbage collection work? How would the collector see what the closure closes over?

@dckc
Copy link
Contributor

dckc commented Dec 13, 2018

I just re-discovered shell-monad which reminded me that sunroof might be a good approach to rholang-to-js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development splitting into core-dev, developer-education, ...? (guides: @dckc, ...)
Projects
None yet
Development

No branches or pull requests

4 participants