rchain / hackathon-2020

Apache License 2.0
3 stars 1 forks source link

rholang tutorial integration / update (e.g. "how do I publish and update a list of members") #10

Closed dckc closed 4 years ago

dckc commented 4 years ago

I just had an exchange with @ian-bloom in #education , following from a review of this morning's session:

dckc:: If you put a static list in the registry, you can't change it. If you want to publish a mutable list, you use a contract. The cell contract would be the simplest. But directory.rho has a few other niceties. ok... @jimscarver: eventually shows the Community contract. That's not the simplest answer to your question, but it is an answer. dckc:: the most direct answer would have been directory.rho

dckc:: now suppose a hackathon attendee had your same question... where do we document the answer? looking at https://rchain.coop/hackathon#dev-apis ... dckc:: "Learn Rholang By Example" sounds promising... dckc:: yes... https://github.com/JoshOrndorff/LearnRholangByExample/tree/master/08-StateChannelsAndMethods . dckc:: hm... format isn't all that great. At various times, we've had that tutorial deployed as designed dckc:: darn; counterFactory.rho is a little goofy dckc:: each of the examples should have a link to load it into the rholang playground

or perhaps the list of examples in the rholang playground should be replaced by the ones from "Learn Rholang By Example"

see also https://github.com/rchain-community/LearnRholangByExample

jimscarver commented 4 years ago

the process in the convert directory creates index.html to be linked to on the hackathon page for https://github.com/rchain-community/LearnRholangByExample

jimscarver commented 4 years ago

the convert process makes .md files into .html


git clone  https://github.com/rchain-community/LearnRholangByExample
cd LearnRholangByExample
npm install
npm install marked
node converter/index.js README.md
for d in */.; do cd $d;ls *.md| while read f; do node ../converter/index.js $f; done; cd ..; done
find . -name README.html |while read f; do cp -p $f $(echo $f|sed 's/README/index/');done
cd ..
$ scp -r LearnRholangByExample rchain@rhobot.net:/var/www/html
jimscarver commented 4 years ago

http://rhobot.net/LearnRholangByExample/

The chinese characters are messed and the site looks huge.

dckc commented 4 years ago

nice work, @jimscarver I see @SteveHenley added a link from the hackathon page in https://github.com/rchain/www.rchain.coop/commit/158b69e6e341a97a19b4500d810f19fea37363ce

I'm not sure why he added a 2nd "Learn Rholang By Example" rather than replacing the one that was there, but I don't suppose that's critical. This is done to my satisfaction. (If there's more to do, as usual, feel free to re-open it.)