summary refs log tree commit diff stats
path: root/lib/pure
Commit message (Collapse)AuthorAgeFilesLines
* fix #17467 1st call to rand is now non-skewed; allow seed == 0 (#17468)Timothee Cour2021-05-111-57/+36
| | | | | | | | | | | | | | | * fix #17467 1st call to rand is now non-skewed; allow passing 0 as seed * changelog + fallback * document behavior for seed == 0 * address comments * _ * fix tests, disable kdtree * re-enable kdtree with -d:nimLegacyRandomInitRand
* Revert "Fix parseUri to sanitize urls containing ASCII newline or tab ↵Andreas Rumpf2021-05-091-29/+3
| | | | | (#17967)" (#17984) This reverts commit f4dd95f3bee14b69caec63c3be984c4a75f43c8a.
* Fix parseUri to sanitize urls containing ASCII newline or tab (#17967)Beshr Kayali2021-05-091-3/+29
| | | | | | | | | | | | | | | | | | | * Fix parseUri to sanitize urls containing ASCII newline or tab * Fix ups based on review Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Additional fix ups based on review - Avoid unnecessary `removeUnsafeBytesFromUri` call if parseUri is strict - Move some parseUri tests to uri module test file Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> * Update changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* merge `initUri()` overloads, improve uri examples (#17970)Timothee Cour2021-05-081-30/+11
| | | | | | | * deprecate `uri.initUri` and improve uri examples * remove `func initUri*()` and make isIpv6 optional * fixup
* ORC: cursor inference bugfix (#17973)Andreas Rumpf2021-05-081-2/+2
| | | | | * fixed a .cursor inference bug * added a test case
* fix #17941: UnusedImport works for var/let/const/type invoked inside a ↵Timothee Cour2021-05-082-2/+2
| | | | | | | generic (#17942) * fix #17941: UnusedImport works for var/let/const/type invoked inside a generic * fixup
* Export sslHandle in `net` and `asyncnet`. (#17573)Ardek Romak2021-05-062-0/+10
|
* parsecsv fix style (#17933)Juan Carlos2021-05-041-67/+64
| | | | | | | * ReSync with Devel * Fix style in parsecsv * Update lib/pure/parsecsv.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* typo: nonexistant => nonexistent (#17918)Timothee Cour2021-05-022-2/+2
| | | | | * typo: nonexistant => nonexistent * fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
* fix #17911 rawProc for cpp (#17912)Timothee Cour2021-05-011-6/+12
|
* system.nim cleanup some exported constants which should never have be… ↵Andreas Rumpf2021-05-012-1/+3
| | | | | | (#17909) * system.nim cleanup some exported constants which should never have been exported
* [std/base64] uses runnableExamples (#17882)flywind2021-05-011-32/+30
| | | | | | * [std/base64] uses runnableExamples * Update lib/pure/base64.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fix #17905: hash(closure) was not being tested (#17906)Timothee Cour2021-04-301-12/+20
|
* fix #17888: remove undefined behavior for posix.open; fix ↵Timothee Cour2021-04-291-0/+1
| | | | | | | | | | | tempfiles.createTempFile (#17889) * fix #17888: remove undefined behavior for posix.open; fix tempfiles.createTempFile * fix for tests/async/tasyncfile.nim * hide mode for now * add notice regarding stability
* improve cache line size (#17885)flywind2021-04-291-6/+3
| | | | | | | | | | | | | * improve cache line size - 64bit system tend to use cache line of 64 bytes - add align https://trishagee.com/2011/07/22/dissecting_the_disruptor_why_its_so_fast_part_two__magic_cache_line_padding Though I'm not sure, what do you think? @timotheecour * Update lib/pure/concurrency/threadpool.nim
* [std/encodings]move to tests (#17866)flywind2021-04-291-72/+0
|
* Fix documentation of strutils.stripLineEnd (#17883)Michael Krieger2021-04-281-1/+1
| | | It does not return anything.
* [std/encodings] fix iconv headers on OpenBSD (#17872)flywind2021-04-271-1/+3
|
* [std/pegs] increase test coverage (#17871)flywind2021-04-271-144/+0
|
* [std/parsecfg]use runnableExamples (#17868)flywind2021-04-271-96/+95
| | | | | | | * [std/parsecfg]use runnableExamples * Apply suggestions from code review Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* add -d:nimLegacyNoHashRef for a transition period which avoids defining ↵Timothee Cour2021-04-271-17/+22
| | | | hash(ref) (#17858)
* fix gbk encodings on windows (#17843)flywind2021-04-261-0/+1
|
* Remove confusing <//> (#17830)flywind2021-04-264-22/+22
|
* add colon (#17834)flywind2021-04-242-2/+2
|
* Fix Httpclient headers from being modified accidentally (#17808)Joey2021-04-211-2/+5
|
* CIs: attempt to use csources_v1 (#16282)Andreas Rumpf2021-04-2121-36/+35
| | | | | | | | * CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
* [std/deques] move data instead of copy + destroy (#17800)flywind2021-04-201-4/+2
|
* Fix buffer-overrun bug in net (#17728) [backport:1.0]shirleyquirk2021-04-161-4/+3
|
* 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