summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* fixes #17173 (#17213)Andreas Rumpf2021-03-013-1/+16
| | | | | | | | | | | | | | | | | | | | | | * fixes #17173 * add testcase (#17214) * Apply suggestions from code review * fix for newruntime * Apply suggestions from code review * Update lib/system.nim * Update lib/system.nim * Update lib/system.nim Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
* add overload `add(a: var string, b: openArray[char])` (#15951)Timothee Cour2021-03-012-7/+24
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* use `-r:off` for runnableExamples that should compile but not run (#17203)Timothee Cour2021-03-015-44/+40
| | | | | * use -r:off for runnableExamples that should compile but not run * use -r:off in other RT disabled tests
* Replace double backticks with single backticks - Part 3 out of ~7 (#17207)Danil Yarantsev2021-02-285-159/+159
|
* Replace double backticks with single backticks - Part 2 out of ~6 (#17206)Danil Yarantsev2021-02-2810-136/+136
|
* Replace double backticks with single backticks - Part 1 out of ~6 (#17205)Danil Yarantsev2021-02-2810-75/+75
|
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-2842-121/+121
|
* add warnings to std/sysrand (#17191)flywind2021-02-261-0/+4
| | | | | | | | | | | | | | * remove unnecessary when statement * remove outdated codes * add warnings to std/sysrand * Update lib/std/sysrand.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fix code-block test bugs: fix #17183, fix ↵Timothee Cour2021-02-261-1/+4
| | | | | | | https://github.com/timotheecour/Nim/issues/620 (#17184) * fix code-block test bugs: fix #17183, fix https://github.com/timotheecour/Nim/issues/620 * cleanup
* Fix unicode.split with seperators examples (#17176)zetashift2021-02-261-58/+25
| | | | | | | | | | | | | | | | | | | | | | * Fix unicode.split with seperators examples https://nim-lang.org/docs/unicode.html#split.i%2Cstring%2CRune%2Cint didn't work with the set constructor `{}` so replaced it with a string that's converted to an openArray compatible type containing `Rune`s. * Add runnableExamples to unicode.split * Add runnableExamples to split with single separator too * Simplify runnableExamples unicode.split * Improve the rest of the runnableExamples with the simplified code * Simplify runnableExamples of unicode.split even more * Formatted unicode.split example * Update lib/pure/unicode.nim Co-authored-by: zetashift <rishi2@laptop.localdomain> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* hashes: support object default hash (#17175)Timothee Cour2021-02-261-17/+13
|
* improve docs for sugar.collect (#17188)Timothee Cour2021-02-261-24/+29
|
* make jsconsole.assertion errors less confusing in logs (#17179)Timothee Cour2021-02-251-1/+1
| | | | | | | * make jsconsole.assertion errors less confusing in logs * address comments * fixup
* clarify the docs of existsOrCreateDir a bit (#17182)flywind2021-02-251-4/+3
| | | | | | | * remove unnecessary when statement * remove outdated codes * clarify the docs a bit
* clean up wrapnilsflywind2021-02-251-1/+0
|
* refs #17114: workaround for arm64 which should segfault but does not (#17178)Timothee Cour2021-02-252-1/+2
| | | | | | | * refs #17114: workaround for arm64 which should segfault but does not * fixup * Update lib/std/wrapnils.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* mark inline (#17180)flywind2021-02-241-2/+2
|
* use single backtick (#17181)flywind2021-02-2410-381/+381
|
* `std/options`: `$some(3)` is now `"some(3)"`, etc. (#17147)Timothee Cour2021-02-241-9/+15
| | | | | | | * std/options: $some(3) is now "some(3)", not "Some(3)", `$none(int)` is now `"none(int)"` instead of `"None[int]"` * fix tests * disable optionsutils
* asyncjs: add `then`, `catch` for promise pipelining (#16871)Timothee Cour2021-02-241-3/+66
| | | | | | * asyncjs: add then * improve tests, changelog, API * fix cryptic windows error: The parameter is incorrect * address comments
* remove deprecated stuff in unittest module (#17156)flywind2021-02-241-38/+30
| | | | | | | | | * remove unnecessary when statement * remove outdated codes * remove deprecated stuff in testament * fix
* wrapnils: add `??.` which returns an `Option` (#16931)Timothee Cour2021-02-241-50/+49
| | | | | | | * wrapnils: add option-like API with ??., isSome, get * fix test after rebase * cleanups * fix changelog * address comments regarding get vs unsafeGet
* fix #17159 items(cstring) works in VM (#17160)Timothee Cour2021-02-241-14/+45
| | | | | | | | | * fix #17159 items(cstring) works in VM * improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs * document items(cstring) * address comments
* add strbasics.strip (#16280)flywind2021-02-242-0/+98
|
* [stdlib] make cookies module modern (#17116)flywind2021-02-241-13/+28
| | | | | | * update cookies module * introduce sameSite.Default Co-authored-by: hlaaftana <10591326+hlaaftana@users.noreply.github.com>
* fixes yet another SSL problem on Windows [backport:1.2] (#17167)Andreas Rumpf2021-02-241-1/+1
|
* use single backtick (#17166)flywind2021-02-2312-305/+305
|
* add enumutils.items for sparse enums, typetraits.SomeSparseEnum (#17080)Timothee Cour2021-02-233-4/+35
| | | | | | | * add enumutils.items for enum with holes * changelog * ref in lib.rst * use `type SomeSparseEnum* = (not Ordinal) and enum` instead of concept * address comment: rename back to enum with holes
* A few rst doc fixes (#17151)Danil Yarantsev2021-02-232-2/+2
| | | | | * Fix a couple of rst formatting issues * no need for the extra space
* add io.readChars overload (simpler, less error prone) (#16044)Timothee Cour2021-02-223-6/+10
| | | | | | | | | | * add simpler to use readChars overload * use new readChars overload * Update lib/wrappers/openssl.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
* Improve the ropes module (#17145)konsumlamm2021-02-221-63/+47
| | | | | | | | | | | | | | * Improve ropes module Improve wording Update runnableExamples Add index bound check for `[]` Minor format changes * Update tests/stdlib/tropes.nim Run on C & JS target Test in VM Add tests for `[]`
* fix #15215 (#17142)rockcavera2021-02-221-5/+12
| | | | | | | | | | | | | | | | * fix 15215 * fix test * end line * Update tests/stdlib/tnetconnect.nim Co-authored-by: flywind <xzsflywind@gmail.com> * Update lib/pure/net.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Add example for pattern matching on options (#17120)konsumlamm2021-02-221-21/+49
| | | | | | | | | | | * Add example for pattern matching on options * Use code-block * Apply suggestions * Use block comments * Fix example
* fix prelude regression refs #16238: `include prelude` doesn't interfere with ↵Timothee Cour2021-02-221-12/+16
| | | | | | | | | `nim doc` (#17111) * fix bug1 from #16238 nim doc now works with include prelude * fix for windows * fixup
* [JS + docs] improve std/monotimes module (#17103)flywind2021-02-221-42/+44
|
* make rst.nim use object variant (#17138)Andrey Makarov2021-02-223-130/+152
| | | | | | | * make rst.nim use object variant * add workaround * fix mistake
* remove outdated codes (#17140)flywind2021-02-222-2/+0
| | | | | * remove unnecessary when statement * remove outdated codes
* make copySign for js consistent with other backends (#16609)Timothee Cour2021-02-221-15/+30
| | | | | | * make copySign work more robustly in js * improve tests * improve tests/vm/tcastint.nim
* use single backtick (#17141)flywind2021-02-2111-68/+68
|
* remove unnecessary when statement (#17135)flywind2021-02-211-12/+7
|
* use single backtick (#17133)flywind2021-02-2110-103/+103
|
* move prelude so that `include std/prelude` also works (#17110)Timothee Cour2021-02-201-3/+6
| | | | | * move prelude so that `include std/prelude` also works * add test
* Improve the strformat module (#17106)konsumlamm2021-02-201-180/+159
| | | | | | | | | | | | | | | | | | | | | | * Improve the strformat module Improve documentation Use runnableExamples * Fix overflow error for low(int64) Add test * Use assert in runnableExamples * Improve tstrformat Put tests in proc & test VM Put tests in blocks Add c, js targets * Use doAssert in tests * Disable JS & VM tests
* enable bsd for tsetutils; improve setutils API (#17098)Timothee Cour2021-02-201-5/+8
|
* stricter checks for RST headlines (#17089)Andrey Makarov2021-02-202-7/+34
|
* uri: document removeDotSegments, add tests, show failure modes (#17064)Timothee Cour2021-02-201-1/+31
| | | | * uri: document removeDotSegments, add tests, show failure modes * address comments
* use single backtick (#17115)flywind2021-02-2010-174/+174
|
* system/excpt: let the OS handle termination on signal (#16712)alaviss2021-02-192-3/+18
|
* add example of hashing an object by all of its fields with `fields` (#16643)dawidkotlin2021-02-191-0/+14
| | | | | | | | | | | | * add example of hashing an object by all of its fields with `fields` * Update lib/pure/hashes.nim * Update lib/pure/hashes.nim * Update lib/pure/hashes.nim Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* use single backtick (#17100)flywind2021-02-1810-81/+81
|