doc: update concept and add specification

This commit is contained in:
Artemy Egorov 2024-07-23 11:55:01 +03:00
parent 94dbe8dd17
commit 9841577297
2 changed files with 60 additions and 2 deletions

View file

@ -6,16 +6,38 @@
</div> </div>
Simple markup language сombining small file size, big number of possibilities for describing the interface and readability. Markup language ecosystem сombining small file size, big number of possibilities for describing the interface and readability.
Specification is coming soon. [Specification](./specification/main.md).
## Concept ## Concept
This is daleth (high level language that translates to daletl).
```yaml ```yaml
# tag: body
# each line is a new tag (if not {}, () is used)
h1: TxtDot revolution h1: TxtDot revolution
p: TxtDot is a cool project p: TxtDot is a cool project
# If no tag is specified, then the 'element' tag, the most primitive tag, is placed
(
Check dalet too
This is one paragraph
)
This is another paragraph
# [ ] for arguments
row[center]: {
link[https://github.com/txtdot/txtdot]: Homepage
button[https://example.com/donate]: {
# tag without body
img[https://example.com/donate.png]
Donate
}
}
# {} for multiple objects # {} for multiple objects
row: { row: {
{ {
@ -46,6 +68,14 @@ row: {
npm install npm install
npm run dev npm run dev
) )
# (~n Text) n is number of minimum spaces
code[markdown]: (~4
this is codeblock
)
# (# Text) Text after "(# " not modified
code[markdown]: (# this is codeblock)
} }
{ {

28
specification/main.md Normal file
View file

@ -0,0 +1,28 @@
# Dalet
> [!WARNING]
> Specification is not complete.
**Dalet** is a system through which it is possible to combine human readable markup language and small size of transmitted data. The system is divided into two stages and two languages.
## Languages
### Daleth
**Daleth** is a high-level language for humans. It can be translated into daletl (to be explained later), but daletl cannot be translated into daleth[^1]. It is only used for page creation by humans.
### Daletl
**Daletl** is a low-level language for machines. It is used in data transmission, processing and generation. It is specifically optimized to transfer as little data as possible using json, messagepack or daletpack.
## Stages
### Stage 1 (optional)
In the first stage, the daleth language is parsed and converted to daletl. All tag names are replaced by the smallest possible names, so that they take up less space in json or messagepack, for example.
### Stage 2
At this stage, only daletl is used. This stage is used by programs for generation, modification and rendering. All information is transferred between the server and the client in this stage.
[^1]: In the first versions only. Detranslation is planned for the future.