-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support for 64 bits integers #2
Comments
Yes, 64 bit are not supported currently. I am not sure how to proceed though : changing |
As a user of the library, I think I prefer a new ctor for Int64. It's the simpler to use and it wouldn't be difficult to spot the ctor and add a tiny bit of documentation. I concur that forcing Int64 for every integer is too heavy for the general case. As for functor-based APIs, they are much heavier. |
actually I looked at the code ( :) ) and me from 5 years ago was forward-thinking enough to put all functionality in CBOR.SImple, so we can experiment with different representations in different module with separate type. |
I've started trying to add the corresponding code in edit: I've spent a few minutes on this and it seems easier than I thought: I'm currently making two CBOR.Simple modules, one with |
How should the testsuite be changed? I've crafted a testcase but integration is not obvious since there are two implementations and moreover each have its own expected failures. The best approach I can think of is to run two separate testsuites and chose the integer implementation through a command-line parameter each time. The downside is that the testsuite output will probably be less obvious since there will be two separate runs. Is that OK with you? |
Sorry for slow reply
Yup, that would be my first approach to try.
I don't really like that, if the implementation is a functor it should be possible to chose in code without command-line flags? Can you create a draft PR please? |
No problem, I'm also slightly slow on my side at the moment. :)
I've spent a bit of time on the testsuite. I've started using dune's diff'ing of testsuite output vs. expected output in order to be able to test the two implementations in a single run while still showing something easy to understand.
I'm readying one. I only have a few small obvious deficiencies to clean I think. |
Hi,
If I'm not mistaken, the CBOR specification supports 64 bits unsigned integers but they're not supported in ocaml-cbor. Is it possible to add them to the library?
Note that I'm currently using ocaml's signed int64 in my application and it'd maybe make sense that I also switch to ocaml 4.08 and its unsigned 64 bit integers.
The text was updated successfully, but these errors were encountered: