<FromGitter>
<thedracle> So, I'm trying to make a websocket server using wss, and I'm getting the following OpenSSL error when connecting to it via a (browser based) client: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ It looks really similar to this error @nsuchy reported on Apr 14th regarding a HTTPS client connection from crystal, and omitting the 'Content-Type' header seemed to be the recommended solution. ...
<FromGitter>
<stnluu_twitter> The code looks right. Any reason you're on v0.27?
<FromGitter>
<stnluu_twitter> Does it work with v0.32?
<FromGitter>
<stnluu_twitter> Also, try absolute path for the cert & the key file and see if that works for you
<FromGitter>
<stnluu_twitter> depending on how you run it, the current directory might be different from what you're expecting
alex`` has quit [Quit: WeeChat 2.7]
alexherbo2 has quit [Remote host closed the connection]
<FromGitter>
<watzon> Yeah you should definitely update your Crystal version and try again. Try updating openssl too.
ur5us has joined #crystal-lang
dwdv has quit [Ping timeout: 240 seconds]
<FromGitter>
<thedracle> Let me try upgrading to a newer crystal, I just used what was installed via brew.
<FromGitter>
<thedracle> Thanks Chris.
<FromGitter>
<thedracle> And Steven.
<FromGitter>
<stnluu_twitter> brew install should give you 0.32 now
<FromGitter>
<thedracle> Yeah, just updated, I must have installed it some time ago.
<FromGitter>
<thedracle> Upgrading fixes the OpenSSL issue-- now the client is complaining about Sec-WebSocket-Protocol, which it looks like WebSocketHandler doesn't support.
ur5us has quit [Ping timeout: 260 seconds]
sagax has quit [Remote host closed the connection]
<FromGitter>
<stnluu_twitter> i had some luck with the kemal shard (had not tried WS)
<FromGitter>
<stnluu_twitter> have you seen how it does things?
sagax has joined #crystal-lang
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Quit: This computer has gone to sleep]
_whitelogger has joined #crystal-lang
JuanMiguel has joined #crystal-lang
<FromGitter>
<watzon> @thedracle tbh I think we've got some work to do with WebSockets
JuanMiguel has quit [Quit: This computer has gone to sleep]
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Remote host closed the connection]
<FromGitter>
<btihen> @thedracle - cool thanks for posting that - It looks interesting.
ht_ has joined #crystal-lang
uu91 has joined #crystal-lang
ht_ has quit [Quit: ht_]
dwdv has joined #crystal-lang
<FromGitter>
<bew> @PenguinOwl try `make clean_cache` as well
Human_G33k has joined #crystal-lang
HumanGeek has quit [Ping timeout: 260 seconds]
sagax has quit [Read error: Connection reset by peer]
_whitelogger has joined #crystal-lang
sagax has joined #crystal-lang
ua has quit [Ping timeout: 265 seconds]
ua has joined #crystal-lang
Groogy has joined #crystal-lang
alex`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.7]
alex`` has joined #crystal-lang
hpyc9 has joined #crystal-lang
FromGitter has quit [Read error: Connection reset by peer]
<FromGitter>
<smprather> Hmm... my attempt at proper mark-down didn't go as planned, but you get the idea.
<FromGitter>
<tenebrousedge> nothing in particular, but you'll need to set the type of that ivar
<FromGitter>
<smprather> Yeh, I'm pretty sure explicit setting will work. I just though this was a case where inference was supposed to work. I haven't checked the source, but I assume the return type of File.open is annotated.
<FromGitter>
<tenebrousedge> it is, but having a return type doesn't always ensure type inference
<FromGitter>
<smprather> (Sorry, from the list of "The assignments must look like this:")
<FromGitter>
<tenebrousedge> yeah, it says that. I don't know how true that is
<FromGitter>
<smprather> As expected, this in the class header works: @log_fh : File. I'm just wondering if this is a reportable inference bug (or enhancement).
<FromGitter>
<smprather> Indeed, the compiler would have to be able to detect if an expression contains a reference to another instance (or local) variable. I admit, it could be tricky. It seems simple cases of a function call(s) with literal arguments could be handled, but that's more of a version 2.x enhancement I suppose. I believe Scala has conquered tricky inference like this.
<FromGitter>
<smprather> Whoops, drop the literal arguments requirement. It shouldn't go into checking method arg types. (and I meant method when I said "function" above)
<FromGitter>
<smprather> In a nutshell, any human could infer this type w/o exception, so it seems the compiler could be taught.
<FromGitter>
<tenebrousedge> perhaps, but if it carries a substantial speed penalty it might not get implemented
<FromGitter>
<smprather> Doh, the type of args would have to be checked to determine the proper overload. That could get into inf loop. So there would have to be a special case of all method overloads returning the same type.
Human_G33k has quit [Ping timeout: 240 seconds]
Human_G33k has joined #crystal-lang
Human_G33k has quit [Client Quit]
<FromGitter>
<christopherzimmerman> Anyone heard of a language called V? I keep coming across modules directly ported from crystal.
<FromGitter>
<smprather> The C -> V translator looks promising. It can presently translate Doom to V.
alex`` has quit [Ping timeout: 258 seconds]
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 258 seconds]
ur5us has joined #crystal-lang
gangstacat has quit [Quit: Ĝis!]
<FromGitter>
<drum445> Hello, has anyone else seen issues with `Invalid memory access (signal 11) at address 0x7fae00000004` when running your app under --release mode?
gangstacat has joined #crystal-lang
<raz>
nope, never.
<raz>
can you reliably reproduce it?
<FromGitter>
<tenebrousedge> usually that's a compiler bug
<FromGitter>
<drum445> I can
<FromGitter>
<drum445> I've had to chagne my code to this to avoid it `Array(Article).from_json(docs).dup # dup to avoid invalid mem errors`
<FromGitter>
<tenebrousedge> hmmmmm
<FromGitter>
<drum445> Printing the array also fixes the problem, seems like unless I use the object it falls out of memory
Yxhuvud has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
<FromGitter>
<Blacksmoke16> Did you make a property on Article not nilable but it's missing from the json
<FromGitter>
<Blacksmoke16> Or something along those lines
Yxhuvud has joined #crystal-lang
alex`` has joined #crystal-lang
<FromGitter>
<drum445> Afraid not, no difference in the docs json object between the times it crashses (--release) and the times it doesn't
<FromGitter>
<drum445> the json object is coming from mongo fyi
<FromGitter>
<tenebrousedge> can you throw the object and deserializer into a Crystal Play?
<FromGitter>
<drum445> Sorry, can't get it to replicate at all