You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code to test for example for "positive fixint" looks like
first_byte.bit_and(0b10000000).is_nonzero
which IMHO is un-intuitive.
It would be nice to write something along the lines:
first_byte =~ b/0xxxxxxx/
This would require a new BitMask type and a new literal to create it. Once we have custom string literals (#247), we could create e.g. a BitMask using something like '0xxxxxxx'_bitmask. This would actually be simple if we had some kind of comptime evaluations, then we could just add a method bitmask! on String.
The text was updated successfully, but these errors were encountered:
Just looking at msgpack spec, which defines a table like this to decode the type of the following value:
The code to test for example for "positive fixint" looks like
which IMHO is un-intuitive.
It would be nice to write something along the lines:
This would require a new
BitMask
type and a new literal to create it. Once we have custom string literals (#247), we could create e.g. aBitMask
using something like'0xxxxxxx'_bitmask
. This would actually be simple if we had some kind of comptime evaluations, then we could just add a methodbitmask!
on String.The text was updated successfully, but these errors were encountered: