<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ocaml.git/stdlib/camlinternalFormat.ml, branch enter-mod-decl</title>
<subtitle>github.com: ocaml/ocaml
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/'/>
<entry>
<title>camlinternalFormat: fix the Formatting_gen case in fmt_of_string</title>
<updated>2019-06-06T10:50:22+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2019-06-04T17:03:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=a9be9a4dbabfa18a9983f4d3846e03f761816480'/>
<id>a9be9a4dbabfa18a9983f4d3846e03f761816480</id>
<content type='text'>
Two bugs were present before the patch:

- Formatting_gen would always be printed as "@{",
  so for example "@[foo@]" would be reprinted as "@{foo@]"

- The Formatting_gen payload would be printed as a string literal,
  escaping '%', while it is a raw string representation of a format;
  so for example "@[&lt;%d&gt;" would be reprinted as "@[&lt;%%d&gt;"

  (This second bug was spotted by Florian Angeletti)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Two bugs were present before the patch:

- Formatting_gen would always be printed as "@{",
  so for example "@[foo@]" would be reprinted as "@{foo@]"

- The Formatting_gen payload would be printed as a string literal,
  escaping '%', while it is a raw string representation of a format;
  so for example "@[&lt;%d&gt;" would be reprinted as "@[&lt;%%d&gt;"

  (This second bug was spotted by Florian Angeletti)
</pre>
</div>
</content>
</entry>
<entry>
<title>Camlinternalformat: remove faulty check_open_box function</title>
<updated>2019-06-06T10:43:27+00:00</updated>
<author>
<name>Gabriel Scherer</name>
<email>gabriel.scherer@gmail.com</email>
</author>
<published>2019-06-04T17:51:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=bd6ef8413e40a1adf45d71b7efd636edc5bb4099'/>
<id>bd6ef8413e40a1adf45d71b7efd636edc5bb4099</id>
<content type='text'>
- Currently the check is a no-op, because the "emit a warning if the
  check fails" was never implemented. (It would actually require some
  work to pass a source location there to emit a warning, so it's not
  trivial.)

- The check is implemented by calling `open_box_of_string` and
  catching the `Failure _` exception if that function fails. This is
  just wrong: `Failure _` should be reserved to fatal program errors,
  and should not be caught for control-flow.

- The current implement is buggy (it fails all the time, but we don't
  notice because no warning is emitted):
  CamlinternalFormat.open_box_of_string expects a string of the form
  "v 3", but check_open_box would pass a string of the form "&lt;v 3&gt;"
  (or an empty string), which is the payload of the format value. So
  the check always fails.

- The idea of the check is wrong: "@[&lt;x&gt;foo@]" is an incorrect format
  string to pass to Format (the box indication does not make sense),
  but it is a perfectly fine format string to pass to Printf, where it
  just prints "@[&lt;x&gt;foo@]" on the output. So we cannot complain to the
  user at type-checking time, when we don't know how the format string
  will be used, whether the boxes will be interpreted as actual boxes
  or string literals.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Currently the check is a no-op, because the "emit a warning if the
  check fails" was never implemented. (It would actually require some
  work to pass a source location there to emit a warning, so it's not
  trivial.)

- The check is implemented by calling `open_box_of_string` and
  catching the `Failure _` exception if that function fails. This is
  just wrong: `Failure _` should be reserved to fatal program errors,
  and should not be caught for control-flow.

- The current implement is buggy (it fails all the time, but we don't
  notice because no warning is emitted):
  CamlinternalFormat.open_box_of_string expects a string of the form
  "v 3", but check_open_box would pass a string of the form "&lt;v 3&gt;"
  (or an empty string), which is the payload of the format value. So
  the check always fails.

- The idea of the check is wrong: "@[&lt;x&gt;foo@]" is an incorrect format
  string to pass to Format (the box indication does not make sense),
  but it is a perfectly fine format string to pass to Printf, where it
  just prints "@[&lt;x&gt;foo@]" on the output. So we cannot complain to the
  user at type-checking time, when we don't know how the format string
  will be used, whether the boxes will be interpreted as actual boxes
  or string literals.
