jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.4 | Fund Crystals development: http://to.ly/TtGw | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal - Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
iamstef has quit []
iamstef has joined #crystal-lang
AckZ has quit []
AckZ has joined #crystal-lang
emmanueloga has quit []
emmanueloga has joined #crystal-lang
blue_deref has quit [Quit: bbn]
waj has quit [Quit: waj]
ngram has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Quit: waj]
<adam12> Any debugging tips other than 'pp'?
mgarciaisaia has joined #crystal-lang
mgarciaisaia1 has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 272 seconds]
nahtnam has quit [Quit: Connection closed for inactivity]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Client Quit]
mgarciaisaia has joined #crystal-lang
mgarciaisaia1 has quit [Ping timeout: 264 seconds]
mgarciaisaia has quit [Quit: Leaving.]
sergey-kucher_ has joined #crystal-lang
willl has joined #crystal-lang
sergey-kucher_ has quit [Ping timeout: 246 seconds]
KriSstaL has joined #crystal-lang
<KriSstaL> hola
KriSstaL has left #crystal-lang [#crystal-lang]
BlaXpirit has joined #crystal-lang
anonymous-42708 has joined #crystal-lang
anonymous-42708 has left #crystal-lang [#crystal-lang]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<jhass> adam12: not really. There's {{debug()}} to print a macro
<jhass> woah, matz backed the fundraiser <3
<BlaXpirit> what fundraiser
<jhass> BlaXpirit: /topic ;D
<BlaXpirit> oh i even looked at topic and missed it somehow
<BlaXpirit> nice
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kilo`byte has quit [Ping timeout: 256 seconds]
Kilo`byte has joined #crystal-lang
mitch_ has joined #crystal-lang
<dwahl> adam12, you can also use lldb. i think the debugger macro sets a backtrace or something but i havent messed with it
<dwahl> s/backtrace/breakpoint
ngram has quit [Ping timeout: 246 seconds]
leafybasil has joined #crystal-lang
waj has joined #crystal-lang
havenwood has joined #crystal-lang
sandelius has joined #crystal-lang
sergey-kucher has quit [Quit: Page closed]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vYlzf
<crystal-gh> crystal/master 1d52f13 Ary Borenszweig: Fixed 1028: when a `case when Const` was expanded to `===`, a transform was missing
mgarciaisaia has joined #crystal-lang
<asterite> Matz is awesome
<travis-ci> manastech/crystal#1d52f13 (master - Fixed 1028: when a `case when Const` was expanded to `===`, a transform was missing): The build passed. https://travis-ci.org/manastech/crystal/builds/72463356
<wmoxam> Cool, Matz is nice :D
<adam12> dwahl: Thanks. I stumbled through but 'pp' was getting tiring.
kulelu88 has joined #crystal-lang
<crystal-gh> [crystal] davydovanton opened pull request #1031: Update HTML::Builder library (master...fix-html-tag-spaces) http://git.io/vY8UP
blue_deref has joined #crystal-lang
luislavena has joined #crystal-lang
<asterite> luislavena: capo total! gracias!!
<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
<jhass> >> def foo; puts 1; end; def foo; puts 2; previous_def; puts 2; end; def foo; puts 3; previous_def; puts 3; end; foo
<DeBot> jhass: 3 - more at http://carc.in/#/r/849
<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)
<jhass> mmh, I wonder
<luislavena> asterite: jhass: thank you, I'm trying to understand crystal-router from bcardiff https://github.com/bcardiff/crystal-routing/blob/master/src/routing/base.cr#L43-L54
<jhass> >> def foo(a=1); puts a; end; def foo(a=2); previous_def; end; foo
<DeBot> jhass: 2 - more at http://carc.in/#/r/84a
<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:
<jhass> asterite: how do you like artanis?
<asterite> but it relies on instance_eval, which we don't have https://github.com/soveran/syro/blob/master/lib/syro.rb#L121 :(
<luislavena> asterite: I think the whole thing of doing procs on the conditions of the router is a bit too much, for organizational purposes
<asterite> But yes, routing can be simple
<asterite> how would you model it?
<luislavena> I was trying to a action router, that is a route that instantiate an Action and invoke #call on it with params
waj has quit [Ping timeout: 265 seconds]
<luislavena> so testing the action can be completely separate from the routing stack (I don't need to fake a http request)
<asterite> There was a recent discussion where many solutions were similar to yours, I think: https://github.com/manastech/crystal/issues/949
<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…]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
rappo has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Client Quit]
luislavena has quit []
<asterite> The curry on conf video is up! https://www.youtube.com/watch?v=xbdVs4FhZac
<jhass> \o/
guilleiguaran___ has joined #crystal-lang
guilleiguaran__ has quit [Ping timeout: 240 seconds]
guilleiguaran___ is now known as guilleiguaran__