tact-lang / tact-docs Goto Github PK
View Code? Open in Web Editor NEWTact main documentation
Home Page: https://docs.tact-lang.org
Tact main documentation
Home Page: https://docs.tact-lang.org
Many languages give the programmer a taste of a simple program right off-the-bat, we should do the same
Introduced in tact-lang/tact#97
What should I do to make a function impure or specify it as inline_ref.
The actual link is at the bottom of the chapter, we should explain there is a deprecated plugin, but provide the link to the maintained one right away
https://github.com/tact-lang/tact/tree/main/stdlib/libs
config
, content
and dns
libraries are present in repository and listed in changelog, but not documented.
Those tools seem to be widely used in the community and we should switch to use those consistently everywhere in the Tact docs
The recent refactoring in #81 broke the links in tact-by-example, see issue tact-lang/tact-by-example#34
This happened because Next.js (the thing our documentation theme uses) doesn't support redirects: () => []
of next.config.js
in static export.
There is a bunch of typos like this. For instance, "it manipulates it's own state" -> "it manipulates its own state".
next.config.js
+ new middleware.js
in the root)Until then i18n support in routing is only implicitly enabled (one may add a /en
prefix to any routes and they would continue working smoothly).
This issue is made as a follow-up to #79 in attempt to decrease the size of individual PRs.
I'm proposing creating a "Coming from FunC" page, which would be geared towards people who are already familiar with TON and Tact and only need a brief side-by-side comparison of FunC to Tact — their syntax, semantics, idiomatic approaches. This should dramatically improve the time of getting started with Tact, and would even serve as a cheat sheet for jumping between FunC and Tact code.
As an aside, documentation should start to differentiate between users unfamiliar with FunC, Tact and TON and those, who are already familiar and/or proficient at any of the above. This would greatly help to cater helpful content as those two different audiences have various requests and needs, and generic docs are mediocre at best when it comes to serving diverging needs.
According to the documentation, function checkDataSignature
expects types of all params to be Slice
.
In fact, any attempt to compile a contract's source code calling aforementioned function fails with next message:
Invalid type "Slice" for argument "public_key"
Compiler version: 1.1.5 (latest).
it was added to Tact in tact-lang/tact#122.
currently the page in docs doesn't list it:
https://docs.tact-lang.org/language/ref/message-modes
Currently https://docs.tact-lang.org/language/guides/changelog is out of sync with https://github.com/tact-lang/tact/blob/main/CHANGELOG.md.
I think we should stop maintaining the changelog in the Tact docs and just link it from the compiler's repo.
Sometimes the parameter names in the function signatures and in the descriptions do not match:
e.g. https://docs.tact-lang.org/language/ref/cells#builderstorebool
Documented to the various degree (from full coverage to none):
base.tact
cells.tact
config.tact
context.tact
contract.tact
crypto.tact
debug.tact
math.tact
primitives.tact
reserve.tact
send.tact
text.tact
Contents of each should be described in Language → References (/language/ref
).
Then, other parts of the documentation may start referencing structures, functions and other things to be described there.
Additionally, the functions and methods defined in the following files shall also be described:
null
value to a map variable is the same as calling an emptyMap()
) + .set()
, .get()
, .asCell()
— those should be added to /book/types.mdx
Currently, one needs to know what and where to place in the docs.
It would be nice to have a simple cli or small scripts controlled from scripts
section in package.json
to quickly create stubs for new pages.
Current docs lack:
It should be presented in the form of a tutorial showing how to port a real-world Solidity smart contract to Tact.
This is related to #54, but for those familiar with how to program for the Ethereum blockchain.
Useful links:
The page should also show there are some analogues of Ethereum/Solidity tools:
It would be nice to have Tact Cookbook become a part of Tact documentation, just like FunC Cookbook is a part of TON Docs. The original repo may get archived afterwards, but not deleted, as many people made their valuable contributions to it during Hack-TON-berfest and those efforts should be preserved and cherished.
Pros:
Cons: none?
Anti-patterns:
The spellchecker should support adding custom words. It should be documented how to add new words to the dictionary
Related issue: #326
For now, lots of people asking about forwardPayload: Slice as remaining
when they dealing with Jetton Token.
I think need add more content about this in Tact Docs.
At https://docs.tact-lang.org/language/ref/random it is specified that random() provides a number with the range from <= x <= to.
In my smartcontract it was not working as intented, so I tried to check it manually, and it looks like that actually random() outputs numbers in the range from <= x < to. That is, second argument is not included.
Probably, the docs are not correct.
tact logo in the left upper part of screen is white, so it can't be seen in the light theme anymore
As in #90, it's better to setup an automatic CI, which would fetch the newest content from the ton-society/ecosystem-map.
It should be https://plugins.jetbrains.com/plugin/23382-ton
If we utilize toggle word wrap in the code blocks, I think it have better UX.
Current grammar page doesn't bring much value, especially for those willing to work on Tact compiler development or related tooling.
The page should be moved to the Language → Reference section, and it should cover different parts of the official Tact grammar in Ohm with examples showcasing their usage in the language.
Now, it's possible to do it with syntax highlighting of Ohm code blocks thanks to the merged TextMate grammar for Ohm, brought from novusnota/vscode-ohm.
Reference links:
Moreover, its scope is wider than the language itself, as it includes interaction with Tact's tooling and TON Blockchain concepts applied with respect to FunC's idioms and their compatibility with Tact.
Besides, the current naming is more of a misnomer, as it usually means deep articles describing how to make a specific project, while the current ones are more descriptive of the language and, only partly, of it's applications in real-life contracts. This is similar to online documentations other languages have, where they call them Books of the language (See Rust's documentation book). I suppose it would be nice to call our section Book as well. Alternatively, it can be named "Learn".
It's only natural to put #66 there :)
P.S.: All the actual guides and tutorials from people all around TON Blockchain would be referenced in the Ecosystem section covered below.
/start
)People, first coming to the docs should see:
/start
does.And instead, currently people see some mediocre looking README-like page. Yes, it has some of the important links, but the rest isn't suited for the awesome Tact documentation I'd like to see :)
Information from the current "Getting Started" page should be moved into relevant sections of a new Book section described above.
/language/guides/grammar
)/evolution
)And despite that, it still occupies the whole section of the docs! On top of that, the current changelog page (/language/guides/changelog
) is out of date and doesn't keep up with latest Tact updates as described in #77.
/tools
)Instead, it should become a part of a much broader section, Ecosystem, which would cover "what's out there" with more detail than just quick links. This would include the current Tools section and make many detailed references to great content posted to tact-lang/awesome-tact.
Main page of the docs should have a quick overview of available things and a very short getting started guide for deploying the very first contract as quick as possible.
Three sections, each having an index page describing available contents. Their position indicates the levels of immersion into Tact and TON Blockchain, going from the very shallow on the "left" (main page) to the very deep and very broad on the "right" (ecosystem section):
/
— main page of the docs. Very important!
/ book
(or /learn
) — section (and a dedicated page) for learning all things Tact and some things TON. Because there's an awesome docs.ton.org resource, many articles and guides, we should reference as much of it as possible, while still remaining Tact-specific and novice-friendly.
/language
— section (and a dedicated page) for the vast overview of the language, including:
/grammar
— a dedicated grammar page, #76/ref
— no change/libs
— no change/evolution
— current /evolution
section should move here, plus a Changelog page (current one has to be replaced by a link to tact-lang/tact/CHANGELOG.md as per #77)/ecosystem — section (and a dedicated page).
Add one section about debugging contracts in general
Add the dump
function to the reference of static available functions
This might require reformatting the existing files
Found some interesting ways to define messages in the examples that I wasn't aware of
message(0x7362d09c) TokenNotification {
forwardPayload: Slice as remaining; // remaining keyword
}
message TokenUpdateContent {
content: Cell?; // optionals
}
Let's make sure they are all documented, from defining your own opcode to remaining keyword and optionals
Introduced in tact-lang/tact#99
i've created a handy cheat sheet for message modes in Tact #10
Those were introduced in tact-lang/tact#87
It would be nice to have simple but full config files for Neovim and Helix, so that beginners could simply download those and start immediately hack on their Tact projects.
What do you think @novusnota?
I guess this could be extended to Vim and Emacs as well.
Or we could even extend it to a repo that explains how to set up development environments using various editors/IDEs together with a Node.js package manager and Blueprint/Sandbox. I think this could be supported by a bounty.
This should include interaction with the standard contracts in the TON ecosystem.
It should appear in the reference
Sometimes Tact is spelled as "TACT". Let's make it uniform across the docs: use "Tact" as the canonical term
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.