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
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #crystal-lang
waleee has quit [Ping timeout: 256 seconds]
<FromGitter> <Blacksmoke16> s/o to `IO::Hexdump`
<FromGitter> <Blacksmoke16> super slick
ur5us has joined #crystal-lang
Na_Klar has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall.]
ur5us has quit [Ping timeout: 240 seconds]
ejjfunky has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<FromGitter> <jrei:matrix.org> TIL we can make polls in matrix
<FromGitter> <jrei:matrix.org> Including here, but I have no idea how the bridges will handle it
jhass[m] has quit [Quit: Bridge terminating on SIGTERM]
xiamx has quit [Quit: Bridge terminating on SIGTERM]
jhass[m] has joined #crystal-lang
<FromGitter> <y8> TIL: `crystal play`
xiamx has joined #crystal-lang
notzmv has quit [Ping timeout: 252 seconds]
<FromGitter> <y8> Say I have two possible overloads of the method for ancestors of the type: `foo(first)` and `foo(first, last)`. I need to call method in parent class with`first, last` if there is an overload with matching signature. How can I tell that there is a matching overload?
taupiqueur has joined #crystal-lang
sorcus has quit [Quit: WeeChat 3.4]
notzmv has joined #crystal-lang
<spuun> y8: why not declare a NOOP verson in the parent?
<FromGitter> <Blacksmoke16> related: https://github.com/crystal-lang/crystal/issues/2549
<FromGitter> <Blacksmoke16> another option i'd throw out is have the sig like `def foo(first, last = nil)`
sorcus has joined #crystal-lang
<FromGitter> <y8> @spuun: I need to call only one method, so method knocking is not really an option
<FromGitter> <y8> @Blacksmoke16: thanks! yes, that seems like my case. Re `foo(first, last=nil)` is my current option, but I don't like that last is nillable, as it requires nil checks
<FromGitter> <Blacksmoke16> not the end of the world, can delegate to two methods, but use this one just as the entry point
<FromGitter> <y8> sure, but that's another source of runtime errors
<FromGitter> <Blacksmoke16> how you figure?
<FromGitter> <Blacksmoke16> ```if first && last ⏎ self.foo first, last ⏎ else ⏎ self.foo first ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=620fb89741e3293d65fc2c56]
<FromGitter> <Blacksmoke16> where the def is like `foo(first : String, last : String? = nil)`
<FromGitter> <y8> last is still optional, so if there is an error in code, you'll only know about that in runtime, where with some kind of arity check, it would throw compile time error
<FromGitter> <Blacksmoke16> best bet would be two separate methods then, versus overload of the same
<FromGitter> <Blacksmoke16> then `#responds_to?` would work
<FromGitter> ... time). It would be much easier for others to provide insights, if you can come up with some sample code on what you are trying to achieve and what is blocking that.
<FromGitter> <naqvis> > last is still optional, so if there is an error in code, you'll only know about that in runtime, where with some kind of arity check, it would throw compile time error ⏎ ⏎ Question is, if you don't know the contract of class, then only option left is figure that out at run-time via `responds_to?` approach, but that still conflicts with what you are trying to achieve (i.e. triggering error at compile
antoszka has quit [Ping timeout: 240 seconds]
antoszka has joined #crystal-lang
antoszka has quit [Ping timeout: 240 seconds]
antoszka has joined #crystal-lang
antoszka has quit [Read error: Connection reset by peer]
antoszka has joined #crystal-lang
ua_ has quit [Ping timeout: 240 seconds]
antoszka has quit [Ping timeout: 240 seconds]
antoszka has joined #crystal-lang
taupiqueur has quit [Ping timeout: 240 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 272 seconds]
avane_ has joined #crystal-lang
avane has quit [Ping timeout: 252 seconds]
ejjfunky has quit [Ping timeout: 256 seconds]
<SamantazFox> Crystal 1.3 is doing some weird network stuff..
<SamantazFox> It broke the entire video playback (proxying subsystem) of invidious, and I'm still struggling to understand what's going on.
<FromGitter> <Blacksmoke16> i'd start by seeing if you can reproduce it with a minimal request/program
<SamantazFox> problem is that I can hardly reduce the code. Changing the server type (e.g testing wil a local server rather than GVS) could change a lot of stuff...
<FromGitter> <Blacksmoke16> right, and if it still happens you and get more and more reduced
<FromGitter> <Blacksmoke16> ultimately ideally a small isolated example to show the problem would be helpful. otherwise its unlikely someone can jump into invidious and find/fix it
<FromGitter> <Blacksmoke16> when its not clear where the problem actually lies
<SamantazFox> yeah, I don't expect anyone to fix invidious. I've tried to check the difference between crystal 1.2.2 and 1.3.0 to see if anything obvious was changed, but I couldn't find anything related to networking.
<FromGitter> <Blacksmoke16> id focus on the code making the request as thats seems to be whats strange? or?
<SamantazFox> the code making the request is Safari on MacOS
<FromGitter> <Blacksmoke16> same behavior if you make it via curl/postman?
<SamantazFox> I can't tell, as I need something to parse and play the video data afterwards.
<SamantazFox> `Connection closed at byte 1046076. Retrying.`
<SamantazFox> and server says: `copied bytes = 1048576`
notzmv has quit [Ping timeout: 250 seconds]
ur5us has joined #crystal-lang
notzmv has joined #crystal-lang
<FromGitter> <Blacksmoke16> :shrug: almost impossible to say whats going on
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
taupiqueur has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<riza> SamantazFox: wireshark, perhaps, or a more sophisticated mitm proxy
waleee has joined #crystal-lang
<FromGitter> <Blacksmoke16> could also try replacing the logic that returns the video with one that returns like a static image
<FromGitter> <Blacksmoke16> and see if it gets corrupted
ur5us has joined #crystal-lang
taupiqueur has quit [Ping timeout: 240 seconds]
hightower2 has joined #crystal-lang
ejjfunky has joined #crystal-lang
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<FromGitter> <moe:busyloop.net> sounds like a case for `git bisect` - https://interrupt.memfault.com/blog/git-bisect#the-problem
<FromGitter> <moe:busyloop.net> possibly time consuming as crystal will need to be compiled a bunch of times. but bisect is designed to minimize the number of steps to find the commit that broke something.