IRC channel logs

2021-07-10.log

back to list of logs

***sneek_ is now known as sneek
***chris2 is now known as Guest7615
***Guest7615 is now known as chrislck
***cadmium.libera.chat sets mode: +o ChanServ
<leoprikler>oh, by the way, I found the life hack for working out the byte length of a string in scheme
<leoprikler>here it comes: just convert it to a bytevector :)
***sneek_ is now known as sneek
***chris is now known as Guest6540
***Guest6540 is now known as chrislck
<rlb>leoprikler: oh, right -- I'd originally thought you needed a (fast) offset length, without necessarily converting the entire string.
<leoprikler>tbf the less allocation the better, but it seems like even with the APIs I'm using you can't get around allocating anyway
<leoprikler>not easily at least
<leoprikler>I could theoretically rip out some internals if I needed them for performance sake, but it works fine so far
<rlb>Right, you could write a pretty "simple" loop/switch over the relevant chars to compute the length yourself in either scheme or C -- iirc the utf-8 encoding rules aren't too bad.
<rlb>(if it mattered)