</pre>
</div>
</content>
</entry>
<entry>
<title>Enforce precision in printf %F</title>
<updated>2019-03-09T11:03:43+00:00</updated>
<author>
<name>Pierre Roux</name>
<email>pierre@roux01.fr</email>
</author>
<published>2019-02-23T14:35:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=ed74b5b23711dc7516e828a921ade82301c345b4'/>
<id>ed74b5b23711dc7516e828a921ade82301c345b4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing typos in various files (#2246)</title>
<updated>2019-02-13T13:04:56+00:00</updated>
<author>
<name>Fourchaux</name>
<email>jprodi04@gmail.com</email>
</author>
<published>2019-02-13T13:04:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=1946594bd7c9a72d1441f19942abbed89e58c0dc'/>
<id>1946594bd7c9a72d1441f19942abbed89e58c0dc</id>
<content type='text'>
Note: Typos found with https://github.com/codespell-project/codespell

Here is the (semi-manual) command used to get (and correct) the typos:

$ codespell -i 3 -w --skip=".png,.gif,./ocaml/boot,./ocaml/.git,./ocaml/manual/styles,./ocaml/manual/manual/htmlman" -L minimise,instal,contructor,"o'caml",cristal,pres,clos,cmo,uint,iff,te,objext,nto,nd,mut,upto,larg,exten,leage,mthod,delte,tim,atleast,langage,hten,iwth,mke,contant,succint,methids,eles,valu,clas,modul,que,classe,missings,froms,defaut,correspondance,differents,configury,reachs,cas,approche,normale,dur,millon,amin,oje,transfert</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note: Typos found with https://github.com/codespell-project/codespell

Here is the (semi-manual) command used to get (and correct) the typos:

$ codespell -i 3 -w --skip=".png,.gif,./ocaml/boot,./ocaml/.git,./ocaml/manual/styles,./ocaml/manual/manual/htmlman" -L minimise,instal,contructor,"o'caml",cristal,pres,clos,cmo,uint,iff,te,objext,nto,nd,mut,upto,larg,exten,leage,mthod,delte,tim,atleast,langage,hten,iwth,mke,contant,succint,methids,eles,valu,clas,modul,que,classe,missings,froms,defaut,correspondance,differents,configury,reachs,cas,approche,normale,dur,millon,amin,oje,transfert</pre>
</div>
</content>
</entry>
<entry>
<title>s/string_of_int/Int.to_string/g</title>
<updated>2018-11-07T12:52:02+00:00</updated>
<author>
<name>Daniel Bünzli</name>
<email>daniel.buenzli@erratique.ch</email>
</author>
<published>2018-08-30T17:15:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=a7afd89003096425ded67cbf7a004a5d2bc95b16'/>
<id>a7afd89003096425ded67cbf7a004a5d2bc95b16</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Relax the type of make_iprintf and improve Format.ifprintf.</title>
<updated>2018-08-02T21:17:47+00:00</updated>
<author>
<name>Drup</name>
<email>drupyog@zoho.com</email>
</author>
<published>2018-08-02T00:51:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=82f5376044c3ec834d0598cacb4fc03376782874'/>
<id>82f5376044c3ec834d0598cacb4fc03376782874</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the state argument in CamlinternalFormat.make_printf.</title>
<updated>2018-08-02T21:09:20+00:00</updated>
<author>
<name>Drup</name>
<email>drupyog@zoho.com</email>
</author>
<published>2018-08-02T00:41:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=12238e40aeced39d5acddc1203129c05e00625f4'/>
<id>12238e40aeced39d5acddc1203129c05e00625f4</id>
<content type='text'>
This state argument was passed around, but never used, except
by the continuation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This state argument was passed around, but never used, except
by the continuation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Whitespace and overlong line fixes.</title>
<updated>2018-06-14T14:15:34+00:00</updated>
<author>
<name>David Allsopp</name>
<email>david.allsopp@metastack.com</email>
</author>
<published>2017-08-12T20:24:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=b5d1929e878d6d2ccfe6ea349960ee803e9e45c6'/>
<id>b5d1929e878d6d2ccfe6ea349960ee803e9e45c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Printf: speedup %#d and allocate less</title>
<updated>2018-05-29T00:52:33+00:00</updated>
<author>
<name>ygrek</name>
<email>ygrek@autistici.org</email>
</author>
<published>2017-05-25T21:35:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=92748ee986a416a083a7053ceb0115e69f3313c3'/>
<id>92748ee986a416a083a7053ceb0115e69f3313c3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Printf: alternative int format %#d 1_234_567</title>
<updated>2018-05-28T17:53:37+00:00</updated>
<author>
<name>ygrek</name>
<email>ygrek@autistici.org</email>
</author>
<published>2017-05-25T07:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ocaml.git/commit/?id=97fca08b2dd48465f77cfc46f107f13304d4d78d'/>
<id>97fca08b2dd48465f77cfc46f107f13304d4d78d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
