<div dir="ltr">I'd like to point out that using unpinned memory for your ByteString alternative means you aren't providing the same API: as most string-using foreign functions expect something more like a bytestring than a Haskell string or text type, ByteString is pinned specifically to support that use case directly and many users of ByteString expect that support. This will include the ByteString variants of various functions in the "posix" package, which are thereby providing "raw" versions of system calls, ensuring the Haskell program can get exactly what the OS provides (POSIX interfaces don't use Unicode, thus various Unicode encodings can be unable to provide the exact OS level representation of e.g. file names).</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 16, 2019 at 9:30 AM Joachim Durchholz <<a href="mailto:jo@durchholz.org">jo@durchholz.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 16.02.19 um 13:23 schrieb 寒东:<br>
> Some unicode processing such as normalization and casefolding is also provide, based on a C unicode libraryutf8rewind <<a href="https://bitbucket.org/knight666/utf8rewind" rel="noreferrer" target="_blank">https://bitbucket.org/knight666/utf8rewind</a>>.<br>
<br>
FWIW the rest looks fine, but committing to a specific UTF-8 <br>
implementation is risky. Unicode is a large and complicated standard, <br>
and constantly evolving; I am sceptical that a one-man library like <br>
utf8rewind can keep up with that, and I'd wrap a mature Unicode library <br>
(such as ICU) rather than place my bet on a one-man show like utf8rewind.<br>
<br>
In particular, I'd avoid utf8rewind because the author believes that <br>
deviating from a standard improves security.<br>
(See his comment in <br>
<a href="https://bitbucket.org/knight666/utf8rewind/issues/8/length-function-should-not-use-strlen" rel="noreferrer" target="_blank">https://bitbucket.org/knight666/utf8rewind/issues/8/length-function-should-not-use-strlen</a> <br>
.)<br>
I do not think that's a well-considered policy, and certainly does not <br>
make me think that his code is well-audited. Including such a thing in <br>
such a basic library as stdio seems unwise to me.<br>
<br>
> To make our package more useful, we rebuild Builder and Parser type from groud, add TCP socket and filesystem support, so that user can start using it to do some simple task, such as parsing a CSV file or starting a TCP server and communicate in protocols. We also provide high performance timer and logger module, which is useful in practical engineering tasks.<br>
<br>
You should split the library, into stuff that does fast byte shoving, <br>
and into stuff that does fast byte processing.<br>
That way, things can start to improve and evolve independently.<br>
<br>
> For installation guide and examples, please see the project's README. As we (I and Tao He) both are not native english speakers, the document quality is not as satisfying as it can be, please help!<br>
<br>
Judging from this message, your English seems pretty good actually :-)<br>
<br>
Regards,<br>
Jo<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>