Project

General

Profile

Feature #10120 » toml-format.html

Marc Egger, 18.06.2020 11:35

 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
  <meta name="generator" content="Zettlr" />
6
  <meta name="date" content="" />
7
  <title></title>
8
  <style type="text/css">
9
  * {
10
    box-sizing: border-box;
11
  }
12

    
13
  a {
14
    color: #FF7C3B;
15
    text-decoration: none;
16
  }
17

    
18
  a:hover {
19
    text-decoration: underline;
20
  }
21

    
22
  hr {
23
    border: none;
24
    border-bottom: 1px solid #999;
25
    width: 80%;
26
  }
27

    
28
  html, body {
29
    margin: 0;
30
    padding: 0;
31
  }
32

    
33
  body {
34
    background-color: white;
35
    color: #333;
36
    font-family: 'DejaVu', 'Georgia', 'Times New Roman', 'Times', serif;
37
  }
38

    
39
  article {
40
    width: 50%;
41
    font-size: 1.5em;
42
    margin: 0 auto;
43
    line-height: 150%;
44
  }
45

    
46
  /* Better display on printing */
47
  @media print {
48
    article {
49
      width: 90%;
50
      font-size: 12pt;
51
      margin: 0 auto;
52
      line-height: 150%;
53
    }
54
  }
55

    
56
  article p {
57
    hyphens: auto;
58
    text-align: justify;
59
  }
60

    
61
  h1, h2, h3, h4, h5, h6 {
62
    font-family: 'Raleway', 'Lato', 'Liberation sans', 'Helvetica', sans-serif;
63
    color: #FF7C3B;
64
  }
65

    
66
  img {
67
    max-width: 100%;
68
    height: auto;
69
  }
70

    
71
  blockquote {
72
    font-size: 80%;
73
    color: rgba(120, 120, 120, 1);
74
    margin: 2% 5%;
75
    line-height: 120%;
76
  }
77

    
78
  table {
79
    border-collapse: collapse;
80
    width: 100%;
81
    font-size: 70%;
82
    font-family: 'Raleway', 'Lato', 'Liberation sans', 'Helvetica', sans-serif;
83
  }
84

    
85
  th, td {
86
    padding: 4px 20px;
87
    border-bottom: 1px solid #333;
88
  }
89

    
90
  /* List of classes taken from the skylighting lib */
91
  /* See: https://github.com/jgm/skylighting/blob/master/skylighting-core/src/Skylighting/Format/HTML.hs */
92

    
93
  /* Colors: Solarized theme (light) */
94
  /* See: https://ethanschoonover.com/solarized/ */
95

    
96
  /* Specific implementation: Taken from the GEdit theme (light) */
97
  /* See: https://github.com/altercation/solarized/blob/master/gedit/solarized-light.xml */
98

    
99
  /* Generic styles */
100
  pre.sourceCode {
101
    color: #657b83;
102
    background-color: #fdf6e3;
103
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, .05);
104
    padding: 2px;
105
    overflow: auto;
106
  }
107

    
108
  /* All classes, taken from skylighting lib */
