summary refs log tree commit diff stats
path: root/lib/pure
Commit message (Collapse)AuthorAgeFilesLines
* fixes documentation regression (#20925)ringabout2022-11-261-2/+2
| | | follow up https://github.com/nim-lang/Nim/pull/17004
* fixes broken importc for vcc [backport] (#20909)ringabout2022-11-241-2/+2
| | | fixes broken imports for vcc
* move `system/atomics` out of system; `std/atomics` should be preferred (#20875)ringabout2022-11-223-2/+5
| | | | | | | | | | | | | * move `system/atomics` out of system; `std/atomics` should be preferred * add deprecation message * fixes * fixes * fixes * fixes more tests
* rename `std/threads` to `std/typedthreads` (#20850)ringabout2022-11-161-1/+1
| | | | | | | | | * rename `std/threads` to `std/oldthreads` * fixes tests * rename to `typedthreads` * changelog
* fixes ptr to cstring warnings[backport] (#20848)ringabout2022-11-163-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo * fixes ptr to cstring warnings[backport] * add fixes Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* Allow users to set log flushing rules (#20817)Matt Haggard2022-11-141-17/+35
| | | | | | | | | | | * Add flushThreshold to std/logging loggers * Remove duplicate field * Add -d:nimFlushAllLogs for changing default flush behavior globally * Add changelog entry for log flushing change * Flush all log levels by default in Nim v2
* fix a few "broken link" warnings (#20837)Andrey Makarov2022-11-141-1/+1
|
* [sugar] handle HiddenDeref in capture, error at CT if unsupported nnk (#20680)Vindaar2022-11-101-3/+13
| | | | | | | | | | | | * [sugar] handle HiddenDeref in capture, error at CT if unsupported nnk Instead of running into trouble of the `.strVal` access failing, it's better to error at CT. * [tests] remove unnecessary import in test case * improve ident extraction & extend test cases * [tests] improve tests for `capture` of different types & act. check
* fixes #13781; fixes #14901; add acyclic pragmas to FlowVar (#20804)ringabout2022-11-101-2/+2
| | | | | * add acyclic pragmas to FlowVar * add testcases
* add effectsOf to map in the std/sets module (#20760)ringabout2022-11-051-1/+4
|
* add `effectsOf` to `std/tables` (#20751)ringabout2022-11-041-2/+6
|
* Uri.isIpv6 exported (#20736)Juan Carlos2022-11-031-1/+1
| | | | | * Export Uri.isIpv6 * Export Uri.isIpv6
* Improve dollar IpAddress (#20729)Juan Carlos2022-11-031-10/+14
| | | | | | | | | | | | | | | * Improve dollar * Improve dollar * Simplify, remove 1 if in for loop * ci * Update lib/pure/net.nim * Update lib/pure/net.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Export FileMode (#20726)Antonis Geralis2022-11-021-0/+1
|
* fixes #20526; use `nimPreviewSlimSystem` for documentation build (#20714)ringabout2022-11-017-2/+19
| | | | | | | * fixes #20526; use `nimPreviewSlimSystem` for `koch docs` * fixes documentation errors * fixes remaning issues
* change `include genode/env` to an import (#20721)ringabout2022-11-011-1/+1
| | | | | | | * change `include genode/env` to an import ref https://github.com/nim-lang/Nim/commit/0b262e9496387d5e8adc0c5f6020b3f3300e8f79#diff-8718bd20d8f61d6638d3d64b19efc31bcd40a6d5be8215b2a1f0b75ed93e8d56 * fixes comments
* refactor os imports into corresponding small modules (#20720)ringabout2022-11-015-5/+7
|
* Improve dollar (#20672)Juan Carlos2022-10-311-30/+49
| | | | | | | | | | | | | | | | | | | | | | | * Improve dollar for uri * Refactor * . * . * verde * optimize * https://github.com/nim-lang/Nim/pull/20672#issuecomment-1295440246 [skip ci] * https://github.com/nim-lang/Nim/pull/20670#issuecomment-1295937393 * ci * Update lib/pure/uri.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Improve getDataUri (#20670)Juan Carlos2022-10-311-4/+12
| | | | | | | * Improve getDataUri * Restart ci * https://github.com/nim-lang/Nim/pull/20670#issuecomment-1295937393
* Genode: add scheduleCallbacks to asyncdispatch (#20708)ehmry2022-10-311-3/+29
| | | | | | | | | * Genode: add native signal handler * Genode: add scheduleCallbacks to asyncdispatch This resolves some awkwardness where an RPC server may or may not use callSoon while dispatching RPC but without scheduling timers or I/O.
* allow deferred close of nil stream (#20706)n5m2022-10-311-4/+14
| | | | | * allow deferred close of nil stream * improve example
* removes channels_builtin when enabling `nimPreviewSlimSystem` (#20713)ringabout2022-10-312-2/+0
|
* put std/threads under the umbrella of nimPreviewSlimSystem (#20711)ringabout2022-10-312-2/+2
| | | | | | | | | | | * put `std/threads` under the umbrella of `nimPreviewSlimSystem` * add changelog * fixes tests * fixes tests again * fixes tests
* move threads out of system (#20674)ringabout2022-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move syslocks first * progress * clean up * go on * clean up * clean up * add imports syslocks * remove documentation * public deallocOsPages * fixes genode * fixes more * fixes boehmGC * cover more cases * fixes cyclic deps * fixes genode * cleanup * unpublic fields * cleanup * clean up
* fix #16264 low(Time) OverflowDefect (#20552)Bung2022-10-291-1/+1
| | | fix #16264 regression(0.18.0 => devel): import times; echo low(Time) gives OverflowDefect
* Fix #20628 for Windows (#20667)Andrey Makarov2022-10-281-6/+9
| | | | | | | * Fix #20628 for Windows * Move isRegular - !isSpecial and onlyRegular - skipSpecial * Forgot to change it in 1 more place
* openssl 3 support no longer opt in + some 1.0 support (#20668)metagn2022-10-271-2/+15
| | | | | | | | | | | | | | | * Revert "Add OpenSSL 3 support (#19814)" This reverts commit 2dcfd732609a2cfa805e5a94cc105399a2f18632. * openssl 3 support no longer opt in + some 1.0 support * hopefully fix * maybe fix * final attempt * actual fix hopefully
* Added openarray[char] overloads to std/unicode (#20648)Jason Beetham2022-10-271-46/+417
| | | | | | | | | | | | | | | | | * Added openarray[char] overloads to std/unicode Call substr instead of index slice inside unicode Added substr overload for openarray for parity with string functionality Made style checker happies and fixed overloads for substr * Added update to changelog [skip ci] * Inline unicode string operations * Moved substr overload to unicode Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* clean up `std/os` related modules (#20651)ringabout2022-10-251-65/+0
| | | | | | | | | * clean up `std/os` related modules * use `cmpPaths` * reset * cleanup
* Change both code snippets to use the same test URL (#20647)Saint2022-10-251-1/+1
|
* Implement Unix file regularity check (#20448) (#20628)Andrey Makarov2022-10-251-4/+7
| | | | | * Implement Unix file regularity check * update std/dirs also
* Added 'openArray[char]' overloads to 'std/parseutils' (#20527)Jason Beetham2022-10-241-93/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added 'openarray[char]' overloads to 'std/parseutils' * Removed redundant `start` and `last` params from slice using procs * Fixed type for parseIdent overload * fixed one by off with 'substr' * removed missed start parameters for procedures * Added 'openarray[char]' overloads to 'std/parseutils' * Removed redundant `start` and `last` params from slice using procs * Fixed type for parseIdent overload * fixed one by off with 'substr' * removed missed start parameters for procedures * Fixed VM op to work with new 'opcSlice' * Corrected captureBetween's logic to work with openarray * js sys's parsefloat logic now uses openarray Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* fixes the typical (not a == b) bug in the documentation (#20643)ringabout2022-10-241-2/+2
| | | | | * fixes the typical (not a == b) bug; uses runnableExamples * cannot add runnableExamples
* Add `safe` parameter to `base64.encodeMime` (#20559)Amjad Ben Hedhili2022-10-211-3/+11
| | | | | | | | | | | | | | | | | | * Improve `encodeMime` signature * `string` to `openArray[char or byte]` * `safe` parameter * Fix * Revert "Fix" This reverts commit a394c505c2ab751621c24fd29b17e97c01251c1f. * Remove encodeMime's openArray overload * Document the `safe` parameter * Add changelog entry
* move procs in os to `appdirs` (#20605)ringabout2022-10-201-141/+3
| | | | | * move procs in os to `appdirs` * Update lib/std/private/osappdirs.nim
* [std/os] split and re-export (#20593)ringabout2022-10-201-2044/+17
| | | | | | | * [std/os] split and export * move to private modules * fixes docs and tests Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* refactor envvars, oserrors; register vmops (#20592)ringabout2022-10-183-339/+5
| | | | | * refactor envvars, oserrors; register vmops * remove type definitions
* [`std/os` clean up] import and export `osseps` (#20580)ringabout2022-10-173-113/+3
| | | import and export osseps
* fixes #19162; enable `strictEffects` for v2 (#19380)ringabout2022-10-151-1/+1
| | | | | | | | | | | | | | | | | | | * enable stricteffects * add gcsafe * fix tests * use func * fixes pegs tests * explicitly mark repr related procs with noSideEffect * add nimLegacyEffects * change URL * fixes docopt * add `raises: []` to repr * fixes weave * fixes nimyaml * fixes glob * fixes parsetoml * Apply suggestions from code review * Update testament/important_packages.nim * add legacy:laxEffects
* follow up #19714; add `memmem` optimizations for `find` on Linux, Macos and ↵ringabout2022-10-131-1/+26
| | | | | | | | | | | | | | | BSDs (#20556) * fixes tests * add memmem optimization for find * fixes * ty[o * fixes `"abc".find("") == 0 doesn't work on macOS Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* Markdown code blocks migration part 7 (#20547)Andrey Makarov2022-10-127-90/+95
|
* oids sticks to 24 length strings; fixes breaking changes (#20546)ringabout2022-10-121-7/+7
| | | oids sticks 24 length strings
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-113-6/+6
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* Remove unused `base64.encode` overload (#20369)Amjad Ben Hedhili2022-10-091-27/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unused `base64.encode` overload * [skip ci] Remove commented code * [skip ci] var -> let * [skip ci] Remove mentions of the string overload * Remove `SomeInteger` overload * Fix CI * Fix CI * Deprecate `SomeInteger` overload * [skip ci] Add changelog entry * Revert "Remove `SomeInteger` overload" This reverts commit 79a2963a2154377ee44e9ad5532409baaf5575a6. * Revert "[skip ci] Add changelog entry" This reverts commit 186f17eb3919a593e2a3928e3ac3b462a8323fc1. * Revert "Revert "Remove `SomeInteger` overload"" This reverts commit 8005318ee4fbf8cef726b1af2015e76aaf1e700a. * Update lib/pure/base64.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* parseutils: skipWhile: fix parameter name in doc comment (#20523)ee72022-10-091-1/+1
|
* FTP client is now able to connect to server over TLS by set `useTls =… ↵Huy Doan2022-10-091-10/+75
| | | | | | | | | | | | | | | | | (#17219) * FTP client is now able to connect to server over TLS by set `useTls = true` in newAsyncFtpClient proc * Update asyncftpclient.nim * fix CI * shouldn't use {.error.} * Update lib/pure/asyncftpclient.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* out parameters: enforce that 'out' is only used as a parameter (#20510)Andreas Rumpf2022-10-072-2/+3
| | | | | | | * out parameters: enforce that 'out' is only used as a parameter * make tables.nim use 'out' parameters * better backwards compat
* Markdown indented code blocks (#20473)Andrey Makarov2022-10-056-19/+20
| | | | | | | | | | | | | | | | | | | | | | | * Implement Markdown indented code blocks Additional indentation of 4 spaces makes a block an "indented code block" (monospaced text without syntax highlighting). Also `::` RST syntax for code blocks is disabled. So instead of ```rst see:: Some code ``` the code block should be written as ```markdown see: Some code ``` * Migrate RST literal blocks :: to Markdown's ones
* strutils, rstgen: avoid deprecated `strutils.delete` (#20488)ee72022-10-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strutils `delete` func with signature func delete*(s: var string, first, last: int) was deprecated in adba5eb45e0a, in favor of one with signature func delete*(s: var string, slice: Slice[int]) However, a few procedures still used the deprecated form. This commit updates them, resolving these deprecation warnings: rstgen.nim(766, 12) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] strutils.nim(1651, 19) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] strutils.nim(1679, 7) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] strutils.nim(2472, 7) Warning: use `delete(s, first..last)`; delete is deprecated [Deprecated] Before this commit: - `trimZeros` called `s.delete(i+1, i)` for an input that lacks a trailing zero (like "1.23"). - `removePrefix*(s: var string, prefix: string)` called `s.delete(0, -1)` when the prefix was the empty string. which did not modify `s`, nor raise an error. But the newer slice `delete` raises an `IndexDefect` when the start of the slice is greater than the end, so we avoid calling the new `delete` for such a case. Recall that exceptions inheriting from `system.Defect` are not tracked with the `.raises: []` exception tracking mechanism [1], so this commit does not break existing code like: proc foo {.raises: [].} = var s = "abc1.20" s.removePrefix("abc") s.trimZeros() doAssert s == "1.2" The `strutils.delete` deprecation was motivated by a problem with `system.delete` [2][3]: `system.delete` had surprising behavior when the index passed to it was out of bounds (it would delete the last entry then). Compile with `-d:nimStrictDelete` so that an index error is produced instead. Be aware however that your code might depend on this quirky behavior so a review process is required on your part before you can use `-d:nimStrictDelete`. To make this review easier, use the `-d:nimAuditDelete` switch, which pretends that `system.delete` is deprecated so that it is easier to see where it was used in your code. `-d:nimStrictDelete` will become the default in upcoming versions. A similar deprecation happened with `sequtils.delete` [4], but that deprecated form is already not used in this repo. [1] https://github.com/nim-lang/Nim/blob/2dec69fe5aa6/doc/manual.md#exception-tracking [2] https://github.com/nim-lang/Nim/blob/2dec69fe5aa6/changelogs/changelog_1_6_0.md#system [3] https://github.com/nim-lang/Nim/commit/92cb76571432 [4] https://github.com/nim-lang/Nim/commit/1d6863a7899f
* Add proxy basic auth documentation (#20498)TerrorTrace2022-10-051-0/+8
|