konsumlamm
083eeda085
Small improvements for the distros module ( #17309 )
2021-03-09 18:41:07 +01:00
Juan Carlos
4d0b87a5cd
Add Portals ( #17306 )
...
* Add Portals
* Add Portals
2021-03-09 12:22:54 +01:00
flywind
cc37fee0ab
fix #17275 ( #17276 )
2021-03-09 12:22:26 +01:00
flywind
9c5223a5f5
remove unnecessary deps ( #17307 )
...
* improve test coverage for isolation
* a bit better
* remove unnecessary deps
2021-03-09 10:35:10 +01:00
Timothee Cour
d161d27cdd
fix #13491 #17279 runnableExamples now don't get lost in translation ( #17282 )
...
* fix #13491 runnableExamples rendering
* fix a runnableExamples thanks to this bugfix
2021-03-09 07:09:24 +01:00
Roman Inflianskas
31424b3808
stdlib/os: add isAdmin ( #17012 )
...
* stdlib/os: add isAdmin
* uint8 -> cuchar, assert isAdmin on Azure
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Update lib/pure/os.nim docs
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Address comments on #17012
* Raise on errors in #17012
* Check the result of FreeSid in #17012
* Change case in #17012
* Fix memory leak in #17012
* Address comments in #17012
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-07 22:40:16 +01:00
flywind
0e3ea16554
use lowercase --define switches ( #17283 )
2021-03-07 12:08:41 +01:00
Timothee Cour
07df4fe560
runnableExamples for walkFiles + friends ( #17271 )
...
* runnableExamples for walkFiles + friends
* address comments
2021-03-06 23:48:55 +01:00
konsumlamm
2e8325a19c
Remove support for named procs with sugar.=> ( #17220 )
...
* Add docs & tests for named procs with sugar.=>
* Remove support for named procs in sugar.=>
* Resolve conflict
* Fix test
2021-03-05 12:08:03 +01:00
flywind
cda443ee68
follow up #17165 ( #17262 )
2021-03-04 22:41:20 -08:00
Jason Beetham
f28dc2c61e
Added assertion to clamp ( #17248 )
...
Co-authored-by: flywind <xzsflywind@gmail.com>
2021-03-04 17:27:02 -08:00
flywind
81889fb84c
reuse jsffi in json module ( #17165 )
...
* remove unnecessary when statement
* remove outdated codes
* reuse jsffi
* move js json coverage
2021-03-04 19:37:12 +01:00
flywind
5670b848cb
use .. warning:: ( #17226 )
...
* remove unnecessary when statement
* remove outdated codes
* use warnings
2021-03-04 11:34:55 +01:00
Jason Beetham
c180de60a8
Added math.clamp for slice clamping ( #17246 )
...
* Added math.clamp for slice clamping
* Added inline to math.clamp
* Cleaned up math.clamp + test
2021-03-03 23:54:23 +00:00
Juan Carlos
4982d1c662
https://github.com/nim-lang/Nim/pull/15826/files#r585368355 ( #17233 )
2021-03-03 11:58:05 +01:00
Clyybber
507873be25
Use readable escape sequences ( #17241 )
2021-03-03 07:15:07 +01:00
Danil Yarantsev
f5a63ade7a
Replace double backticks with single backticks - Part 5 out of ~8 ( #17217 )
...
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-03-01 18:11:25 -08:00
Danil Yarantsev
285539c87a
Replace double backticks with single backticks - Part 4 out of ~7 ( #17216 )
2021-03-01 18:00:58 -08:00
Timothee Cour
dd6b0f81ef
use -r:off for runnableExamples that should compile but not run ( #17203 )
...
* use -r:off for runnableExamples that should compile but not run
* use -r:off in other RT disabled tests
2021-03-01 14:26:39 +01:00
Danil Yarantsev
aef55a7a88
Replace double backticks with single backticks - Part 3 out of ~7 ( #17207 )
2021-02-28 23:22:05 -08:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples ( #17202 )
2021-02-28 13:17:19 -08:00
zetashift
c7d6e4c6a6
Fix unicode.split with seperators examples ( #17176 )
...
* 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>
2021-02-26 15:08:48 +01:00
Timothee Cour
63f1c38f4e
hashes: support object default hash ( #17175 )
2021-02-26 08:45:37 +01:00
Timothee Cour
4a31088ac2
improve docs for sugar.collect ( #17188 )
2021-02-26 08:43:32 +01:00
flywind
f07bdbe945
clarify the docs of existsOrCreateDir a bit ( #17182 )
...
* remove unnecessary when statement
* remove outdated codes
* clarify the docs a bit
2021-02-25 13:58:31 +01:00
Timothee Cour
bea037f856
refs #17114 : workaround for arm64 which should segfault but does not ( #17178 )
...
* 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>
2021-02-25 08:40:43 +01:00
flywind
60929953cb
mark inline ( #17180 )
2021-02-24 21:52:23 -08:00
flywind
fcb5cf643c
use single backtick ( #17181 )
2021-02-24 21:47:27 -08:00
Timothee Cour
578d1ee751
std/options: $some(3) is now "some(3)", etc. (#17147 )
...
* 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
2021-02-24 22:17:16 +00:00
flywind
99633d7682
remove deprecated stuff in unittest module ( #17156 )
...
* remove unnecessary when statement
* remove outdated codes
* remove deprecated stuff in testament
* fix
2021-02-24 21:02:33 +01:00
flywind
3f38f8fbb7
add strbasics.strip ( #16280 )
2021-02-24 10:22:47 +01:00
flywind
46bd222c89
[stdlib] make cookies module modern ( #17116 )
...
* update cookies module
* introduce sameSite.Default
Co-authored-by: hlaaftana <10591326+hlaaftana@users.noreply.github.com>
2021-02-24 10:14:19 +01:00
Andreas Rumpf
b48a32053f
fixes yet another SSL problem on Windows [backport:1.2] ( #17167 )
2021-02-24 10:12:47 +01:00
flywind
47c078e29c
use single backtick ( #17166 )
2021-02-23 21:05:39 -08:00
Timothee Cour
c274e67198
add enumutils.items for sparse enums, typetraits.SomeSparseEnum ( #17080 )
...
* 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
2021-02-23 20:25:35 +01:00
Danil Yarantsev
4e619a6bea
A few rst doc fixes ( #17151 )
...
* Fix a couple of rst formatting issues
* no need for the extra space
2021-02-23 08:59:13 +01:00
konsumlamm
a1f4113705
Improve the ropes module ( #17145 )
...
* 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 `[]`
2021-02-22 19:58:37 +01:00
rockcavera
d76d79336f
fix #15215 ( #17142 )
...
* 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>
2021-02-22 17:40:57 +01:00
konsumlamm
05711d95e0
Add example for pattern matching on options ( #17120 )
...
* Add example for pattern matching on options
* Use code-block
* Apply suggestions
* Use block comments
* Fix example
2021-02-22 11:16:15 +01:00
Timothee Cour
ef5303114c
fix prelude regression refs #16238 : include prelude doesn't interfere with nim doc ( #17111 )
...
* fix bug1 from #16238 nim doc now works with include prelude
* fix for windows
* fixup
2021-02-22 11:10:34 +01:00
flywind
f26c25737c
remove outdated codes ( #17140 )
...
* remove unnecessary when statement
* remove outdated codes
2021-02-22 09:40:11 +01:00
Timothee Cour
cde950e1bc
make copySign for js consistent with other backends ( #16609 )
...
* make copySign work more robustly in js
* improve tests
* improve tests/vm/tcastint.nim
2021-02-22 08:47:00 +01:00
flywind
4556901572
use single backtick ( #17141 )
2021-02-21 19:53:28 -08:00
flywind
146beb2797
remove unnecessary when statement ( #17135 )
2021-02-21 11:17:25 +01:00
flywind
70ec17eede
use single backtick ( #17133 )
2021-02-21 00:27:39 -08:00
Timothee Cour
e94a3e5fcd
move prelude so that include std/prelude also works ( #17110 )
...
* move prelude so that `include std/prelude` also works
* add test
2021-02-20 18:08:13 +01:00
konsumlamm
bd199a8d31
Improve the strformat module ( #17106 )
...
* 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
2021-02-20 18:06:29 +01:00
Timothee Cour
0fcf1af765
uri: document removeDotSegments, add tests, show failure modes ( #17064 )
...
* uri: document removeDotSegments, add tests, show failure modes
* address comments
2021-02-20 17:58:54 +01:00
flywind
a1a18cfe66
use single backtick ( #17115 )
2021-02-20 03:20:29 -08:00
dawidkotlin
95664e1524
add example of hashing an object by all of its fields with fields ( #16643 )
...
* 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>
2021-02-19 07:59:33 +01:00