sharedtables.html 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <!-- This file is generated by Nim. -->
  4. <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>std/sharedtables</title>
  9. <!-- Google fonts -->
  10. <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
  11. <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
  12. <!-- Favicon -->
  13. <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
  14. <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
  15. <!-- CSS -->
  16. <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
  17. <!-- JS -->
  18. <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
  19. </head>
  20. <body>
  21. <div class="document" id="documentId">
  22. <div class="container">
  23. <h1 class="title">std/sharedtables</h1>
  24. <div class="row">
  25. <div class="three columns">
  26. <div class="theme-select-wrapper">
  27. <label for="theme-select">Theme:&nbsp;</label>
  28. <select id="theme-select" onchange="setTheme(this.value)">
  29. <option value="auto">🌗 Match OS</option>
  30. <option value="dark">🌑 Dark</option>
  31. <option value="light">🌕 Light</option>
  32. </select>
  33. </div>
  34. <div id="global-links">
  35. <ul class="simple-boot">
  36. <li><a href="manual.html">Manual</a></li>
  37. <li><a href="lib.html">Standard library</a></li>
  38. <li> <a id="indexLink" href="theindex.html">Index</a></li>
  39. <li><a href="compiler/theindex.html">Compiler docs</a></li>
  40. <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
  41. <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
  42. </ul>
  43. </div>
  44. <div id="searchInputDiv">
  45. Search: <input type="search" id="searchInput"
  46. oninput="search()" />
  47. </div>
  48. <ul class="simple simple-toc" id="toc-list">
  49. <li>
  50. <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
  51. </li>
  52. <li>
  53. <details open>
  54. <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
  55. <ul class="simple simple-toc-section">
  56. <li><a class="reference" href="#SharedTable" title="SharedTable[A; B] = object">SharedTable</a></li>
  57. </ul>
  58. </details>
  59. </li>
  60. <li>
  61. <details open>
  62. <summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
  63. <ul class="simple simple-toc-section">
  64. <li><a class="reference" href="#defaultInitialSize" title="defaultInitialSize = 32">defaultInitialSize</a></li>
  65. </ul>
  66. </details>
  67. </li>
  68. <li>
  69. <details open>
  70. <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
  71. <ul class="simple simple-toc-section">
  72. <ul class="simple nested-toc-section">[]=
  73. <li><a class="reference" href="#%5B%5D%3D%2CSharedTable%5BA%2CB%5D%2CA%2CB" title="`[]=`[A, B](t: var SharedTable[A, B]; key: A; val: B)">`[]=`[A, B](t: var SharedTable[A, B]; key: A; val: B)</a></li>
  74. </ul>
  75. <ul class="simple nested-toc-section">add
  76. <li><a class="reference" href="#add%2CSharedTable%5BA%2CB%5D%2CA%2CB" title="add[A, B](t: var SharedTable[A, B]; key: A; val: B)">add[A, B](t: var SharedTable[A, B]; key: A; val: B)</a></li>
  77. </ul>
  78. <ul class="simple nested-toc-section">deinitSharedTable
  79. <li><a class="reference" href="#deinitSharedTable%2CSharedTable%5BA%2CB%5D" title="deinitSharedTable[A, B](t: var SharedTable[A, B])">deinitSharedTable[A, B](t: var SharedTable[A, B])</a></li>
  80. </ul>
  81. <ul class="simple nested-toc-section">del
  82. <li><a class="reference" href="#del%2CSharedTable%5BA%2CB%5D%2CA" title="del[A, B](t: var SharedTable[A, B]; key: A)">del[A, B](t: var SharedTable[A, B]; key: A)</a></li>
  83. </ul>
  84. <ul class="simple nested-toc-section">hasKeyOrPut
  85. <li><a class="reference" href="#hasKeyOrPut%2CSharedTable%5BA%2CB%5D%2CA%2CB" title="hasKeyOrPut[A, B](t: var SharedTable[A, B]; key: A; val: B): bool">hasKeyOrPut[A, B](t: var SharedTable[A, B]; key: A; val: B): bool</a></li>
  86. </ul>
  87. <ul class="simple nested-toc-section">init
  88. <li><a class="reference" href="#init%2CSharedTable%5BA%2CB%5D%2Cint" title="init[A, B](t: var SharedTable[A, B]; initialSize = 32)">init[A, B](t: var SharedTable[A, B]; initialSize = 32)</a></li>
  89. </ul>
  90. <ul class="simple nested-toc-section">len
  91. <li><a class="reference" href="#len%2CSharedTable%5BA%2CB%5D" title="len[A, B](t: var SharedTable[A, B]): int">len[A, B](t: var SharedTable[A, B]): int</a></li>
  92. </ul>
  93. <ul class="simple nested-toc-section">mget
  94. <li><a class="reference" href="#mget%2CSharedTable%5BA%2CB%5D%2CA" title="mget[A, B](t: var SharedTable[A, B]; key: A): var B">mget[A, B](t: var SharedTable[A, B]; key: A): var B</a></li>
  95. </ul>
  96. <ul class="simple nested-toc-section">mgetOrPut
  97. <li><a class="reference" href="#mgetOrPut%2CSharedTable%5BA%2CB%5D%2CA%2CB" title="mgetOrPut[A, B](t: var SharedTable[A, B]; key: A; val: B): var B">mgetOrPut[A, B](t: var SharedTable[A, B]; key: A; val: B): var B</a></li>
  98. </ul>
  99. <ul class="simple nested-toc-section">withKey
  100. <li><a class="reference" href="#withKey%2CSharedTable%5BA%2CB%5D%2CA%2Cproc%28A%2CB%2Cbool%29" title="withKey[A, B](t: var SharedTable[A, B]; key: A;
  101. mapper: proc (key: A; val: var B; pairExists: var bool))">withKey[A, B](t: var SharedTable[A, B]; key: A;
  102. mapper: proc (key: A; val: var B; pairExists: var bool))</a></li>
  103. </ul>
  104. </ul>
  105. </details>
  106. </li>
  107. <li>
  108. <details open>
  109. <summary><a class="reference reference-toplevel" href="#18" id="68">Templates</a></summary>
  110. <ul class="simple simple-toc-section">
  111. <ul class="simple nested-toc-section">withValue
  112. <li><a class="reference" href="#withValue.t%2CSharedTable%5BA%2CB%5D%2CA%2Cuntyped%2Cuntyped%2Cuntyped" title="withValue[A, B](t: var SharedTable[A, B]; key: A; value, body1, body2: untyped)">withValue[A, B](t: var SharedTable[A, B]; key: A; value, body1, body2: untyped)</a></li>
  113. <li><a class="reference" href="#withValue.t%2CSharedTable%5BA%2CB%5D%2CA%2Cuntyped%2Cuntyped" title="withValue[A, B](t: var SharedTable[A, B]; key: A; value, body: untyped)">withValue[A, B](t: var SharedTable[A, B]; key: A; value, body: untyped)</a></li>
  114. </ul>
  115. </ul>
  116. </details>
  117. </li>
  118. </ul>
  119. </div>
  120. <div class="nine columns" id="content">
  121. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  122. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  123. <div id="tocRoot"></div>
  124. <div class="deprecation-message">
  125. <b>Deprecated</b>
  126. </div>
  127. <p class="module-desc"><p>Shared table support for Nim. Use plain old non GC'ed keys and values or you'll be in trouble. Uses a single lock to protect the table, lockfree implementations welcome but if lock contention is so high that you need a lockfree hash table, you're doing it wrong.</p>
  128. <p>Unstable API.</p>
  129. </p>
  130. <div class="section" id="6">
  131. <h1><a class="toc-backref" href="#6">Imports</a></h1>
  132. <dl class="item">
  133. <a class="reference external" href="hashes.html">hashes</a>, <a class="reference external" href="math.html">math</a>, <a class="reference external" href="locks.html">locks</a>, <a class="reference external" href="assertions.html">assertions</a>, <a class="reference external" href="outparams.html">outparams</a>
  134. </dl>
  135. </div>
  136. <div class="section" id="7">
  137. <h1><a class="toc-backref" href="#7">Types</a></h1>
  138. <dl class="item">
  139. <div id="SharedTable">
  140. <dt><pre><a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">;</span> <span class="Identifier">B</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
  141. <dd>
  142. generic hash SharedTable
  143. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L25" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  144. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L25" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  145. </dd>
  146. </div>
  147. </dl>
  148. </div>
  149. <div class="section" id="10">
  150. <h1><a class="toc-backref" href="#10">Consts</a></h1>
  151. <dl class="item">
  152. <div id="defaultInitialSize">
  153. <dt><pre><a href="sharedtables.html#defaultInitialSize"><span class="Identifier">defaultInitialSize</span></a> <span class="Other">=</span> <span class="DecNumber">32</span></pre></dt>
  154. <dd>
  155. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/tableimpl.nim#L15" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  156. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/tableimpl.nim#L15" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  157. </dd>
  158. </div>
  159. </dl>
  160. </div>
  161. <div class="section" id="12">
  162. <h1><a class="toc-backref" href="#12">Procs</a></h1>
  163. <dl class="item">
  164. <div id="[]=-procs-all">
  165. <div id="[]=,SharedTable[A,B],A,B">
  166. <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CSharedTable%5BA%2CB%5D%2CA%2CB"><span class="Identifier">`[]=`</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span> <span class="Identifier">val</span><span class="Other">:</span> <span class="Identifier">B</span><span class="Other">)</span></pre></dt>
  167. <dd>
  168. Puts a (key, value)-pair into <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span></span></tt>.
  169. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L221" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  170. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L221" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  171. </dd>
  172. </div>
  173. </div>
  174. <div id="add-procs-all">
  175. <div id="add,SharedTable[A,B],A,B">
  176. <dt><pre><span class="Keyword">proc</span> <a href="#add%2CSharedTable%5BA%2CB%5D%2CA%2CB"><span class="Identifier">add</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span> <span class="Identifier">val</span><span class="Other">:</span> <span class="Identifier">B</span><span class="Other">)</span></pre></dt>
  177. <dd>
  178. Puts a new (key, value)-pair into <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span></span></tt> even if <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span><span class="Punctuation">[</span><span class="Identifier">key</span><span class="Punctuation">]</span></span></tt> already exists. This can introduce duplicate keys into the table!
  179. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L226" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  180. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L226" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  181. </dd>
  182. </div>
  183. </div>
  184. <div id="deinitSharedTable-procs-all">
  185. <div id="deinitSharedTable,SharedTable[A,B]">
  186. <dt><pre><span class="Keyword">proc</span> <a href="#deinitSharedTable%2CSharedTable%5BA%2CB%5D"><span class="Identifier">deinitSharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">)</span></pre></dt>
  187. <dd>
  188. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L253" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  189. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L253" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  190. </dd>
  191. </div>
  192. </div>
  193. <div id="del-procs-all">
  194. <div id="del,SharedTable[A,B],A">
  195. <dt><pre><span class="Keyword">proc</span> <a href="#del%2CSharedTable%5BA%2CB%5D%2CA"><span class="Identifier">del</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">)</span></pre></dt>
  196. <dd>
  197. Deletes <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt> from hash table <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span></span></tt>.
  198. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L232" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  199. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L232" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  200. </dd>
  201. </div>
  202. </div>
  203. <div id="hasKeyOrPut-procs-all">
  204. <div id="hasKeyOrPut,SharedTable[A,B],A,B">
  205. <dt><pre><span class="Keyword">proc</span> <a href="#hasKeyOrPut%2CSharedTable%5BA%2CB%5D%2CA%2CB"><span class="Identifier">hasKeyOrPut</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span> <span class="Identifier">val</span><span class="Other">:</span> <span class="Identifier">B</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a></pre></dt>
  206. <dd>
  207. Returns true if <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt> is in the table, otherwise inserts <tt class="docutils literal"><span class="pre"><span class="Identifier">value</span></span></tt>.
  208. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L164" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  209. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L164" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  210. </dd>
  211. </div>
  212. </div>
  213. <div id="init-procs-all">
  214. <div id="init,SharedTable[A,B],int">
  215. <dt><pre><span class="Keyword">proc</span> <a href="#init%2CSharedTable%5BA%2CB%5D%2Cint"><span class="Identifier">init</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">initialSize</span> <span class="Other">=</span> <span class="DecNumber">32</span><span class="Other">)</span></pre></dt>
  216. <dd>
  217. <p>Creates a new hash table that is empty.</p>
  218. <p>This proc must be called before any other usage of <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span></span></tt>.</p>
  219. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L242" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  220. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L242" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  221. </dd>
  222. </div>
  223. </div>
  224. <div id="len-procs-all">
  225. <div id="len,SharedTable[A,B]">
  226. <dt><pre><span class="Keyword">proc</span> <a href="#len%2CSharedTable%5BA%2CB%5D"><span class="Identifier">len</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a></pre></dt>
  227. <dd>
  228. Number of elements in <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span></span></tt>.
  229. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L237" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  230. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L237" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  231. </dd>
  232. </div>
  233. </div>
  234. <div id="mget-procs-all">
  235. <div id="mget,SharedTable[A,B],A">
  236. <dt><pre><span class="Keyword">proc</span> <a href="#mget%2CSharedTable%5BA%2CB%5D%2CA"><span class="Identifier">mget</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">B</span></pre></dt>
  237. <dd>
  238. Retrieves the value at <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span><span class="Punctuation">[</span><span class="Identifier">key</span><span class="Punctuation">]</span></span></tt>. The value can be modified. If <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt> is not in <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span></span></tt>, the <tt class="docutils literal"><span class="pre"><span class="Identifier">KeyError</span></span></tt> exception is raised.
  239. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L139" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  240. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L139" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  241. </dd>
  242. </div>
  243. </div>
  244. <div id="mgetOrPut-procs-all">
  245. <div id="mgetOrPut,SharedTable[A,B],A,B">
  246. <dt><pre><span class="Keyword">proc</span> <a href="#mgetOrPut%2CSharedTable%5BA%2CB%5D%2CA%2CB"><span class="Identifier">mgetOrPut</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span> <span class="Identifier">val</span><span class="Other">:</span> <span class="Identifier">B</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">B</span></pre></dt>
  247. <dd>
  248. Retrieves value at <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span><span class="Punctuation">[</span><span class="Identifier">key</span><span class="Punctuation">]</span></span></tt> or puts <tt class="docutils literal"><span class="pre"><span class="Identifier">val</span></span></tt> if not present, either way returning a value which can be modified. <strong>Note</strong>: This is inherently unsafe in the context of multi-threading since it returns a pointer to <tt class="docutils literal"><span class="pre"><span class="Identifier">B</span></span></tt>.
  249. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L156" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  250. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L156" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  251. </dd>
  252. </div>
  253. </div>
  254. <div id="withKey-procs-all">
  255. <div id="withKey,SharedTable[A,B],A,proc(A,B,bool)">
  256. <dt><pre><span class="Keyword">proc</span> <a href="#withKey%2CSharedTable%5BA%2CB%5D%2CA%2Cproc%28A%2CB%2Cbool%29"><span class="Identifier">withKey</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span>
  257. <span class="Identifier">mapper</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span> <span class="Identifier">val</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">B</span><span class="Other">;</span> <span class="Identifier">pairExists</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="system.html#bool"><span class="Identifier">bool</span></a><span class="Other">)</span><span class="Other">)</span></pre></dt>
  258. <dd>
  259. <p>Computes a new mapping for the <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt> with the specified <tt class="docutils literal"><span class="pre"><span class="Identifier">mapper</span></span></tt> procedure.</p>
  260. <p>The <tt class="docutils literal"><span class="pre"><span class="Identifier">mapper</span></span></tt> takes 3 arguments:</p>
  261. <ol class="simple"><li><tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt> - the current key, if it exists, or the key passed to <tt class="docutils literal"><span class="pre"><span class="Identifier">withKey</span></span></tt> otherwise;</li>
  262. <li><tt class="docutils literal"><span class="pre"><span class="Identifier">val</span></span></tt> - the current value, if the key exists, or default value of the type otherwise;</li>
  263. <li><tt class="docutils literal"><span class="pre"><span class="Identifier">pairExists</span></span></tt> - <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> if the key exists, <tt class="docutils literal"><span class="pre"><span class="Identifier">false</span></span></tt> otherwise.</li>
  264. </ol>
  265. <p>The <tt class="docutils literal"><span class="pre"><span class="Identifier">mapper</span></span></tt> can can modify <tt class="docutils literal"><span class="pre"><span class="Identifier">val</span></span></tt> and <tt class="docutils literal"><span class="pre"><span class="Identifier">pairExists</span></span></tt> values to change the mapping of the key or delete it from the table. When adding a value, make sure to set <tt class="docutils literal"><span class="pre"><span class="Identifier">pairExists</span></span></tt> to <tt class="docutils literal"><span class="pre"><span class="Identifier">true</span></span></tt> along with modifying the <tt class="docutils literal"><span class="pre"><span class="Identifier">val</span></span></tt>.</p>
  266. <p>The operation is performed atomically and other operations on the table will be blocked while the <tt class="docutils literal"><span class="pre"><span class="Identifier">mapper</span></span></tt> is invoked, so it should be short and simple.</p>
  267. <p>Example usage:</p>
  268. <p><pre class="listing"><span class="Comment"># If value exists, decrement it.</span>
  269. <span class="Comment"># If it becomes zero or less, delete the key</span>
  270. <span class="Identifier">t</span><span class="Operator">.</span><span class="Identifier">withKey</span><span class="Punctuation">(</span><span class="DecNumber">1'i64</span><span class="Punctuation">)</span> <span class="Keyword">do</span> <span class="Punctuation">(</span><span class="Identifier">k</span><span class="Punctuation">:</span> <span class="Identifier">int64</span><span class="Punctuation">,</span> <span class="Identifier">v</span><span class="Punctuation">:</span> <span class="Keyword">var</span> <span class="Identifier">int</span><span class="Punctuation">,</span> <span class="Identifier">pairExists</span><span class="Punctuation">:</span> <span class="Keyword">var</span> <span class="Identifier">bool</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
  271. <span class="Keyword">if</span> <span class="Identifier">pairExists</span><span class="Punctuation">:</span>
  272. <span class="Identifier">dec</span> <span class="Identifier">v</span>
  273. <span class="Keyword">if</span> <span class="Identifier">v</span> <span class="Operator">&lt;=</span> <span class="DecNumber">0</span><span class="Punctuation">:</span>
  274. <span class="Identifier">pairExists</span> <span class="Operator">=</span> <span class="Identifier">false</span></pre></p>
  275. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L173" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  276. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L173" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  277. </dd>
  278. </div>
  279. </div>
  280. </dl>
  281. </div>
  282. <div class="section" id="18">
  283. <h1><a class="toc-backref" href="#18">Templates</a></h1>
  284. <dl class="item">
  285. <div id="withValue-templates-all">
  286. <div id="withValue.t,SharedTable[A,B],A,untyped,untyped,untyped">
  287. <dt><pre><span class="Keyword">template</span> <a href="#withValue.t%2CSharedTable%5BA%2CB%5D%2CA%2Cuntyped%2Cuntyped%2Cuntyped"><span class="Identifier">withValue</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span>
  288. <span class="Identifier">value</span><span class="Other">,</span> <span class="Identifier">body1</span><span class="Other">,</span> <span class="Identifier">body2</span><span class="Other">:</span> <a href="system.html#untyped"><span class="Identifier">untyped</span></a><span class="Other">)</span></pre></dt>
  289. <dd>
  290. Retrieves the value at <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span><span class="Punctuation">[</span><span class="Identifier">key</span><span class="Punctuation">]</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">value</span></span></tt> can be modified in the scope of the <tt class="docutils literal"><span class="pre"><span class="Identifier">withValue</span></span></tt> call.
  291. <p><strong class="examples_text">Example:</strong></p>
  292. <pre class="listing"><span class="Keyword">var</span> <span class="Identifier">table</span><span class="Punctuation">:</span> <span class="Identifier">SharedTable</span><span class="Punctuation">[</span><span class="Identifier">string</span><span class="Punctuation">,</span> <span class="Identifier">string</span><span class="Punctuation">]</span>
  293. <span class="Identifier">init</span><span class="Punctuation">(</span><span class="Identifier">table</span><span class="Punctuation">)</span>
  294. <span class="Identifier">table</span><span class="Punctuation">[</span><span class="StringLit">&quot;a&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;x&quot;</span>
  295. <span class="Identifier">table</span><span class="Punctuation">[</span><span class="StringLit">&quot;b&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;y&quot;</span>
  296. <span class="Identifier">table</span><span class="Punctuation">[</span><span class="StringLit">&quot;c&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;z&quot;</span>
  297. <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">withValue</span><span class="Punctuation">(</span><span class="StringLit">&quot;a&quot;</span><span class="Punctuation">,</span> <span class="Identifier">value</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
  298. <span class="Identifier">value</span><span class="Punctuation">[</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;m&quot;</span>
  299. <span class="Keyword">var</span> <span class="Identifier">flag</span> <span class="Operator">=</span> <span class="Identifier">false</span>
  300. <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">withValue</span><span class="Punctuation">(</span><span class="StringLit">&quot;d&quot;</span><span class="Punctuation">,</span> <span class="Identifier">value</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
  301. <span class="Keyword">discard</span> <span class="Identifier">value</span>
  302. <span class="Identifier">doAssert</span> <span class="Identifier">false</span>
  303. <span class="Keyword">do</span><span class="Punctuation">:</span> <span class="Comment"># if &quot;d&quot; notin table</span>
  304. <span class="Identifier">flag</span> <span class="Operator">=</span> <span class="Identifier">true</span>
  305. <span class="Keyword">if</span> <span class="Identifier">flag</span><span class="Punctuation">:</span>
  306. <span class="Identifier">table</span><span class="Punctuation">[</span><span class="StringLit">&quot;d&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;n&quot;</span>
  307. <span class="Identifier">assert</span> <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">mget</span><span class="Punctuation">(</span><span class="StringLit">&quot;a&quot;</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;m&quot;</span>
  308. <span class="Identifier">assert</span> <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">mget</span><span class="Punctuation">(</span><span class="StringLit">&quot;d&quot;</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;n&quot;</span></pre>
  309. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L97" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  310. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L97" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  311. </dd>
  312. </div>
  313. <div id="withValue.t,SharedTable[A,B],A,untyped,untyped">
  314. <dt><pre><span class="Keyword">template</span> <a href="#withValue.t%2CSharedTable%5BA%2CB%5D%2CA%2Cuntyped%2Cuntyped"><span class="Identifier">withValue</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="sharedtables.html#SharedTable"><span class="Identifier">SharedTable</span></a><span class="Other">[</span><span class="Identifier">A</span><span class="Other">,</span> <span class="Identifier">B</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <span class="Identifier">A</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">,</span> <span class="Identifier">body</span><span class="Other">:</span> <a href="system.html#untyped"><span class="Identifier">untyped</span></a><span class="Other">)</span></pre></dt>
  315. <dd>
  316. Retrieves the value at <tt class="docutils literal"><span class="pre"><span class="Identifier">t</span><span class="Punctuation">[</span><span class="Identifier">key</span><span class="Punctuation">]</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">value</span></span></tt> can be modified in the scope of the <tt class="docutils literal"><span class="pre"><span class="Identifier">withValue</span></span></tt> call.
  317. <p><strong class="examples_text">Example:</strong></p>
  318. <pre class="listing"><span class="Keyword">var</span> <span class="Identifier">table</span><span class="Punctuation">:</span> <span class="Identifier">SharedTable</span><span class="Punctuation">[</span><span class="Identifier">string</span><span class="Punctuation">,</span> <span class="Identifier">string</span><span class="Punctuation">]</span>
  319. <span class="Identifier">init</span><span class="Punctuation">(</span><span class="Identifier">table</span><span class="Punctuation">)</span>
  320. <span class="Identifier">table</span><span class="Punctuation">[</span><span class="StringLit">&quot;a&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;x&quot;</span>
  321. <span class="Identifier">table</span><span class="Punctuation">[</span><span class="StringLit">&quot;b&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;y&quot;</span>
  322. <span class="Identifier">table</span><span class="Punctuation">[</span><span class="StringLit">&quot;c&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;z&quot;</span>
  323. <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">withValue</span><span class="Punctuation">(</span><span class="StringLit">&quot;a&quot;</span><span class="Punctuation">,</span> <span class="Identifier">value</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
  324. <span class="Identifier">assert</span> <span class="Identifier">value</span><span class="Punctuation">[</span><span class="Punctuation">]</span> <span class="Operator">==</span> <span class="StringLit">&quot;x&quot;</span>
  325. <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">withValue</span><span class="Punctuation">(</span><span class="StringLit">&quot;b&quot;</span><span class="Punctuation">,</span> <span class="Identifier">value</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
  326. <span class="Identifier">value</span><span class="Punctuation">[</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;modified&quot;</span>
  327. <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">withValue</span><span class="Punctuation">(</span><span class="StringLit">&quot;b&quot;</span><span class="Punctuation">,</span> <span class="Identifier">value</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
  328. <span class="Identifier">assert</span> <span class="Identifier">value</span><span class="Punctuation">[</span><span class="Punctuation">]</span> <span class="Operator">==</span> <span class="StringLit">&quot;modified&quot;</span>
  329. <span class="Identifier">table</span><span class="Operator">.</span><span class="Identifier">withValue</span><span class="Punctuation">(</span><span class="StringLit">&quot;nonexistent&quot;</span><span class="Punctuation">,</span> <span class="Identifier">value</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
  330. <span class="Identifier">assert</span> <span class="Identifier">false</span> <span class="Comment"># not called</span></pre>
  331. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/collections/sharedtables.nim#L63" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  332. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/collections/sharedtables.nim#L63" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  333. </dd>
  334. </div>
  335. </div>
  336. </dl>
  337. </div>
  338. </div>
  339. </div>
  340. <div class="twelve-columns footer">
  341. <span class="nim-sprite"></span>
  342. <br>
  343. <small style="color: var(--hint);">Made with Nim. Generated: 2025-02-03 14:57:17 UTC</small>
  344. </div>
  345. </div>
  346. </div>
  347. <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
  348. </body>
  349. </html>