-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharticle-messaging-from-client.html
More file actions
executable file
·474 lines (431 loc) · 23.1 KB
/
article-messaging-from-client.html
File metadata and controls
executable file
·474 lines (431 loc) · 23.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<!DOCTYPE html>
<html lang="en">
<head>
<!--__RIM_REDIRECT__-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap" rel="stylesheet">
<title>Messaging between C client and server</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="HandheldFriendly" content="True"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="canonical" href="https://rimstone-lang.com/article-messaging-from-client.html" />
<style>
body, html {
font-family: Quicksand,monospace,Helvetica, Arial, sans-serif;
line-height: 150%;
font-size:16px;
}
body {
padding-left:1vw;
padding-right:1vw;
}
.ncode {
letter-spacing: 0px;
font-family: monospace;
font-size:83%;
display:inline-block;
max-width:99%;
min-width:90%;
margin:0;
padding:0;
padding-left:5px;
padding-top:3px;
padding-bottom:3px;
margin-bottom:8px;
margin-top:8px;
border: 2px solid #d6d6d6;
background-color:#f5f7f4;
white-space:nowrap;
}
.shcode {
letter-spacing: 0px;
font-family: monospace;
font-size:83%;
display:inline-block;
max-width:99%;
min-width:90%;
margin:0;
padding:0;
padding-left:5px;
padding-top:3px;
padding-bottom:3px;
margin-bottom:8px;
margin-top:8px;
border: 2px solid #d6d6d6;
background-color:#f5f7f4;
white-space:nowrap;
}
.sqlcode {
letter-spacing: 0px;
font-family: monospace;
font-size:83%;
display:inline-block;
max-width:99%;
min-width:90%;
margin:0;
padding:0;
padding-left:5px;
padding-top:3px;
padding-bottom:3px;
margin-bottom:8px;
margin-top:8px;
border: 2px solid #d6d6d6;
background-color:#f5f7f4;
white-space:nowrap;
}
.htmlcode {
letter-spacing: 0px;
font-family: monospace;
font-size:83%;
display:inline-block;
max-width:99%;
min-width:90%;
margin:0;
padding:0;
padding-left:5px;
padding-top:3px;
padding-bottom:3px;
margin-bottom:8px;
margin-top:8px;
border: 2px solid #d6d6d6;
background-color:#f5f7f4;
white-space:nowrap;
}
.code {
letter-spacing: 0px;
font-family: monospace;
font-size:83%;
display:inline-block;
max-width:99%;
min-width:90%;
margin:0;
padding:0;
padding-left:5px;
padding-top:3px;
padding-bottom:3px;
margin-bottom:8px;
margin-top:8px;
border: 2px solid #d6d6d6;
background-color:#f5f7f4;
white-space:nowrap;
}
/*Just like h1 but for pdf conversion it would be indented this way it's not*/
.vhub {
display: block;
font-size: 1.6em;
margin-top: 0.63em;
margin-bottom: 0.63em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
/*Just like h2 but for pdf conversion it would be indented this way it's not*/
.vsub {
display: block;
font-size: 1.25em;
margin-top: 0.53em;
margin-bottom: 0.53em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
ul {
margin-left: 0.75vw;
padding-left: 0;
}
li {
margin-left: 0.75vw;
padding-left: 0;
}
/* this must be last, as it overrides previous settings, for mobile */
@media (hover: none) {
a {
display: inline-block;
padding-top: 3px;
padding-bottom: 2px;
}
body {
padding-left:2vw;
padding-right:2vw;
letter-spacing: 1px;
}
}
/*The following is for code snippets that are highlighted by 2html vim*/
pre { overflow-x: scroll; margin:0; padding:0; font-family:monospace; }
.Identifier { color: #008b8b; }
.Statement { color: #af5f00; }
.PreProc { color: #5fd7ff; }
.Type { color: #005f00; }
.Comment { color: blue ; }
.Constant { color: #ff00ff; }
/*end of highlighted snippets*/
a {
text-decoration:none;
padding-bottom: 0px;
color:inherit;
border-bottom: 2px solid #6cb8f0;
}
a:hover {
text-decoration: none;
color:black;
border-bottom: 1px solid red;
}
/*do not underline links nor should they be active*/
pre a {
text-decoration:none;
color:black;
border-bottom: none;
pointer-events: none;
cursor: default;
}
.golfSnippet {display:none;}
ul {
list-style-type:square;
list-style-position: outside;
}
</style>
</head>
<body>
<div id="google_translate_element" style='float:right'></div>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script>
function rim_copy(gt, eid, gc) {
gt.textContent = eid.textContent;
gt.select();
document.execCommand("copy");
gc.style.visibility="visible"
setTimeout(()=>{ gc.style.visibility="hidden"; }, 1000);
}
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<!--RIMMENU13-->
<!--RIMENDMENU13-->
<!--BEGVDOC90-->
<div class='vhub' style='margin-top:10px;margin-right:20px;text-align:left;background-color:white;'><a href='https://rimstone-lang.com' style='border-bottom:0px'><img src='https://rimstone-lang.com/rimstone.png' style='width:180px;height:auto'/></a></div><div class='vhub' style='margin-top:10px;'>Messaging between C client and server</div><hr/><br/>
This example shows how to exchange messages between RimStone server and a C API client (see <a href='https://rimstone-lang.com/Client-API.html'>Client-API</a>). The client uses FastCGI binary protocol to communicate with the server. <a href='https://rimstone-lang.com/SEMI.html'>SEMI</a> messaging is used as a format of messages. In this example, a client sends 10 variable length message to the server (meaning each has a different number of key/value pairs); the server then gets each key/value and replies in kind. The client displays the result.<br/>
<br/>
Note that status checking is not performed for simplicity here.<br/>
<div class="vsub"><a id="Create a server and start it"></a>Create a server and start it</div>
To get started, create a directory for this example and position in it:<br/>
<div class="shcode" style='position:relative;padding-right:16px;'>
<pre id='code_228' class=notranslate>
<span class="Statement">mkdir</span> <span class="Special">-p</span> msgapi
<span class="Statement">cd</span> msgapi</pre>
<span id=rimstone_copied_228 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_228' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_228, code_228, rimstone_copied_228)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
Create file "srv.rim":<br/>
<div class='code' style='position:relative;padding-right:16px;'>
<pre id='code_227' class=notranslate>
cat << '<span class="Constant">EOF</span>' > srv.rim
<span class="Statement">begin-handler</span> /srv<span class="Identifier"> public</span>
<span class="Statement"> silent-header</span>
<span class="Statement"> request-body</span> msg <span class="Comment">// get the message sent by client</span>
<span class="Statement"> new-message</span> m<span class="Identifier"> from</span> msg <span class="Comment">// parse into key/value pairs </span>
<span class="Statement"> new-message</span> r <span class="Comment">// create new reply message</span>
<span class="Statement"> read-message</span> m<span class="Type"> key</span> k<span class="Type"> value</span> v <span class="Comment">// read how many key/value pairs are there, that's</span>
<span class="Comment">// the how the client packed the data</span>
<span class="Statement"> write-message</span> r<span class="Identifier"> key</span> <span class="Constant">"reply"</span><span class="Identifier"> value</span> v <span class="Comment">// write into reply message how many key/value pairs</span>
<span class="Comment">// we're sending back</span>
<span class="Statement"> start-loop</span><span class="Identifier"> repeat</span> #v<span class="Type"> use</span> i<span class="Identifier"> start-with</span> <span class="Constant">1</span>
<span class="Statement"> read-message</span> m<span class="Type"> key</span> k<span class="Type"> value</span> v <span class="Comment">// get key/value pair from client</span>
<span class="Comment">// write key/value pair to go back to the client</span>
<span class="Statement"> write-message</span> r<span class="Identifier"> key</span> $i<span class="Identifier"> value</span> <span class="Constant">"Reply is "</span> + $i + <span class="Constant">" (from "</span>+v+<span class="Constant">")"</span>
<span class="Statement"> end-loop</span>
<span class="Statement"> get-message</span> r<span class="Type"> to</span> rm <span class="Comment">// get the binary representation of the message</span>
<span class="Statement"> print-out</span> rm <span class="Comment">// send it back to client</span>
<span class="Statement">end-handler</span>
<span class="Constant">EOF</span></pre>
<span id=rimstone_copied_227 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_227' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_227, code_227, rimstone_copied_227)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
Create "msgapi" application ("-k"):<br/>
<div class="shcode" style='position:relative;padding-right:16px;'>
<pre id='code_230' class=notranslate>
rim <span class="Special">-k</span> msgapi</pre>
<span id=rimstone_copied_230 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_230' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_230, code_230, rimstone_copied_230)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
Compile the server - this also demonstrates excluding directories from compilation (since RimStone will by default try to compile the RimStone and C code in all subdirectories). In this case, we're excluding subdirectory "c-api", which we will create in just a sec and place a C client program in it:<br/>
<div class="shcode" style='position:relative;padding-right:16px;'>
<pre id='code_231' class=notranslate>
rim <span class="Special">-q</span> <span class="Special">--exclude-dir</span><span class="Statement">=</span>c-api</pre>
<span id=rimstone_copied_231 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_231' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_231, code_231, rimstone_copied_231)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
Start the server, with a single server process running:<br/>
<div class="shcode" style='position:relative;padding-right:16px;'>
<pre id='code_232' class=notranslate>
mrim <span class="Special">-w</span> <span class="Constant">1</span> msgapi</pre>
<span id=rimstone_copied_232 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_232' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_232, code_232, rimstone_copied_232)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
<div class="vsub"><a id="Create a client in C"></a>Create a client in C</div>
Create directory for a C API client, and switch to it:<br/>
<div class="shcode" style='position:relative;padding-right:16px;'>
<pre id='code_233' class=notranslate>
<span class="Statement">mkdir</span> c-api
<span class="Statement">cd</span> c-api</pre>
<span id=rimstone_copied_233 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_233' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_233, code_233, rimstone_copied_233)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
Next is the C code for your client. It sends a message to the server (comprised of key/value pairs), gets the reply back, and prints out key/value pairs in it. Create file "client.c" with this:<br/>
<div class='code' style='position:relative;padding-right:16px;'>
<pre id='code_229' class=notranslate>
cat << '<span class="Constant">EOF</span>' > client.c
<span class="PreProc">#include </span><span class="Constant">"rcli.h"</span>
<span class="Type">int</span> rim_client (rim_cli *req, <span class="Type">char</span> *connection, <span class="Type">char</span> *method, <span class="Type">char</span> *app_path, <span class="Type">char</span> *request, <span class="Type">char</span> *url_params, <span class="Type">char</span> *body, <span class="Type">int</span> body_len);
<span class="Comment">// Send a request to RimStone server, see the example of use below</span>
<span class="Type">int</span> rim_client (rim_cli *req, <span class="Type">char</span> *connection, <span class="Type">char</span> *method, <span class="Type">char</span> *app_path, <span class="Type">char</span> *request, <span class="Type">char</span> *url_params, <span class="Type">char</span> *body, <span class="Type">int</span> body_len)
<span class="Statement">{</span>
memset ((<span class="Type">char</span>*)req, <span class="Constant">0</span>, <span class="Statement">sizeof</span>(rim_cli));
req->server = connection;
req->req_method = method;
req->app_path = app_path;
req->req = request;
req->url_params = url_params;
req->req_body = body;
req->content_type = <span class="Constant">"application/rim"</span>;
req->content_len = body_len;
<span class="Statement">return</span> rim_cli_request (req);
<span class="Statement">}</span>
<span class="Type">void</span> main ()
<span class="Statement">{</span>
<span class="Type">int</span> i;
<span class="Comment">// Get the path of Unix socket file to communicate with the server</span>
<span class="Type">char</span> dir[RIM_MAX_OS_UDIR_LEN];
rim_dir (RIM_DIR_SOCKFILE, dir, <span class="Statement">sizeof</span>(dir), <span class="Constant">"msgapi"</span>, <span class="Constant">NULL</span>);
<span class="Comment">// Make /srv request to msgapi application server </span><span class="Constant">10</span><span class="Comment"> times</span>
<span class="Statement">for</span> (i = <span class="Constant">1</span>; i < <span class="Constant">10</span>; i++)
<span class="Statement"> {</span>
rim_cli req; <span class="Comment">// Client C API request</span>
rim_msg *msg; <span class="Comment">// Message for client</span>
msg = rim_new_msg (<span class="Constant">NULL</span>, <span class="Constant">0</span>); <span class="Comment">// Make a new message</span>
<span class="Type">char</span> key[<span class="Constant">100</span>], value[<span class="Constant">100</span>], count[<span class="Constant">100</span>]; <span class="Comment">// alloc for message key/value pairs</span>
snprintf (count, <span class="Statement">sizeof</span>(count), <span class="Constant">"</span><span class="Special">%d</span><span class="Constant">"</span>, i); <span class="Comment">// the count (how many key/value pairs)</span>
rim_write_msg (msg, <span class="Constant">"count"</span>, count, strlen(count)); <span class="Comment">// write the count into the message</span>
<span class="Type">int</span> j;
<span class="Statement">for</span> (j = <span class="Constant">1</span>; j <= i; j++) <span class="Comment">// pack different number of key/value pairs, so for the first messasge</span>
<span class="Comment">// pack only one, for the second message pack </span><span class="Constant">2</span><span class="Comment"> pairs, for the third message</span>
<span class="Comment">// pack </span><span class="Constant">3</span><span class="Comment"> pairs etc. Just to make it interesting.</span>
<span class="Statement"> {</span>
<span class="Comment">// write key/value into a message</span>
snprintf (key, <span class="Statement">sizeof</span>(key), <span class="Constant">"</span><span class="Special">%d</span><span class="Constant">"</span>, j);
snprintf (value, <span class="Statement">sizeof</span>(value), <span class="Constant">"message </span><span class="Special">%d</span><span class="Constant">"</span>, j);
rim_write_msg (msg, key, value, strlen(value));
<span class="Statement"> }</span>
<span class="Comment">// send message to RimStone server</span>
<span class="Type">int</span> res = rim_client (&req, dir, <span class="Constant">"POST"</span>, <span class="Constant">"/msgapi"</span>, <span class="Constant">"/srv"</span>, <span class="Constant">"/"</span>, rim_get_msg (msg), rim_get_msg_len (msg));
<span class="Statement">if</span> (res == RIM_OKAY)
<span class="Statement"> {</span>
<span class="Comment">// Create a message from reply, since the server packed key/value pairs and sent them back as a message</span>
rim_msg *rep = rim_new_msg (rim_cli_data(&req), req.data_len);
<span class="Type">char</span> *k, *v;
rim_num len;
<span class="Comment">// Read the number of key/value pairs in the message, as it's the first piece of information we packed in srv.rim</span>
rim_read_msg (rep, &k, &v, &len);
rim_num tmess = atol (v);
free (k);
<span class="Type">int</span> j;
<span class="Comment">// read key/value pairs from the message sent back from the server</span>
<span class="Statement">for</span> (j = <span class="Constant">1</span>; j <= tmess; j++)
<span class="Statement"> {</span>
rim_read_msg (rep, &k, &v, &len);
printf(<span class="Constant">"</span><span class="Special">%s</span><span class="Special">\n</span><span class="Constant">"</span>, v); <span class="Comment">// display value</span>
free (k);
<span class="Statement"> }</span>
free (rep);
<span class="Statement"> }</span>
<span class="Comment">// free up resources</span>
rim_cli_delete(&req);
free (rim_get_msg(msg));
free (msg);
<span class="Statement"> }</span>
<span class="Statement">}</span>
<span class="Constant">EOF</span></pre>
<span id=rimstone_copied_229 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_229' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_229, code_229, rimstone_copied_229)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
Compile C program:<br/>
<div class="shcode" style='position:relative;padding-right:16px;'>
<pre id='code_234' class=notranslate>
gcc <span class="Special">-o</span> client client.c <span class="PreProc">$(</span><span class="Special">rim </span><span class="Special">-i</span><span class="PreProc">)</span></pre>
<span id=rimstone_copied_234 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_234' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_234, code_234, rimstone_copied_234)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
<div class="vsub"><a id="Run your C client"></a>Run your C client</div>
<div class="shcode" style='position:relative;padding-right:16px;'>
<pre id='code_235' class=notranslate>
./client</pre>
<span id=rimstone_copied_235 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_235' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_235, code_235, rimstone_copied_235)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
The result is:<br/>
<div class='ncode' style='position:relative;padding-right:16px;'>
<pre id='code_226' class=notranslate>
Reply is 1 (from message 1)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 3 (from message 3)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 3 (from message 3)
Reply is 4 (from message 4)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 3 (from message 3)
Reply is 4 (from message 4)
Reply is 5 (from message 5)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 3 (from message 3)
Reply is 4 (from message 4)
Reply is 5 (from message 5)
Reply is 6 (from message 6)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 3 (from message 3)
Reply is 4 (from message 4)
Reply is 5 (from message 5)
Reply is 6 (from message 6)
Reply is 7 (from message 7)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 3 (from message 3)
Reply is 4 (from message 4)
Reply is 5 (from message 5)
Reply is 6 (from message 6)
Reply is 7 (from message 7)
Reply is 8 (from message 8)
Reply is 1 (from message 1)
Reply is 2 (from message 2)
Reply is 3 (from message 3)
Reply is 4 (from message 4)
Reply is 5 (from message 5)
Reply is 6 (from message 6)
Reply is 7 (from message 7)
Reply is 8 (from message 8)
Reply is 9 (from message 9)</pre>
<span id=rimstone_copied_226 style='position:absolute;right:-14px;top:-30px; cursor: pointer;visibility:hidden;background:white;'>Copied!</span>
<textarea id='rimstonet_226' style='position: absolute;left: -500%;'></textarea>
<img src='https://rimstone-lang.com/rimstone-copy-small-1.png' id='rimstoneb' onclick='rim_copy(rimstonet_226, code_226, rimstone_copied_226)' style='position:absolute;right:0;top:0; cursor: pointer;opacity:0.5;'/>
</div><br/>
<!--ENDVDOC90-->
<br/><div style='width:100%;clear:both;'>
<hr/>
<!--RIMFOOT77--><span style='font-size:80%'><a href="https://rimstone-lang.com/copyright.html">Copyright</a> (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.</span>
</div><br/></body></html>