Commit Graph

17 Commits

Author SHA1 Message Date
tersec 326ef09a46
remove dead code under Nim 1.6+ (#206) 2023-07-31 21:07:48 +00:00
tersec 9958aac68a
remove workaround for unsupported Nim 0.19 and earlier (#200)
* remove workaround for unsupported Nim 0.19 and earlier

* replace some proc with func
2023-06-15 13:13:41 +00:00
Jacek Sieka d087c039c2
fix `baseAddr`, move to `ptrops` (#156)
* return `nil` for empty openArrays / avoid returning `16`
* move to `ptrops`, deprecate `ptr_arith` fully
2022-11-18 15:22:29 +02:00
Jacek Sieka f295d00db9
remove `stew/ranges` (#152)
* deprecated for years
* relies on unavailable (shallowCopy) or broken (missing range checks)
features in nim
2022-11-18 12:52:55 +01:00
Miran 2ab76e2cc2
fix warnings encountered with Nim 1.6 (#128)
* fix warnings encountered with Nim 1.6

* Create shims/stddefects.nim with aliases for all defects
2022-07-27 10:10:26 +02:00
Jacek Sieka 8a405309c6
enable styleCheck:usages (#93) 2021-12-02 16:24:02 +01:00
Zahary Karadjov d0f5be4971
Fix a compilation error when using a 32-bit varint parser 2020-05-12 22:59:46 +03:00
Jacek Sieka 638e7acc8e
deprecate ranges (#31)
Without lifetime tracking, ranges pose a number of issues with regards
to memory safety - use openArray instead which is limited but safe.

In its present form, ranges take a copy of whatever is passed to them
which obscures the copies that they take, leading to misleading and slow
code.

If openArray is not applicable, simply do a seq copy - it's fine and
really doesn't matter in 95% of all cases, then profile and use other
techniques where needed.
2020-05-07 07:11:43 +02:00
Jacek Sieka 1edeabb453
Renames (#17)
* renames and warning fixes
* gitignore: nimcache
2019-12-20 13:23:30 +01:00
Jacek Sieka 5ada369741 ptrops: add 2019-09-26 18:25:19 +03:00
Zahary Karadjov 19fd0cc489
Hide the complexity of dealing with the BitSeq marker bit inside an efficient machine words iterator 2019-08-06 21:02:03 +03:00
Zahary Karadjov e203f709d6
Address review comments 2019-07-31 02:31:56 +03:00
Zahary Karadjov e4da0b36c5
Fix a compilation issue when testing nim-stew 2019-07-31 02:25:12 +03:00
Zahary Karadjov 3fce87f0f5
Refactor the bitranges module
* The bit procs defined over number values and openarray are now part of
  the bitops2 module and use the more traditional LittleEndian indexing.

* Added BitSeq and BitArray types as defined in the ETH2 spec.
2019-07-31 02:20:49 +03:00
Zahary Karadjov 061543d039
Turn some inline procs into templates
As much as I believe in the power of optimizing compilers, it turned
out that the use of forced inlining with templates still creates a
significant difference in the release builds of nim-faststreams.
2019-07-31 02:13:02 +03:00
Jacek Sieka 89107ae03d
fix shims imports 2019-07-07 11:38:00 +02:00
Jacek Sieka 904f84c8e0
add ranges 2019-07-06 20:45:27 +02:00