<FromGitter>
<tenebrousedge> refinements are simply
<FromGitter>
<tenebrousedge> I wasn't aware that continuations existed, and I guess as long as they throw a compiler warning, I'm probably not going to pay them much attention
<FromGitter>
<stronny> refinements are simple, their scoping is extremely hard (for me at least)
f1refly has quit [Ping timeout: 276 seconds]
gangstacat has quit [Ping timeout: 276 seconds]
chemist69 has quit [Ping timeout: 246 seconds]
chemist69 has joined #crystal-lang
gangstacat has joined #crystal-lang
<FromGitter>
<tenebrousedge> @stronny maybe I'm missing something about their scoping. What do you see as being complicated about that?
ht_ has joined #crystal-lang
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
absolutejam1 has joined #crystal-lang
early has quit [Quit: Leaving]
early has joined #crystal-lang
HumanGeek has quit [Quit: Leaving]
absolutejam1 has quit [Ping timeout: 265 seconds]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
Raimondi has quit [Quit: WeeChat 2.5: ¡Chau!]
ua has quit [Ping timeout: 246 seconds]
Raimondi has joined #crystal-lang
absolutejam1 has joined #crystal-lang
ua has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 276 seconds]
absolutejam1 has joined #crystal-lang
hightower2 has quit [Ping timeout: 265 seconds]
absolutejam1 has quit [Ping timeout: 240 seconds]
absolutejam1 has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 245 seconds]
absolutejam1 has joined #crystal-lang
sorcus has joined #crystal-lang
alex`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.6]
alex`` has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 268 seconds]
absolutejam1 has joined #crystal-lang
hightower2 has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 245 seconds]
absolutejam1 has joined #crystal-lang
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
DTZUZO has quit [Quit: WeeChat 2.0]
DTZUZO has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter>
<stronny> I've tried to use them to patch redmine like 5 years ago. I've forgotten details and haven't use them since.
<FromGitter>
<tenebrousedge> I wouldn't say that their use is always a mistake, but they're usually a last resort. Similar with using `def` on a variable
<FromGitter>
<tenebrousedge> (which Crystal does not allow)
<FromGitter>
<j8r> a class instance variable is an instance variable, dont see the diff
<FromGitter>
<vlazar> in Ruby there is a class instance variable
robacarp has left #crystal-lang [#crystal-lang]
<FromGitter>
<tenebrousedge> I don't know how to make it any clearer than the example code displays
<FromGitter>
<bararchy> Oh no @bcardiff CI shows invalid mem access
<FromGitter>
<bcardiff> in which build @bararchy ?
alex`` has joined #crystal-lang
<FromGitter>
<asterite> @vlazar only in Crystal you can define and initialize an instance variable inside a class top-level. In Ruby that's something different
<FromGitter>
<bcardiff> Ah, yeah. We are investingating a bit what is happening there. Thanks!
<FromGitter>
<asterite> ""??????????????????
<FromGitter>
<asterite> sorry, cat
<FromGitter>
<bcardiff> 😹
<FromGitter>
<bararchy> 🎉
<FromGitter>
<firejox> Hi,everyone: )
<FromGitter>
<Blacksmoke16> o/
<FromGitter>
<firejox> I have some idea about Fiber. If we break swapcontext into two parts, it will be easier to keep thread-safe.
<FromGitter>
<firejox> Because we can use rop to add operations (eg. mutex.unlock ) to the targeted context before swap.
<FromGitter>
<firejox> After swap, these operations will be executed automatically.
<oprypin>
how to print an exception in an informative way? i could just let Crystal print it, but i don't want it to be fatal :D
DTZUZO has quit [Ping timeout: 265 seconds]
<FromGitter>
<Blacksmoke16> rescue, print what you want, dont reraise
<FromGitter>
<tenebrousedge> @firejox that sounds good to me but it's probably best raised on the Issues list
<oprypin>
yeah but what is that part "what you want"
<oprypin>
turns out it's e.inspect_with_backtrace
<FromGitter>
<Blacksmoke16> what you want would be however you want to print the error
<FromGitter>
<Blacksmoke16> using that, or if you wanted to use some custom format etc
<FromGitter>
<Blacksmoke16> i.e. could also log it etc
<FromGitter>
<firejox> @tenebrousedge ok, i will make issue there
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
absolutejam1 has joined #crystal-lang
<FromGitter>
<sam0x17> how to get the start and end points of a `Range(T)`? thought doing `.first` and `.last`, `range[0]`, or even `range.0` etc would work, but none do (though `first` works because of ennumerable
<FromGitter>
<Blacksmoke16> `#begin`
<FromGitter>
<Blacksmoke16> `#end`
<FromGitter>
<sam0x17> so `a = range.begin; b = range.end`?
<FromGitter>
<Blacksmoke16> yes
<FromGitter>
<sam0x17> ah, ty
<FromGitter>
<sam0x17> thought those were reserved words xD
<FromGitter>
<Blacksmoke16> :p
Human_G33k has joined #crystal-lang
Human_G33k has quit [Remote host closed the connection]
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 268 seconds]
<FromGitter>
<codenoid> cool
f1refly has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<FromGitter>
<Sija> @bararchy I am now, whassup? :)
ht_ has quit [Quit: ht_]
JuanMiguel has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.6]
JuanMiguel has quit [Client Quit]
alex`` has joined #crystal-lang
<FromGitter>
<jwoertink> If I have some code that calls `gets`, and I run that code from `Process.run`, is there a way to give that `gets` a value programmatically?
<FromGitter>
<tenebrousedge> like unix `expect`?
<FromGitter>
<jwoertink> Not sure what that is. Looking it up
<FromGitter>
<kinxer> Could you pass in an IO to be the `STDIN`?
<FromGitter>
<jwoertink> Yeah, looks like `expect` is similar to what I'm talking about
alex`` has quit [Quit: WeeChat 2.6]
<FromGitter>
<tenebrousedge> would that work, or do you need a Crystal solution?
<FromGitter>
<jwoertink> I need a crystal solution
<FromGitter>
<jwoertink> I can try passing the IO. I'm already doing that for the output
<FromGitter>
<jwoertink> This is basically a CLI wizard asking you questions. So it uses `puts` and `gets`
<FromGitter>
<jwoertink> But when running the specs, it's all run through `Process.run`. To be as minimally invasive as possible, I'd need a way to catch when it asks for some question, and then insert the gets value at that point
<FromGitter>
<jwoertink> The more I look at this though, it seems like I may need to just keep the OptionParser deal, and pass everything through that