aturley has quit [Read error: Connection reset by peer]
aturley has joined #ponylang
endformationage has quit [Quit: WeeChat 2.3]
srenatus has joined #ponylang
<profetes>
vaninwagen: thank you very much, looks Promise'ing, I'll try to implement this into my solution later. thanks!
<vaninwagen>
anthonybullard: could you create a github issue with your code and a backtrace from a debug build of ponyc? Which version did you use.
<vaninwagen>
This is clearly a compiler bug
<vaninwagen>
profetes: nice pun, hard to avoid actually
acarrico has quit [Quit: Leaving.]
acarrico has joined #ponylang
<Candle>
https://github.com/CandleCandle/text-reader I think I've covered all the edge cases (see the tests, which all pass on my machine and 0.25.0). Apart from the abuse of @printf, can anyone see anywhere that could be improved? I'm about to try to use it more in anger so I'm sure that I'll find some...
<Candle>
It's intended as a replacement for buffered/Reader.line() where we know that (a) the data comes in in chunks and (b) lines are always separated by \r\n.
<vaninwagen>
Candle nice! When using it to parse http headers, how could i go about getting the whole body?
<vaninwagen>
The only thing that jumps into my face is the copying of the line string
<Candle>
If I understand your question, that is what the 'remaining()' function is there for; grab the unused buffer elements to read the body.
<Candle>
I think we came to the conclusion that without re-implementing the String class to work with multiple underlying arrays, we have to copy the bytes into a new String.
<Candle>
Part of the problem is that one call of the data array passed received(...) can contain 0..n lines. (see the test named 'line-reader/complete-example')
<Candle>
I take it you've seen the psudo-code near the start of text-reader.pony ?
endformationage has joined #ponylang
<vaninwagen>
Yep
<vaninwagen>
I think if we use something like a rope, that is a pointer with a length into a bunch of arrays and make it Stringable and Comparable to String and other such pointers, we have a good foundation for reducing copying altogether
<vaninwagen>
I was just thinking a lot about this lately
<vaninwagen>
Your text-reader is a great step forward
squirmybroom35 has joined #ponylang
squirmybroom35 has quit [Remote host closed the connection]
travis-ci has joined #ponylang
<travis-ci>
ponylang/ponyc#5515 (master - 8a0a7d4 : Stephan Renatus): The build was fixed.