luis changed the topic of #slime to: SLIME, the Superior Lisp Interaction Mode for Emacs | https://common-lisp.net/project/slime | https://irclog.tymoon.eu/freenode/%23slime | https://irclog.whitequark.org/slime
_whitelogger has joined #slime
_whitelogger has joined #slime
scymtym has quit [Ping timeout: 276 seconds]
frgo has joined #slime
moldybits has joined #slime
scymtym has joined #slime
edgar-rft has quit [Read error: Connection reset by peer]
edgar-rft has joined #slime
jonatack has quit [Quit: jonatack]
<Shinmera> Doing something like (let ((string (make-string 1000))) (map-into string (lambda () (code-char (random #xFFFF)))))
<Shinmera> will very often result in an error
<Shinmera> Invalid protocol message: Error during string-to-utf8: Unable to encode character 28320 as :UTF-8.
<Shinmera> This is very annoying if the string occurs in a backtrace, as SLDB fails to launch at all
edgar-rft has quit [Quit: Leaving]
<luis> Shinmera: that is actually a valid character isn't it? Did you make up that number?
<Shinmera> I pasted the error.
<Shinmera> You can try the snippet yourself, it'll very likely produce a similar error with different code points.
<Shinmera> But yeah, all #xFFFF code-points are valid unicode.
<Shinmera> I stumbled on this because I'm implementing unicode algorithms and want to test my stuff against random garbage attacks. Debugging that without SLDB is... troublesome.
<luis> My memory is fuzzy but there are some non-characters but it's probably only CCL that's pedant about it.
<Shinmera> Hmm, ok, let me double-check then
<luis> (I ran into that when implementing UTF-8B support for Babel)
<Shinmera> Looks like D800 to DFFF are considered invalid code points indeed
<luis> But 28320 is not one of those is it?
<luis> (I'm on my phone. :-/)
<Shinmera> That's 6EA0
<Shinmera> Another one is 9FB0
<luis> Can you come up with a direct string-to-utf8 call that fails? Perhaps outside SLIME.
<Shinmera> Yeah, I'll try
<Shinmera> Hmm. I think the error message is misleading and points to a character close to an invalid one.
<Shinmera> Because if I explicitly ignore the D800-DFFF range in my random generator there's no more faults
<luis> That's... Evil error reporting.
<Shinmera> I can't seem to create an example myself though.
<Shinmera> Yeah, all the barfing strings do contain characters in that range
<Shinmera> But the char reported as invalid seems... random?
<luis> It might be the previous character, maybe?
<Shinmera> If I try to construct the test it reports the correct character as faulty
<Shinmera> I don't have time to debug this further. The behaviour is too confusing for me to know what to do at this point
<Shinmera> Ignoring the invalid range in my constructed examples is good enough for now, but it would be better if Slime either replaced or removed invalid characters when sending stuff over, since the current semi-crashing behaviour is far less than ideal.
<luis> Definitely. Can you open issue with the test case that does fail?
<luis> *an issue
<luis> What Lisp are you using?
<Shinmera> SBCL
<Shinmera> I pasted the exact steps to get my error
<luis> OK. Thanks.
<Shinmera> Hope that helps!
edgar-rft has joined #slime
makomo has joined #slime
ironbutt has joined #slime
ir0nbutt has joined #slime
ironbutt has quit [Ping timeout: 245 seconds]
ironbutt has joined #slime
ir0nbutt has quit [Ping timeout: 240 seconds]
makomo has quit [Ping timeout: 245 seconds]
makomo has joined #slime
jonatack has joined #slime
scymtym has quit [Ping timeout: 245 seconds]
scymtym has joined #slime