<div>As a member of the prime committee I would support adding hex floats to the next standard.  I'm not current on the related Unicode topics mind you :)<br><div class="gmail_quote"><div>On Sat, Mar 4, 2017 at 2:10 AM Edward Kmett <<a href="mailto:ekmett@gmail.com">ekmett@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="gmail_msg">This does bring up portability concerns and would cause further divergence of Read from the language standard. If not handled carefully, this drags us in an ever more implementation-defined rather than specification-defined direction.</div><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_msg">As a data point for this discussion, a similar proposal to extend the Read syntax to add support BinaryLiterals was rejected over portability and silent behavioral change concerns.<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><a href="https://ghc.haskell.org/trac/ghc/ticket/10092" class="gmail_msg" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/10092</a><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Whatever we do here, we may well want to be consistent with how we treat both of these proposals.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">If we do choose to accept this, we may well need to back and re-tackle #10092.</div><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg">Currently, we do have at least one chink in the armor, in that Read is currently more liberal in what it will accept Unicode-wise than what the language specification states as a result of</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><a href="https://ghc.haskell.org/trac/ghc/ticket/10444" class="gmail_msg" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/10444</a></div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I do think that whatever we do here, it should involve a conscious decision to either stick to the current report, or diverge from the current report and then to revise this part of the report.<br class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">If we can get the Haskell Prime folks to fix the language report to include them in the next language standard (if by default, even better!) then I'm fully +1. I'm also fully on board with both these and binary literals going into the language standard.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">If we're doing this entirely on our own in the spirit of "being liberal in what you accept and conservative in what you output" then I'm personally far more dubious of the merits of that approach in practice, and will wait to weigh in from a CLC perspective until more feedback is in place.</div></div><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">-Edward</div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Fri, Mar 3, 2017 at 5:41 PM, Carter Schonwald <span class="gmail_msg"><<a href="mailto:carter.schonwald@gmail.com" class="gmail_msg" target="_blank">carter.schonwald@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg">Plus one from me</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Also this is actually more ieee compliant than the c standards spec because we don't need suffixes on literals :)</div><div class="m_5493835097493398190HOEnZb gmail_msg"><div class="m_5493835097493398190h5 gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">On Tue, Feb 28, 2017 at 8:20 PM Iavor Diatchki <<a href="mailto:iavor.diatchki@gmail.com" class="gmail_msg" target="_blank">iavor.diatchki@gmail.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">To me, the notation makes sense if you think of the binary representation of the number: each hex digit is 4 bits, and the base 2 exponent allows you to move the decimal point by one bit.  I would guess that the exponent is written in base 10, because that's easier for most people to understand, and its bit-pattern representation is not all that important.<div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div></div><div class="gmail_extra m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><div class="gmail_quote m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">On Tue, Feb 28, 2017 at 5:07 PM, Levent Erkok <span class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><<a href="mailto:erkokl@gmail.com" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">erkokl@gmail.com</a>></span> wrote:<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><blockquote class="gmail_quote m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">Henning:<div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">Indeed, the proposal follows the description in p57-58 of <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf</a>, which dates back to 2007. (Some Haskell related deviations do exist, like dropping the final suffix, since Haskell doesn't need it; and requiring digits both before and after the dot.)<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">I think of the format as precisely representing the value "mantissa x 2^exp"; where the mantissa is written in hexadecimal, and the exponent is left as a regular decimal integer. The discrepancy is rather weird, but I guess it made more sense when the standard was drafted. More importantly, all the other languages (C, Java, Python: <a href="http://www.exploringbinary.com/hexadecimal-floating-point-constants/" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">http://www.exploringbinary.com/hexadecimal-floating-point-constants/</a>) follow this convention as well; so it would be unfortunate if Haskell diverged.</div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">For the change in semantics for "reads:" That is indeed unfortunate since we lose backwards compatibility. But it's a very minor one and I would be curious if anyone depended on the existing semantics for any legitimate reason. I personally do not see any issues with it.</div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">-Levent.</div></div><div class="gmail_extra m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><div class="gmail_quote m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><div class="m_5493835097493398190m_7103934848056697488m_-8712361830375515895h5 m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">On Tue, Feb 28, 2017 at 11:20 AM, Henning Thielemann <span class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><<a href="mailto:lemming@henning-thielemann.de" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">lemming@henning-thielemann.de</a>></span> wrote:<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div></div><blockquote class="gmail_quote m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><div class="m_5493835097493398190m_7103934848056697488m_-8712361830375515895h5 m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><span class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
On Tue, 28 Feb 2017, Iavor Diatchki wrote:<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<blockquote class="gmail_quote m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This may affect existing programs---although it doesn't seem very likely.  Here is an example:<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
current behavior:<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
reads "0x10p10" = [(16.0,"p10")]<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
new behavior:<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
reads "0x10p10" = [(16384,"")]<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
</blockquote>
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></span>
"p" refers to a power of two and the exponent is written in decimal for a hexadecimal mantissa. Looks pretty confusing to me but it seems that the standard was made somewhen before this proposal.<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div></div>_______________________________________________<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
Libraries mailing list<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<a href="mailto:Libraries@haskell.org" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">Libraries@haskell.org</a><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></blockquote></div><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div>
</blockquote></div><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg"></div>
_______________________________________________<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
Libraries mailing list<br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<a href="mailto:Libraries@haskell.org" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">Libraries@haskell.org</a><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br class="m_5493835097493398190m_7103934848056697488gmail_msg gmail_msg">
</blockquote></div></div>
</div></div><br class="gmail_msg">_______________________________________________<br class="gmail_msg">
Libraries mailing list<br class="gmail_msg">
<a href="mailto:Libraries@haskell.org" class="gmail_msg" target="_blank">Libraries@haskell.org</a><br class="gmail_msg">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div>
</blockquote></div></div>