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 `strtod` #118

Closed
samoht opened this Issue Jan 29, 2015 · 11 comments

Comments

Projects
None yet
8 participants
@samoht
Member

samoht commented Jan 29, 2015

val float_of_string (and the corresponding Scanf function) uses strod (see the relevant OCaml code). However It seems that we do not support it.

@samoht samoht added the bug label Jan 29, 2015

samoht referenced this issue Jan 29, 2015

Added minimal POSIX API
Just enough to let us compile and run the OCaml runtime. Writing to
stdout or stderr outputs the string with printk, which is useful
for debugging.
@MagnusS

This comment has been minimized.

Member

MagnusS commented Jun 2, 2015

This currently also means that calls to float_of_string will compile, but crash the unikernel at runtime.

@dbuenzli

This comment has been minimized.

dbuenzli commented Jun 2, 2015

FWIW the algorithms of this paper look interesting. A self-contained BSD3 implementation by the author is available here.

@talex5

This comment has been minimized.

Contributor

talex5 commented Jun 5, 2015

Interesting. A small self-contained implementation of this would be very welcome. Are there any issues with using C++ code in mirage-xen? I guess it will need some support libraries.

@hhugo

This comment has been minimized.

hhugo commented Jun 8, 2015

related : http://caml.inria.fr/mantis/view.php?id=6701
(strtod is locale dependent)

@yomimono

This comment has been minimized.

Member

yomimono commented Feb 25, 2016

@timbertson

This comment has been minimized.

Contributor

timbertson commented Feb 25, 2016

I've also hit this with yojson, parsing any JSON data containing a float.

@dbuenzli

This comment has been minimized.

dbuenzli commented Apr 8, 2016

New issue with a reference to a new paper http://caml.inria.fr/mantis/view.php?id=7218

@dbuenzli

This comment has been minimized.

dbuenzli commented Apr 20, 2016

As follow up to the call. The code I'm using in libc-ocaml is this one. It is what used to be used e.g. in V8 before they switched to grisu, here's the removal commit.

@dbuenzli

This comment has been minimized.

dbuenzli commented Apr 20, 2016

Note also that there is a change log here it may be a good idea to mention which version was picked up.

@ansiwen

This comment has been minimized.

ansiwen commented Apr 29, 2016

same problem here in cohttp in combiation with webmachine: https://bpaste.net/show/607e55d45508

so, will this be fixed? what can we do about it? I need a solution, but I'm not sure how it's going to be fixed. I could help.

@talex5

This comment has been minimized.

Contributor

talex5 commented Apr 30, 2016

@ansiwen Thanks for the offer! Someone needs to pick a suitable-licensed, self-contained, not-too-messy C implementation and copy it into mirage-platform here: https://github.com/mirage/mirage-platform/tree/master/xen-posix/src (next to fmt_fp.c, which does the other direction).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment