Commit Graph

8454 Commits

Author SHA1 Message Date
flywind
ceab5e49f2 uri module uses runnableExamples (#16982) 2021-02-09 13:07:51 +01:00
hlaaftana
49ee2f7f3b fix #16967 [backport:1.2] (#16976)
* fix #16967 [backport:1.2]

* move test to tsugar
2021-02-09 13:04:36 +01:00
flywind
41d32c3ea3 fix lists docs regression (#16981) 2021-02-09 12:19:11 +01:00
Héctor M. Monacci
d1210a3bb9 Another typo corrected (#16974)
From `fliter proc` to `filter proc`
2021-02-08 20:12:48 -08:00
Juan Carlos
68ef0c6c5b Deprecate any (#16920) 2021-02-08 19:21:17 -08:00
rockcavera
4576cf20af Refactoring bitops.rotateLeftBits() and bitops.rotateRightBits(); adding builtins and intrinsics. (#16622)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-02-08 16:36:41 -08:00
Peter Salvi
e211a2a9f6 std/lists: Various changes to lists (RFC #303) (#16536)
* Various changes to `lists` (RFC #303)

* Removing a non-element is no-op; better tests

* Remove preserves cycles; add appendMove alias; tests.

* Return value for (singly linked) `lists.remove`

* More test for lists.remove

* Moved `lists.append` to the end of the file to see all `add` definitions

* Disable testing js for now

* Use workaround for swap js bug

* Smaller diff

* Undo "silent" deprecation of append

* Correct typo in changelog

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Remove `appendMoved`

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Don't remove appendMoved

Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-02-08 22:24:16 +01:00
Héctor M. Monacci
a9f44b7257 Correct typo (#16972)
From `fliter proc` to `filter proc`
2021-02-08 19:39:25 +01:00
Andreas Rumpf
abac35e743 basic cleanups regarding SSL handling (#16940) [backport:1.0]
* basic cleanups regarding SSL handling
* enabled certificate checking on Windows
* updated the SSL test
* quoting helps
2021-02-08 13:54:03 +01:00
flywind
f140c92409 fix some warnings (#16952) 2021-02-08 13:50:15 +01:00
Timothee Cour
910720b0d4 document typeof (#16965) 2021-02-08 13:45:06 +01:00
flywind
0cf3ba159c close #15767 (#16959)
* fix some warnings

* close #15767

* Revert "fix some warnings"

This reverts commit 39f2f23b00.
2021-02-08 11:47:28 +01:00
flywind
d447c0fe3f use typeof instead type (#16962) 2021-02-08 09:46:07 +01:00
hlaaftana
4fac8af0c9 Add initRand() with seed based on time (#16953) 2021-02-07 21:15:51 -08:00
flywind
065264eae1 close #16921 (#16951) 2021-02-06 17:33:11 +01:00
flywind
39230422d0 make style consistent (#16944) 2021-02-05 19:58:26 +01:00
Timothee Cour
3eebbb234d fix of procs + runnableExamples (#16932) 2021-02-05 16:32:10 +01:00
Timothee Cour
6dc7ece36a document default (#16942) 2021-02-05 16:28:21 +01:00
Timothee Cour
ae9ba260f6 clarify docs for wrapnils (#16929)
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-02-04 15:39:19 -08:00
Rummskartoffel
2a60974ede Correct typo in osseps.nim (#16939) 2021-02-04 15:36:28 -08:00
Antonis Geralis
9ded85e1b4 add createElementNS, will hopefully fix svgs for karax (#16938) 2021-02-05 00:33:27 +01:00
Roman Inflianskas
e9b360c5df stdlib/os: handle symlinks in copy/move functions (#16709)
* stdlib/os: handle symlinks in copy/move functions

- Added optional `options` argument to `copyFile`, `copyFileToDir`, and
  `copyFileWithPermissions`. By default, symlinks are followed (copy files
  symlinks point to).
- `copyDir` and `copyDirWithPermissions` copy symlinks as symlinks (instead of
  skipping them as it was before).
- `moveFile` and `moveDir` move symlinks as symlinks (instead of skipping them
  sometimes as it was before).
- Added optional `followSymlinks` argument to `setFilePermissions`.

See also: https://github.com/nim-lang/RFCs/issues/319

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Address comments in #16709

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Address comments in #16709 (second iteration)

Skip symlinks on Windows.

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-02-04 18:57:41 +01:00
Clyybber
2b2836fc9d Fix link to switch 2021-02-04 14:40:32 +01:00
Clyybber
cccf219ceb Allow strings for -- in config.nims (#16934) 2021-02-04 13:59:55 +01:00
konsumlamm
f4449a897d Sugar tests (#16820) 2021-02-02 18:11:59 -08:00
narimiran
1d1c831efa [ci skip] CountTable, remove link to unexisting proc 2021-02-02 09:52:39 +01:00
n5m
f87b9866af link compile-time options together in docs (#16879)
* link similar compiler option proc together

* fixup links

* fix formatting and links

* example formatting

* drop declared

* link to compilesettings

* only link define pragmas once

* drop another declared

* backlink to compileOptions from compilesettings

* remove newline
2021-02-02 09:44:21 +01:00
Timothee Cour
4b2054a7bf dumpToString: improves on sugar.dump (#16841)
* dumpToString
* _
* fixup
* changelog
* address comment: removed the word "Deprecated"
2021-02-02 07:41:33 +01:00
konsumlamm
15d6be52a1 Improve doc comments (#16902)
Add runnableExamples
Use `reduce` in `initRational` and `//`
Add static tests
2021-02-02 07:04:30 +01:00
Timothee Cour
917f12ae52 2.5x- 3x faster copyFile on osx (#16883) 2021-02-01 17:38:17 -08:00
flywind
777888fdea add widestrs.newWideCString overload (#16860) 2021-02-01 20:16:50 +01:00
flywind
a2855b66ae JS: make hash float support IE/Safari (#16872) 2021-02-01 13:19:25 +01:00
ee7
0b01eddace critbits: fix error from strictFuncs (#16877)
Previously, compiling a file containing just `import critbits` with
`nim c --experimental:strictFuncs` would produce the following error:
    critbits.nim(529, 6) Error: 'toCritBitTree' can have side effects

This was introduced by 2aed418698 (#16564).

Fixes: #16873
2021-02-01 13:14:23 +01:00
Timothee Cour
1a74576854 distinctBase now is identity instead of error for non distinct types (#16891) 2021-02-01 13:10:52 +01:00
Miran
25c75752d0 remove quotation marks around imports - fixes links in the docs (#16888) 2021-02-01 06:50:23 +01:00
konsumlamm
c05d1aab13 Add more runnableExamples (#16864)
Add more links
2021-01-31 18:53:22 +00:00
konsumlamm
13640c08a2 Minor docs improvement for oids (#16882) 2021-01-31 01:29:50 -08:00
flywind
111092e8aa refactor hash in JS backend (#16863) 2021-01-30 14:14:38 +01:00
Juan Carlos
b8e8eaae66 BigInt runnableExamples: octal, binary, hex constructor (#16868)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-01-29 17:48:47 -08:00
Antonis Geralis
2c70734913 Add StorageEvent and correct Storage object (#16865)
There is no `LocalStorage` type, it's `Storage`
2021-01-29 20:37:31 +01:00
flywind
296cf9657c add lost functions (#16843) 2021-01-29 15:14:19 +01:00
Timothee Cour
6e267d28b3 remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs (#16861)
* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors

* simplify nimNoNilSeqs2

* simplify nimNoNilSeqs

* fixup
2021-01-29 14:30:24 +01:00
flywind
4e1e231e29 fix floats slice (#16853)
* see whether it breaks

* fix

* fix

* minor

* fix

* add enum

* use Ordinal types

* fix tests

* fix

* another style

* fix remainning cases
2021-01-29 12:26:36 +01:00
Timothee Cour
478d15f7f4 improve code in categories.nim; add std/private/gitutils; fix flakyness in nim CI (cloneDependency in deps.nim) (#16856)
* improve code in categories.nim; gitutils; fix flakyness in deps.nim
* cleanups
2021-01-29 07:51:12 +01:00
Joey
0d1c5f4137 A new request should always have a new content-length (#16667)
* A new request should always have a new content-length

In [my last PR](https://github.com/nim-lang/Nim/pull/16618) I made a mistake by assuming that the client.headers were cleared on every request, like the Python version. So, due to the fact that Nim keeps the client headers, we need to clear the Content-Length header on each request (which makes sense because you almost never want to use the same Content-Length twice, but you may want to reuse other headers)

* Move content-length to newHeaders instead of in the global client headers

* Use single backticks
2021-01-28 00:07:08 +00:00
Timothee Cour
e112974920 fix #16752: threadvar now works with importcpp types; osx now uses native TLS (--tlsEmulation:off), which can be orders of magnitude faster (#16750)
* osx now uses native TLS, which can be orders of magnitude faster

* add {.cppNonPod.}

* improve test

* changelog, docs, disable part of windows test
2021-01-27 22:35:43 +01:00
konsumlamm
3c8fddbc76 Improve documentation for the mersenne module (#16824)
* Improve documentation for mersenne

Add tests for mersenne

* Add link to Wikipedia article
2021-01-27 19:14:13 +00:00
konsumlamm
c9801d7abc Improve documentation for threadpool (#16821) 2021-01-27 19:05:31 +00:00
Jason Beetham
dde096ffde added enum indexed array support to json (#16807)
* added enum indexed array support to json

* Added json test

* Removed when statement for enum indexed arrays
2021-01-26 00:55:49 +01:00
Elliot Waite
0436a7cffd Make small text changes in the docs (#16634)
* Fix broken links in docs

* Fix rand HSlice links

* Make small text changes in the docs

* Fix typo in contributing docs
2021-01-25 14:59:19 +01:00