summary refs log tree commit diff stats
path: root/lib/pure/hashes.nim
Commit message (Expand)AuthorAgeFilesLines
* hashes for refs should be an opt-in feature (#18098)Miran2021-05-301-1/+1
* fix #17911 rawProc for cpp (#17912)Timothee Cour2021-05-011-6/+12
* fix #17905: hash(closure) was not being tested (#17906)Timothee Cour2021-04-301-12/+20
* add -d:nimLegacyNoHashRef for a transition period which avoids defining hash(...Timothee Cour2021-04-271-17/+22
* std/hashes: hash(ref|ptr|pointer) + other improvements (#17731)Timothee Cour2021-04-161-23/+49
* hashes: Made the runnableExample easier to understand (#17689)Andreas Rumpf2021-04-091-1/+1
* hashes: support object default hash (#17175)Timothee Cour2021-02-261-17/+13
* add example of hashing an object by all of its fields with `fields` (#16643)dawidkotlin2021-02-191-0/+14
* JS: make hash float support IE/Safari (#16872)flywind2021-02-011-5/+10
* refactor hash in JS backend (#16863)flywind2021-01-301-29/+31
* Improve documentation for the hashes module (#16720)konsumlamm2021-01-151-51/+73
* fix #16061 (#16551)flywind2021-01-021-4/+10
* fix #16542 (#16549)flywind2021-01-021-2/+21
* move tests to testament (#16101)flywind2020-11-241-43/+0
* Alternate to https://github.com/nim-lang/Nim/pull/15915 (#15937)c-blake2020-11-131-2/+7
* Fix #14394 (#14395)Clyybber2020-05-181-1/+1
* move since from inclrtl to std/private/since (#14188)hlaaftana2020-05-021-1/+1
* bug fix (#14149) [backport:1.2]cooldome2020-04-281-1/+4
* fixes #12834 (#14017)Andreas Rumpf2020-04-191-3/+3
* added a .since annotation to hashIdentityAndreas Rumpf2020-04-151-2/+4
* Add `hashWangYi1` (#13823)c-blake2020-04-151-2/+71
* fix #12508, unaligned access on sparc64 (#13594)Miran2020-03-091-1/+1
* cleanup Ordinal (#13501)Timothee Cour2020-02-271-1/+1
* [backport] pseudorandom probing for hash collision (#13418)Timothee Cour2020-02-191-28/+4
* style fix: change 'JS' to 'js' to make it consistent (#13168)Miran2020-01-161-2/+2
* fixes #11764, faster hashing of (u)int (#12407)Miran2019-10-151-6/+9
* [backport] run nimpretty on hashesnarimiran2019-09-301-4/+4
* hashes: implement murmur3 (#12022)Miran2019-09-011-47/+149
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-2/+2
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-4/+0
* styleCheck: make the compiler and large parts of the stdlib compatible with -...Araq2019-07-101-1/+1
* [bugfix] hashes: fix regression for nested containers (#11426)Miran2019-06-081-6/+6
* right shift is now by default sign preserving (#11322)Arne Döring2019-05-291-7/+12
* hashes: quickfix one testnarimiran2019-05-271-1/+1
* fix spelling [ci skip] (#11307)Andy Davidoff2019-05-221-1/+1
* faster hashing (#11203)Miran2019-05-211-41/+94
* hashes: fix inconsistent tests, fixes #10771narimiran2019-03-031-4/+3
* improved documentation for several modules (#10752)Miran2019-03-011-40/+91
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-1/+0
* fixes #5969Araq2017-06-091-3/+8
* remove en-dash from the languageAndreas Rumpf2017-04-021-5/+1
* added hash for uints (#5435)Fabian Keller2017-02-261-0/+8
* Add hash proc for cstrings (#5386)Ruslan Mustakov2017-02-131-0/+10
* added hash procs for handling portions of strings/arrays/seqs.JamesP2015-10-071-4/+70
* Added commaapense2015-07-061-1/+1
* THash -> Hash correctionapense2015-07-061-1/+1
* added hash function for ordinal typesFabian Keller2015-07-031-0/+4
* lib/pure/e-o - Dropped 'T' from typespdw2015-06-041-30/+31
* Restructure branching slighty. Fix error message.Oscar Campbell2015-06-011-7/+6
* Implement #2811 - Unicode en-dash (U+2013) as hump/snake alt.Oscar Campbell2015-05-311-2/+10
an>= document.getElementById(lineNum); /* Always jump to new location even if the line was hidden inside a fold, or * we corrected the raw number to a line ID. */ if (lineElem) { lineElem.scrollIntoView(true); } return true; } if ('onhashchange' in window) { window.onhashchange = JumpToLine; } --> </script> </head> <body onload='JumpToLine();'> <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="Comment"># Example program showing 'return-continuation-until-mark' return other values</span> <span id="L2" class="LineNr"> 2 </span><span class="Comment"># alongside continuations.</span> <span id="L3" class="LineNr"> 3 </span><span class="Comment">#</span> <span id="L4" class="LineNr"> 4 </span><span class="Comment"># Print out a given list of numbers.</span> <span id="L5" class="LineNr"> 5 </span><span class="Comment">#</span> <span id="L6" class="LineNr"> 6 </span><span class="Comment"># To run:</span> <span id="L7" class="LineNr"> 7 </span><span class="Comment"># $ git clone <a href="https://github.com/akkartik/mu">https://github.com/akkartik/mu</a></span> <span id="L8" class="LineNr"> 8 </span><span class="Comment"># $ cd mu</span> <span id="L9" class="LineNr"> 9 </span><span class="Comment"># $ ./mu continuation4.mu</span> <span id="L10" class="LineNr">10 </span><span class="Comment">#</span> <span id="L11" class="LineNr">11 </span><span class="Comment"># Expected output:</span> <span id="L12" class="LineNr">12 </span><span class="Comment"># 1</span> <span id="L13" class="LineNr">13 </span><span class="Comment"># 2</span> <span id="L14" class="LineNr">14 </span><span class="Comment"># 3</span> <span id="L15" class="LineNr">15 </span> <span id="L16" class="LineNr">16 </span><span class="muRecipe">def</span> <a href='continuation4.mu.html#L16'>main</a> [ <span id="L17" class="LineNr">17 </span> <span class="Constant">local-scope</span> <span id="L18" class="LineNr">18 </span> l:&amp;:<a href='064list.mu.html#L6'>list</a>:num <span class="Special">&lt;-</span> copy<span class="Constant"> null</span> <span id="L19" class="LineNr">19 </span> l <span class="Special">&lt;-</span> push<span class="Constant"> 3</span>, l <span id="L20" class="LineNr">20 </span> l <span class="Special">&lt;-</span> push<span class="Constant"> 2</span>, l <span id="L21" class="LineNr">21 </span> l <span class="Special">&lt;-</span> push<span class="Constant"> 1</span>, l <span id="L22" class="LineNr">22 </span> k:continuation, x:num, done?:bool <span class="Special">&lt;-</span> <span class="muControl">call-with-continuation-mark</span> <span class="Constant">100/mark</span>, <a href='continuation4.mu.html#L31'>create-yielder</a>, l <span id="L23" class="LineNr">23 </span> <span class="Delimiter">{</span> <span id="L24" class="LineNr">24 </span> <span class="muControl">break-if</span> done? <span id="L25" class="LineNr">25 </span> $print x <span class="Constant">10/newline</span> <span id="L26" class="LineNr">26 </span> k, x:num, done?:bool <span class="Special">&lt;-</span> call k <span id="L27" class="LineNr">27 </span> <span class="muControl"> loop</span> <span id="L28" class="LineNr">28 </span> <span class="Delimiter">}</span> <span id="L29" class="LineNr">29 </span>] <span id="L30" class="LineNr">30 </span> <span id="L31" class="LineNr">31 </span><span class="muRecipe">def</span> <a href='continuation4.mu.html#L31'>create-yielder</a> l:&amp;:<a href='064list.mu.html#L6'>list</a>:num<span class="muRecipe"> -&gt; </span>n:num, done?:bool [ <span id="L32" class="LineNr">32 </span> <span class="Constant">local-scope</span> <span id="L33" class="LineNr">33 </span> <span class="Constant">load-inputs</span> <span id="L34" class="LineNr">34 </span> <span class="Delimiter">{</span> <span id="L35" class="LineNr">35 </span> done? <span class="Special">&lt;-</span> equal l,<span class="Constant"> null</span> <span id="L36" class="LineNr">36 </span> <span class="muControl">break-if</span> done? <span id="L37" class="LineNr">37 </span> n <span class="Special">&lt;-</span> first l <span id="L38" class="LineNr">38 </span> l <span class="Special">&lt;-</span> <a href='064list.mu.html#L24'>rest</a> l <span id="L39" class="LineNr">39 </span> <span class="muControl">return-continuation-until-mark</span> <span class="Constant">100/mark</span>, n, done? <span id="L40" class="LineNr">40 </span> <span class="muControl"> loop</span> <span id="L41" class="LineNr">41 </span> <span class="Delimiter">}</span> <span id="L42" class="LineNr">42 </span> <span class="Comment"># A function that returns continuations shouldn't get the opportunity to</span> <span id="L43" class="LineNr">43 </span> <span class="Comment"># return. Calling functions should stop calling its continuation after this</span> <span id="L44" class="LineNr">44 </span> <span class="Comment"># point.</span> <span id="L45" class="LineNr">45 </span> <span class="muControl">return-continuation-until-mark</span> <span class="Constant">100/mark</span>,<span class="Constant"> -1</span>, done? <span id="L46" class="LineNr">46 </span> assert<span class="Constant"> false</span>, <span class="Constant">[called too many times, ran out of continuations to return]</span> <span id="L47" class="LineNr">47 </span>] </pre> </body> </html> <!-- vim: set foldmethod=manual : -->