Tutorial: TVM assembly, Fift and the difference
ProgramCrafter opened this issue · comments
Summary
Most people don't see difference between Fift and TVM assembly and are thus confused when try truly low-level programming.
Context
There was a beautiful attempt to convert number into string:
slice int_to_string(int x) asm "(.) $>s PUSHSLICE";
Victor,
@tondev
Telegram chat
It didn't work because (.)
is a Fift primitive, not TVM instruction.
Goals
- Write article covering all Fift syntax and features, preferably with examples from toncli's Asm.fif/etc ("deep dive")
- Write article describing in brief what is Fift, what is TVM assembly and what's the difference between them ("brief course")
Deliverables
- Ready articles for https://ton.org/docs/
Definition of Done
- Both articles done
Reward
- Standard TON Footstep NFT
- $900 in TON equivalent ($450 * 2)
Total: $900
I agree that it is necessary to cover this topic in docs. I experienced the same problems with understanding the difference between Fift and TVM-assembly, and I think a lot of beginner devs too.
@ProgramCrafter would you like to write these articles yourself?
@Gusarich OK!
But I need to mention I don't know how to make wide tables fully visible so that CSS code is manageable. Hope I'll understand how to do that when I get to that part)
After some thinking I've decided that fixing style of instruction table would produce unmanageable code.
Though, the fix is done on my fork: ProgramCrafter/ton-docs@aaf99d8
Can't understand properly https://ton.org/docs/develop/fift-and-tvm-assembly
- Can we add more examples?
- Adding the code syntax highlights support! Right now, the docs are hard to read those fift codes in practice. I think no one read it seriously! If no one watch = meaningless. Can we let https://ton.org/docs support .fift code or .fc code?