Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

feat: big update, Language→Reference #206

Merged
merged 26 commits into from
May 21, 2024

Conversation

novusnota
Copy link
Member

@novusnota novusnota commented Apr 29, 2024

Brace yourself wanderer, a HUGE update is ahead:

  • Renamed Language to Reference
  • Added related redirects
  • Fixed cross-links from and onto other pages of the docs
  • Added missing and new functions: dumpStack(), pow2(), log(), log2(), Address.toString(), StringBuilder.concat(),
  • Improved description of pow() function and other compile-time functions (with notes, when they can work at run-time too)
  • Added Address type to the list of possible argument types of dump() function
  • Added a note about @stdlib/stoppable now auto-importing @stdlib/ownable
  • Specified reserve mode constants: ReserveExact, ReserveAllExcept, ReserveAtMost, ReserveAddOriginalBalance, ReserveInvertSign, `ReserveBounceIfActionFail
  • Added couple of old, but missing functions
  • Re-wrote all (!) of the descriptions
  • Added usage examples to virtually any (!) function

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 novusnota requested a review from anton-trunov May 14, 2024 00:38
@novusnota novusnota changed the title feat: Language→Reference, a big update! feat: big rename and update, Language→Reference May 14, 2024
@novusnota novusnota changed the title feat: big rename and update, Language→Reference feat: big update, Language→Reference May 14, 2024
@novusnota novusnota marked this pull request as ready for review May 14, 2024 02:13
@novusnota
Copy link
Member Author

Ready for review, whew

Co-authored-by: Anton Trunov <anton.a.trunov@gmail.com>
@novusnota
Copy link
Member Author

novusnota commented May 14, 2024

@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: #206 (comment)

@novusnota novusnota modified the milestone: v1.3.0 May 15, 2024
@novusnota
Copy link
Member Author

novusnota commented May 20, 2024

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
Copy link
Member Author

@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
Copy link
Member

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?

@anton-trunov anton-trunov merged commit 53a77a1 into tact-lang:main May 21, 2024
1 check passed
@novusnota novusnota deleted the language/reference branch May 21, 2024 08:38
@novusnota
Copy link
Member Author

novusnota commented May 21, 2024

@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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants