Oleksii Divak
Oleksii Divak
I've just completed writing a JSON parser from scratch (GaloisInc/json#17) and I used `attoparsec` specifically because `flatparse` only works over strict `ByteString`s. > we get no output at all until...
> Can you tell me more about your use cases? The only real one I know of that assumes chunking by the default is `wai`'s [`getRequestBodyChunk`](https://hackage.haskell.org/package/wai-3.2.3/docs/Network-Wai.html#v:getRequestBodyChunk). `Content-Length` header is entirely...
Now that I look at the list of restrictions `flatparse` comes with, chunked parsing may be off the table simply because the library is razor-focused on performance as is and...
Turns out I was wrong, Haskell does have a streaming parser in that sweet spot between `flatparse` and `attoparsec`, it's called... `binary`. The darn convenience typeclasses really made me forget...
```haskell insyboggle :: Ord k => v -> (v -> v) -> k -> Map k v -> Map k v` ``` > Calling `insyboggle` we must create a singleton...
While `Data.Text.Internal.Encoding.Utf8` is indeed functional enough to serve its purpose, my concerns are the following: - The interface is recursive, so the `Incomplete` state on the fourth byte is unreachable;...
> For performance reasons two array lookups are much better than up to 13 comparisons. Isn't this only true if the entire lookup table resides in L1 cache? Sure this...
So after a week of tinkering I made a benchmark repository ([link](https://github.com/BurningWitness/utf)). The algorithms I wrote include no low-level magic, just inlines and strict copying. The benchmark timings can be...
> `decodeUtf8` does not follow the maximal subpart rule ... sounds like a bug, right? Yes, it should probably have its own issue. Can be replicated through the tests [here](https://github.com/BurningWitness/utf/blob/bench/test/conformance/Test/UTF8.hs#L384-L391)....
> lets you not have any parser state (except the offset) in between code points I don't think "lets" is a correct term here, you can weave any state you...