bounties
bounties copied to clipboard
JavaScript (or Monte) Compiler for RChain
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
a tiny bit of progress: https://gist.github.com/dckc/fb6c0a49361e8502b0be418ec71b44c1
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?
Yes, that's the idea.
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.
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
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.
or perhaps TinySES https://github.com/Agoric/TinySES
Some progress Jun 21: https://github.com/dckc/tinyses2rho 0e24be8
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?
I just re-discovered shell-monad which reminded me that sunroof might be a good approach to rholang-to-js.