summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* readLine: Fix issues with --gc:arcktamp2020-06-261-6/+11
| | | | **--gc:arc** defines **nimv2**. This changes the definition of **WideCStringObj**. Also an empty string should be returned in case of EOF.
* readLine: Remove recursive importsktamp2020-06-251-10/+31
|
* readLine: Unicode support for Windows consolektamp2020-06-231-0/+36
| | | When input is read from the Windows console, input encoding is UTF16. This is translated internally to UTF8.
* fix #14750, don't allocate too much in newWideCString (#14773)Miran2020-06-231-3/+2
|
* fixes #14760 (#14769)Andreas Rumpf2020-06-231-1/+1
|
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-2320-44/+80
| | | | | | | | | | | * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog
* Deprecate and/or remove ospaths (#14767)Juan Carlos2020-06-232-2/+2
|
* Remove outdated comment and copy of length (#14759)Clyybber2020-06-221-13/+3
|
* added normal variate function (#14725)b3liever2020-06-221-1/+42
| | | | | | | * added normal variate function * change method only slightly faster * changelog + since Co-authored-by: b3liever <b3liever@yandex.com>
* posix_other: add define to force time_t to 64 bit [backport] (#14753)alaviss2020-06-221-1/+6
| | | | | | | | This is a temporary remedy for time_t transition to 64 bit on newer Linux libc (musl >= 1.2.0, glibc >= 2.32). In the future we might want to move away from libc, or figure out a way to reliably detect the real size of C types at compile time, both of which are difficult.
* [backport] Docs: Fix broken `code-block` (#14749)ee72020-06-222-25/+25
| | | | | | | | This commit indents the contents of a `code-block` in `httpclient.nim` so that it displays correctly. The bug was introduced by 42a64245f8. I did a quick search for other `code-block`s that are broken in the same way, but the only other one I found (in `pegs.nim`) is not included in the generated documentation.
* Export fields from the Selection object. (#14752)treeform2020-06-211-0/+7
| | | See: https://developer.mozilla.org/en-US/docs/Web/API/Selection
* encodings: use only one iconv definition [backport:1.2] (#14741)alaviss2020-06-211-18/+15
| | | | | | | | Fix an issue reported on IRC: using encodings with --dynlibOverrideAll result in duplicated iconv definitions, causing compile errors. This commit remove the `var` wrapper of iconv and go all out on pointers, as it should due to how the API accepts nil. Also corrected the API to resemble iconv(3p).
* Add css white-space property to dom.nim. (#14743)treeform2020-06-211-0/+1
| | | https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
* fix #13899 defer now works with async (#14723)Timothee Cour2020-06-191-0/+3
|
* fixes #14718 [backport]Araq2020-06-191-4/+4
|
* add legacy workaround; improve test so that it actually tests for the bugfixTimothee Cour2020-06-191-3/+5
|
* Update tuple newLitsolo9892020-06-191-5/+12
|
* Remove deprecated stuff from stdlib (#14699)Miran2020-06-1716-436/+12
| | | | | | | * update to the latest Jester * remove deprecated procs from some stdlib modules * 'criterion' is not maintained anymore and relies on obsolete stuff
* remove compilerproc from `newIdentNode` (#14692)Timothee Cour2020-06-171-1/+1
|
* Update macros.nim (#14697)solo9892020-06-171-3/+2
|
* `addQuitProc` now works with closures, and c, js(node/browser) backend; fix ↵Timothee Cour2020-06-164-36/+79
| | | | | | | | | | | | | | | some bugs in testament (#14342) * make addQuitProc great again * fix bugs in testament * fix test * change 2016 => 2020 * addQuitProc => addExitProc + locks * move to std/exitprocs
* fix #14179, fix #14142, make CI 1.4x faster (2x faster locally) (#14658)Timothee Cour2020-06-162-72/+70
| | | | | | | | | | | | | | | * fix #14142: no more clash with: import os + use of existsDir/dirExists/existsFile/fileExists/findExe in config.nims * remove a comment * Revert "fixes the regression #12860 caused; hotfix" This reverts commit 3d2459bdc0b6d6236a2cd9209ed81c965ee411a5. * Revert "Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)" This reverts commit d38853c504d89d6e361f064a17391afaf42d74b8. * noNimScript => noWeirdTarget + noNimJs
* make `fromJson/toJson` work with `array[range, typ]`, + 1 bugfix (#14669)Timothee Cour2020-06-151-8/+24
| | | | | * make toJson more robust * properly handle array
* normalizeExe (#14668)Timothee Cour2020-06-151-2/+14
|
* Update newLit set[T] to work when set is empty. (#14662)solo9892020-06-151-0/+4
| | | | | | | | | * Update macros.nim * Update lib/core/macros.nim Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* Added --benchmarkVM to times.cpuTime() documentation (#14663)Ico Doornekamp2020-06-151-0/+2
|
* fix #14655 setLen(seq) now zeros memory (#14656)Timothee Cour2020-06-141-14/+15
| | | | | * simplify sysstr.nim * fix #14655
* remove tyOpt, mOpt (#14636)Timothee Cour2020-06-122-2/+2
| | | | | * remove tyOpt, mOpt * fixup
* Add rstgen.rstToLatex convenience proc for renderRstToOut and ↵Juan Carlos2020-06-121-0/+11
| | | | initRstGenerator with outLatex output, see https://github.com/nim-lang/fusion/pull/11#issuecomment-641804899 (#14629)
* httpcore: Add http code 308 Permanent Redirect (#14639)djazz2020-06-122-1/+3
| | | | | * httpcore: Add http code 308 * httpclient: Add 308 to redirection proc * fix typo
* Add `proc find` to `heapqueue` (#14628)c-blake2020-06-101-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Unwind just the "pseudorandom probing" (whole hash-code-keyed variable stride double hashing) part of recent sets & tables changes (which has still been causing bugs over a month later (e.g., two days ago https://github.com/nim-lang/Nim/issues/13794) as well as still having several "figure this out" implementation question comments in them (see just diffs of this PR). This topic has been discussed in many places: https://github.com/nim-lang/Nim/issues/13393 https://github.com/nim-lang/Nim/pull/13418 https://github.com/nim-lang/Nim/pull/13440 https://github.com/nim-lang/Nim/issues/13794 Alternative/non-mandatory stronger integer hashes (or vice-versa opt-in identity hashes) are a better solution that is more general (no illusion of one hard-coded sequence solving all problems) while retaining the virtues of linear probing such as cache obliviousness and age-less tables under delete-heavy workloads (still untested after a month of this change). The only real solution for truly adversarial keys is a hash keyed off of data unobservable to attackers. That all fits better with a few families of user-pluggable/define-switchable hashes which can be provided in a separate PR more about `hashes.nim`. This PR carefully preserves the better (but still hard coded!) probing of the `intsets` and other recent fixes like `move` annotations, hash order invariant tests, `intsets.missingOrExcl` fixing, and the move of `rightSize` into `hashcommon.nim`. * Fix `data.len` -> `dataLen` problem. * Add neglected API call `find` to heapqueue. * Add a changelog.md entry, `since` annotation and rename parameter to be `heap` like all the other procs for consistency. * Add missing import.
* exceptions.nim: Fix a bad `Error` -> `Defect` renaming (#14621)ee72020-06-101-1/+1
| | | This commit fixes a mistake from 7d6cbf290a.
* parseutils: integerOutOfRangeDefect => integerOutOfRangeError (#14627)Timothee Cour2020-06-091-7/+7
|
* Make the example better describe the desired outcome (#14611)Max Grender-Jones2020-06-081-5/+5
|
* optimized wrapWords; fixes #14579 (#14606) [backport:1.2]Andreas Rumpf2020-06-081-25/+48
|
* `toJson`, `jsonTo`, json (de)serialization for custom types; remove ↵Timothee Cour2020-06-083-31/+157
| | | | | | | | | | | | | | | | | | | | | dependency on strtabs thanks to a hooking mechanism (#14563) * json custom serialization; application for strtabs * serialize using nesting * make toJson more feature complete * add since * Revert "Improve JSON serialisation of strtabs (#14549)" This reverts commit 7cb4ef26addb3bb5ce2405d8396df6fd41664dae. * better approach via mixin * toJson, jsonTo * fix test * address comments * move to jsonutils * doc * cleanups * also test for js * also test for vm
* Fix sugar.dump: It doesn't work correctly with compile time expression (#14580)Tomohiro2020-06-081-1/+1
|
* openssl: use explicit result for SSL_in_init (#14597)alaviss2020-06-081-2/+2
| | | | | | | Sometimes the analysis might get funky and decide that the if-expression below is not an if-expression. Details of how this can happen is largely unknown, but it's easy to prevent so we will just go forward with that. Fix #14591
* wrappers/openssl: defer loading SSL_CTX_set_ciphersuitesLeorize2020-06-061-1/+3
|
* net: also set TLSv1.3 cipher suitesLeorize2020-06-062-0/+12
|
* wrappers/openssl: mark casts as gcsafeLeorize2020-06-061-17/+13
| | | | Nim will pretend that these proc are not gcsafe if they are not marked.
* wrappers/openssl: enable SSL_CTX_set_ecdh_auto for LibreSSLLeorize2020-06-061-1/+1
| | | | | | This procedure is not no-op for older LibreSSL, and the ABI is kept for newer versions, so there's no harm in enabling it unconditionally for all LibreSSL versions.
* net: revert compatibility changes for WindowsLeorize2020-06-061-5/+2
| | | | | This reverts commit d53a6355f3ad4401731142d8fc66b95ecfdfb321 and 688b1f250ed058ecc49737dc75fd089206fa25b9.
* wrappers/openssl: the version number comes from the utility libraryLeorize2020-06-061-9/+20
| | | | | Previously we loaded the SSL library for this, but that's not where the symbol resides.
* net: use CiphersOld list for WindowsLeorize2020-06-061-1/+4
| | | | | | | The default DLLs shipped are too old, switch to CiphersOld list to ensure compatibility. This commit should be reverted before any future release.
* net: don't call set_ecdh_auto for super old OpenSSLLeorize2020-06-062-6/+4
| | | | | And the fun thing is that currently we use a super old OpenSSL on Windows.
* wrappers/openssl: fix SSL_CTX_set_modeLeorize2020-06-061-1/+1
| | | | Follow up of 794042080b270d9da8d64bb4285ce83787bdec7e
* wrappers/openssl: getOpenSSLVersion is gcsafeLeorize2020-06-061-3/+4
| | | | Yet another weird {.gcsafe.} triggering when it shouldn't.
* net: enable automatic EC curve selection for OpenSSL 1.0.2Leorize2020-06-062-0/+23
| | | | | This setting is required for servers running OpenSSL < 1.1.0 to support EC-based secure ciphers that is now part of the default cipher list.