-
Notifications
You must be signed in to change notification settings - Fork 8
feat: whitepaper comments #1141
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
Open
hacker-volodya
wants to merge
7
commits into
main
Choose a base branch
from
whitepaper-comments
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+77
−0
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b8bfabf
feat: whitepaper comments
hacker-volodya 85252a0
Update foundations/whitepapers/comments.mdx
hacker-volodya 47a00e3
Update foundations/whitepapers/comments.mdx
hacker-volodya cb0d70c
Update foundations/whitepapers/comments.mdx
hacker-volodya c6af95a
Remove outdated sections from comments.mdx
hacker-volodya 0d0179f
fix: navigation, formatting
hacker-volodya ec4119b
Update foundations/whitepapers/comments.mdx
novusnota File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| --- | ||
| title: "Whitepapers comments" | ||
| sidebarTitle: "Comments" | ||
| --- | ||
|
|
||
| Clarifications and status notes for the whitepapers. | ||
|
|
||
| ## TON Virtual Machine, `tvm.pdf` | ||
|
|
||
| ### 1.3.2. List of control registers | ||
|
|
||
| The zero element of the `c7` tuple is an environment information (which itself is also a tuple). The remaining 255 slots are used for global variables. [`[i] SETGLOB`](/tvm/instructions#f87_-setglob) modifies `c7`, inserting an element with index `i`, [`[i] GETGLOB`](/tvm/instructions#f85_-getglob) reads `i`-th element from `c7`. See [TVM > Registers](/tvm/registers#c7-%E2%80%94-environment-information-and-global-variables) for details. | ||
|
|
||
| ### 4.4. Continuations as objects | ||
|
|
||
| It is possible to construct such objects, however, no high-level language implemented it yet. | ||
|
|
||
| ### 4.5.7. List of predefined exceptions | ||
|
|
||
| Exit code `11` is thrown by [standard function selector](/tvm/registers#c3-—-function-selector) if there is no function with given id. Also it is thrown by [`SENDMSG`](/tvm/instructions#fb08-sendmsg) in case of invalid message. | ||
|
|
||
| ### 5.1. Codepages and interoperability of different TVM versions | ||
|
|
||
| Currently only codepage `0` implemented. | ||
|
|
||
| ### A. Instructions and opcodes | ||
|
|
||
| Basic gas price is `10 + b`, not `10 + b + 5r`. See [TVM > Gas](/tvm/gas) for details. | ||
|
|
||
| Provided instruction list is obsolete. Consider use [TVM > Instructions](/tvm/instructions). | ||
|
|
||
| ### B.2. Step function of TVM | ||
|
|
||
| "Reference implementation of TVM" and codepages `-1` and `-2` are not implemented yet. | ||
|
|
||
| ## Fift, `fiftbase.pdf` | ||
|
|
||
| ### 1 Overview | ||
|
|
||
| > The dictionary is supposed to be split into several vocabularies, or namespaces; however, namespaces are not implemented yet, so all words are currently defined in the same global namespace. | ||
|
|
||
| Namespaces and context switching are now implemented — Fift words are defined in the default dictionary and accessible through the global namespace called `Fift`. | ||
|
|
||
| It is now possible to add new namespaces with the `namespace` word or switch dictionary contexts on the fly. It is also possible to define words or named constants directly under those namespaces and reference words from different namespaces: | ||
|
|
||
| ```fift | ||
| namespace My | ||
|
|
||
| "a" constant a | ||
| "b" constant b | ||
| "c" constant c | ||
|
|
||
| a b c .s { drop } 3 times // "a" "b" "c" | ||
|
|
||
| My definitions | ||
| "b-my" constant b | ||
| "c-my" constant c | ||
| "d-my" constant d | ||
|
|
||
| a b c d .s { drop } 4 times // "a" "b-my" "c-my" "d-my" | ||
|
|
||
| Fift definitions | ||
| a b c .s { drop } 3 times // "a" "b-my" "c-my" "d-my" | ||
|
|
||
| My b My c My d .s { drop } 3 times // "b-my" "c-my" "d-my" | ||
| a b c .s { drop } 3 times // "a" "b" "c" "d" | ||
|
|
||
| My definitions | ||
| a b c d .s { drop } 4 times // "a" "b-my" "c-my" "d-my" | ||
| Fift a Fift b Fift c d .s { drop } 4 times // "a" "b" "c" "d-my" | ||
|
|
||
| Fift definitions | ||
| cr | ||
| My-wordlist @ | ||
| { drop type -1 } hmapforeach drop cr // "b " "d " "c " | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.