Giter VIP home page Giter VIP logo

tact-docs's People

Contributors

aandrukhovich avatar alirezatabatabaeian avatar anstill avatar anton-trunov avatar arashnm80 avatar bobbjedi avatar danisnearby avatar enourmo avatar ex3ndr avatar gajesh2007 avatar hiyorimi avatar howardpen9 avatar koodl avatar mbaneshi avatar mhbdev avatar novusnota avatar oni-giri avatar pavelvaskou avatar polaristow avatar qpwedev avatar reveloper avatar sansx avatar swiftadviser avatar talkol avatar tonk-team avatar unevenjoy avatar unordered-set avatar wgb5445 avatar zjor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tact-docs's Issues

Add link checking to CI (and git hooks)

  1. All the links in docs should be automatically checked each week for the valid response of the servers (200 or 301/302).
  2. Optional: Add a pre-commit or pre-push hook to check the validity of the links.

toggle word wrap

If we utilize toggle word wrap in the code blocks, I think it have better UX.

Cover anti-patterns and possible attacks on Tact smart-contracts

Anti-patterns:

  • on-chain string parsing from a human-friendly format into a machine-readable binary structure -- a dapp frontend should do that and only communicate with its smart contracts using machine-readable structures messages, so we don't impose too much load on the blockchain

Misleading `public_key` param type in checkDataSignature

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).

Example Neovim and Helix configs for beginners

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.

Complete annotated grammar reference/spec from `grammar.ohm`

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:

Broken redirects

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.

random() range seems invalid

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.

Fix typos: "it's" vs "its"

There is a bunch of typos like this. For instance, "it manipulates it's own state" -> "it manipulates its own state".

Document message declaration syntax

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

Docs lack contributing info

It's necessary to have:

  • Overview of the project structure
  • Help on adding new pages and sections
  • Guidance on adding translations (once #80 and #86 get resolved)

It would be nice to also have a helpful CLI/scripts to quickly create new pages, see #88.

Proposal: Tact Cookbook should become a part of docs

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:

  1. All the syntax would be now highlighted.
  2. All the links would be checked once #65 gets implemented.

Cons: none?

"Coming from FunC" page

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.

Add spellchecking to CI

The spellchecker should support adding custom words. It should be documented how to add new words to the dictionary

Proposal: A new structure of the documentation

Core ideas

  1. Documentation should start being helpful as quick as possible (A brief "Getting Started" should be the part of the main/index page)
  2. Documentation should differ between advanced and novice users of Tact and TON Blockchain (as mentioned in #54):

📛 Criticisms of the current structure

Language/Guides section is getting too big to not have it's own dedicated section

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.

Getting Started is too slow (/start)

People, first coming to the docs should see:

  1. Basic overview of it's parts
  2. Very brief and very quick "Getting Started" page, telling them how to deploy their first contract and where to look for further information after this. The page shall not go into details and describe, say, receivers like the current /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.

Current grammar page is useless (/language/guides/grammar)

#76

Evolution section's scope is too narrow (/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 section's scope is too narrow (/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.

✅ Proposed solution

Broad ideas

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):

  1. Book (or Learn) — intended for those having surface-level (or no) knowledge of Tact and TON, or for those familiar with other blockchains (#54, #67).
  2. Language — for people wanting to go deeper, and those (already) familiar with TON. More of a detailed reference, then a manual.
  3. Ecosystem — for people wanting to go broader and, perhaps, contribute to the ecosystem.

New structure

  • / — 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).

Docs lack a complete reference of everything available in the default standard library (`/stdlib/std`)

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:

Chinese (zh) language option needs to be enabled in the interface

  • Middleware and routing should enable language switching (next.config.js + new middleware.js in the root)
  • All the pages should get their empty Chinese counterparts, so that Chinese translators may start filling those in

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.