| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
CountTable now returns 0 instead of 'key not found' for get requests.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
+ other fixes (#10274)
* s/exitStatus(...)/exitStatusLikeShell(...)/
* fix #10273 execShellCmd now returns nonzero when child exits with signal
* test case for #10249 and explanation for the bug
* fix test failure
* add tests/nim.cfg
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Initial version of C++11 style atomics
* Make Atomic[T] always concrete
|
|\
| |
| | |
Move four modules to graveyard
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
* Add more Date wrappers to jscore
* Times cosmetic changes
- Improved docs
- Code wrapped at 80 chars
- Formatting fixes using nimpretty
- Remove some old deprecated procs
|
|
|
| |
Those are useful in generic code, and `proc write*[T](s: Stream, x: T)` was already public.
|
|
|
|
| |
powers of two when needed. This prevents the selector to allocate large amounts of memory at startup on systems with a high RLIMIT_NOFILE setting (#10194)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which leaked implementation detail (#10070)
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim
* Note: isNamedTuple is useful in other places, eg #10010 (comment)
* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim
* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
|
|
|
|
|
|
|
| |
Darwin has long deprecated the wait union, but their macros still assume
it unless you define _POSIX_C_SOURCE. This trips up C++ compilers.
This commit duplicates the behavior of WEXITSTATUS when _POSIX_C_SOURCE
is defined.
|
|
|
|
|
|
|
| |
According to POSIX, system() shall returns the termination status in the
format specified by waitpid(), which means WEXITSTATUS should be used to
retrieve the exit code portably.
This fixes execShellCmd on Haiku.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* removed from `compiler`:
* lists (deprecated 2 years ago)
* removed from `lib` (all deprecated 3 years ago):
* ssl
* matchers
* httpserver
* removed from `lib/deprecated`:
* unsigned
* actors (and three accompanying tests)
* parseurl
* moved to `lib/deprecated`:
* securehash (the reason for not directly removing - it was deprecated (only) one year ago)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* 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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
| |
(#10131)
* fix typetraits.`$` regression https://github.com/c-blake/cligen/issues/84
* add test
|
| |
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
| |
Fixes #9999.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#10072)
* Add the ability to sample elements from an openArray according to a parallel
array of weights/unnormalized probabilities (any sort of histogram, basically).
Also add a non-thread safe version for convenience.
* Address Araq comments on https://github.com/nim-lang/Nim/pull/10072
* import at top of file and space after '#'.
* Put in a check for non-zero total weight.
* Clarify constraint on `w`.
* Rename `rand(openArray[T])` to `sample(openArray[T])` to `sample`, deprecating
old name and name new (openArray[T], openArray[U]) variants `sample`.
* Rename caller-provided state version of rand(openArray[T]) and also clean
up doc comments.
* Add test for new non-uniform array sampler. 3 sd bound makes it 99% likely
that it will still pass in the future if the random number generator changes.
We cannot both have a tight bound to check distribution *and* loose check to
ensure resilience to RNG changes. (We cannot *guarantee* resilience, anyway.
There's always a small chance any test hits a legitimate random fluctuation.)
|
| |
|
| |
|
|
|
|
|
|
| |
* Stop false positives in distros.nim
* Fix bad string comparison on line 176 of distros.nim
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|