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
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 250 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 268 seconds]
ur5us has joined #crystal-lang
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 268 seconds]
_whitelogger has joined #crystal-lang
mr_tr0n has joined #crystal-lang
taupiqueur has joined #crystal-lang
mr_tr0n has quit [Quit: mr_tr0n]
taupiqueur has quit [Ping timeout: 256 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 260 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 260 seconds]
<FromGitter> <naqvis> > *<ngp>* I don't think that gives me exactly what I'm looking for. What I'm trying to implement is similar to a pipe-filter pattern, but using Procs ⏎ ⏎ with some little hacking, you can achieve something like pipe-filter pattern. ⏎ https://carc.in/#/r/cfon [https://gitter.im/crystal-lang/crystal?at=61b6c7a576e379175535edcd]
<FromGitter> <naqvis> for sure this is just a hack and it won't work properly in MT mode. Intention here is to show there are whole lot possibilities via which you can design your own solution
taupiqueur has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
taupiqueur_ has joined #crystal-lang
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur_ has quit [Ping timeout: 268 seconds]
taupiqueur has joined #crystal-lang
szutt has joined #crystal-lang
taupiqueur has quit [Ping timeout: 250 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 252 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 256 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 260 seconds]
taupiqueur has joined #crystal-lang
<Elouin> Hi, i wrote a small irc bot and it works over unencrypted connections, but with tls its not really connecting.
<FromGitter> <naqvis> when you say not connecting, what error are you receiving?
taupiqueur has quit [Ping timeout: 252 seconds]
<Elouin> its connecting, but seem to lose the connection very quickly. When i try to connect to libera for example: https://bin.disroot.org/?fadd71c0e46ac1aa#FCjccgvdb7y7zwpaJe4kjrq5wS7XVHMMji6NYM42aDYe
<FromGitter> <naqvis> not able to see any messages
<FromGitter> <naqvis> try to pass `context` with `verifymode` set to `None`
<FromGitter> <naqvis> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=61b7067dc2cc0e5343fd04f1]
taupiqueur has joined #crystal-lang
<Elouin> added the context code. still the same result. :/
<FromGitter> <naqvis> you better do some debugging to understand if remote host is rejecting the connection with some details
<FromGitter> <naqvis> might worth trying with `openssl s_client`
<Elouin> With openssl s_client and writing the raw irc messages by hand it works.
HumanG33k has quit [Ping timeout: 252 seconds]
HumanG33k has joined #crystal-lang
<FromGitter> <naqvis> try to increase timeout settings for connection. as looking at your shared screenshot, its showing connection timeout
<Elouin> When i do `socket << message << "\r\n"` instead of `socket.puts message` it seems to work.
<Elouin> But why though. 🤔
<Elouin> Thanks for the help @naqvis . 🙂
<FromGitter> <naqvis> i'm not aware of IRC protocol, but that might require a linefeed to mark the end of the message
<FromGitter> <naqvis> 👍
<Elouin> just out of curiosity: if i do `socket.puts message + "\r\n"` that also doesnt work. but shouldnt `socket.puts message + "\r\n"` == `socket << message << "\r\n"` as of https://github.com/crystal-lang/crystal/blob/6529d725a/src/io.cr#L216 🤔
taupiqueur has quit [Ping timeout: 240 seconds]
<FromGitter> <naqvis> i believe if you do `socket.puts message + "\n\r\n"` should work
<FromGitter> <naqvis> reason is `puts` appends new line `\n` if string passed doesn't end with that, and IRC requires the `\r\n` as the marker to mark the end of message
postmodern has joined #crystal-lang
<Elouin> Doesn't seem to work with "\n\r\n". Also it works without ssl, so i dont think its an IRC specific problem.
taupiqueur has joined #crystal-lang
<Elouin> socket.flush is what makes the difference.
<Elouin> (had that in the `<<` version of my code but not the `puts` version.)
<Elouin> but now the question is, why do i have to flush with openssl but not without.
taupiqueur has quit [Ping timeout: 256 seconds]
notzmv has quit [Ping timeout: 240 seconds]
taupiqueur has joined #crystal-lang
postmodern has quit [Quit: Leaving]
notzmv has joined #crystal-lang
hightower2 has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
hightower3 has joined #crystal-lang
hightower3 has quit [Remote host closed the connection]
szutt has quit [Quit: Ping timeout (120 seconds)]
szutt has joined #crystal-lang
<raz> may be related to buffer sizes
<raz> or buffering in general (i'm no familiar with ossl, but perhaps it generally only sends on flush or close?)
hightower2 has quit [Ping timeout: 252 seconds]
taupiqueur has quit [Ping timeout: 252 seconds]
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 240 seconds]
notzmv has quit [Remote host closed the connection]
notzmv has joined #crystal-lang
szutt has quit [Quit: Client closed]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 268 seconds]
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 252 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 252 seconds]
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 256 seconds]
ur5us has joined #crystal-lang
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 250 seconds]
ur5us has quit [Ping timeout: 252 seconds]
taupiqueur has joined #crystal-lang
ur5us has joined #crystal-lang
<SamantazFox> How is the stack trace generated in cas of an exception?
<SamantazFox> There seem to be some inconsistencies
<SamantazFox> For instance, the stack trace provided in this issue: https://github.com/iv-org/invidious/issues/2713 looks weird starting from the line `from src/invidious/trending.cr:19:14 in 'trending' (and upwards)`
<SamantazFox> I don't see where the `in 'trending'` comes from (it's not the function's name, like on other lines)
<FromGitter> <oprypin:matrix.org> SamantazFox, that is quite weird indeed
<SamantazFox> oprypin And the weirdest past comes later on in the trace (almost at the top) where you can clearly see one of our function (`decode_length_seconds`) being mapped to the stdlib `pointer.cr`