<luislavena>
asterite: un placer, ustedes son capos en lo que estan haciendo!
strcmp1 has joined #crystal-lang
shama has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
waj has quit [Quit: waj]
NeverDie has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
waj has joined #crystal-lang
luislavena has quit [Remote host closed the connection]
sergey-kucher has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
leafybasil has quit [Ping timeout: 240 seconds]
<dzv>
is there a way to indicate a io operation should be nonblocking at a high level (not the nonblock flag passed to FileDescriptorIO)?
mgarciaisaia has joined #crystal-lang
<asterite>
There is/was read_nonblock, but I'm not sure it works
vikaton has joined #crystal-lang
vikaton has quit []
dwahl has quit [Ping timeout: 265 seconds]
<dzv>
perhaps nonblock should be added to the io interface and the existing nonblock renamed so that all operations can tell if they should retry or return something else?
<dzv>
i have a high level io wrapper that may call read internally multiple times to satisfy one operation. it can't play nicely with select without a way to indicate that nonblocking operations are desired
<dzv>
i think BufferedIOMixin has the same issue. would IO#gets work correctly if you were reading from multiple IO's and using select?
luislavena has joined #crystal-lang
luislavena has quit [Ping timeout: 244 seconds]
luislavena has joined #crystal-lang
sergey-kucher has quit [Ping timeout: 246 seconds]
<luislavena>
asterite: hello, is there any docs around previous_def macro?
<jhass>
there's not much to it, you can imagine it to insert the code of whatever the previous definition was
<asterite>
luislavena: docs still missing, but it's basically what jhass said. Think super, but instead of invoking the definition up in the hierarchy it invokes the method you just redefined
<asterite>
(it errors if this is the first definition of the method, that is, there's no previous def)
<asterite>
Oh... mmm... it's a bit too twisted for my taste
<asterite>
but when you define a route it overwrites the method to first check that route, if it doesn't match use the previous definition of the method
<asterite>
so it's like building a huge method with these checks one after the other, but one route at a time
<luislavena>
asterite: I got the opposite, first it check if the previous_def fulfill the request (and return)
<luislavena>
and if not, does the new piece of code added to the bottom
<asterite>
Ah, yes, right, that's it
<luislavena>
asterite: like a finite automata does but doesn't go over a big if list :D
<asterite>
I think just having an array of procs to execute when the route matches is simpler
<asterite>
Hehe, yes
<luislavena>
asterite: the proc array approach is used in things like Hobbit and Brooklyn, yet Cuba and Syro beat it:
<luislavena>
asterite: saw it, yet not convinced of controller (with multiple actions in it) and the string-to-instance magic
<asterite>
Yes. I also don't understand why there needs to be a controller thingy in web apps. Actions and regular object composition/delegation should be enough
<asterite>
Right?
<asterite>
I think it's supposedly to keep related code together, so you can maybe apply filters to all actions... but you could do that with module inclusion, maybe
<asterite>
And you are right, that way actions become easily testables
<luislavena>
need to play a bit more with this before I share something :)
<luislavena>
still trying to understand a bunch of this, much appreciated your tolerance until I get better :D
shama has quit [Read error: Connection reset by peer]
shama has joined #crystal-lang
strcmp1 has quit [Ping timeout: 265 seconds]
strcmp1 has joined #crystal-lang
Raimondi has joined #crystal-lang
leafybasil has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
mgarciaisaia has quit [Quit: Leaving.]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]