109
  .sourceCode .kw { color: #859900; font-weight: bold; } /* Keyword */
110
  .sourceCode .dt { color: #b58900; } /* Datatype */
111
  .sourceCode .df { color: #d33682; } /* Decimal values*/
112
  .sourceCode .bn { color: #d33682; } /* base-n-integers */
113
  .sourceCode .fl { color: #d33682; } /* Floats */
114
  .sourceCode .ch { color: #2aa198; } /* Character */
115
  .sourceCode .st { color: #2aa198; } /* String */
116
  .sourceCode .vs { color: #2aa198; } /* Verbatim String */
117
  .sourceCode .ss { color: #2aa198; } /* Special String */
118
  .sourceCode .co { color: #586e75; font-style: italic; } /* Comment */
119
  .sourceCode .ot { font-weight: bold; } /* Other token */
120
  .sourceCode .al { color: #d33682; background-color: #073642; } /* Alert */
121
  .sourceCode .fu { color: #268bd2; } /* Function name */
122
  .sourceCode .re {} /* Region marker */
123
  .sourceCode .er { color: #dc322f; font-weight: bold; } /* Error */
124
  .sourceCode .cn { color: #2aa198; } /* Constant */
125
  .sourceCode .sc { color: #dc322f; } /* Special character */
126
  .sourceCode .im { color: #6c71c4; font-weight: bold; } /* Import statement */
127
  .sourceCode .do { color: #dc322f; } /* Documentation string */
128
  .sourceCode .an { color: #2aa198; } /* Annotation */
129
  .sourceCode .cv { color: #6c71c4; } /* Comment var */
130
  .sourceCode .va { color: #268bd2; } /* Variable */
131
  .sourceCode .cf { color: #859900; } /* Control Flow (if, else, return) */
132
  .sourceCode .op {} /* Operator */
133
  .sourceCode .bu { color: #b58900; } /* Builtin function/class/identifier */
134
  .sourceCode .ex { color: #268bd2; } /* Extension */
135
  .sourceCode .pp { color: #cb4b16; } /* Preprocessor, like #import in C++ */
136
  .sourceCode .at { color: #dc322f; } /* Attribute */
137
  .sourceCode .in { color: #586e75; } /* Information */
138
  .sourceCode .wa { color: #cb4b16; } /* Warning */
139
  </style>
140

    
141
<!-- Pandoc variables -->
142

    
143
<!-- Additional CSS in case the user has passed it -->
144

    
145
<!-- Include MathJax CDN, if applicable -->
146
</head>
147
<body>
148
  <!-- Render in article for reader view enabling -->
149
    <article>
150
    <p>20200617115045 #file-format #programming #toml</p>
151
    <h2 id="changes-from-v0.4-to-v1.0-for-use-in-qfq">Changes from v0.4 to v1.0 for use in QFQ</h2>
152
    <h3 id="v0.5">v0.5</h3>
153
    <p><strong>maybe relevant:</strong></p>
154
    <ul>
155
    <li>Add <strong>dotted keys</strong>. e.g.</li>
156
    </ul>
157
    <pre class="toml"><code>Toml v0.5 example dotted keys:
158
    name = &quot;Orange&quot;
159
    physical.color = &quot;orange&quot;
160
    physical.shape = &quot;round&quot;
161
    site.&quot;google.com&quot; = true</code></pre>
162
    <p>equivalent json:</p>
163
    <div class="sourceCode" id="cb2"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb2-1"><a href="#cb2-1"></a><span class="fu">{</span></span>
164
    <span id="cb2-2"><a href="#cb2-2"></a>  <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;Orange&quot;</span><span class="fu">,</span></span>
165
    <span id="cb2-3"><a href="#cb2-3"></a>  <span class="dt">&quot;physical&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
166
    <span id="cb2-4"><a href="#cb2-4"></a>    <span class="dt">&quot;color&quot;</span><span class="fu">:</span> <span class="st">&quot;orange&quot;</span><span class="fu">,</span></span>
167
    <span id="cb2-5"><a href="#cb2-5"></a>    <span class="dt">&quot;shape&quot;</span><span class="fu">:</span> <span class="st">&quot;round&quot;</span></span>
168
    <span id="cb2-6"><a href="#cb2-6"></a>  <span class="fu">},</span></span>
169
    <span id="cb2-7"><a href="#cb2-7"></a>  <span class="dt">&quot;site&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
170
    <span id="cb2-8"><a href="#cb2-8"></a>    <span class="dt">&quot;google.com&quot;</span><span class="fu">:</span> <span class="kw">true</span></span>
171
    <span id="cb2-9"><a href="#cb2-9"></a>  <span class="fu">}</span></span>
172
    <span id="cb2-10"><a href="#cb2-10"></a><span class="fu">}</span></span></code></pre></div>
173
    <p><strong>probably not relevant:</strong></p>
174
    <ul>
175
    <li>Rename Datetime to Offset Date-Time.</li>
176
    <li>Add Local Date-Time.</li>
177
    <li>Add Local Date.</li>
178
    <li>Add Local Time.</li>
179
    <li>Allow accidental whitespace between backslash and newline in the line continuation operator in multi-line basic strings.</li>
180
    <li>Clarify that keys are always strings.</li>
181
    <li>Clarify that literal strings can be table keys. e.g.</li>
182
    </ul>
183
    <pre class="toml"><code>Toml v0.5 example strings as keys:
184
    [dog.&quot;tater.man&quot;]
185
    type.name = &quot;pug&quot;</code></pre>
186
    <p><strong>not relevant:</strong></p>
187
    <ul>
188
    <li>Add hex, octal, and binary integer formats.</li>
189
    <li>Add special float values (inf, nan)</li>
190
    <li>Add ABNF specification.</li>
191
    <li>Allow space (instead of T) to separate date and time in Date-Time.</li>
192
    <li>Specify that the standard file extension is<code>.toml</code>.</li>
193
    <li>Specify that MIME type is<code>application/toml</code></li>
194
    <li>Clarify that U+007F is an escape character.</li>
195
    <li>Clarify that you cannot use array-of-table to append to a static array.</li>
196
    <li>Clarify that a TOML file must be a valid UTF-8 document.</li>
197
    <li>Clarify valid Array values.</li>
198
    <li>Clarify that at least millisecond precision expected for Date-Time and Time.</li>
199
    <li>Clarify that comments are OK in multiline arrays.</li>
200
    <li>Clarify that +0, -0, +0.0, and -0.0 are valid and what they mean.</li>
201
    <li>TOML has a logo!</li>
202
    </ul>
203
    <h3 id="v1.0">v1.0</h3>
204
    <p><strong>maybe relevant:</strong></p>
205
    <ul>
206
    <li>Allow raw tab characters in basic strings and multi-line basic strings.</li>
207
    <li>Allow heterogenous values in arrays. e.g.</li>
208
    </ul>
209
    <pre class="toml"><code>Toml 1.0 example heterogenous arrays:
210
    # Mixed-type arrays are allowed in v1.0
211
    numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
212
    contributors = [
213
      &quot;Foo Bar &lt;foo@example.com&gt;&quot;,
214
      { name = &quot;Baz Qux&quot;, email = &quot;bazqux@example.com&quot;, url = &quot;https://example.com/bazqux&quot; }
215
    ]</code></pre>
216
    <p><strong>not relevant:</strong></p>
217
    <ul>
218
    <li>Clarify in ABNF how quotes in multi-line basic and multi-line literal strings are allowed to be used.</li>
219
    <li>Leading zeroes in exponent parts of floats are permitted.</li>
220
    <li>Clarify that control characters are not permitted in comments.</li>
221
    <li>Clarify behavior of tables defined implicitly by dotted keys.</li>
222
    <li>Clarify that inline tables are immutable.</li>
223
    <li>Clarify that trailing commas are not allowed in inline tables.</li>
224
    <li>Clarify in ABNF that UTF-16 surrogate code points (U+D800 - U+DFFF) are not allowed in strings or comments.</li>
225
    </ul>
226
  </article>
227
</body>
228
</html>
(1-1/2)