-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing __u/int128
support
#288
Comments
D doesn't support 128bit integers. What do you suggest the result would be? |
https://dlang.org/phobos/core_int128.html ? Edit: Not yet how supported it is by other D compilers... At first it would be enough to just translate to 64bit integers. (Like Pascal) |
In my test LDC and GDC works! <source>(9): Error: module `int128` is in file 'core/int128.d' which cannot be read
import path[0] = /opt/compiler-explorer/dmd2-nightly/dmd2/linux/bin64/../../src/phobos
import path[1] = /opt/compiler-explorer/dmd2-nightly/dmd2/linux/bin64/../../src/druntime/import
Compiler returned: 1 |
Strange, it's available in the repository. BTW, have you checked if it's ABI compatible with |
More recent information is below: cc: @ibuclaw |
BTW, should it be |
Please, use |
I'm not that familiar with 128 bit integers, but it seems there's no unsigned version in |
I know. Not ideal, but for some simulated operations so far haven't had any problems. I tried using uint64 with high values during concurrent transactions and in some cases I applied the use of integer casts. Then I will publish the D client to compare with the C Client as a reference. ReferencesWhy not 64-bit?A: https://tigerbeetle.com/blog/2023-09-19-64-bit-bank-balances-ought-to-be-enough-for-anybody/ Clients FFI |
Do you suggest using the signed |
It's not ideal, but yeah. Using Cent in signed and unsigned. |
@kassane is this what you had in mind: ac4b876#diff-9347ce4d022101ff02a5f37861df6934dc17bd9a72590f391f603a555f6e10b8? |
Exactly. |
Source to translate:
https://github.com/tigerbeetle/tigerbeetle/blob/main/src/clients/c/tb_client.h
typedef __uint128_t tb_uint128_t;
->alias tb_uint128_t = <unimplemented>;
The translation gave an undefined type.
dstep/dstep/translator/Type.d
Lines 188 to 196 in 2cb53c1
The text was updated successfully, but these errors were encountered: