summary refs log tree commit diff stats
path: root/lib/pure
Commit message (Collapse)AuthorAgeFilesLines
* oids: switch from PRNG to random module (#16203)flywind2021-01-071-20/+19
| | | | | | | * switch from PRNG to random module * fix the regression * comments + tests * runnableExamples * make oids better
* add math.signbit (#16592)flywind2021-01-071-1/+26
|
* Fixes the asynchttpserver example some more (#16599)Dominik Picheta2021-01-071-8/+7
| | | | | I dislike this example a lot (busy looping for FDs to be closed is a very poor waste of resources) but at least with these changes it's a little bit better.
* Minor docs/format changes (cpuinfo, volatile) (#16602)konsumlamm2021-01-062-12/+11
|
* Improve documentation for deques (#16589)konsumlamm2021-01-061-156/+106
|
* Link the <fenv.h> header (#16597)konsumlamm2021-01-051-2/+4
|
* make cstrutils work in VM (#16590)flywind2021-01-052-97/+98
| | | | | * make cstrutils work in VM * more
* Improve documentation for complex (#16588)konsumlamm2021-01-051-101/+159
| | | | | | | | | | | | | * Improve documentation for complex Add missing doc comments * Add runnableExample Add links for principal values Optimize `-` Change var to let * Use std prefix for imports
* fix #9125 (#16582)flywind2021-01-051-1/+11
| | | | | | | | | | | | * fix #9125 * Update tests/stdlib/tmath.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * back Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* remove duplication in asynchttpserver examples (#16586)Timothee Cour2021-01-051-48/+28
| | | | | | | * remove duplication in asynchttpserver examples * fixup * add comment showing how to run snippet locally
* fix #16506 by changing the example (#16580)Miran2021-01-041-2/+2
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Add backwards index overload for `[]` for JsonNode (#16501)Neelesh Chandola2021-01-041-0/+13
| | | | | | | | | | | * Add backwards index overload for `[]` for JsonNode * Add since Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> * Add docs, example, and changelog Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* Improve sequtils documentation (#16559)konsumlamm2021-01-041-78/+79
| | | | | | | * Improve sequtils documentation Uncomment assertions in tests * Use present tense
* Improve documentation for critbits (#16568)konsumlamm2021-01-031-135/+107
|
* Fix #16554 (#16564)hlaaftana2021-01-031-2/+3
|
* Algorithm improvements (#16529)konsumlamm2021-01-021-134/+142
| | | | | | | | | | | | * Improve documentation for algorithm Remove unused import in algorithm tests Improve formatting * Reapply fix for reverse on empty openArray * Use 3rd person singular Add more explanations.
* fix #16061 (#16551)flywind2021-01-021-4/+10
|
* fix #16542 (#16549)flywind2021-01-021-2/+21
| | | * fix #16542
* Add mimetypes.mimesLongest (#16480)Juan Carlos2021-01-021-1/+28
| | | | | | | | | | | | | | | | | | | * Allow single alloc mimetypes ops * Allow single alloc mimetypes ops * Update lib/pure/mimetypes.nim Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> * https://github.com/nim-lang/Nim/pull/16480#issuecomment-752630190 * https://github.com/nim-lang/Nim/pull/16480#issuecomment-752630190 * https://github.com/nim-lang/Nim/pull/16480#issuecomment-753349661 * update changelog Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* Documentation only Testament unittest (#16532)Juan Carlos2021-01-011-9/+13
| | | | | | | | | * Link Testament from unittest doc * Update lib/pure/unittest.nim Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* reuse const (#16422)n5m2021-01-011-1/+1
|
* follow up #16399 clean up docs (#16539)flywind2021-01-011-30/+41
| | | | | * follow up #16399 clean up docs * more
* link to POSIX sendSignal from osproc.kill docs (#16475)n5m2021-01-011-0/+2
| | | and from osproc.terminate docs
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-312-73/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * support strutils * more * better * Call len once per string/cstring * Change var to let * Compare ternary on first char * More appropriate param name * fix * better * one test * impl * more efficient * minor Co-authored-by: Clyybber <darkmine956@gmail.com>
* adding missing commas in std/bitops (#16520)rockcavera2020-12-301-5/+5
| | | adding missing commas between the importc and header pragmas of some procs.
* use runnableExamples in options (#16503)flywind2020-12-301-26/+17
|
* Add math.copySign (#16406)flywind2020-12-301-0/+38
| | | | | * add math.copySign * fix + tests
* follow #15860 clean cgi module (#16487)flywind2020-12-271-50/+47
| | | | | * follow #15860 clean cgi module * follow #15860 clean cgi module
* Save some alloc on base64 using encodeSize (#16465)Juan Carlos2020-12-271-0/+1
|
* follow #15357 and move decodeQuery (#15860)flywind2020-12-272-34/+59
| | | | | | | | | * follow #15357 and move decodeQuery * solve problem one * minor * deprecate decodeData * add changelog and since * add testcase for decodeQuery
* fix #16474 `unittest.check type1 is type2` gives CT error (#16476)flywind2020-12-271-1/+2
| | | | * fix #16474 * more tests
* Add missing HTTP codes (#16454)Juan Carlos2020-12-231-3/+54
|
* add `euclDiv` and `euclMod` to `math` (#16414)flywind2020-12-231-0/+26
| | | | | | | | * add `euclDiv` and `euclMod` to `math` * use abs * Update lib/pure/math.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
* strip minor improvement (#16444)flywind2020-12-231-1/+1
| | | | | | | * strip minor improvement * add more tests * Update tests/stdlib/tstrutils.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* [backport => 1.0] fix #16428 vmops now works for generic procs (#16429)Timothee Cour2020-12-221-0/+2
| | | | | * fix #16428 vmops now works for generic procs * remove duplication
* styleCheck: Fix some inconsistent identifiers (#16177)ee72020-12-2112-39/+39
|
* docs minor for math (#16407)flywind2020-12-201-2/+2
|
* O(1) concatenation of singly- and doubly linked lists. (#16362)Peter Salvi2020-12-201-1/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * O(1) concatenation of singly- and doubly linked lists. There is also new `toSinglyLinkedList` and `toDoublyLinkedList` functions for conversion from `openArray`s, similarly to `toHashSet` or `toTable`. * Add `sequtils` import to runnable examples with `toSeq`. * Added missing call to runnable examples. * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * Improved tests for lists. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * More compact tests for lists with templates. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Added extended example to `lists.copy`. * Corrected .since annotations to 1.6 * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Since declarations changed to (1,5,1). * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Changelog update. * Fix rebasing errors. * Self-adding with `lists.addMove` results in a cycle now. Added some extra tests.
* Fix osproc so that it doesn't close pipe/process/thread handles twice ↵Tomohiro2020-12-181-18/+40
| | | | | | | (#16385) [backport] * Add error check to closeHandle and fix closing handle twice in osproc * Fix compile error on Linux
* use hexchar in stdlib (#16290)flywind2020-12-174-61/+20
|
* make the docs of strutils a bit better (#16368)flywind2020-12-171-153/+150
|
* fixes #16359 [backport] (#16377)Andreas Rumpf2020-12-171-1/+1
|
* sequtils.nim: Change some `func` back to `proc` (#16309)ee72020-12-141-28/+28
| | | | | | | | | | | This commit changes the funcs that take a `proc` parameter back to procs. This reverts some of commit 6f57ebae349f: sequtils.nim: Use `func` (#16293) See also: - https://github.com/nim-lang/Nim/issues/16303 - https://github.com/nim-lang/Nim/pull/16304
* Fix broken links in docs (#16336)Elliot Waite2020-12-1411-61/+67
| | | | | * Fix broken links in docs * Fix rand HSlice links
* clean the docs of sequtils (#16332)flywind2020-12-141-97/+89
|
* Added strscans.scanTuple (#16300)Jason Beetham2020-12-121-1/+50
| | | | * Added since and changelog
* improve tests for collections (#16328)Timothee Cour2020-12-121-63/+45
| | | | | | | * improve tests for collections * remove remaining code blocks in deques.nim * improve runnableExamples
* add math.isNaN (#16179)Timothee Cour2020-12-111-0/+21
| | | | | | | * add math.isNaN * isNaN now works with --passc:-ffast-math; tests * Update lib/pure/math.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* unittest: use defines instead of env vars (#16165)Timothee Cour2020-12-101-35/+55
| | | | | | | | | * unittest: use defines instead of env vars * use defines in testament * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* rationals.nim: Use `func` everywhere (#16302)ee72020-12-091-41/+41
|