<div dir="ltr"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px 0px 0.25em;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">Dear Haskellers,</p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px 0px 0.25em;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)"><br></p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px 0px 0.25em;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">Today I'm very happy to announce a new beta version of <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">stdio</code> is released on <a class="gmail-s1w8oh2o-27 gmail-ivVjmg" href="http://hackage.haskell.org/package/stdio" rel="noopener noreferrer" target="_blank" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:rgb(94,80,134)">hackage</a>, there're some large additions in this version:</p><ul class="gmail-s1w8oh2o-12 epDuwo" style="margin:4px 0px 4px 8px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;list-style-position:outside;color:rgb(26,26,27)"><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">Add UDP module.</p></li><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">Add JSON module.</p></li><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">Add <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">ToText</code> class to <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Std.Data.TextBuilder</code> module.</p></li></ul><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">The largest addition is a new JSON module, features <a class="gmail-s1w8oh2o-27 gmail-ivVjmg" href="https://github.com/haskell-stdio/JSONTestSuite" rel="noopener noreferrer" target="_blank" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:rgb(94,80,134)">full RFC 8259 compliance</a> and <a class="gmail-s1w8oh2o-27 gmail-ivVjmg" href="https://github.com/haskell-stdio/stdio/tree/master/bench/json" rel="noopener noreferrer" target="_blank" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:rgb(94,80,134)">2~3x faster performance</a>. Try to bring big improvements over a very mature library like aeson is not an easy task, parts of the improvements come from faster <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Parser</code> and <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Builder</code> infrastructures in <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">stdio</code>. But we also made a few other improvements:</p><ul class="gmail-s1w8oh2o-12 epDuwo" style="margin:4px 0px 4px 8px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;list-style-position:outside;color:rgb(26,26,27)"><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">To improve building lookup table during JSON parsing(and many other formats as well), An ordered map module based on sorted vectors and binary-search is also added, there're actually four modules providing similar functions to <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">containers</code>:</p><ul class="gmail-s1w8oh2o-12 epDuwo" style="margin:4px 0px 4px 8px;padding:0px;border:0px;font:inherit;vertical-align:baseline;list-style-position:outside"><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Std.Data.Vector.FlatMap</code></p></li><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Std.Data.Vector.FlatIntMap</code></p></li><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Std.Data.Vector.FlatSet</code></p></li><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Std.Data.Vector.FlatIntSet</code></p></li></ul></li></ul><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">These data structures have different time and memory characteristics from tree-based ones, and suits some situations better, e.g. intermediate lookup table.</p><ul class="gmail-s1w8oh2o-12 epDuwo" style="margin:4px 0px 4px 8px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;list-style-position:outside;color:rgb(26,26,27)"><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">To improve JSON string parsing, we made an UTF-8 validation state machine with JSON unescaping logic built-in written in C, combine with the ability to scan a whole chunk of input(provided by our new <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Parser</code>, namely <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">scanChunks</code>), we now have faster JSON string parsing performance than some native code(<code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">JSON.parse</code> from nodejs).</p></li><li class="gmail-s1w8oh2o-11 gmail-vSpYb" style="margin:0.4em 1em;padding:0px;border:0px;font:inherit;vertical-align:baseline"><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">Numeric parsing is also improved, e.g. we changed <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Integer</code> decoding loop to use machine words if range permits, then covert the result to <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Integer</code> rather than use <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Integer</code> all the time.</p></li></ul><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">There're also lots of improvements and simplifications contribute to faster performance. Overall this is good proof that our new <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Parser</code> and <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Builder</code> infrastructures work well.</p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">Besides the JSON module, another important addition is the <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">ToText</code> class in <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Std.Data.TextBuilder</code>, which is also derivable via generics. The format is chosen to follow <code class="gmail-s1w8oh2o-7 gmail-bpZJor" style="margin:0px 2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:13px;line-height:20px;font-family:"Noto Mono",Menlo,Monaco,Consolas,monospace;vertical-align:baseline;background:rgba(238,238,238,0.8);color:rgb(255,0,109);max-width:100%;overflow:auto">Show</code> class as much as possible, this is a very handy class when you need to quickly turn something into a builder or text.</p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">A UDP module is added quite easily since the IO manager part is in place. Due to the message based nature, the API is quite different from TCP, design suggestions are welcomed!</p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">Happy hacking! </p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">~Cheers</p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)"><br></p><p class="gmail-s1w8oh2o-10 gmail-bQeEFC" style="margin:0px;padding:0.25em 0px 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:14px;line-height:inherit;font-family:"Noto Sans",Arial,sans-serif;vertical-align:baseline;color:rgb(26,26,27)">Han Dong</p></div>