Skip to content

Commit 626c2d0

Browse files
authored
"Distributed Communities" presentation (#59)
* Create distributed communities outline * update * updates * move to right dir
1 parent a4b220b commit 626c2d0

File tree

11 files changed

+502
-1
lines changed

11 files changed

+502
-1
lines changed

cmd/reveal/reveal.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func main() {
1515
var es int
1616
for _, v := range os.Args[1:] {
1717
if err := convertFile(v); err != nil {
18-
fmt.Fprintf(os.Stderr, "%s: error converting: %v", v, err)
18+
fmt.Fprintf(os.Stderr, "%s: error converting: %v\n", v, err)
1919
es = 1
2020
}
2121
}
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package forum
2+
3+
import (
4+
"gno.land/p/demo/avl"
5+
"gno.land/p/demo/ufmt"
6+
7+
"std"
8+
"strconv"
9+
"strings"
10+
)
11+
12+
var (
13+
idCounter int
14+
threadList avl.Tree // id -> *Thread
15+
)
16+
17+
type Thread struct {
18+
ID int
19+
Title string
20+
Body string
21+
Author std.Address
22+
}
23+
24+
func NewThread(title, body string) (threadID int) {
25+
idCounter++
26+
threadList.Set(strconv.Itoa(idCounter), &Thread{
27+
ID: idCounter,
28+
Title: title,
29+
Body: body,
30+
Author: std.PrevRealm().Addr(),
31+
})
32+
return idCounter
33+
}
34+
35+
func Render(param string) string {
36+
if param != "" {
37+
val, ok := threadList.Get(param)
38+
if !ok {
39+
panic("thread not found")
40+
}
41+
thread := val.(*Thread)
42+
return ufmt.Sprintf("# %s\n\n%s", thread.Title, thread.Body)
43+
}
44+
45+
var bld strings.Builder
46+
47+
bld.WriteString("# Forum\n")
48+
49+
threadList.Iterate("", "", func(key string, value interface{}) bool {
50+
thread := value.(*Thread)
51+
bld.WriteString(ufmt.Sprintf("- %s: [%s](./forum:%s) by %s\n", key, thread.Title, key, thread.Author.String()))
52+
return false
53+
})
54+
55+
return bld.String()
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module gno.land/r/demo/forum
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
Title: **Distributed communities: how to build timeless and decentralized apps, with Go**
2+
3+
Outline:
4+
5+
6+
>Gno is a programming language to build decentralized and distributed applications,
7+
>like blogs, discussion boards and social networks. It is a subset of Go 1.17
8+
>(pre-generics), interpreted by a stack-based virtual machine, made to run
9+
>entirely deterministically. It uses different standard libraries and allows
10+
>for permanent data storage by automatically persisting and restoring global
11+
>variables.
12+
>
13+
>Join us to learn how Gno and gno.land enable the seamless creation of
14+
>composable, succinct back-end applications. We'll demonstrate how to build
15+
>social platforms from the ground up, including application development,
16+
>moderation, and governance. Everything you need to design a distributed community.
17+
>
18+
>The session will also include a brief introduction to the Gno programming
19+
>language and tools, followed by a hands-on demonstration of bringing these
20+
>concepts to life in both web and mobile applications.
21+
22+
## 1. Project presentation
23+
24+
Present the project, how it works, what it aims to do.
25+
26+
- What is Gno?
27+
- Showcase of what has been built: blog, boards, microblog, social, gnoverflow; delving into snippets of code, and showing how a simple thing gets built, rendered, and called.
28+
- Gno tooling
29+
- Showcase of gnodev, gno repl, gno debugger; how we can use it to work on a blog realm; gnobro, etc.
30+
- Gno realms as out-of-the-box GRPC + gno.land as AWS
31+
- Show how we can call other realms just by calling them as functions; but these are applications with state, and this is somewhat similar to calling them using GRPC.
32+
- To deploy these realms, we use Gno.land. Gno.land serves as an "AWS" of sorts; the chain has the application, and it is distributed on all the nodes, and the validators can also be "called" to deliver transactions.
33+
- On Gno.land, the author of the realm only "pays" to publish the realm; but the sustainance of the realm itself is payed by the users in gas fees.
34+
35+
## 2. Dissecting the GnoVM
36+
37+
- Gno primer
38+
- What features are different from normal Go.
39+
- What "patterns" are different from normal Go.
40+
- Determinism, like time.Now() and random.
41+
- GnoVM primer
42+
- Diagram of GnoVM processing of code.
43+
- How data gets stored into global variables.
44+
- A journey in VM land
45+
- Show how a simple program works and is first parsed and preprocessed on the chain; and then executed.
46+
- Compare: solidity / wasm.
47+
- Source code is source of truth; anyone can inspect and fork
48+
- Surface area is larger; but there are benefits that we plan on doing (like being able to query information about code and state to the VM)
49+
- Not domain-specific; so you don't have to be invested in blockchains to try out Gno.
50+
51+
## 3. Building a social platform
52+
53+
Deep dive into how a platform like dSocial is built. Or the microblogs. How
54+
moderation can work. How a UX can work (dSocial app demo).
55+
56+
- Building social communities on gno.land
57+
- Examples of how we can build boards, microblogs, GnoSocial on top of Gno.
58+
- Showcase of how these spaces can exist and be regulated by code.
59+
- Compare gno.land vs facebook/twitter
60+
- Compare gno.land vs mastodon/fediverse
61+
62+
TODO: expand on this section
63+
64+
### Other examples
65+
66+
These can be shown as further examples; but we shouldn't deep dive on how they
67+
can work. But we can reference them and point to examples of these (GovDAO,
68+
GnoChess).
69+
70+
- Building communes and companies on gno.land
71+
- Examples of how smart contracts can be used to build organizations, which are regulated in structure and financing directly with clear, and simple code.
72+
- Everything is transparent; and the rules for governance can be written as code.
73+
- Turning what are currently "social contracts" into real "code contracts", which computers on the chain can enforce.
74+
- Compare gno realm vs a legal contract.
75+
- Compare gno.land company vs a real company.
76+
- Building game servers on gno.land
77+
- Example of how you can build something like gnochess on gno, and other examples of game servers that can be built on gno.land
78+
- Still on-line communities, that can outlast the parent companies
79+
- For real-time games, gno.land will not be good because it's slower than necessary. Our goal is not to centralize everything on the chain though; everyone can fork, and make their own chain. Gno is just a better way to program dapps; we don't claim though to be making the ultimate blockchain for every use case.
80+
- Compare gno.land vs traditional client-server games.

0 commit comments

Comments
 (0)