Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: initial learn section #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

heueristik
Copy link
Collaborator

@heueristik heueristik commented Oct 11, 2024

This is a work by @heindel that I split into separate branches

Copy link
Collaborator Author

@heueristik heueristik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round of review for @heindel

@@ -0,0 +1,10 @@
---
description: >-
From an end-user perspective, applications are what makes the intent-machine
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The causality is wrong here.
Applications don't make the intent-machine run.
Applications can be run on intent-machines.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intended meaning was that end-users use applications and applications run on Anoma as OS.

This needs to be changed in any case. Possibly, we may even get rid of the intent-machine and only talk about Anoma as OS.

@@ -0,0 +1,19 @@
# What is an Anoma application?

An Anoma _application_ is a set of resource kinds and solvers. Resource kinds allow to narrow down the fragments of state that are of interest to an application; then, the solvers of an application operate on (this fragment of) state, which typically involves combining user intents into transaction objects. Thus, solvers are what makes the intent-machine work for all users. In fact, there is potentially a whole system of applications as applications may interact (directly) with each other whenever they operate on resources of the same kind. 
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused.

Applications are constituted by state, which is modelled as resources, and logic which can be divided into

  • resource logic functions
  • transaction functions
  • projection functions

The latter two constitute the interface of an application and the prior the backend.

Resource kinds alone don't make up an application, and solvers are optional for applications.

What you write here deviates a lot from https://github.com/anoma/ART-2024-Heuer-Reusche-Cubides-Resource-Machine-Applications and I wonder why


### Solver

A solver is a specific user that is fabricating transaction objects from user intents such that the preferences for state (change) of intents are effected by state updates.
Copy link
Collaborator Author

@heueristik heueristik Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "fabricating" mean here?

Transaction objects can be balanced or unbalanced. A solver combines unbalanced transaction objects into balanced ones.

fabricating transaction objects from user intents

This sounds a bit misleading.
Practically, an intent is an unbalanced transaction object containing an ephemeral resource being part of a transaction that expresses constraints over it.
So intents are transaction themselves. This sentence sounds like and transaction is created from an intent.
However, transactions expressing intents are matched and combined with each other.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for revising the comment!

Indeed, the sentence fabricating transaction objects from user intents does not mention that the result in general need not be balanced and requires that the reader already understands what transaction objects are. And, certainly, composing is the better word. Additionally, we may consider adding links to the respective pages to the specs.

@@ -0,0 +1,16 @@
# What is an intent?

An _intent_ is a machine-readable message concerning user preferences about state. Thus, users can send intents to spread information about how they would like to change (certain aspects of) the "world". The "world" of an application is the application's _state._
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For application devs, an intent is an ephemeral resource being created and consumed over the course of a transaction and that express constraints over the state transition.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In view of this post, I would propose to avoid all forms of

  • an intent is XYZ
  • intents are ABC

and I think this can be done. The benefit is that we "automatically" avoid the issue to accidentally define what an intent is per se (cf. @vveiln 's post on the topic of how to not define intents, not even in the advanced section).

@heindel
Copy link
Collaborator

heindel commented Oct 18, 2024

Let me summarize the points that I took away from some conversations in the meantime:

  • the style of the present PR is rather fitting the advanced section
  • I conjecture that the learn section is rather to be written as a sequence of tutorials How to write code for X? For example, how to write code for intents, how to write code for resources, instead of explaining the concepts that we are writing code for (which then would belong to the advanced section). Possibly, this is very much in the way described here
  • the sui counterpart is rather the app-dev subsection than the whole section on concepts
  • Issue What are applications (and other prerequisite concepts of the Anoma app lib)? #2 may need revision, in particular, changing from the What is X?, which is asking for the full definition, to a How to get X written in code? (or similar).

@heueristik
Copy link
Collaborator Author

Let me summarize the points that I took away from some conversations in the meantime:

  • the style of the present PR is rather fitting the advanced section

I wouldn't say that. We should hide complexity a bit and present only the necessary things to developers that practically matter to them. The goal here is to give practical answers that don't break consistency with the deep-dive material (e.g. ARTs). Deep-dive material should be linked to in the advanced section.

  • I conjecture that the learn section is rather to be written as a sequence of tutorials How to write code for X? For example, how to write code for intents, how to write code for resources, instead of explaining the concepts that we are writing code for (which then would belong to the advanced section). Possibly, this is very much in the way described here

I would limit tutorials to the build section.

I don't mind. What do you propose here?

see above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What are applications (and other prerequisite concepts of the Anoma app lib)?
2 participants