From 0f787aff3e1a0f64ce66d449d963684e0c7a0b5f Mon Sep 17 00:00:00 2001
From: GitHub Action Telegram allows applying detailed message filters while looking for messages in chats.
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more. Telegram allows sending polls and quizes, that can be voted on by thousands, if not milions of users in chats and channels. Telegram allows sending polls and quizes, that can be voted on by thousands, if not millions of users in chats and channels. How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups. Telegram allows applying detailed message filters while looking for messages in chats.
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more. Telegram allows sending polls and quizes, that can be voted on by thousands, if not milions of users in chats and channels. Telegram allows sending polls and quizes, that can be voted on by thousands, if not millions of users in chats and channels. How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.Polls
-Admin, banned and default rights for channels, supergroups and groups
Discussion groups
diff --git a/data/corefork.telegram.org/api.html b/data/corefork.telegram.org/api.html
index a082817b82..8ad2a58850 100644
--- a/data/corefork.telegram.org/api.html
+++ b/data/corefork.telegram.org/api.html
@@ -133,7 +133,7 @@
Polls
-Admin, banned and default rights for channels, supergroups and groups
Discussion groups
diff --git a/data/corefork.telegram.org/api/layers.html b/data/corefork.telegram.org/api/layers.html
index d540221b0f..4d056bcd5c 100644
--- a/data/corefork.telegram.org/api/layers.html
+++ b/data/corefork.telegram.org/api/layers.html
@@ -1679,7 +1679,7 @@ Notice that all PINNED_*
updateLoginToken - A login token (for login via QR code) was accepted.
Files (JPG format when decrypted, max. 10 MB) are downloaded chunk by chunk as described in files », except that instead of generating an inputFileLocation, an inputFileLocation should be generated, instead.
id
field is the id
of the secureFileaccess_hash
field is the access_hash
of the secureFileTelegram allows sending polls and quizes, that can be voted on by thousands, if not milions of users in chats and channels.
+Telegram allows sending polls and quizes, that can be voted on by thousands, if not millions of users in chats and channels.
pollAnswer#6ca9c2e9 text:string option:bytes = PollAnswer;
diff --git a/data/corefork.telegram.org/api/terms.html b/data/corefork.telegram.org/api/terms.html
index 863a69b430..49ba822928 100644
--- a/data/corefork.telegram.org/api/terms.html
+++ b/data/corefork.telegram.org/api/terms.html
@@ -55,7 +55,7 @@
3. Advertising & Monetization
3.1. Developers are allowed to monetize their coding efforts through advertising or other legitimate means.
3.2. If you decide to monetize your app, you must clearly mention all the methods of monetization that are used in your app in all its app store descriptions.
-3.3. If your app allows accessing content from Telegram channels, you must include support for official sponsored messages in Telegram channels and may not interefere with this functionality.
+3.3. If your app allows accessing content from Telegram channels, you must include support for official sponsored messages in Telegram channels and may not interfere with this functionality.
4. Breach of terms
4.1. If your app violates these terms, we will notify the Telegram account responsible for the app about the breach of terms.
4.2. If you do not update the app to fix the highlighted issues within 10 days, we will have to discontinue your access to Telegram API and contact the app stores about the removal of your apps that are using the Telegram API in violation of these terms.
diff --git a/data/corefork.telegram.org/bots/api.html b/data/corefork.telegram.org/bots/api.html
index 18344b6377..78b0ee2fc3 100644
--- a/data/corefork.telegram.org/bots/api.html
+++ b/data/corefork.telegram.org/bots/api.html
@@ -8509,7 +8509,7 @@ No more than 50 results per query are allowed.
PassportFile
-This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
+This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10 MB.
diff --git a/data/corefork.telegram.org/constructor/auth.exportedAuthorization b/data/corefork.telegram.org/constructor/auth.exportedAuthorization
index b39e5167f2..119cfcd314 100644
--- a/data/corefork.telegram.org/constructor/auth.exportedAuthorization
+++ b/data/corefork.telegram.org/constructor/auth.exportedAuthorization
@@ -4,10 +4,10 @@
auth.exportedAuthorization
-
+
-
+
@@ -39,7 +39,7 @@
auth.exportedAuthorization
- Data for copying of authorization between data centres.
+ Data for copying of authorization between data centers.
-
diff --git a/data/corefork.telegram.org/constructor/auth.loginTokenSuccess b/data/corefork.telegram.org/constructor/auth.loginTokenSuccess
index aa878dbc08..6fce448bde 100644
--- a/data/corefork.telegram.org/constructor/auth.loginTokenSuccess
+++ b/data/corefork.telegram.org/constructor/auth.loginTokenSuccess
@@ -4,10 +4,10 @@
auth.loginTokenSuccess
-
+
-
+
@@ -39,7 +39,7 @@
auth.loginTokenSuccess
- Login via token (QR code) succeded!
+ Login via token (QR code) succeeded!
-
diff --git a/data/corefork.telegram.org/constructor/contacts.importedContacts b/data/corefork.telegram.org/constructor/contacts.importedContacts
index bd53fa9702..ff1c55f365 100644
--- a/data/corefork.telegram.org/constructor/contacts.importedContacts
+++ b/data/corefork.telegram.org/constructor/contacts.importedContacts
@@ -4,10 +4,10 @@
contacts.importedContacts
-
+
-
+
@@ -39,7 +39,7 @@
contacts.importedContacts
- Info on succesfully imported contacts.
+ Info on successfully imported contacts.
-
@@ -66,7 +66,7 @@
imported
Vector<ImportedContact>
-List of succesfully imported contacts
+List of successfully imported contacts
popular_invites
diff --git a/data/corefork.telegram.org/constructor/dcOption.html b/data/corefork.telegram.org/constructor/dcOption.html
index ef21d84922..172823a336 100644
--- a/data/corefork.telegram.org/constructor/dcOption.html
+++ b/data/corefork.telegram.org/constructor/dcOption.html
@@ -4,10 +4,10 @@
dcOption
-
+
-
+
@@ -39,7 +39,7 @@
dcOption
- Data centre
+ Data center
-
diff --git a/data/corefork.telegram.org/constructor/encryptedFile.html b/data/corefork.telegram.org/constructor/encryptedFile.html
index 149b046635..ccb0d2f408 100644
--- a/data/corefork.telegram.org/constructor/encryptedFile.html
+++ b/data/corefork.telegram.org/constructor/encryptedFile.html
@@ -81,7 +81,7 @@
dc_id
int
-Number of data centre
+Number of data center
key_fingerprint
diff --git a/data/corefork.telegram.org/constructor/encryptedFileEmpty.html b/data/corefork.telegram.org/constructor/encryptedFileEmpty.html
index 8c057bd4cc..391a585a42 100644
--- a/data/corefork.telegram.org/constructor/encryptedFileEmpty.html
+++ b/data/corefork.telegram.org/constructor/encryptedFileEmpty.html
@@ -4,10 +4,10 @@
encryptedFileEmpty
-
+
-
+
@@ -39,7 +39,7 @@
encryptedFileEmpty
- Empty constructor, unexisitng file.
+ Empty constructor, non-existing file.
-
diff --git a/data/corefork.telegram.org/constructor/inputAppEvent.html b/data/corefork.telegram.org/constructor/inputAppEvent.html
index 89345c323b..703c7d1f98 100644
--- a/data/corefork.telegram.org/constructor/inputAppEvent.html
+++ b/data/corefork.telegram.org/constructor/inputAppEvent.html
@@ -4,10 +4,10 @@
inputAppEvent
-
+
-
+
@@ -39,7 +39,7 @@
inputAppEvent
- Event that occured in the application.
+ Event that occurred in the application.
-
diff --git a/data/corefork.telegram.org/constructor/inputEncryptedFileBigUploaded.html b/data/corefork.telegram.org/constructor/inputEncryptedFileBigUploaded.html
index 206e8c59ad..6fbafa5fe1 100644
--- a/data/corefork.telegram.org/constructor/inputEncryptedFileBigUploaded.html
+++ b/data/corefork.telegram.org/constructor/inputEncryptedFileBigUploaded.html
@@ -4,10 +4,10 @@
inputEncryptedFileBigUploaded
-
+
-
+
@@ -39,7 +39,7 @@
inputEncryptedFileBigUploaded
- Assigns a new big encrypted file (over 10Mb in size), saved in parts using the method upload.saveBigFilePart.
+ Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method upload.saveBigFilePart.
-
@@ -84,7 +84,7 @@
Related pages
upload.saveBigFilePart
-Saves a part of a large file (over 10Mb in size) to be later passed to one of the methods.
+Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.
diff --git a/data/corefork.telegram.org/constructor/inputFileBig.html b/data/corefork.telegram.org/constructor/inputFileBig.html
index 9183868caf..9e1854a5ac 100644
--- a/data/corefork.telegram.org/constructor/inputFileBig.html
+++ b/data/corefork.telegram.org/constructor/inputFileBig.html
@@ -4,10 +4,10 @@
inputFileBig
-
+
-
+
@@ -39,7 +39,7 @@
inputFileBig
- Assigns a big file (over 10Mb in size), saved in part using the method upload.saveBigFilePart.
+ Assigns a big file (over 10 MB in size), saved in part using the method upload.saveBigFilePart.
-
@@ -84,7 +84,7 @@
Related pages
upload.saveBigFilePart
-Saves a part of a large file (over 10Mb in size) to be later passed to one of the methods.
+Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.
diff --git a/data/corefork.telegram.org/constructor/inputSecureFile.html b/data/corefork.telegram.org/constructor/inputSecureFile.html
index 585b9ad722..848a34fcb4 100644
--- a/data/corefork.telegram.org/constructor/inputSecureFile.html
+++ b/data/corefork.telegram.org/constructor/inputSecureFile.html
@@ -4,10 +4,10 @@
inputSecureFile
-
+
-
+
@@ -39,7 +39,7 @@
inputSecureFile
- Preuploaded passport file, for more info see the passport docs »
+ Pre-uploaded passport file, for more info see the passport docs »
-
diff --git a/data/corefork.telegram.org/constructor/messages.affectedHistory b/data/corefork.telegram.org/constructor/messages.affectedHistory
index 2c0bbb68ca..40bf535748 100644
--- a/data/corefork.telegram.org/constructor/messages.affectedHistory
+++ b/data/corefork.telegram.org/constructor/messages.affectedHistory
@@ -66,7 +66,7 @@
pts
int
-Number of events occured in a text box
+Number of events occurred in a text box
pts_count
diff --git a/data/corefork.telegram.org/constructor/messages.messages b/data/corefork.telegram.org/constructor/messages.messages
index 03b55922b8..e6e8d29d8a 100644
--- a/data/corefork.telegram.org/constructor/messages.messages
+++ b/data/corefork.telegram.org/constructor/messages.messages
@@ -4,10 +4,10 @@
messages.messages
-
+
-
+
@@ -39,7 +39,7 @@
messages.messages
- Full list of messages with auxilary data.
+ Full list of messages with auxiliary data.
-
diff --git a/data/corefork.telegram.org/constructor/messages.sentEncryptedMessage b/data/corefork.telegram.org/constructor/messages.sentEncryptedMessage
index 983d20e21c..426fbba4c7 100644
--- a/data/corefork.telegram.org/constructor/messages.sentEncryptedMessage
+++ b/data/corefork.telegram.org/constructor/messages.sentEncryptedMessage
@@ -4,10 +4,10 @@
messages.sentEncryptedMessage
-
+
-
+
@@ -39,7 +39,7 @@
messages.sentEncryptedMessage
- Message without file attachemts sent to an encrypted file.
+ Message without file attachments sent to an encrypted file.
-
diff --git a/data/corefork.telegram.org/constructor/nearestDc.html b/data/corefork.telegram.org/constructor/nearestDc.html
index bbf6052ad0..5b5b848efb 100644
--- a/data/corefork.telegram.org/constructor/nearestDc.html
+++ b/data/corefork.telegram.org/constructor/nearestDc.html
@@ -4,10 +4,10 @@
nearestDc
-
+
-
+
@@ -39,7 +39,7 @@
nearestDc
-
diff --git a/data/corefork.telegram.org/constructor/phoneCallDiscardReasonBusy.html b/data/corefork.telegram.org/constructor/phoneCallDiscardReasonBusy.html
index bd04eb65ef..7decd38236 100644
--- a/data/corefork.telegram.org/constructor/phoneCallDiscardReasonBusy.html
+++ b/data/corefork.telegram.org/constructor/phoneCallDiscardReasonBusy.html
@@ -4,10 +4,10 @@
phoneCallDiscardReasonBusy
-
+
-
+
@@ -39,7 +39,7 @@
phoneCallDiscardReasonBusy
- The phone call was discared because the user is busy in another call
+ The phone call was discarded because the user is busy in another call
-
diff --git a/data/corefork.telegram.org/constructor/updateLangPackTooLong.html b/data/corefork.telegram.org/constructor/updateLangPackTooLong.html
index 9e51363cf4..fbc53eadd7 100644
--- a/data/corefork.telegram.org/constructor/updateLangPackTooLong.html
+++ b/data/corefork.telegram.org/constructor/updateLangPackTooLong.html
@@ -74,7 +74,7 @@
Related pages
langpack.getDifference
-Get new strings in languagepack
+Get new strings in language pack
diff --git a/data/corefork.telegram.org/constructor/updates.state b/data/corefork.telegram.org/constructor/updates.state
index b07f7e97ca..2aa7d77521 100644
--- a/data/corefork.telegram.org/constructor/updates.state
+++ b/data/corefork.telegram.org/constructor/updates.state
@@ -66,7 +66,7 @@
pts
int
-Number of events occured in a text box
+Number of events occurred in a text box
qts
diff --git a/data/corefork.telegram.org/method/auth.exportAuthorization b/data/corefork.telegram.org/method/auth.exportAuthorization
index a813e1c76e..0bc8b3c794 100644
--- a/data/corefork.telegram.org/method/auth.exportAuthorization
+++ b/data/corefork.telegram.org/method/auth.exportAuthorization
@@ -4,10 +4,10 @@
auth.exportAuthorization
-
+
-
+
@@ -39,7 +39,7 @@
auth.exportAuthorization
- Returns data for copying authorization to another data-centre.
+ Returns data for copying authorization to another data-center.
-
@@ -68,7 +68,7 @@
dc_id
int
-Number of a target data-centre
+Number of a target data-center
diff --git a/data/corefork.telegram.org/method/auth.importAuthorization b/data/corefork.telegram.org/method/auth.importAuthorization
index 96868d1f5a..dc52a6881c 100644
--- a/data/corefork.telegram.org/method/auth.importAuthorization
+++ b/data/corefork.telegram.org/method/auth.importAuthorization
@@ -4,10 +4,10 @@
auth.importAuthorization
-
+
-
+
@@ -39,7 +39,7 @@
auth.importAuthorization
- Logs in a user using a key transmitted from his native data-centre.
+ Logs in a user using a key transmitted from his native data-center.
-
diff --git a/data/corefork.telegram.org/method/help.getNearestDc b/data/corefork.telegram.org/method/help.getNearestDc
index 5bf959f42c..b39c24dce1 100644
--- a/data/corefork.telegram.org/method/help.getNearestDc
+++ b/data/corefork.telegram.org/method/help.getNearestDc
@@ -4,10 +4,10 @@
help.getNearestDc
-
+
-
+
@@ -39,7 +39,7 @@
help.getNearestDc
- Returns info on data centre nearest to the user.
+ Returns info on data center nearest to the user.
-
diff --git a/data/corefork.telegram.org/method/langpack.getDifference b/data/corefork.telegram.org/method/langpack.getDifference
index 644c96bad5..408afaaa11 100644
--- a/data/corefork.telegram.org/method/langpack.getDifference
+++ b/data/corefork.telegram.org/method/langpack.getDifference
@@ -4,10 +4,10 @@
langpack.getDifference
-
+
-
+
@@ -39,7 +39,7 @@
langpack.getDifference
- Get new strings in languagepack
+ Get new strings in language pack
-
diff --git a/data/corefork.telegram.org/method/upload.saveBigFilePart b/data/corefork.telegram.org/method/upload.saveBigFilePart
index bca0225981..cd009d24c9 100644
--- a/data/corefork.telegram.org/method/upload.saveBigFilePart
+++ b/data/corefork.telegram.org/method/upload.saveBigFilePart
@@ -4,10 +4,10 @@
upload.saveBigFilePart
-
+
-
+
@@ -39,7 +39,7 @@
upload.saveBigFilePart
- Saves a part of a large file (over 10Mb in size) to be later passed to one of the methods.
+ Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.
-
diff --git a/data/corefork.telegram.org/methods.html b/data/corefork.telegram.org/methods.html
index 429dac3313..2cbea10334 100644
--- a/data/corefork.telegram.org/methods.html
+++ b/data/corefork.telegram.org/methods.html
@@ -124,7 +124,7 @@
help.getNearestDc
-Returns info on data centre nearest to the user.
+Returns info on data center nearest to the user.
help.getSupport
@@ -237,11 +237,11 @@
auth.exportAuthorization
-Returns data for copying authorization to another data-centre.
+Returns data for copying authorization to another data-center.
auth.importAuthorization
-Logs in a user using a key transmitted from his native data-centre.
+Logs in a user using a key transmitted from his native data-center.
auth.importBotAuthorization
@@ -830,7 +830,7 @@
upload.saveBigFilePart
-Saves a part of a large file (over 10Mb in size) to be later passed to one of the methods.
+Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.
upload.saveFilePart
@@ -1544,7 +1544,7 @@
langpack.getDifference
-Get new strings in languagepack
+Get new strings in language pack
langpack.getLangPack
diff --git a/data/corefork.telegram.org/mtproto/TL-abstract-types.html b/data/corefork.telegram.org/mtproto/TL-abstract-types.html
index f23f8d5c88..79f5d13c1a 100644
--- a/data/corefork.telegram.org/mtproto/TL-abstract-types.html
+++ b/data/corefork.telegram.org/mtproto/TL-abstract-types.html
@@ -42,7 +42,7 @@
TL Language defines abstract data types in the spirit of a general theory of types (more accurately, Martin-Löf’s theories of dependent intuitionistic types) without specifying the values of these types should be represented in memory, when saved to disk, or transmitted over a network. In contrast, the article on binary serialization discusses the problem of effective serialization of values of abstract types. To this end, the concept of a concrete or serialized type has been defined as the sets of serializations of all possible values of the corresponding abstract type. In this case, the serializations take values in the set A of words in the alphabet A*, which consists of 2^32 characters -- 32-bit integers.
In order to use a TL schema (e.g. “program”) in the TL language to describe the serialization of values of abstract types, we should explain how the concrete type [T] (subset [T] of A^) is associated with the abstract type T (defined in TL), and how the values of the abstract type T correspond to the values of the concrete type [T] (i.e. the elements of [T]*).
Serialization is the process of constructing an element of [T] based on a value of the abstract type T. The reverse process is deserialization.
-Values of the abstract type T may be represented in a different way. Typically, some sort of trees or graphs are used in memory or, if desired, a set of nodes may be used, each of which contains a certain tag (“node type”) and several pointers to other nodes and/or values of built-in primitive types such as int
. However, for general discussions it is useful to write the values of abstract type T as a string, more specifically, an S-expression. Recall that an S-expression is either an atom (the value of a primitive type, for example, an integer or a string constant in quotation marks; or an identifier that corresponds to a built-in or defined function) or a space-delimited list of S-expressions ending in parentheses. In our case, we use S-expressions, the first element of which is a combinator identifier, while the remaining elements (the number of which depends on the combinator’s arity) are S-expressions representing elements of the chosen combinator’s fields (or parameters). Moreover, the type of the arguments’ S-expressions and the type of the S-expressions of the result (e.g. the associated expression) must match.
+Values of the abstract type T may be represented in a different way. Typically, some sort of trees or graphs are used in memory or, if desired, a set of nodes may be used, each of which contains a certain tag (“node type”) and several pointers to other nodes and/or values of built-in primitive types such as int
. However, for general discussions it is useful to write the values of abstract type T as a string, more specifically, an S-expression. Recall that an S-expression is either an atom (the value of a primitive type, for example, an integer or a string constant in quotation marks; or an identifier that corresponds to a built-in or defined function) or a space-delimited list of S-expressions ending in parentheses. In our case, we use S-expressions, the first element of which is a combinator identifier, while the remaining elements (the number of which depends on the combinator's arity) are S-expressions representing elements of the chosen combinator's fields (or parameters). Moreover, the type of the arguments’ S-expressions and the type of the S-expressions of the result (e.g. the associated expression) must match.
For example, for the schema
pair x:int y:int = Pair;
pnil = PairList;
@@ -94,7 +94,7 @@ pcons hd:Pair tl:PairList = PairList;
From the perspective of abstract type theory, naked types (in contrast to built-in primitive types like int
and string
are unnecessary. However, they are extremely useful in practice.
Therefore, TL introduces the (partially defined) idempotent unary operator %
, which turns a standard functional (e.g. an expression of type ...->Type or simply Type) into a different standard functional of the same type. If T is a type, then from an abstract theoretical point of view, %T
is equivalent to c(T). In other words, the values of %T
are the constant values of T. If T is a k-arity standard expression, then T : S1 -> ... -> Sk -> Type, where each Si=Type or #, then by definition %T
is a k-arity standard expression with the same arity, which is defined by the equation (%T) a1 ... ak = % (T a1 ... ak).
When a constant value of type %T
is serialized, it is first serialized as a value of type T (assuming that T is not already a naked type itself). Then the first character of the serialization is discarded (e.g. the name of the enclosing combinator). Therefore, %T
is a only a valid type expression if there is not more than one constructor for %T
. The expression %T
, where T : S1 -> ... -> Sk -> Type, is valid, if for any choice of parameters a1 : S1, ... , ak : Sk, the type T a1 ... ak does not have more than one constructor. Using %
in other instances is incorrect.
-If for every value of the parameters a1 : S1, ..., ak : Sk, there is exactly one constructor C for T a1 ... ak, then TL allows writing C a1 ... ak
instead of %T a1 ... ak
or %(T a1 .. ak)
. In other words, in certain situations the identifier C
is a synonym for %T
. This is only allowed in the context of a type (when specifying the type of a combinator’s field or result).
+If for every value of the parameters a1 : S1, ..., ak : Sk, there is exactly one constructor C for T a1 ... ak, then TL allows writing C a1 ... ak
instead of %T a1 ... ak
or %(T a1 .. ak)
. In other words, in certain situations the identifier C
is a synonym for %T
. This is only allowed in the context of a type (when specifying the type of a combinator's field or result).
Moreover, it is assumed that %Int = int
and %String = string
.
!
modifier
In TL, the idempotent operator !
can modify any type, actually making surface values be allowed when its constant values are serialized. However, if T is a standard function like S1->..->Sr->Type, then !T is defined using the equation (!T) a1 ... ar = !(T a1 ... ar)
, for any a1:S1, ..., ar:Sr.
diff --git a/data/corefork.telegram.org/mtproto/TL-combinators.html b/data/corefork.telegram.org/mtproto/TL-combinators.html
index 4d6c7dc85c..db917e56e8 100644
--- a/data/corefork.telegram.org/mtproto/TL-combinators.html
+++ b/data/corefork.telegram.org/mtproto/TL-combinators.html
@@ -67,10 +67,10 @@ Combinators in TL are…">
A combinator identifier is either an identifier starting with a lowercase Latin letter (lc-ident), or a namespace identifier (also lc-ident) followed by a period and another lc-ident. Therefore, cons
and lists.get
are valid combinator identifiers.
-
-
A combinator has a name, also known as a number (not to be confused with the designation) -- a 32-bit number that unambiguously determines it. It is either calculated automatically (see below) or it is explicitly assigned in the declaration. To do this, a hash mark (#
) and exactly 8 hexadecimal digits -- the combinator’s name -- are added to the identifier of the combinator being defined.
+A combinator has a name, also known as a number (not to be confused with the designation) -- a 32-bit number that unambiguously determines it. It is either calculated automatically (see below) or it is explicitly assigned in the declaration. To do this, a hash mark (#
) and exactly 8 hexadecimal digits -- the combinator's name -- are added to the identifier of the combinator being defined.
-
-
A combinator’s declaration begins with its identifier, to which its name (separated by a hash mark) may have been added.
+A combinator's declaration begins with its identifier, to which its name (separated by a hash mark) may have been added.
-
After the combinator identifier comes the main part of the declaration, which consists of declarations of fields (or variables), including an indication of their types.
@@ -101,7 +101,7 @@ Combinators in TL are…">
All optional fields must be explicitly named (using _
instead of field_i is not allowed).
-
-
Moreover, at present the names of all optional fields must share the combinator’s result type (possibly more than once) and themselves be of type #
(i,e., nat
) or Type
. Therefore, if the exact result type is known, it is possible to determine the values of all of the combinator’s implicit parameters (possibly obtaining a contradiction of the form 2=3
in doing so, which means that the combinator is not allowed in the context).
+Moreover, at present the names of all optional fields must share the combinator's result type (possibly more than once) and themselves be of type #
(i,e., nat
) or Type
. Therefore, if the exact result type is known, it is possible to determine the values of all of the combinator's implicit parameters (possibly obtaining a contradiction of the form 2=3
in doing so, which means that the combinator is not allowed in the context).
Required field declarations
@@ -122,7 +122,7 @@ Combinators in TL are…">
Required field declarations follow one after another, separated by spaces (by any number of whitespace symbols, to be more precise).
-
-
The declared field’s type (type-expr) may use the declared combinator’s previously defined variables (fields) as subexpressions (i.e. parameter values). For example:
+The declared field’s type (type-expr) may use the declared combinator's previously defined variables (fields) as subexpressions (i.e. parameter values). For example:
nil {X:Type} = List X;
cons {X:Type} hd:X tl:(list X) = List X;
typed_list (X:Type) (l : list X) = TypedList;
@@ -131,7 +131,7 @@ typed_list (X:Type) (l : list X) = TypedList;
Repetitions
-
-
These may only exist among required parameters. They have the form [ field-id :
] [ multiplicity *
] [
args ]
, where args has the same format as the combinator’s declaration of (several) required fields, except that all of the enclosing combinator’s previously declared fields may be used in the argument types.
+These may only exist among required parameters. They have the form [ field-id :
] [ multiplicity *
] [
args ]
, where args has the same format as the combinator's declaration of (several) required fields, except that all of the enclosing combinator's previously declared fields may be used in the argument types.
-
The name of a field of an enclosing combinator that receives a repetition as a value may be specified (field-id), or bypassed, which is equivalent to using the underscore sign as a field-id.
diff --git a/data/corefork.telegram.org/mtproto/TL-dependent.html b/data/corefork.telegram.org/mtproto/TL-dependent.html
index bb1c22e608..d81e3ac97b 100644
--- a/data/corefork.telegram.org/mtproto/TL-dependent.html
+++ b/data/corefork.telegram.org/mtproto/TL-dependent.html
@@ -129,7 +129,7 @@ Vector : Type -> Type;
vector {X:Type} n:# v:(%Tuple X n) = Vector X;
Nevertheless, our Tuple
has its advantages. For example, we can define data types such as:
matrix_10x10 a:(%Tuple (%Tuple double 10) 10) = Matrix_10x10;
-In any event, remember that during calculation of the matrix_10x10
combinator’s number, all parentheses must be removed and the CRC32 of the string matrix_10x10 a:%Tuple %Tuple double 10 10 = Matrix_10x10
must be computed.
+In any event, remember that during calculation of the matrix_10x10
combinator's number, all parentheses must be removed and the CRC32 of the string matrix_10x10 a:%Tuple %Tuple double 10 10 = Matrix_10x10
must be computed.
Moreover, we can define arbitrarily-sized matrices:
matrix {X:Type} m:# n:# a:(%Tuple (%Tuple X m) n) = Matrix X;
In this case using vector would result in storing the length of a row (m) in each row, e.g. n times.
@@ -152,10 +152,10 @@ vector {X:Type} # [ X ] = Vector X;
Optional combinator parameters in TL must possess the following properties:
-
-
Optional parameters must be precisely ythe combinator’s first several arguments;
+Optional parameters must be precisely ythe combinator's first several arguments;
-
-
The value of any optional parameter must be entirely determined by the combinator’s result type.
+The value of any optional parameter must be entirely determined by the combinator's result type.
For example, in cons {X:Type} hd:X tl:(list X) = list X
the parameter X
may be made optional, because it is located at the very beginning of the argument list and is unambiguously determined by the list X
result type. Similarly, in tcons {X:Type} {n:#} hd:X tl:(%Tuple X n) = Tuple X (S n)
the values of X and n are completely determined based on the Tuple X (S n)
result type, therefore they made be made optional parameters.
diff --git a/data/corefork.telegram.org/mtproto/TL-formal.html b/data/corefork.telegram.org/mtproto/TL-formal.html
index 1bccc7538d..52f8a42e66 100644
--- a/data/corefork.telegram.org/mtproto/TL-formal.html
+++ b/data/corefork.telegram.org/mtproto/TL-formal.html
@@ -148,7 +148,7 @@ For the syntax of patterns, see in article Formal declarat
result-type ::= boxed-type-ident { subexpr }
result-type ::= boxed-type-ident <
subexpr { ,
subexpr } >
-See Formal declaration of TL combinators for a description of what exactly this means. Here we will only note that when declaring the type of a combinator’s next argument, only the names of previously arranged (more to the left) arguments of the same combinator may be used as variables, but when declaring the result type you can use all of its parameters (of type Type
and #
).
+See Formal declaration of TL combinators for a description of what exactly this means. Here we will only note that when declaring the type of a combinator's next argument, only the names of previously arranged (more to the left) arguments of the same combinator may be used as variables, but when declaring the result type you can use all of its parameters (of type Type
and #
).
Note that the names of combinators declared in this way may be used in TL itself only as the corresponding bare types. The only combinators that appear in declarations are built-in: O : #
and S : # -> #
.
There are also “pseudo-declarations” that are allowed only to declare built-in types (such as int ? = Int;
):
diff --git a/data/corefork.telegram.org/mtproto/TL-optargs.html b/data/corefork.telegram.org/mtproto/TL-optargs.html
index 8aa55122a6..171b87fb63 100644
--- a/data/corefork.telegram.org/mtproto/TL-optargs.html
+++ b/data/corefork.telegram.org/mtproto/TL-optargs.html
@@ -4,10 +4,10 @@
Optional combinator parameters and their values
-
+
-
+
@@ -39,15 +39,15 @@
Optional combinator parameters and their values
- TL Language makes it possible to declare a combinator’s first few parameters optional. Subsequently, they are almost never required to be explicitly stated. This is directly related to another important property of TL: polymorphism.
+ TL Language makes it possible to declare a combinator's first few parameters optional. Subsequently, they are almost never required to be explicitly stated. This is directly related to another important property of TL: polymorphism.
All optional parameters are typically required to be part of the result type (at least once).
A (sub)expression may be serialized/deserialized in one of two ways:
-
-
The result type is known (for example, we’re parsing the response to a previously sent RPC query and therefore know the value of some type is expected). In this case, the result type may be used to determine the values of the combinator’s implicit parameters.
+The result type is known (for example, we’re parsing the response to a previously sent RPC query and therefore know the value of some type is expected). In this case, the result type may be used to determine the values of the combinator's implicit parameters.
-
-
The result type is not known. It is determined as a result of (de)serialization (for example, we are serializing an RPC query). In this case, it is necessary to explicitly specify (and serialize) all of the combinator’s optional parameters by using the full version of the combinator.
+The result type is not known. It is determined as a result of (de)serialization (for example, we are serializing an RPC query). In this case, it is necessary to explicitly specify (and serialize) all of the combinator's optional parameters by using the full version of the combinator.
We will assume that the functional combinator only differs from the constructor in that before its result type the !
modifier is implicitly added, and the (remote or local) computation of a functional expression may be presented as the execution of some polymorphic function eval : !X -> X
.
diff --git a/data/corefork.telegram.org/mtproto/TL-polymorph.html b/data/corefork.telegram.org/mtproto/TL-polymorph.html
index 658321fb15..d37d6318ac 100644
--- a/data/corefork.telegram.org/mtproto/TL-polymorph.html
+++ b/data/corefork.telegram.org/mtproto/TL-polymorph.html
@@ -92,7 +92,7 @@ nil : forall (X:Type), X -> List X;
There is a small problem: if we want to serialize the value of the bare type ‘%pair string int’ or ‘%pair string Y’ (which in TL is usually denoted simply as “pair”, though the form “%Pair” is preferable), we cannot simultaneously use both the full constructor @pair and the partial pair, because the constructor’s name will not be serialized. Therefore, we must differentiate the bare types %@pair (type X, type Y, value x:X, and value y:Y are serialized) and %pair (only x:X and y:Y are serialized; types X and Y are known from the context). In practice, we nearly almost always need the bare type %pair, and this is precisely what “pair” means in the type’s context in TL. Therefore,
record name:string map:(List (pair int string)) = Record;
will be serialized approximately like we want it to be (the serialization of list elements will consist of the serialization of int and the serialization of string, without any additional headers, types, or combinator names).
-Incidentally, when calculating the “record” combinator’s name 'record' in the example given above, the CRC32 of record name:string map:List pair int string = Record
will be computed.
+Incidentally, when calculating the “record” combinator's name 'record' in the example given above, the CRC32 of record name:string map:List pair int string = Record
will be computed.
Also note that a more precise description of this type would be
record name:string map:(List %(Pair int string)) = Record
diff --git a/data/corefork.telegram.org/mtproto/TL.html b/data/corefork.telegram.org/mtproto/TL.html
index e89117151f..f79c1de122 100644
--- a/data/corefork.telegram.org/mtproto/TL.html
+++ b/data/corefork.telegram.org/mtproto/TL.html
@@ -75,7 +75,7 @@
A TL program usually consists of two sections separated by keyword ---functions---
. The first section consists of declarations of built-in types and aggregate types (i.e. their constructors). The second section consists of the declared functions, i.e. functional combinators.
Actually, both the first and second sections consist of combinator declarations, each of which ends with a semicolon. However, the first section contains only constructors, while the second section only involves functions. Each combinator is declared using a “combinator declaration” in the format explained above. However, the combinator number and field names may be explicitly assigned.
If additional type declarations are required after functions have been declared, the keyword (section divider) ---types---
is used. Furthermore, a functional combinator may be declared in the type section if its result type begins with an exclamation point (in fact, when the function section is interpreted, this exclamation point is added automatically).
-To explicitly define 32-bit names of combinators, a hash mark (#) is added immediately after the combinator’s name, followed by 8 hexadecimal digits.
+To explicitly define 32-bit names of combinators, a hash mark (#) is added immediately after the combinator's name, followed by 8 hexadecimal digits.
Namespaces
Composite constructions like <namespace_identifier>.<constructor_identifier>
and <namespace_identifier>.<Type_identifier>
can be used as constructor- or type identifiers. The portion of the identifier to the left of the period is called the namespace. Moreover, the rule about a first uppercase letter in type identifiers and lowercase letter in constructor identifiers applies to the part of the construction after the period. For example, auth.Message
would be a type, while auth.std_message
would be a constructor.
Namespaces do not require a special declaration.
diff --git a/data/corefork.telegram.org/passport.html b/data/corefork.telegram.org/passport.html
index ffcc341cc7..255c367653 100644
--- a/data/corefork.telegram.org/passport.html
+++ b/data/corefork.telegram.org/passport.html
@@ -377,7 +377,7 @@ This is just a list of data types that can be requested, and the encrypted objec
PassportFile
-This object represents a PassportFile related to a document. The file is up to 10MB in size and in the .jpg format.
+This object represents a PassportFile related to a document. The file is up to 10 MB in size and in the .jpg format.
Receiving information
When the user confirms your request by pressing the 'Authorize' button, the Bot API sends an Update with the field passport_data to the bot that contains encrypted Telegram Passport data.
diff --git a/data/corefork.telegram.org/passport/encryption.html b/data/corefork.telegram.org/passport/encryption.html
index 8aed498b38..8d432884c1 100644
--- a/data/corefork.telegram.org/passport/encryption.html
+++ b/data/corefork.telegram.org/passport/encryption.html
@@ -305,7 +305,7 @@ Data must be in JSON format and not TL, as it has to be passed directly to the s
---functions---
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;
-Files (JPG format, max. 10MB) are encrypted and padded (see Encryption), and then uploaded chunk by chunk as described in files », except that instead of generating an inputFile, an inputSecureFile should be generated, instead.
+Files (JPG format, max. 10 MB) are encrypted and padded (see Encryption), and then uploaded chunk by chunk as described in files », except that instead of generating an inputFile, an inputSecureFile should be generated, instead.
md5_checksum
is to be set to the MD5 hash of the encrypted file, for a server-side integrity check.file_hash
field should be set to the data_hash of the data.Information for connection to data centre.
+Information for connection to data center.
Object contains info about an event that occured in the application.
+Object contains info about an event that occurred in the application.
Object contains info on nearest data centre.
+Object contains info on nearest data center.
Object contains info on events occured.
+Object contains info on events occurred.
Oject contains info on user authorization.
+Object contains info on user authorization.
Object contains info on succesfully imported contacts.
+Object contains info on successfully imported contacts.
Contains info on cofiguring parameters for key generation by Diffie-Hellman protocol.
-Contains Diffie-Hellman key generation protocol parameters. +
Object contains infor on list of messages with auxiliary data.
+Object contains information on list of messages with auxiliary data.