Giter VIP home page Giter VIP logo

Comments (9)

tgrospic avatar tgrospic commented on July 30, 2024 2

We could publish special pre-release with Rholang 1.1 which can be used in evaluated mode to get translation to desugared syntax.

For example this code evaluated with Rholang 1.1

let x <- 1 ; y <- 2 ; z <- 3 in {
  (*x, *y, *z)
}

produces this output

match [1] {
  [x0] => {
    match [2] {
      [x1] => {
        match [3] {
          [x2] => {
            (x0, x1, x2)
          }
        }
      }
    }
  }
}

from rchip-proposals.

Bill-Kunj avatar Bill-Kunj commented on July 30, 2024 1

@Bill-Kunj I'm suggesting to publish a pre-release with all the artifacts (Docker image, deb package, ...) so it can be used in VSCode extension or with eval command like any other release.

Not being pushy, but I really, really want to try this out. When can I start using it?

from rchip-proposals.

tgrospic avatar tgrospic commented on July 30, 2024 1

@dckc You need to run an instance of RNode and call gRPC method eval. This is what CLI eval method is doing.

So first start standalone instance.

$ docker run --name rho -v $PWD/tmp:/tmp -ti --rm rchain/rnode:v0.12.4__rholang-1.1-rc1 run -s

When it's up (unfortunately after the blockchain part is ready) you can call eval to that instance with the same container, so escape all of networking setup. Eval is on private port, so port 40402.

docker exec rho bin/rnode --grpc-port 40402 eval /tmp/r1.rho

from rchip-proposals.

dckc avatar dckc commented on July 30, 2024

Exactly.

I was thinking of a standalone jar a la
https://github.com/rchain/rchain/tree/dev/rholang#command-line-usage

But anything that can be used from a batch dev tool (npm script, makefile, ...) is fine.

from rchip-proposals.

Bill-Kunj avatar Bill-Kunj commented on July 30, 2024

I'm glad someone finally brought this to the foreground. Rholang 1.0 is hard for newbies. Rholang 1.1 would be invaluable for new practitioners.
@tgrospic How hard will it be to publish a batch tool similar to what @dckc suggests? What can I do to help?

from rchip-proposals.

tgrospic avatar tgrospic commented on July 30, 2024

@Bill-Kunj I'm suggesting to publish a pre-release with all the artifacts (Docker image, deb package, ...) so it can be used in VSCode extension or with eval command like any other release.

from rchip-proposals.

Bill-Kunj avatar Bill-Kunj commented on July 30, 2024

This sounds like a great start.

from rchip-proposals.

tgrospic avatar tgrospic commented on July 30, 2024

Rholang 1.1 pre-release (special build) is published: v0.12.4+rholang-1.1-rc1.

Docker image has tag name with __ instead of + and it's published here: v0.12.4__rholang-1.1-rc1.

It's based on v0.12.4 version with some small updates not related to Rholang.

These test can help to understand how the new syntax is desugared to Rholang 1.0.

Enjoy! 🥳

from rchip-proposals.

dckc avatar dckc commented on July 30, 2024

Rholang 1.1 pre-release (special build) is published

Thanks!

Enjoy!

I'm struggling to figure out how. Help, please?

I put the example above in r1.rho:

let x <- 1 ; y <- 2 ; z <- 3 in {
  (*x, *y, *z)
}

Now what? How do I convert it to rholang 1.0 using v0.12.4+rholang-1.1-rc1?

I tried:

$ docker run -v/tmp:/tmp -ti --rm rchain/rnode:v0.12.4__rholang-1.1-rc1 eval /tmp/r1.rho
Evaluating from /tmp/r1.rho

Result for /tmp/r1.rho:
Error: Connection refused: localhost/127.0.0.1:40401

then I tried:

$ docker run -d --net host -v/tmp:/tmp --rm rchain/rnode:v0.12.4__rholang-1.1-rc1
0233e39840af1cc97957c1f16e17054d6b3228245d1bbed5bf48d3f2628217f1
$ docker run --net host -v/tmp:/tmp -ti --rm rchain/rnode:v0.12.4__rholang-1.1-rc1 eval /tmp/r1.rho
Evaluating from /tmp/r1.rho

Result for /tmp/r1.rho:
Error: Connection refused: localhost/0:0:0:0:0:0:0:1:40401

from rchip-proposals.

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.