1_329_227_995_784_915_872_903_807_060_280_344_576_u128
Invalid UInt64: 1329227995784915872903807060280344576 (ArgumentError)
from ???
from ???
from ???
from ???
from ???
from ???
from ???
from ???
from __crystal_main
from main
from __libc_start_main
from _start
from ???
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
But, I can get the same UInt128 from Slice(UInt8):
source = Bytes[1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8]
pp source.reduce(0u128) { |r, v| (r << 8) | v } # => 1329227995784915872903807060280344576_u128
Yes, this is a known issue. See #5818 and #7015. Apparently those were closed without a good reason (it was never fixed and the PR that supposed to fix it is wrong (or at least not efficient as I'd like it to).
Let's keep this open to represent this issue.
There's #7093, as I understand waiting for the final touches. Would be great if it made it into 0.28.0 release.
@Sija No new commits for about two months.
@delef True, but that's the most complete PR to date.
Most helpful comment
Yes, this is a known issue. See #5818 and #7015. Apparently those were closed without a good reason (it was never fixed and the PR that supposed to fix it is wrong (or at least not efficient as I'd like it to).
Let's keep this open to represent this issue.