summary refs log tree commit diff stats
path: root/lib/pure
Commit message (Collapse)AuthorAgeFilesLines
* std/hashes: hash(ref|ptr|pointer) + other improvements (#17731)Timothee Cour2021-04-161-23/+49
|
* start using import {.all.} (#17736)Timothee Cour2021-04-161-22/+0
|
* simplify asyncfutures, asyncmacro (#17633)Timothee Cour2021-04-142-72/+31
|
* remove unnecessary assignment (#17702)flywind2021-04-121-1/+0
|
* followup strformat PR. backslash escapes, tests, docs (#17700)shirleyquirk2021-04-121-4/+29
| | | | | | | | | | | | | | | | | | | | | | * Allow use of colons inside fmt allowing colons inside fmt by replacing the format specifier delimiter lets arbitrary nim code be run within fmt expressions. Co-authored-by: flywind <xzsflywind@gmail.com> * formatting,documentation,backslash escapes Adding support for evaluating expressions by special-casing parentheses causes this regression: `&"""{ "(hello)" }"""` no longer parses. In addition, code such as &"""{(if open: '(' else: ')')}""" wouldn't work. To enable that, as well as the use of, e.g. Table constructors inside curlies, I've added backslash escapes. This also means that if/for/etc statements, unparenthesized, will work, if the colons are escaped, but i've left that under-documented. It's not exactly elegant having two types of escape, but I believe it's the least bad option. * changelog * added json strformat test * pulled my thumb out and wrote a parser Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
* [feature] add arbitrary code execution to strformat (#17694)shirleyquirk2021-04-111-9/+28
| | | | | | | | | * changed parser to ignore ':' within parens * Update strformat.nim * Update lib/pure/strformat.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Genode platform fixes (#17521)Emery Hemingway2021-04-091-0/+26
| | | | | | | | | | | | | | | | | | | * Genode: move dyncall failures to runtime Do not use the "error" pragma to warn that dynamic library loading is not implemented, print a message at runtime and exit. * Genode: use stricter dataspace type in page allocator * Genode: remove compiler configuration from nim.cfg Self-hosting Nim is not supported on Genode and defining the cross-compilation environment can be done externally. * Genode: use new mutex API * Genode: call nim_component_construct as a C procedure * Genode: implement echo for NimStringV2
* hashes: Made the runnableExample easier to understand (#17689)Andreas Rumpf2021-04-091-1/+1
|
* further progress on rst roles & directives (fix #17646) (#17659)Andrey Makarov2021-04-086-11/+11
| | | | | | | * further progress on rst roles & dir-s (fix #17646) * fix documents according to the messages * fix bug 17 from #17340
* Improve endians module (#17674)konsumlamm2021-04-081-7/+42
| | | | Extend documentation Add runnableExamples
* use strstr for a faster find implementation (#17672)Andreas Rumpf2021-04-081-3/+26
| | | | | * use strstr for a faster find implementation * stress the -d:release and -d:danger switches
* use sink and lent in deques (#17661)flywind2021-04-071-10/+10
| | | | | | | | | * use sink and lent in deques * Update lib/pure/collections/deques.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* close #4451 (#17627)flywind2021-04-061-1/+2
|
* don't run one example on 32-bit machines (#17655)Miran2021-04-061-3/+4
| | | | | This example seems to break our 32-bit nightlies builds. This is just a temporary solution (TM) until we figure out a better one.
* remove un-needed {.push hint[ConvFromXtoItselfNotNeeded]: off.} in ↵Timothee Cour2021-04-032-6/+1
| | | | asyncfutures, asyncmacro (#17631)
* fix #17615(runnableExamples silently ignored if placed after some code) (#17619)flywind2021-04-021-1/+1
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* [docs minor] close #17618 (#17620)flywind2021-04-021-9/+12
| | | | | | | | | * [docs minor] close #17618 * Update lib/pure/times.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* [docs minor] close #16553 (#17612)flywind2021-04-021-10/+6
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Fix #17017 (math edge cases) (#17588)konsumlamm2021-04-011-5/+13
| | | | | | | * Fix #17017 Add more test cases * USe signbit in example
* Removes asynchttpserver.getSocket. (#17587)Dominik Picheta2021-03-311-14/+0
|
* add getPort to resolve Port(0) (#17559)Timothee Cour2021-03-301-15/+27
| | | | | | | | | * add getPort to resolve Port(0) * fixup * use getPort in examples + tests * address comments: do not re-export Port
* Rotation right and left refactored to generics. Continuation of #16622 (#17578)rockcavera2021-03-301-88/+31
| | | | | | | * Rotation right and left refactored to generics Continuation of [16622](https://github.com/nim-lang/Nim/pull/16622) * add runnableExamples
* Fix void async in templates (#17562)Ardek Romak2021-03-301-2/+3
| | | | | | | | * Fix https://github.com/nim-lang/Nim/issues/16159 * Add test for async in template * Shorten the expression * Even shorter Co-authored-by: Clyybber <darkmine956@gmail.com>
* Add hasDataBuffered to asyncnet (#16000)Dylan Modesitt2021-03-291-0/+5
| | | | Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* [std/uri]fix #17481 (#17568)flywind2021-03-291-1/+1
|
* [docs]fix #17473 (#17565)flywind2021-03-291-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix nim js cmp fails at CT * Add `hasClosure` to `std/effecttraits` * type * Update changelog.md Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * fix #14011 * Delete ttypetraits.nim * Apply suggestions from code review * fix #17473 * Revert "fix #14011" This reverts commit 0eed97a84b172b198bf4e6de69c04b84ef9d9f93. * Update lib/system.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Add `hasClosure` to `std/typetraits` (#17501)flywind2021-03-291-0/+11
| | | | | | | | | | | | | | | | * fix nim js cmp fails at CT * Add `hasClosure` to `std/effecttraits` * type * Update changelog.md Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/std/effecttraits.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Small doc fixes in net (#17566)Danil Yarantsev2021-03-291-4/+2
|
* Fix net.readLine infine loop #17534 (#17535)ben2021-03-291-0/+1
| | | | | * Fix net.readLine infine loop #17534 * fix #17534 add return to template
* Free the certificate after checking in `checkCertName` (#17558) [backport:1.2]Danil Yarantsev2021-03-291-3/+4
| | | | | | * Fix small leak in checkCertName * Size is not needed either * Free the certificate after checking
* follow up #17539 (#17548)flywind2021-03-291-1/+0
| | | | | * fix nim js cmp fails at CT * follow up #17539
* Add a getter for all defined Sections in parsecfg (#15450)Ardek Romak2021-03-281-0/+6
|
* nnkArglist => nnkArgList + special case stylecheck:error (#17529)Timothee Cour2021-03-271-1/+1
| | | | | * nnkArglist => nnkArgList * special case stylecheck:error
* lent support for tables (#17505)flywind2021-03-251-9/+9
|
* fix #17325 linux 32bit CI; fix #17085 flaky test (#17469)Timothee Cour2021-03-241-3/+4
|
* fix #17490 (#17491)flywind2021-03-241-4/+10
|
* followup #16182 (#17472)flywind2021-03-231-3/+3
| | | | | * fix nim js cmp fails at CT * followup #16182
* remove {.compileTime.} for procs with NimNode: redundant because of ↵Timothee Cour2021-03-235-13/+12
| | | | tfTriggersCompileTime (#17463)
* add algorithm.merge (#16182)flywind2021-03-231-0/+94
| | | | | | | | | * add merge to algorithm * Apply suggestions from code review * Update lib/pure/algorithm.nim * Apply suggestions from code review * Update changelog.md Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
* remove redundant void return in stdlib (#17464)Timothee Cour2021-03-234-6/+5
|
* close #11330 sets uses optimized countSetBits (#17334)flywind2021-03-221-80/+8
| | | | | | | * Update lib/pure/bitops.nim * Update lib/system/sets.nim * Apply suggestions from code review Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* strutils: improve doc comments for `replace` funcs (#17427)ee72021-03-201-3/+4
| | | | | | | | | | | | | This commit fixes mispellings of "occurrence" introduced by: - 76a3b350ce0f (#17337) - 8e8bea9044f0 (#17339) and adds the same "every occurrence of" in the `replaceWord` func. Other changes: - Prefer "replace with" to "replace by". - Be more consistent with "the" - prefer "of the character" given that we wrote "by the character". - Try to be more consistent with writing the types - add "the string `sub`" given that we wrote "the character `sub`".
* [FIX] use `mixin` for strscans.scanp (#17371)haxscramper2021-03-191-1/+2
|
* Clarify behaviour of char replace (#17339)Héctor M. Monacci2021-03-191-1/+1
| | | Clarify behaviour of char replace by adding ```every ocurrence of character```
* IC: green tests (#17311)Andreas Rumpf2021-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * IC: renamed to_packed_ast module to ic module * IC: don't store the --forceBuild flag, makes it easier to test * IC: enable hello world test * Codegen: refactorings for IC; changed the name mangling algorithm * fixed the HCR regressions * life is too short for HCR * tconvexhull is now allowed to use deepCopy * IC exposed a stdlib bug, required a refactoring * codegen: code cleanups * IC: even if a module is outdated, its dependencies might come from disk * IC: progress * IC: better name mangling, module IDs are not stable * IC: another refactoring helping with --ic:on --gc:arc * disable arraymancer on Windows for the time being * disable arraymancer altogether * IC: make basic test work with 'nim cpp' * IC: progress on --ic:on --gc:arc * wip; name mangling for type info
* doc times: do not use `now` (and also `epochTime`) for benchmarking (#17405)Timothee Cour2021-03-181-1/+6
| | | | | | | | | | | | | * doc times: do not use now for benchmarking * Update lib/pure/times.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/pure/times.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* followup #17398: `getTempDir`, `getConfigDir` now do not have trailing ↵Timothee Cour2021-03-181-7/+11
| | | | | | | DirSep (#17402) * followup #17398: `getTempDir`, `getConfigDir` now do not have trailing DirSep * fix test
* fix #17393 getHomeDir and expandTilde should not include trailing `/` (#17398)Timothee Cour2021-03-171-2/+12
| | | | | * fix #17393 getHomeDir and expandTilde should not include trailing `/` * changelog
* followup #17389; add see also in std/json (#17400)Timothee Cour2021-03-161-0/+8
| | | Co-authored-by: flywind <xzsflywind@gmail.com>
* Fix FutureStream memory usage (#17395) [backport:1.2]Igor Ribeiro de Assis2021-03-161-1/+5
|