Skip to content
This repository has been archived by the owner. It is now read-only.

Missing `strtod` #118

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

Missing `strtod` #118

samoht opened this issue Jan 29, 2015 · 11 comments
Labels
bug

Comments

@samoht
Copy link
Member

@samoht 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
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
Copy link
Member

@MagnusS MagnusS commented Jun 2, 2015

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

@dbuenzli
Copy link

@dbuenzli 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
Copy link
Contributor

@talex5 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
Copy link

@hhugo hhugo commented Jun 8, 2015

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

@yomimono
Copy link
Contributor

@yomimono yomimono commented Feb 25, 2016

@timbertson
Copy link
Contributor

@timbertson timbertson commented Feb 25, 2016

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

@dbuenzli
Copy link

@dbuenzli dbuenzli commented Apr 8, 2016

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

@dbuenzli
Copy link

@dbuenzli 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
Copy link

@dbuenzli 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
Copy link

@ansiwen 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
Copy link
Contributor

@talex5 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants