Commit Graph

185 Commits

Author SHA1 Message Date
Jacek Sieka d622c07a08
result: cleanups (#22)
* fix ResultError type
* add/fix documentation
* clean up raises (in preparation for better Defect handling)
* fix toException mixin
* work around compiler bug with more explicit types
* fix capture exception type
* fix result type on `?`
2020-03-30 22:49:13 +02:00
Ștefan Talpalaru 4477f45c40
Merge branch 'basetype' 2020-03-30 19:56:37 +02:00
Ștefan Talpalaru 09e55cd375
stew/objects: add baseType() 2020-03-29 17:34:45 +02:00
Zahary Karadjov 989c33a82b
Take advantage of fixes in Nim 1.2 2020-03-25 17:52:09 +02:00
Jacek Sieka 76beeb769e
fix fromBytes for zero length arrays 2020-03-07 23:29:46 +01:00
Jacek Sieka ca8fb7ebd0 add slice assignment for openarray 2020-03-05 12:11:25 +02:00
Jacek Sieka 598fe151f8 non-cast implementation of toBytes, add fromBytes 2020-03-05 12:11:25 +02:00
Zahary Karadjov 50562b515a
Add bitseqs.bitsLen(openarray) 2020-01-29 02:42:50 +02:00
Jacek Sieka f5be0ab63a
add nim-result 2020-01-23 17:35:30 +01:00
Jacek Sieka 1edeabb453
Renames (#17)
* renames and warning fixes
* gitignore: nimcache
2019-12-20 13:23:30 +01:00
Jacek Sieka 898f4f47e3
Merge pull request #13 from status-im/bitsetting
set, clear, toggle and change bits
2019-12-20 12:55:41 +01:00
Jacek Sieka a36df61d2b
set, clear, toggle and change bits
* use standard bit manipulation naming
* fix signed overflow on large shifts
* add toggle
* add smoke tests
* branch-free changeBit
2019-12-20 12:49:20 +01:00
Jacek Sieka d8c2a64055
Merge pull request #16 from status-im/comparebyte
byteutils: lexicographical less than
2019-12-20 12:48:10 +01:00
Jacek Sieka 9c18a1cc55
byteutils: lexicographical less than 2019-12-19 13:29:38 +01:00
Yuriy Glukhov 1c1195dba3 Copied base32, 58, 64 from libp2p 2019-12-13 15:31:19 +02:00
Jacek Sieka e9d75c05f6
fix 1.0 test compat 2019-12-10 15:50:02 +01:00
Jacek Sieka cf4df3dc50 add toBytes (#14) 2019-12-10 15:39:57 +01:00
Zahary Karadjov 1c4293b3e7
A new fix for newLit
Upstream fix submitted here:
https://github.com/nim-lang/Nim/pull/12542
2019-10-28 14:30:49 +02:00
Zahary Karadjov 2c9ca5dabb recordFields returns more accurate information in nested case objects 2019-10-23 09:36:16 +09:00
andri lim 53c1ebe9d4 fixes 'nimFirstOne' for Nim v1.0.2 2019-10-23 09:36:16 +09:00
Zahary Karadjov 11b6a831cb Prepare for Nim v1.0.2 2019-10-23 09:36:16 +09:00
kdeme 0c3ab3eb78 Fix endianness typos 2019-10-03 16:38:42 +03:00
Zahary Karadjov 2bdd2fab6e
Add `len` for tuples 2019-10-02 16:25:58 +03:00
Jacek Sieka 62c1bebe2e ptrops: remove mixin and work around compiler bugs 2019-09-26 18:25:19 +03:00
Jacek Sieka df542980b6 ptrops: remove MemAddress 2019-09-26 18:25:19 +03:00
Jacek Sieka ee484001d2 ptrops: fix mixins 2019-09-26 18:25:19 +03:00
Jacek Sieka 7fa9535f3c ptrops: add mixins 2019-09-26 18:25:19 +03:00
Jacek Sieka 5ada369741 ptrops: add 2019-09-26 18:25:19 +03:00
Zahary Karadjov 5f1dc751ca
Convenience varints API going from int straight to openarray 2019-09-08 22:33:03 -04:00
Ștefan Talpalaru a81d1fac85
CI: update script path 2019-08-24 20:42:13 +02:00
Zahary Karadjov 43bbe48e5f Cosmetic rename for more clarity 2019-08-19 18:43:25 +03:00
Zahary Karadjov 888a5aa82d Fix the failing overlaps test 2019-08-19 18:43:25 +03:00
Jacek Sieka 3689c58d1b bitseq failing test 2019-08-19 18:43:25 +03:00
Zahary Karadjov 4f685ab7ec
Another useful form of isTuple 2019-08-14 17:29:14 +02:00
Zahary Karadjov 343c2073cc
recordFields have become too heavy-weight to remain an iterator 2019-08-12 17:49:39 +03:00
Alexander Ivanov 06290de0f9
Implement unnamed tuple support 2019-08-08 22:51:25 +03:00
Jacek Sieka a8d98b3e88
fix parser type 2019-08-07 11:39:05 +02:00
Zahary Karadjov 5e11e1f1db
Add BitSeq.isZeros 2019-08-07 05:19:53 +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 a3df04d701
Add more init procs for tables and macros.genExpr 2019-08-02 15:26:08 +03:00
Zahary Karadjov d196350d22
Add anonConst 2019-08-02 11:51:04 +03:00
Zahary Karadjov 6be00f7c4b
Extract the varints code being used in the latest LibP2P back-end
Originally, this code was taken from
https://github.com/status-im/nim-libp2p/blob/master/libp2p/varint.nim

The API was refactored to make it easier to use in the networking
back-ends where the data is being consumed byte by byte.
2019-08-01 17:21:14 +03:00
Zahary Karadjov 9ac177db1f
Address review comments 2019-07-31 11:40:25 +03:00
Zahary Karadjov 2ca2f25af6
hasCustomPragmaFixed supports types with quoted field names 2019-07-31 02:43:35 +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 2334aa0fb3
More code migrated from the beacon-chain repo 2019-07-31 02:25:12 +03:00
Zahary Karadjov 81cbc16f15
Added bitops2.bitWidth 2019-07-31 02:24:33 +03:00
Zahary Karadjov ff326d686c
support $ op for bit arrays/seqs 2019-07-31 02:20:49 +03:00
Zahary Karadjov 30e084f76f
Add macros.inspectType 2019-07-31 02:20:49 +03:00