Ico Doornekamp
be9d1280ae
Added examples to strtabs module ( #10160 )
2019-01-07 00:52:19 +01:00
Neelesh Chandola
e77dd683eb
Fix defer not not-working at top level ( #10191 )
2019-01-07 00:51:17 +01:00
Alexander Ivanov
15773c455a
Add changelog for the isNil JavaScript change ( #10184 )
...
Forgot to add an item, breaking change
2019-01-07 00:50:21 +01:00
Leonardo Cecchi
b7be67349b
Fix ODBC SQL Error string decoding ( #10207 ) [backport]
...
ODBC Errors were presented to the users as a sequence of characters.
I.e.:
>test_oracle.exe
Error: ['H', 'Y', '0', '0', '0', '\x00', '\x00', ...]
test_oracle.nim(15) test_oracle
test_oracle.nim(8) test_oracle
db_odbc.nim(534) open
db_odbc.nim(168) dbError
Error: unhandled exception: ODBC Error [DbError]
This patch fix the string decoding, creating a real string:
>test_oracle.exe
Error: HY000 [Oracle][ODBC][Ora]ORA-12541: TNS:no listener
test_oracle.nim(15) test_oracle
test_oracle.nim(8) test_oracle
db_odbc.nim(534) open
db_odbc.nim(168) dbError
Error: unhandled exception: ODBC Error [DbError]
2019-01-07 00:48:55 +01:00
c-blake
ea3e32c224
Remove totally unneeded import of hashes. ( #10221 )
2019-01-07 00:42:49 +01:00
Federico Ceratto
2fa35126b0
Fix getAddrInfo, add IPPROTO_ICMPV6 Closes #10198
2019-01-06 20:23:44 +00:00
Tristano Ajmone
f3bd3691e7
Minor Fixes to Manual Wording ( #10214 )
2019-01-06 10:45:24 +01:00
Timothee Cour
4a720394bb
testament megatest: we can now tell which test failed; helps debugging and prevents certain bugs, plus other fixes ( #10089 )
...
* [testament] --verboseMegatest flag to make megatest compilation verbose
* replace "tests" by testsDir
* megatest's nimcache is now in same dir as other tests to avoid clobbering (eg when running tests from multiple Nim repos)
2019-01-05 16:07:09 +01:00
Timothee Cour
ffea3fbfae
* move up runnableExamples definition so can be used more in system.nim ( #10196 )
...
* document that toInt, toBiggestInt round towards 0 and add runnableExamples
* minor doc fixes
2019-01-05 16:01:10 +01:00
Hugo Locurcio
e5ca57d85c
Fix the tuple returned by os.splitFile() in documentation ( #10197 )
2019-01-05 01:00:38 +01:00
alaviss
be0a4d1342
fix system.nim documentations ( #10168 )
...
* system: fix nimGC_getStackBottom doc
* system/helpers: avoid leaking docs to system
2019-01-04 15:13:07 +01:00
Neelesh Chandola
e9a192c36f
expandFilename on windows is now consistent with other platforms ( #10154 )
2019-01-04 15:11:48 +01:00
rec
ba7d33b4e4
Guard against null exception ( #10162 )
2019-01-04 15:05:03 +01:00
Tristano Ajmone
4eee92a7a3
Fix Typo in Compiler Guide ( #10189 )
...
Change 'ableit' to 'albeit'.
2019-01-04 14:37:07 +01:00
Timothee Cour
319b46230c
fix bug in doAssertRaises when exception==Exception ( #10172 )
...
* fix bug in doAssertRaises when exception==Exception
* add testcase for doAssertRaises
2019-01-04 13:54:02 +01:00
Araq
5101b6befd
fixes #10188
2019-01-04 13:39:54 +01:00
Miran
69149a0e92
[backport] improve unicode docs, fixes #2353 ( #10174 )
...
* as instructed in #2353 , provides a short description why
there are no specialized procs for seq[Rune]
* adds several examples to better explain what some functions do
* small fixes (double backticks, add missing dots, etc.)
* use `rune` instead of "unicode characer"
2019-01-04 13:20:12 +01:00
Neelesh Chandola
db7ff50fe5
Undocument --genmapping ( #10175 )
2019-01-04 10:43:29 +01:00
Araq
086229459a
runnableExamples: compile and test them as a single file; fixes #9300
2019-01-04 09:52:22 +01:00
Miran
77166ba795
[backport] correctly document toInt, fixes #2764 [ci skip] ( #10176 )
2019-01-04 09:25:58 +01:00
Araq
e6cbf9e790
koch.nim: speed up tests for the 'testinstall' target for the nightly builds (these tests are also covered by the other CIs)
2019-01-03 23:45:42 +01:00
Andreas Rumpf
cb9110c43d
--define:nimQuirky exception handling for Nim; in preparation of a blog post
2019-01-03 18:56:05 +01:00
Neelesh Chandola
7c5ae00887
exportc is now not allowed for type aliases ( #9979 )
2019-01-02 20:01:06 +01:00
Oscar Nihlgård
9fb8c3d965
Add {.noReturn.} to system.raiseAssert ( #10161 )
2019-01-02 17:39:53 +01:00
Timothee Cour
a1e268e3dc
[cleanup] remove dead code compiler.options.mergeConfigs ( #10165 )
2019-01-02 10:26:40 +01:00
Ico Doornekamp
31b8bc7866
Add link to tutorial part III to docs.rst ( #10157 ) [ci skip]
2019-01-01 19:49:29 +01:00
Neelesh Chandola
6ed9676af5
Show field not initialized warning only when notnil used ( #10155 )
2019-01-01 18:49:44 +01:00
Neelesh Chandola
9faad7591e
Deprecate gc v2 ( #10151 )
...
* Deprecate gc v2
* warnDeprecated now has custom messages
2019-01-01 13:50:48 +01:00
jiro
e7fa8f3443
Add Example code to Documentation comment of wordWrap proc. ( #10146 )
2019-01-01 09:56:59 +01:00
cooldome
7c90e22ddd
fixes #10148 ( #10149 )
...
* fixes #10148
* fix a typo
2018-12-31 22:57:09 +01:00
Timothee Cour
ab72d68ec8
fix off by 1 error in col shown by toFileLineCol ( #10138 )
...
* fix off by 1 error in `col` shown by toFileLineCol
* fix test failures
2018-12-31 15:42:01 +01:00
c-blake
7ac1fc81fd
Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ? ( #10084 )
...
* Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ?
CDF is a standard ident in all things related to random numbers/sampling,
and full words "cumulativeDistributionFunction" would be silly long, in
this case, IMO. We use lowercase `cdf` to make it not look like a type,
remove all looping from `sample` letting callers do it. Besides just
side-stepping any `sampleSize` name choice, callers may want to filter
out samples anyway which this makes slightly simpler.
Also add two variants of `cumsum`, value return and in-place update
distinguished by the var-ness of the first argument. Add tests for
`int` and `float` for both `cumsum` and the new `sample`. (The sample
tests exercise the value return mode of `cumsum`.)
Functionality pre-this-PR `sample(a, w)` is now the almost as simple
`for i in 0..<n: sample(a, w.cumsum)`, but this new code factoring is
almost surely better. The statistical tests pass, as before.
* Address Araq comment in https://github.com/nim-lang/Nim/pull/10084
We can always add in some `var` version later if desired to save
memory, but this change now at least firms up the `sample` interface.
* Rename `cumsum` -> `cumsummed` to honor NEP1 style. Re-instate `cumsum` as
the in-place transformation. Test both in `tests/stdlib/tmath.nim` and use
`cumsummed` in the example code for sample since that's a simpler example.
* Fix requests from https://github.com/nim-lang/Nim/pull/10084 :
example in lib/pure/math.nim and comment whitespace in lib/pure/random.nim
2018-12-31 14:52:51 +01:00
deech
e87910197a
Check there are no side effects before optimizing away compile time expressions. ( #9934 )
2018-12-31 14:41:24 +01:00
Neelesh Chandola
bcbe317d17
Before showing deprecated warning, check whether enum field was marked deprecated or the whole enum type ( #10135 )
2018-12-30 18:34:41 +01:00
Andreas Rumpf
2ee2022c29
help Nim optimize intsets.initIntSet
2018-12-30 11:45:16 +01:00
cooldome
82c009a2cb
Dead code elimination for entire modules and their init procs if empty ( #10032 )
...
* fixes #9798
* Change order of write modules
* Move datInit calls ahead of initStackBottom
2018-12-30 11:28:12 +01:00
Neelesh Chandola
cbbdcb2669
Show deprecation warning for fields of a deprecated enum ( #10112 )
...
* Show deprecation warning for fields of a deprecated enum
* Add test
2018-12-30 09:45:39 +01:00
Neelesh Chandola
c5ad4c10cb
Deprecated pragma is now supported on enum fields ( #10113 )
...
* {.deprecated.} pragma is now supported for enum fields
* Add tests
* Simplify code
2018-12-30 09:43:59 +01:00
Timothee Cour
a6633b9658
fix typetraits.$ regression https://github.com/c-blake/cligen/issues/84 ( #10131 )
...
* fix typetraits.`$` regression https://github.com/c-blake/cligen/issues/84
* add test
2018-12-30 09:40:21 +01:00
Alexander Ivanov
aadbdd6b06
Support undefined in isNil ( #9960 )
2018-12-30 02:48:37 +01:00
Andreas Rumpf
062d7e3a39
fixes #10082
2018-12-30 02:45:43 +01:00
Timothee Cour
dd33f41877
refs #10121 ( #10124 )
2018-12-30 02:06:15 +01:00
Timothee Cour
7f81195e5a
document --profiler:on ( #10115 )
2018-12-30 01:31:30 +01:00
Neelesh Chandola
527b774772
{.push raises: [].} is now ignored for vars/lets/consts ( #10026 )
2018-12-30 01:28:56 +01:00
Timothee Cour
e98d54b050
nim dump: add nimcache entry ( #10122 )
2018-12-30 01:27:37 +01:00
Timothee Cour
9c65ea0d16
nim c now allows: when defined(c) (#10130 )
2018-12-30 01:21:33 +01:00
Timothee Cour
0831292863
revives: Move typetraits.$ to system. Fixes #5827 ( #10071 )
...
* Move typetraits.`$` to system. Fixes #5827 .
* revive PR; adjust code to make sure everything works and add tests
* fix tests/concepts/tstackconcept.nim
* address comments
2018-12-30 01:09:47 +01:00
Timothee Cour
eba8ffcf70
checkErr now shows actual system error msg instead of unknown error (#9987 )
2018-12-27 22:46:53 +01:00
ee7
cc4720fac1
Const tuple unpacking: add tests ( #10100 )
2018-12-27 22:40:40 +01:00
Timothee Cour
1b7c8482fe
fixes #10101 ( #10103 )
2018-12-27 22:40:09 +01:00