[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GADT printer patch

Right, I want to separate float formatting anyway. Some libraries (notably
FreeBSD's libkern printf) don't do floats at all, so separating those cleanly
in the OCaml layer would be lovely.

Currently, the whole format string gets shoved to vsnprintf(3).  With this
patch, we just need an implementation of caml_format_float, but not all the
other bits of printf.


On 22 May 2013, at 14:56, Stephen Dolan <Stephen.Dolan@xxxxxxxxxxxx> wrote:

> It still requires sprintf. In particular, it uses caml_format_float to
> do %f and friends, which uses sprintf internally. Correct float
> formatting is a surprisingly large amount of code.
> Stephen
> On Wed, May 22, 2013 at 2:19 PM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>> This is really neat:
>> http://caml.inria.fr/mantis/view.php?id=6017
>> If I understand it right, it eliminates our need for the printf dietlibc 
>> bits, which means we could simplify mirage-platform quite a bit!
>> Should cook up an OPAM compiler patch to experiment with it...
>> -anil



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.