tersec
tersec
### Description ```nim type K = object h: iterator(f: K): K iterator d(g: K): K {.closure.} = defer: discard discard K(h: d) ``` ```nim type K = object h: iterator(f:...
Valgrind invalid reads and writes with `addExitProc` from `std/exitprocs` in Nim 2.0 but not `devel`
### Description ```nim import std/exitprocs proc exitProc() = discard addExitProc(exitProc) ``` Compiled with `nim c -d:useMalloc b && valgrind ./b` with `version-2-0` commit `35ec9c31bd0bd413f1740feea90f3b97ad5d1b65` results in a length Valgrind report...
### Description https://developer.apple.com/documentation/kernel/1441083-sprintf notes that this function is deprecated, and as of macOS 13, a `deprecated-declarations` warning appears when one tries to use it: ``` warning: 'sprintf' is deprecated: This...
### Description ```nim discard allocCStringArray([""]) ``` compiled with ``` nim c -r --mm:refc --passC="-fsanitize=undefined" --passL="-fsanitize=undefined" a.nim ``` Where `allocCStringArray` compiles to: ```c N_LIB_PRIVATE N_NIMCALL(NCSTRING*, allocCStringArray__system_u2460)(NimStringDesc** a_p0, NI a_p0Len_0) { NCSTRING*...
### Description ```nim proc y[N](): array[N, int] = default(array[N, int]) discard y[1]() ``` `nim c -c` suffices, i.e. this is a compile-time, not runtime phenomenon. ### Nim Version ``` Nim...
### Description ```nim proc y(n: ref int) = discard proc w(n: ref int) = iterator a(): int = y(n) let x = a w(nil) ``` ### Nim Version ``` Nim...
https://github.com/status-im/nimbus-eth2/issues/4661 ``` nimbus-eth2/vendor/nim-chronos/chronos/asyncfutures2.nim(389, 3) Warning: catch a more precise Exception deriving from CatchableError or Defect. [BareExcept] ``` https://github.com/status-im/nim-chronos/blob/f7835a192b45c37e97614d865141f21eea8c156e/chronos/asyncfutures2.nim#L389-L393
When attempting to either run `nimble test` or `nim c tests/testsysrand.nim` from the root `nimcrypto` directory. Tested with current git commit: ``` commit 0c6ddab03a99805239b7875f71d2ca95fbed6f85 (HEAD -> master, origin/master, origin/HEAD) Author:...
For example, `aarch64`. This avoids intrinsics but uses `uint128`: https://github.com/status-im/nim-stint/blob/7bb0ccc7842577243edc3b8d61f75bf498551a7a/stint/private/primitives/addcarry_subborrow.nim#L87-L89 ```nim import "."/"nim-stint"/stint const x: UInt256 = 0.u256 discard $x ``` ``` commit 7bb0ccc7842577243edc3b8d61f75bf498551a7a (HEAD -> master, origin/master, origin/HEAD) Author:...
WIP, not mergeable yet, but make sure there's an internally consistent branch ready. Captures some of the logic changes, but too much duplication; most can become generic.