ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
sagax has quit [Ping timeout: 255 seconds]
ur5us_ has quit [Ping timeout: 258 seconds]
ur5us_ has joined #crystal-lang
brokkoli_ori has quit [Quit: bye people (Leaving)]
<oz> ah, I'm sure we'll see more and more. Crystal is a joy to work with. :)
ur5us_ has quit [Ping timeout: 255 seconds]
onyx has joined #crystal-lang
_ht has joined #crystal-lang
jmdaemon has quit [Ping timeout: 246 seconds]
ur5us_ has joined #crystal-lang
ur5us_ has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
<FromGitter> <stellarpower> Should I open this as a bug?
<FromGitter> <stellarpower> Re the specific error it comes back with
<FromGitter> <Blacksmoke16> can you reproduce it without torify?
<FromGitter> <Blacksmoke16> a minimal, reproducible example would be great to have
<FromGitter> <stellarpower> I would, but without knowing what the conditions are that caused it, I assume it'd take thousands of requests before seeing the same thing crop up again
<FromGitter> <Blacksmoke16> what about seeing if you can reproduce it via https://crystal-lang.org/api/master/HTTP/Client/Response.html#from_io%28io%2Cignore_body%3Dfalse%2Cdecompress%3Dtrue%29-class-method
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp- has joined #crystal-lang
Sankalp- is now known as Sankalp
<FromGitter> <Blacksmoke16> like manually grab the response string, save it to a heredoc const, new up an IO::Memory, and see if that also causes the error?
<FromGitter> <Blacksmoke16> er the nilable version, `from_io?` as thats what the client is using
ur5us has quit [Ping timeout: 255 seconds]
<FromGitter> <stellarpower> As in, get the encrypted data from the socket, then get HTTP::Response ot try and parse this fro mthe buffer directly.?
<FromGitter> <Blacksmoke16> i was kinda assuming the response is simple, but if its large or something that might not work out too great
<FromGitter> <Blacksmoke16> ultimately the issue is https://github.com/crystal-lang/crystal/blob/0123976/src/http/client/response.cr#L126 returning `nil`, so its either a bug in the parsing logic, or something isnt right with the response
<FromGitter> <stellarpower> IT should be a few kilobytes
<FromGitter> <Blacksmoke16> either way need a way to reproduce it in order to fix it
<FromGitter> <stellarpower> Oh okay
<FromGitter> <stellarpower> I can dig in there
<FromGitter> <stellarpower> I think it'd be better to forward the underlying exception there
<FromGitter> <stellarpower> Or actually it;s not in a rescue is it?
<FromGitter> <stellarpower> So it's egfgfectively dropping through the self_from_io cases
<FromGitter> <stellarpower> Now I know where I'm looking thanks I'll get what I'm doing out the way and then see if I can work it out
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang/crystal/blob/master/src/http/client.cr#L602-L605 is the method that its calling
<FromGitter> <Blacksmoke16> so yea, could prob throw some `pp` in there and get a better idea of where its failing
<FromGitter> <stellarpower> Presumably I can just modify the sources of the stdlib, or are they pre-compiled?
<FromGitter> <Blacksmoke16> you could, might be easier to just build it locally and use that locally compiled one
<FromGitter> <Blacksmoke16> then you're not messing with your actual install
<FromGitter> <stellarpower> Oh right, oculd do that yeah
<FromGitter> <Blacksmoke16> wont need to recompile after each change either so should be pretty easy
<FromGitter> <stellarpower> I wanted the interpreter so it's in /usr/local anyway
<FromGitter> <stellarpower> BTW on the topic of PP, can I change the indent easily?
<FromGitter> <stellarpower> so far just been calling the top-level function (macro?), i.e. `pp something`
<FromGitter> <stellarpower> Would I need ot make a custo mprinter?
<FromGitter> <Blacksmoke16> i dont think you can really customize it without changing its definition for each type?
<FromGitter> <Blacksmoke16> actuall sec
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/PrettyPrint.html can use this in some way i think
<FromGitter> <Blacksmoke16> like `obj.pretty_print pp_instance`, or maybe use the `.format` method in some way
<FromGitter> <stellarpower> Yeah, so probably will need to define a global one that matches what I like
<FromGitter> <stellarpower> I was hoping I could just `pp(obj, indent: 4)`
<FromGitter> <stellarpower> But that's fine anyway, cheers
<FromGitter> <stellarpower> Script is finally working too ;)
<FromGitter> <stellarpower> Hate webscraping iwth a passion
onyx_ has joined #crystal-lang
notzmv has quit [Ping timeout: 248 seconds]
brw has joined #crystal-lang
notzmv has joined #crystal-lang
_ht has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 258 seconds]