flywind
d31cbfd167
Revert "add missing import to asynchttpserver's example" ( #18164 )
...
This reverts commit 7ef364a402 .
2021-06-03 16:44:11 +02:00
Andreas Rumpf
0aa8b793a5
clarify what a 'monotonic' timestamp is ( #18163 )
2021-06-03 16:27:34 +02:00
narimiran
7ef364a402
add missing import to asynchttpserver's example
2021-06-03 15:20:42 +02:00
Artem Klevtsov
3e57c2f780
Improve db_postgres iterators ( #18144 )
...
* Fix pqSetSingleRowMode case. Add links to the docs
* Add missing PGContextVisibility enum
* Remove unused PGContextVisibility enum
* Improve db_postgres iterators
* Fix instantRows with DbColumns. Cosmetics.
* Reduce copy&paste in db_postgres
* Move pqclear inside loop
2021-06-03 14:41:57 +02:00
n5m
9df631a379
reuse algorithm.fill while building SkipTable ( #18138 )
...
* reuse algorithm.fill while building SkipTable
* Update lib/pure/strutils.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-03 14:25:52 +02:00
Araq
282d61bafa
added lib/deps.txt
2021-06-03 14:00:53 +02:00
Andreas Rumpf
daaa40973c
added float32 schubfach algorithm; wip ( #18155 )
...
* added float32 schubfach algorithm; wip
* fixes #18418
2021-06-03 12:09:40 +02:00
flywind
06960bb9cb
Ref #17697 improve withValue docs ( #18154 )
...
* Ref #17697 improve withValue docs
* address comments
2021-06-03 07:35:24 +02:00
flywind
bbce3d2da9
[std/tables] remove unnecessary do: ( #18160 )
2021-06-02 21:09:04 -07:00
flywind
f27f3f65df
[std/hashcommon]improve docs a bit ( #18153 )
...
* reduce duplicated deprecated messages
2021-06-02 22:59:06 -04:00
Timothee Cour
0de3d4292f
fix #16993 , #18054 , #17835 runnableExamples now works with templates and nested templates ( #18082 )
2021-06-02 09:02:14 -07:00
Andreas Rumpf
63db2b19bf
use dragonbox algorithm; alternative to #18008 ( #18139 )
...
* use dragonbox algorithm; alternative to #18008
* removed unsafe code
2021-06-01 22:29:53 +02:00
Andrey Makarov
ba3ec7b049
docs: Latex generation improvements ( #18141 )
...
* docs: improve Latex generation
* make it work on Windows + fix ] escaping
* minor fixes with escapes and style
2021-06-01 20:47:23 +02:00
flywind
c2e3dc0ed1
close #18129 Add setCurrentException for JS backend ( #18145 )
...
* [std/re] make interface consistent
* tiny
* revert
* close #18129 add setCurrentException
* changelog entry
2021-06-01 18:16:25 +02:00
flywind
c0e8199acc
[std/re] fix findBounds and find procs ( #18028 )
...
* [std/re] make interface consistent
* tiny
* revert
2021-05-31 23:28:22 +02:00
Timothee Cour
369a7d1246
jsonutils.toJson now serializes JsonNode as is by default ( #18097 )
...
* jsonutils.toJson now serializes JsonNode as is (without deep copy nor treating it as a regular ref object)
* JsonNodeMode
2021-05-31 22:17:52 +02:00
Timothee Cour
9559350e34
add os.getCacheDir ( #18126 )
...
* add `os.getCacheDir`
* fixup
* address comments
2021-05-31 22:16:33 +02:00
n5m
064fe18de6
improve fast returns of find and rfind ( #18127 )
2021-05-31 11:20:15 +02:00
Timothee Cour
18b4774311
document macros.unpackVarargs ( #18106 )
...
* deprecate macros.unpackVarargs
* un-deprecate unpackVarargs and add docs+runnableExamples
* update examples + tests with varargs[typed]
2021-05-31 10:51:20 +02:00
Timothee Cour
98ea61f09b
dont silence hints in system.nim ( #18034 )
2021-05-30 23:57:25 +02:00
Miran
50e98e6efa
hashes for refs should be an opt-in feature ( #18098 )
2021-05-30 23:55:51 +02:00
Timothee Cour
4a7f2c386c
close #16569 : deprecated reversed(a, start, last) overload, use toOpenArray instead ( #18047 )
...
* close #16569 : deprecated reversed overload, use toOpenArray instead
* [skip ci] change wording in changelog per review
* fixup
2021-05-30 22:37:21 +02:00
xioren
478f717377
Move async example to asynchronous version of proc ( #18078 )
...
* improve runnableExamples in std/httpclient
* Add synchronous example.
* Update lib/pure/httpclient.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-05-24 20:56:31 -07:00
Timothee Cour
d217888e56
close #18009 parseJson JInt vs JFloat; preserve -0.0 as JFloat to distinguish from 0.0 ( #18067 )
2021-05-23 23:06:14 +02:00
Andrey Makarov
9f7e2e3057
docs: make inline markup more compatible with Markdown ( #18053 )
...
fixes https://github.com/timotheecour/Nim/issues/739
2021-05-21 06:54:20 +02:00
Ștefan Talpalaru
a1c82c39af
asyncdispatch+stackTraceOverride: fix premature collection ( #18039 ) [backport:1.2]
...
Copying StackTraceEntry instances when nimStackTraceOverride is defined
breaks the link between a cstring field that's supposed to point at
another string field in the same object.
Sometimes, the original object is garbage collected, that memory region
reused for storing other strings, so when the StackTraceEntry copy tries
to use its cstring pointer to construct a traceback message, it accesses
unrelated strings.
This only happens for async tracebacks and this patch prevents that by
making sure we only use the string fields when nimStackTraceOverride is
defined.
Async tracebacks also beautified slightly by getting rid of an extra line
that was supposed to be commented out, along with the corresponding debugging output.
There's also a micro-optimisation to avoid concatenating two strings just
to get their combined length.
2021-05-19 19:19:11 +02:00
Andreas Rumpf
7052503ca8
make strformat part of the prelude ( #18046 )
2021-05-19 19:18:16 +02:00
Andreas Rumpf
53935b8b27
ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] ( #18040 )
...
* ARC: fixes memory leaks with newSeq used in a loop [backport:1.4]
* Update tests/arc/tnewseq_legacy.nim
2021-05-18 21:45:37 +02:00
Timothee Cour
7f077a76fe
jsonutils: add customization for toJson via ToJsonOptions; generalize symbolName; add symbolRank ( #18029 )
...
* jsonutils: add customization for toJson via `ToJsonOptions`
* add enumutils.symbolRank
* lookup table implementation for HoleyEnum
* cleanup
* changelog
* fixup
* Update lib/std/jsonutils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-05-18 15:10:19 +02:00
Antonis Geralis
6e0fe965da
add sink and lent annotations for xmltree and streams ( #18037 )
2021-05-18 08:16:07 +02:00
Joey
e904c6d87c
Add checked to dom ( #18033 )
...
This allows the ability to set a checkbox as checked programmatically. It's different from `setAttribute` because once an input has been clicked on by the user, `setAttribute` no longer works programmatically.
2021-05-17 08:04:39 +02:00
Andrey Makarov
2096490b59
follow-up #17930 - inline syntax highlighting ( #18013 )
...
* follow-up #17930 - inline syntax highlighting
* make closure->nimcall
2021-05-16 23:55:14 +02:00
Timothee Cour
d83b25db1e
fix #18007 : std/json now serializes nan,inf,-inf as strings instead of invalid json ( #18026 )
...
* fix #18007 : std/json now serializes nan,inf,-inf as raw strings instead of invalid json
* fix roundtrip
* fix tests
* fix changelog
* simplify
* add runnableExamples
* fix typo [skip ci]
2021-05-16 23:54:10 +02:00
flywind
65f6b66820
Revert "[std/re]fix terrible and strange interface" ( #18027 )
...
This reverts commit c218f2ba0b .
2021-05-16 11:10:41 +08:00
flywind
c218f2ba0b
[std/re]fix terrible and strange interface
2021-05-16 10:39:52 +08:00
Thomas T. Jarløv
99788ee504
Escape %00 / \0 in dbQuote ( #18015 ) [backport:1.4]
...
Fix https://github.com/nim-lang/Nim/issues/17925
2021-05-15 21:26:15 +02:00
Andrey Makarov
3824fd3f9a
RST opt.list to have priority over def.list ( #17845 )
2021-05-15 08:12:26 +02:00
Andreas Rumpf
4857c462d5
Revert "fix #14873 properly by skipping abi field in importc type ( #17944 )" ( #17992 )
...
This reverts commit 98c29c01eb .
2021-05-15 06:50:39 +02:00
Timothee Cour
2ce592a209
refs #18011 disable some newly failing tests on cpp windows; refs #17946 increase timeout for tchannels ( #18012 )
2021-05-14 15:33:17 -07:00
Andrey Makarov
97970d9dcc
doc2tex: generate docs to Latex (#17997 )
...
* `doc2tex`: generate docs to Latex
* address some comments
2021-05-14 07:30:47 +02:00
Andreas Rumpf
3bc625aff1
ORC: progress ( #18000 )
...
* ORC: progress
* ORC: bugfix; don't follow acyclic data even if only at runtime the subtype is marked as acyclic
* progress
* minor style changes
2021-05-12 22:00:37 +02:00
Timothee Cour
1e080eb9b4
jsonutils: handle holey enum as regular enum, via ord ( #17995 )
2021-05-11 22:49:47 +02:00
Timothee Cour
a770c98e27
jsonutils: support set ( #17994 )
2021-05-11 21:09:17 +02:00
Timothee Cour
e60672141a
improve std/tempfiles ( #17920 )
...
* improve std/tempfiles
* fixup
* fix windows
* improve test
* improve runnableExamples and tests
* address comment
2021-05-11 16:35:43 +02:00
Timothee Cour
45490497e3
fix #17467 1st call to rand is now non-skewed; allow seed == 0 ( #17468 )
...
* 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
2021-05-11 11:04:59 +02:00
Andreas Rumpf
983a2aa11c
Revert "Fix parseUri to sanitize urls containing ASCII newline or tab ( #17967 )" ( #17984 )
...
This reverts commit f4dd95f3be .
2021-05-09 23:33:31 +02:00
Beshr Kayali
f4dd95f3be
Fix parseUri to sanitize urls containing ASCII newline or tab ( #17967 )
...
* 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 >
2021-05-09 19:24:00 +01:00
Timothee Cour
eba1c3fd24
merge initUri() overloads, improve uri examples ( #17970 )
...
* deprecate `uri.initUri` and improve uri examples
* remove `func initUri*()` and make isIpv6 optional
* fixup
2021-05-08 16:58:30 +02:00
Andreas Rumpf
c14427dbf3
ORC: cursor inference bugfix ( #17973 )
...
* fixed a .cursor inference bug
* added a test case
2021-05-08 16:47:06 +02:00
Timothee Cour
38b41f893a
fix #17941 : UnusedImport works for var/let/const/type invoked inside a generic ( #17942 )
...
* fix #17941 : UnusedImport works for var/let/const/type invoked inside a generic
* fixup
2021-05-08 09:56:46 +02:00