256 Commits

Author SHA1 Message Date
Jacek Sieka
403b5de2a7
docs 2023-05-10 08:55:31 +02:00
Jacek Sieka
9ff33edb38
add references 2023-05-09 21:34:08 +02:00
Jacek Sieka
391c2e24b1
intops: core integer primitives
This, together with bitops2 and endians2, forms the core primitive
offering for working with integers as the computer sees them.

The focus of intops is to expose a number of common integer operations
typically used to build more complex abstractions such as bigints,
mp-ints etc while having access to the best performance the compiler and
cpu can offer.

There is more to do here, but this provides an outline of what this
module could look like.

Obviously, there are no exceptions or defects around - the point of
these utilities is to stay as close as possible to bare metal. They
could be used to implement such features however (similar to how
`system/integerops` works).
2023-05-09 21:28:35 +02:00
Eugene Kabanov
407a598836
Fix Windows MAX_PATH limitation for absolute paths in io2 module. (#169)
* Fix Windows MAX_PATH limitation for absolute paths.

* Update algorithm to be more compatible with both directory and file paths.

* Add test.
2023-02-02 09:30:40 +01:00
Miran
11c8893cc6
switch CI to the supported version of ubuntu (#139)
* switch CI to the supported version of ubuntu

See https://github.com/actions/runner-images/issues/6002

* don't continue on error for Nim 1.6

* install openssl on macos for Nim devel

due to changes in https://github.com/nim-lang/Nim/pull/19814

---------

Co-authored-by: Jacek Sieka <jacek@status.im>
2023-02-01 13:19:07 +07:00
jangko
25aab846f1
upgrade github action to v3 2023-02-01 12:03:32 +07:00
Jacek Sieka
447b23d3bf
results: work around field access bugs (#167)
* results: work around field access bugs

See:

* https://github.com/nim-lang/Nim/issues/3770
* https://github.com/nim-lang/Nim/issues/20900

* comment fixes

* add test

* document test better
2023-01-20 15:32:51 +01:00
Jacek Sieka
19a6aea53b
results: document experimental error shortcut, and its gotchas (#168) 2023-01-20 15:32:34 +01:00
Jordan Hrycaj
609edbb5db
Updated unit tests using setup facility (#166)
why:
  Allows executing sub-tests independently.
2023-01-19 20:23:21 +00:00
Jacek Sieka
4e256104e1
Remove lock file (#165)
The lock file breaks devel testing - CI updates are needed as well as a
strategy for handling "nim important packages" builds (which build with
a version of Nim different from that in the lock file)
2023-01-19 15:23:48 +01:00
Jacek Sieka
32d6f43fff
byteutils: allow empty output buffers (#157)
* byteutils: allow empty output buffers

* er, closed
2023-01-19 08:19:26 +01:00
Jacek Sieka
ac602b5086
results: print none for empty Opt instances (#164)
* results: print `none` for empty Opt instances

* fix test too
2023-01-16 09:01:31 +01:00
Bung
f2f9685ec9
fix int set (#163) 2022-12-19 12:28:22 +01:00
Zahary Karadjov
f5846de7b2
Add objects.isDefaultValue 2022-12-15 17:11:53 +02:00
Jacek Sieka
7184d2424d
ci: bump checkout (#160) 2022-11-22 17:17:06 +01:00
Jacek Sieka
8e8d99f912
cancel PR builds (#159)
* cancel PR builds

* test

* test again
2022-11-22 13:47:01 +01:00
Jacek Sieka
aba51f1d29
normalise nimble file (#158)
* normalise nimble file

* loop args
2022-11-21 11:02:24 +01:00
Jacek Sieka
66c16920a6
update nimble build script (#155) 2022-11-19 07:50:31 +01: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
Jordan Hrycaj
665e1d1604
Fix issues #151 and #153 (#154) 2022-11-17 14:54:48 +00:00
Jacek Sieka
8a1b6ab4dc
results: work around void member codegen issue (#150) 2022-11-11 14:26:59 +01:00
Tanguy
989047dd76
Deprecate baseType (#148)
* Switch to compile time error for ARC / ORC

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2022-11-10 08:35:52 +01:00
Lorenzo Delgado
ba687c37a3
chore: fix 'there should not be high(value). use high(type)' deprecation (#147) 2022-11-09 14:48:38 +01:00
Tanguy
23da07c9b5
Fix compilation on devel (#146) 2022-10-29 21:48:51 +02:00
jangko
f2e58ba4c8
support multiple nim version re. nnkArgList issue 2022-09-22 08:16:32 +07:00
Jacek Sieka
0c379cf1d8
fix fromBytes call resolution (#140) 2022-09-12 14:29:03 +02:00
Jacek Sieka
142a408ca7
results: typo 2022-09-03 20:19:16 +02:00
Zahary Karadjov
018760954a
Add stew/saturation_arith 2022-08-18 23:57:27 +03:00
Jordan Hrycaj
1e86bd1ef3
Fixing overlapping intervals bug (#138)
why:
  did not properly merge
2022-08-16 14:21:01 +01:00
Eugene Kabanov
0476bcad1b
Cross-platform lockFile()/unlockFile() procedures for io2. (#116) 2022-08-05 19:58:34 +03:00
Eugene Kabanov
49db5b27b9
Disable VCC compiler tests. (#137)
* Disable VCC compiler tests.

* Fix macos version requirement.
2022-08-03 16:51:46 +03:00
Jordan Hrycaj
a812fd3fae
Retrive envelop interval for point (#136) 2022-08-02 09:08:17 +01:00
Zahary Karadjov
06621a2fcd
More forgiving recordFields 2022-07-28 19:50:32 +03: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
Miran
d37e77a72b
make it more Nim 1.4+ compatible (#131)
* make it more 1.6-compatible

* these changes are from 1.4 forward
2022-07-26 17:52:59 +00:00
Jordan Hrycaj
c020fd80f1
Fix ge() fringe case (#135)
why:
  The point `high(P)` is treated separately and added to the top adjacent
  interval or is treated as a sigle point interval.
2022-07-25 15:05:27 +01:00
Jordan Hrycaj
598246620d
Fix fringe case (#130)
why:
 Merging [a,a] in to {[a+1,b]} caused assertion violation, doAssert
 condition was too strict.
2022-07-19 09:19:41 +01:00
Jordan Hrycaj
8a9816ac02
Fix iterator edge cases for [high(P),high(P)] (#129)
also:
  cascaded `if` in rbtree (for unrelated troubleshooting)
2022-07-18 18:56:31 +01:00
tersec
f173efc500
stylecheck: nnkArglist -> nnkArgList (#127)
* stylecheck: nnkArglist -> nnkArgList

* --stylecheck:error iff >= 1.6.0
2022-07-18 11:02:40 +00:00
Jacek Sieka
9a3130eb5b
leb128: avoid shifts larger than type (#123) 2022-07-16 19:16:11 +02:00
Zahary Karadjov
b55c5a6d74
Reorder the definitions to avoid a refernce to setBit before it's being defined 2022-07-14 15:11:34 +03:00
Jordan Hrycaj
9c3596d9de
Migrate to unittest2 (#125)
* Migrate to `unittest2`

why:
  Global symbol overflow when running NIM 1.2 on Github ci suggests that
  unit tests run sort of separately. The replacement library `unittest2`
  provides that.

* Build ci dependencies
2022-07-08 10:34:21 +01:00
Jordan Hrycaj
4cab7b0879
Added IntervalSet, sets of non-adjacent intervals (#121)
* Added `IntervalSet`, sets of non-adjacent intervals

Relocated from nimbus-eth1 snap sync development

* Fix local import directive

* Fix --styleCheck complaints

* Attempt to get around CI problem by varying items

details:
  Vary all_tests exec list
  Hide useless globalness of `noisy` constant in non-debugging mode
2022-06-20 15:04:47 +01:00
Jacek Sieka
dad28a269f
result: add Opt.some / Opt.none (#117) 2022-06-17 13:45:22 +03:00
zah
981551ae5d
Nimble Setup (#110) 2022-06-17 11:43:10 +03:00
Zahary Karadjov
f75c0a273a
[skip ci] consistent formatting 2022-06-17 11:39:35 +03:00
zah
9fe9cb7002
Add byteutils.hexToByteArrayStrict (#120) 2022-06-17 11:37:06 +03:00
Jordan Hrycaj
b3ea2c6b46
Normalise KeyError exception message (#119) 2022-06-16 16:19:53 +01:00
lchenut
c2f0cbf0d9
Add enum utilities and add enum with holes support (#115) 2022-06-10 02:29:07 +03:00