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
deavmi_ has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
<postmodern> is there a way to create an tuple of arbitrary length, but all elements are of the same type?
<FromGitter> <Blacksmoke16> No tuples are fixed suze by design
<FromGitter> <Blacksmoke16> Size
<FromGitter> <watzon> Is there a good thread safe queue yet?
<FromGitter> <watzon> Or am I going to have to implement one quickly?
<FromGitter> <Blacksmoke16> Rabbit?
<FromGitter> <watzon> Rabbit would probably be a good idea actually, but this is a smaller project and I'd rather avoid external deps like that if I can. I really just need a deque that is thread safe.
<FromGitter> <Blacksmoke16> That's fair
<FromGitter> <Blacksmoke16> There's one in the stdlib, but idk if it's thread safe or not
deavmi has quit [Ping timeout: 240 seconds]
deavmi has joined #crystal-lang
<FromGitter> <watzon> Yeah iirc it isn't
postmodern has quit [Quit: Leaving]
ur5us has joined #crystal-lang
<yxhuvud> @watzon: can you use a channel?
ur5us has quit [Ping timeout: 256 seconds]
pusewicz has joined #crystal-lang
<FromGitter> <HertzDevil> is there a design reason that `x.as?(T)` isn't equivalent to `x if x.is_a?(T)`
<FromGitter> <HertzDevil> (the difference is that the former returns a `T?` and the latter returns a `(typeof(x) & T)?`)
<yxhuvud> subclasses?
<FromGitter> <HertzDevil> why do you think so
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
<yxhuvud> no good reason.
<yxhuvud> looking at the documentation for as, I guess the upcast possibility to union type could be responsible?
<yxhuvud> ie it allows you to do things like `[1.as?(Int32|String)] << "hello"` which is not possible using `1 if 1.is_a?(Int32|String)` instead
<FromGitter> <HertzDevil> oh yeah upcasts
<FromGitter> <HertzDevil> what about `x.as?(T)` versus `x.as(T) if x.is_a?(T)`
<FromGitter> <alex-kampa> I have encountered a strange probelm with TCPServer. This works perfectly well:
<FromGitter> <alex-kampa> I have encountered a strange problem with TCPServer. This works perfectly well: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ => Unhandled exception in spawn: Closed stream (IO::Error) [https://gitter.im/crystal-lang/crystal?at=60e0376465513b4d9145e924]
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
Elouin has quit [Quit: So long and thanks for all the fish!]
Elouin has joined #crystal-lang
<FromGitter> <riffraff169> as a not quite rabbit expert, running rabbit in a container is very simple, so not much required to use it...it would be simple to use for your app
<FromGitter> <riffraff169> could even have a script that starts the rabbit container, runs your app, then when app quits, rabbit quits
m4xm4n has joined #crystal-lang
deavmi has quit [Ping timeout: 240 seconds]
deavmi has joined #crystal-lang
mps has quit [Ping timeout: 256 seconds]
mps has joined #crystal-lang
<FromGitter> <Blacksmoke16> > GC Warning: Finalization cycle involving 0x7f8dc9e7eea0
<FromGitter> <Blacksmoke16> nice, thats a new one
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #crystal-lang
pusewicz has quit []
pusewicz has joined #crystal-lang
ur5us has joined #crystal-lang
m4xm4n has quit [Quit: Connection closed for inactivity]
postmodern has joined #crystal-lang
<postmodern> what is IO::ARGF ?
mps has quit [Ping timeout: 272 seconds]
mps has joined #crystal-lang
<postmodern> ah ha. hmm now to figure out why it's showing up in my specs when i am clearly calling IO::Memory#gets
<FromGitter> <Blacksmoke16> 🤔
mps has quit [Ping timeout: 265 seconds]
mps has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]