tact-lang / tact-docs

Tact main documentation
https://docs.tact-lang.org
40 stars 36 forks source link

feat: big update, Language→Reference #206

Closed novusnota closed 1 month ago

novusnota commented 2 months ago

Brace yourself wanderer, a HUGE update is ahead:

Preview of the Reference overview page: image

Closes #143 (rename and all related things) — this is the main issue target of this PR Closes #176 (re-write of the Strings reference page) Closes #193 (dumpStack() function) Closes #190 (pow() and pow2() functions) Closes #75 (as it covers all of the missing things)

novusnota commented 1 month ago

Ready for review, whew

novusnota commented 1 month ago

@anton-trunov Thanks for your suggestions covering edge cases that I've missed — I'm now going over them one by one.

Also, I agree that "API Reference" may sound unclear. Therefore, I'm thinking to rename it to just "Reference" and change all api-... prefixes to something like builtin-... and not to std-..., because that conflicts conceptually (IMHO) with stdlib-... prefix of standard libraries that are available for inclusion, but aren't included by default.

I'll contemplate on it a bit :)

UPD: Nearly all languages call it API documentation or API reference/specification. So I'm inclined to leave it as API Reference. We may call it Prelude, but that's a bit to Haskell-y :)

UPD2: Went with "Core library", see: https://github.com/tact-lang/tact-docs/pull/206#discussion_r1601833259

novusnota commented 1 month ago

Went a bit obsessive with wording, now pulled myself together and completing core-cells.mdx page. I'll push updates related to it in 1~2 hours, once I ensure the same simple style across descriptions there.

Unrelated, but we may have to catch more lvalue expected before ~load_ref things (happens when one tries to .loadThing() from a function return, like emptySlice().loadRef()) so that we display error message before FunC does it.

novusnota commented 1 month ago

@anton-trunov ready for review! Refined everything I could, added missing functions and additionally added a warning-ish note about making strict schemes for cell serialization/deserialization using TL-B

anton-trunov commented 1 month ago

Unrelated, but we may have to catch more lvalue expected before ~load_ref things (happens when one tries to .loadThing() from a function return, like emptySlice().loadRef()) so that we display error message before FunC does it.

@novusnota could you please open an issue with reproduction steps in tact-lang/tact?

novusnota commented 1 month ago

@anton-trunov Sure thing, and I think that we may open another one too regarding skipBits() function — it's impossible to assign values from it due to its return type being (slice, ()) in FunC