-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,653 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) 2019, sCrypt Inc | ||
# This file is distributed under the same license as the sCrypt package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: sCrypt\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2020-09-30 16:42-0700\n" | ||
"PO-Revision-Date: 2020-10-01 00:49+0000\n" | ||
"Language-Team: Chinese (China) (https://www.transifex.com/scrypt/teams/113667/zh_CN/)\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Language: zh_CN\n" | ||
"Plural-Forms: nplurals=1; plural=0;\n" | ||
|
||
# 912f11d9500f4d9382a96b92ae6fc810 | ||
#: ../../ackermann.rst:3 | ||
msgid "Ackermann Function" | ||
msgstr "" | ||
|
||
# 976f79eac8324ef3b2911d380accb49e | ||
#: ../../ackermann.rst:5 | ||
msgid "" | ||
"The Ackermann function is a classic example of a recursive function, notable" | ||
" especially because it is not a primitive recursive function. It grows very " | ||
"quickly in value, as does the size of its call tree. The Ackermann function " | ||
"is usually defined as follows:" | ||
msgstr "" | ||
|
||
# b14b4ded3a6c436e85f1848bc13645d5 | ||
#: ../../ackermann.rst:8 | ||
msgid "" | ||
"A(m, n) = \\begin{cases} n+1 & \\mbox{if } m = 0 \\\\ A(m-1, 1) & \\mbox{if " | ||
"} m > 0 \\mbox{ and } n = 0 \\\\ A(m-1, A(m, n-1)) & \\mbox{if } m > 0 " | ||
"\\mbox{ and } n > 0. \\end{cases}" | ||
msgstr "" | ||
|
||
# c380afc23c554d4bbb98953a0ce9b66b | ||
#: ../../ackermann.rst:18 | ||
msgid "" | ||
"nCrypt has devised a way to calculate the value of the Ackermann function " | ||
"using `native scripts`_. But it is definitely non-trivial. Below we present " | ||
"a much simpler version." | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) 2019, sCrypt Inc | ||
# This file is distributed under the same license as the sCrypt package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: sCrypt\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2020-09-30 16:42-0700\n" | ||
"PO-Revision-Date: 2020-10-01 00:49+0000\n" | ||
"Language-Team: Chinese (China) (https://www.transifex.com/scrypt/teams/113667/zh_CN/)\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Language: zh_CN\n" | ||
"Plural-Forms: nplurals=1; plural=0;\n" | ||
|
||
# 0f4aa1bb8bb1442281db08946a9e0b2a | ||
#: ../../asm.rst:3 | ||
msgid "Inline Assembly" | ||
msgstr "" | ||
|
||
# 60a75189b9454e9c9c99513b8298d719 | ||
#: ../../asm.rst:4 | ||
msgid "" | ||
"Script is a low-level language and acts as assembly for the `Bitcoin Virtual" | ||
" Machine <https://medium.com/@xiaohuiliu/introduction-to-bitcoin-smart-" | ||
"contracts-9c0ea37dc757>`_. Usually, developers do not have to deal with it " | ||
"directly and can use high-level languages like sCrypt. However, there are " | ||
"cases where using Script is desirable. For example, customized script is " | ||
"optimized and thus more efficient than script generated by sCrypt. Or script" | ||
" is generated using external tools (like `MiniForth " | ||
"<https://powping.com/posts/95e53a7305ad9d333d072575946d0cfd0d6321f40af40f9c66c70955ada94e58>`_)" | ||
" and needs to be integrated into sCrypt." | ||
msgstr "" | ||
|
||
# b75bdb093175461da9b63fd756c72c50 | ||
#: ../../asm.rst:9 | ||
msgid "" | ||
"Script can be embedded directly into sCrypt source code using assembly " | ||
"representation. An sCrypt function can be written in Script and called like " | ||
"a regular sCrypt function." | ||
msgstr "" | ||
|
||
# be3cecb0de45422eb2c03dcf59a1be3e | ||
#: ../../asm.rst:12 | ||
msgid "Calling Convention" | ||
msgstr "" | ||
|
||
# bbe83d697e6847549fbae116c8c96f2c | ||
#: ../../asm.rst:13 | ||
msgid "" | ||
"For a function to be written in Script, its entire body must be enclosed by " | ||
"``asm`` mode. Function parameters are on top of the stack, in reverse order " | ||
"as declared. For example, for a function with signature ``function foo(int " | ||
"p0, bytes p1, bool p2): int``, ``p2`` will be top of the stack, ``p1`` " | ||
"second from top, and ``p0`` third from top when entering ``asm`` mode. When " | ||
"exiting ``asm`` mode, all parameters must be poped and replaced with a " | ||
"single returned result on top of the stack. All other items in the stack " | ||
"must remain intact." | ||
msgstr "" | ||
|
||
# c843e69725124d00b5130fb9e4fe9045 | ||
#: ../../asm.rst:18 | ||
msgid "Two assembly functions are shown below." | ||
msgstr "" | ||
|
||
# 5cb60dbb676348a59b0cfcc748e9028d | ||
#: ../../asm.rst:38 | ||
msgid "Assembly Variable" | ||
msgstr "" | ||
|
||
# acb5d7db916b46edbb74c5533abd77eb | ||
#: ../../asm.rst:39 | ||
msgid "" | ||
"Variables can be used inside ``asm`` mode by prefix ``$``. Unlike the rest " | ||
"of Script, which is copied verbatim into the final script output, a variable" | ||
" is prefixed by its scope to avoid name collision, uniquely identified by " | ||
"the function and contract it is within. For example, supposed a variable " | ||
"``$var`` is used inside function ``func`` inside contract ``contractFoo``, " | ||
"it will show up in the final script output as ``$contractFoo.func.var``." | ||
msgstr "" | ||
|
||
# 4e10c560fa5a448495775ff176f21f22 | ||
#: ../../asm.rst:43 | ||
msgid "An example is shown below." | ||
msgstr "" | ||
|
||
# c609dd50356a408fa799829fa5a25fc2 | ||
#: ../../asm.rst:58 | ||
msgid "Notes" | ||
msgstr "" | ||
|
||
# f14bef88119f49aaacc01a5db995a2b0 | ||
#: ../../asm.rst:59 | ||
msgid "" | ||
"Inline assembly bypasses many features of sCrypt such as type checking. " | ||
"Extreme caution has to be taken using this advanced feature. Also it is " | ||
"case-insensitive for compatibility with external tools." | ||
msgstr "" |
Oops, something went wrong.