summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-3125-35/+1242
| | | | | | | | | | | | | | | | | | | | | | | | * code cleanups and feature additions * added basic test and koch/CI integration * make it build on Unix * DrNim: now buildable on Unix, only takes 10 minutes, enjoy * added basic documentation for DrNim which can also be seen as the RFC we're following * drnim: change the build setup so that drnim.exe ends up in bin/ * makes simple floating point ranges work * added basic float range check * drnim: teach Z3 about Nim's range types plus code refactoring * drnim: make unsigned numbers work * added and fixed index checking under setLen * first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking * drnim: .requires checking implemented * drnim: implemented .ensures properly * more impressive test involving min() * drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures * testament: support for 'pattern <directory> * koch: uses new <directory> feature of testament * drnim: added tiny musings about 'old' * Make testament work with old SSL versions * koch: add support for 'koch drnim -d:release' * drnim: preparations for the param.old notation
* Tiny fix on browsers.openDefaultBrowser (#13818)Juan Carlos2020-03-311-1/+3
|
* Fix a 'See XXX' on documentation, clean out (#13820)Juan Carlos2020-03-311-2/+1
|
* fixes #13810 (#13821)cooldome2020-03-312-2/+23
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* macros for proc types, macros for types (#13778)Andreas Rumpf2020-03-317-140/+303
| | | | | | | | | * new minor feature: macros for proc types, to be documented * Finished the implementation and added tests * [skip ci] Describe the new custom pragmas in the manual and the changelog Co-authored-by: Zahary Karadjov <zahary@gmail.com>
* workflows/ci_docs: fix documentation deployment (#13819)alaviss2020-03-311-3/+9
| | | | | | | | | | | | * workflows/ci_docs: fix docs publishing It turns out that github.ref is the full ref name, so we have to be a bit more specific. See https://developer.github.com/v3/activity/events/types/#pushevent Also fixed a silly typo :) * workflows/ci_docs: run CI when there are changes to the workflow
* Unwind just the "pseudorandom probing" part of recent sets,tables changes ↵c-blake2020-03-318-175/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#13816) * 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.
* #13806 - getApplFreebsd might lose data (#13807)Euan2020-03-311-16/+16
| | | | | | | | | * #13806 - first call sysctl with a null buffer to get the length, then alloc buffer and call again * Use csize_t rather than csize * Suggestions from @Clyybber Co-authored-by: Euan Torano <euan.torano@bluesky-wireless.co.uk>
* workflows/ci_docs: lots of goodies (#13809)alaviss2020-03-311-13/+95
| | | | | | | | | | | | | | | | | | | | | | | | | * workflows/ci_docs: publish documentation to Github Pages This should be a complete replacement for our current Travis CI setup. * workflows/ci_docs: run docgen upon modification to the css on push So that any changes regarding the stylesheets would be reflected on the published docs. * workflows/ci_docs: build the compiler in release mode * workflows/ci_docs: set branch name for the generated docs This makes the "Source" links work correctly. * workflows/ci_docs: run docgen on windows and osx too Only deploy the Linux-generated version. * workflows/ci_docs: cache csources compiler This should cut the time spent building csources, which is about 1-2mins depending on OS.
* Add Documentation (#13811)Juan Carlos2020-03-3112-19/+135
| | | | * Add more Docs and runnableExamples
* refs #13797 (#13812)Timothee Cour2020-03-311-1/+1
|
* Fix telebot test failed, closes ba0f3/telebot.nim#49 [ref #13812] (#13814)Huy Doan2020-03-311-1/+1
| | | I was update telebot to version 1.0.0, update folder structure follow `nimble` guideline
* stacktraces can now show custom runtime msgs per frame (#13351)Timothee Cour2020-03-3014-21/+171
| | | | | | | | * stacktraces can now show custom runtime msgs * improve tests/stdlib/tstackframes.nim * fix test for --gc:arc * test --stacktraceMsgs:on and --stacktraceMsgs:off * --stacktracemsgs:off by default
* faster CIs (#13803)Miran2020-03-3072-1085/+535
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ttables: smaller table, 5x speedup * thavlak: less iterations, less loops; 30% speedup * tasyncclosestall: shorter timeout; 35% speedup * gcleak4: less iterations, 2x speedup * ttimes: remove deprecated stuff * tdangerisrelease: remove cpp backend, 3x speedup * tfrexp1: smaller range, 2x speedup * trtree: fix warnings, less iterations, 6x speedup * tasyncawait_cyclebreaker: smaller swarm size; 2x speedup * trealloc: smaller number of iterations; 10x speedup * towned_binary_tree: less iterations, 4x speedup * tclosure: remove unused code, less iterations; 2x speedup * twaitany: less durations; 1.4x speedup * tasync_misc: less iterations, 2x speedup * t8535: smaller sleep, 1.5x speedup * tmanyjoin: smaller sleep, 2x speedup * t12221: shorter sleeps, removed two slower tests; 1.6x speedup * tfuturestream: smaller sleep; 1.5x speedup * growobjcrash: less iterations; 2x speedup * ttryrecv: smaller sleep; 1.5x speedup * treusetvar: less threads; 2x speedup * delete tthreadanalysis2, basically a duplicate of tthreadanalysis * t7758: less iterations, 1.5x speedup * tasyncawait: smaller swarm, less messages; 1.5x speedup * tjsandnativeasync: smaller sleep, 1.5x speedup * tpendingcheck: smaller sleep, 1.5x speedup * remove rodfiles test category * move tseq from its own category to 'collections' category * remove unneeded tests and helpers from 'assert' category * stdlib: merge tbitops2 into tbitops * remove 'trepr2' from 'stdlib' cat * merge 'tstreams' into one file * remove 'tinefficient_const_table' from 'ccbugs' cat * merge 'tcollections_to_string' into 'tcollections' * tblocking_channel: smaller sleep, small speedup * tconvexhull: less iterartions; 1.2x speedup * merge 'tdeepcopy2' into 'tdeepcopy' * merge 'tdisjoint_slice2' into 'tdisjoint_slice1' * tmissing_deepcopy: smaller sequence * tsendtwice: smaller arrays; 5x speedup * remove 'tindexerrorformatbounds' * disable multimethod tests * remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests * koch.nim: bootstrap just with '-d:release', no need for 'csource' * add github workflow for documentation * testament: no need for 8 sub-second decimals
* '.push raises: []' now also affects proc types (#13776)Andreas Rumpf2020-03-295-5/+32
| | | | | | | | | * '.push raises: []' now also affects proc types * fixes the regression * less disruptive bugfix * another attempt
* fix #13794 HashSet leak (#13800)Timothee Cour2020-03-291-1/+2
|
* Fix #13631 (#13789)Juan Carlos2020-03-291-2/+2
|
* fix #13730 (#13787)Timothee Cour2020-03-282-2/+10
|
* [CI] fix recent freebsd systematic failure (#13788)Timothee Cour2020-03-281-9/+14
|
* fixes #13763 (#13777)Andreas Rumpf2020-03-272-1/+10
|
* More fixes for Haiku (#13774)alaviss2020-03-272-47/+50
| | | | | | | | | | | * osproc: move fork-based code path under the when conditional * osproc: avoid using the environ global on Haiku * osenv: import environ from stdlib.h on Haiku Haiku's environ is declared in `<stdlib.h>` by default, differing from POSIX and/or Linux. Import it from there to avoid collision with anyone importing `<stdlib.h>` from Nim.
* fix typos and deprecation warnings for tconvariancerules.nim (#13772)Arne Döring2020-03-271-21/+20
|
* make nim_temp compile with --gc:arc --sinkInference:off (#13769)cooldome2020-03-261-1/+1
| | | | | | | * make nim_temp compiler with --gc:arc * trigger build Co-authored-by: cooldome <ariabushenko@bk.ru>
* Fix vm.nim for --gc:arc (#13741)Clyybber2020-03-263-41/+30
| | | | | | | | | | | | | * koch boot --gc:arc now passes the nim stage ... but generates invalid C code * Move it closer to where its used * Try something else * Poor mans var * Use UncheckedArray instead
* ssl_certs: add Haiku support (#13761)alaviss2020-03-261-7/+32
|
* asyncdispatch: fix erroneous set construction (#13765)alaviss2020-03-261-1/+3
| | | | | | | These constants were defined as `cint`. They can be huge on certain systems, such as Haiku, and trigger out-of-bounds errors in asyncdispatch. Ref #13764.
* Fix typeSym.getImpl for ref types (#13752)zah2020-03-264-8/+88
| | | | | | | | | | | | | | | | | | | | | * Fix typeSym.getImpl for ref types * Fix a codegen issue affecting the test suite of nim-beacon-chain * Fix tests/stdlib/tjsonmacro To understand the fix better it may help to take a look at the history of the replaced code. The nil check that is removed in this commit was introduced in another fix that failed to identify the root cause of the issue - namely that we allow an object type to exist for which no ast is present: https://github.com/nim-lang/Nim/pull/9601/files The original intention of the code is more obvious here: https://github.com/nim-lang/Nim/pull/9538/files
* `import macros` rather than `import std/macros`. (#13762)Euan2020-03-261-1/+2
|
* distinctBase overload for values (#13746)Timothee Cour2020-03-252-1/+8
|
* Continue bool conversion fixing (#13751)cooldome2020-03-253-2/+20
| | | | | | | | | * continue fixing #13744 * improve style * improve test Co-authored-by: cooldome <ariabushenko@bk.ru>
* bump copyright year to 2020 (#13753)Miran2020-03-251-1/+1
|
* [ci skip] docs: make the syntax for generics easy to look up (#13754)Rory O’Kane2020-03-251-1/+2
|
* [skip ci] docs: reword Part 3 link to communicate that it exists (#13755)Rory O’Kane2020-03-251-1/+1
|
* docs: say that `nil` can be used as a value (#13756)Rory O’Kane2020-03-251-5/+8
| | | | | and improve wording in other ways Showing that `nil` can be assigned helps to warn readers that variables can be `nil` even after being assigned a value.
* fix deprecations and other warnings (#13748)Miran2020-03-2522-66/+63
|
* fixes #13744 (#13749)cooldome2020-03-254-1/+44
| | | | | | | * fixes #13744 * improve style Co-authored-by: cooldome <ariabushenko@gmail.ru>
* fix #13737 (#13738)Timothee Cour2020-03-241-1/+2
|
* use nimEmulateOverflowChecks for ARM/ARM64Araq2020-03-241-0/+4
|
* __stderrp and friends are only on FreeBSD & DragonFlyBSD. (#13735)Euan2020-03-232-2/+2
|
* fix #13731, ambiguous repr of pointers (#13732)Miran2020-03-231-6/+2
|
* fixes #13722 (#13729)Andreas Rumpf2020-03-233-12/+27
| | | | | * fixes #13722 * better fix
* hotfix: make 'nim doc nimhcr' work on all platformsAraq2020-03-231-33/+33
|
* trees.nim: compare floating points by their bitpatterns because NaN ↵Araq2020-03-231-1/+1
| | | | comparisions are always false (WORST design in the history of computing!)
* disable even more of scope based destruction handling; fixes #13709Araq2020-03-231-7/+98
|
* trees.nim: compare floating points by their bitpatterns because NaN ↵Araq2020-03-231-1/+1
| | | | comparisions are always false (WORST design in the history of computing!)
* new syntax for lvalue references: `var b {.byaddr.} = expr` (#13508)Timothee Cour2020-03-234-1/+139
| | | | | | | | * new syntax for lvalue references: `var b {.byaddr.} = expr` * on type mismatch, `???(0, 0)` not shown anymore * * compiler now lowers `var a: {.foo.}: MyType = expr` to foo(a, MyType, expr) * new pragmas.byaddr defined in pure library code exploiting this lowering * skip `template foo() {.pragma.}`
* add error for missing commandLineParams (#13719)Andy Davidoff2020-03-231-0/+4
| | | | | | | * add error for missing commandLineParams * fixup * rewrite
* Revert "fix #13417 (#13712)" (#13728)Andreas Rumpf2020-03-232-31/+11
| | | This reverts commit a5f02cac85281fc2804e910f330f0c11d3c4f77b.
* introduce getPeerCertificates, fixes #13299 (#13650)Christian Ulrich2020-03-224-22/+82
| | | | | | | | | | | | * make i2d_X509 and d2i_X509 always available i2d_X509 and d2i_X509 have been available in all versions of OpenSSL, so make them available even if nimDisableCertificateValidation is set. * introduce getPeerCertificates, fixes #13299 getPeerCertificates retrieves the verified certificate chain of the peer we are connected to through an SSL-wrapped Socket/AsyncSocket. This introduces the new type Certificate which stores a DER-encoded X509 certificate.
* better error messages for Nim's effect systemAraq2020-03-224-21/+46
|