Giter VIP home page Giter VIP logo

Comments (3)

JoshOrndorff avatar JoshOrndorff commented on August 23, 2024

The slashes and whatnot are my shitty ascii version of the arrows in the whiteboard photo above :)

Correct: "send processes, receive names"
Incorrect: "send on processes, receive on names"

You always send and receive on names. But the thing which you send must be a process, and the thing you receive on the other end is the quote of the sent process, which is a name.

Or is that not right "Foo" is a process and @ makes it a name you can send on?

Correct

And then, when you receive on @"Foo" you get something that is a name?

Correct; You always receive names.

(but then you can put "for (@x <- @"Foo")" to make it a process? Totally confusing.

The thing you received is still a name. You always receive names. The difference is that you used pattern matching so that the name you received matches @x thus x itself is a process. Here's the relevant part of the tutorial https://github.com/JoshOrndorff/LearnRholangByExample/tree/master/10-MoreSyntax#receiving-processes

Also there is a thing called a name-variable, and a process-variable.

Correct

So, one could have just an 'x' but it is a process variable (no @ sign in front) but also a name 'x' that is a name-variable. This further confuses

Variable names don't reflect their types. Just like in java int x = 4; is perfectly valid and double x = 3.2; is perfectly valid. What you call the variable doesn't indicate anything about its type.

You should come to my office hours Thursday mornings at 7:00am your time. I'll be expecting you :)

from learnrholangbyexample.

JoshOrndorff avatar JoshOrndorff commented on August 23, 2024

The poor dude whose github handle is @x probably gets tagged in a bunch of rholang related posts.

Maybe I should start writing all of my example receives as for (@glenbraun <- badassProgrammers){...}

BTW, that would make glenbraun a process variable.

from learnrholangbyexample.

glenbraun avatar glenbraun commented on August 23, 2024

But, then one can do:

new foo in { … }, which seems to create a name called "foo".
When one does: for (foo <- bar) { }
both foo and bar are names? but: for (@foo <- bar) makes foo a process? Is foo a name variable in the first and a process variable in the second? or the other way around? Are the three letters 'f' then 'o', then 'o' a name variable, but the syntax '@' makes it a process variable? or the other way around. I guess I'm being thick but it makes no sense to me. I get it a little that what can be put into the RSpace are processes that are quoted, rather than names. The name is the key, the quoted process is the value. Best, I know. It will likely make sense for me someday, but I have to think there must be some other programmer out there who will try to learn Rholang who has a similar issue. It seems the description needs some better way to describe it. I think the usage seems to depend on context, whether one is receiving or sending (maybe, I don't know). Anyway, will keep at it and see if it becomes more clear over time.

from learnrholangbyexample.

Related Issues (16)

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.