jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.5.8 | 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
canhtak has joined #crystal-lang
asterite has joined #crystal-lang
asterite has quit [Client Quit]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/NZ2D
<crystal-gh> crystal/master f4c38f5 Zamith: Uses correct Dir method for static file handler
<crystal-gh> crystal/master c36da37 Ary Borenszweig: Merge pull request #409 from zamith/master...
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/NZaF
<crystal-gh> crystal/master d4e17eb Ary Borenszweig: Added some typeof specs for HTTP::Sever and handlers
zamith has quit [Quit: Be back later ...]
canhtak has quit [Quit: canhtak]
<travis-ci> manastech/crystal#1956 (master - c36da37 : Ary Borenszweig): The build passed.
waj has joined #crystal-lang
waj has quit [Client Quit]
weskinner has joined #crystal-lang
weskinner has quit [Ping timeout: 264 seconds]
endou has joined #crystal-lang
endou_ has quit [*.net *.split]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
<crystal-gh> [crystal] weskinner opened pull request #410: change Dir.list to Dir.foreach (master...fix-1) http://git.io/NnBZ
ismaelga has quit [Remote host closed the connection]
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
zamith has joined #crystal-lang
asterite has joined #crystal-lang
zamith_ has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/NcP9
<crystal-gh> crystal/master 4985484 Ary Borenszweig: The magic variables '$~' and '$?' are now method-local and concurrent-safe. 'Tuple' is now correctly considered a struct. 'Pointer' is now correctly considered a struct. Renamed 'Function' to 'Proc'.
zamith has quit [Ping timeout: 250 seconds]
asterite has quit [Quit: Page closed]
<travis-ci> manastech/crystal#1959 (master - 4985484 : Ary Borenszweig): The build was broken.
leafybasil has quit [Remote host closed the connection]
asterite has joined #crystal-lang
leafybasil has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/Ncxb
<crystal-gh> crystal/master b740fc9 Ary Borenszweig: Remaining changes from 0.5.10
<travis-ci> manastech/crystal#1960 (master - b740fc9 : Ary Borenszweig): The build was fixed.
<crystal-gh> [crystal] akaufmann opened pull request #411: Crypto::Blowfish (master...blowfish) http://git.io/NCWi
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/NCDe
<crystal-gh> crystal/master 301db0e Ary Borenszweig: Fixed #412: ! method only callable as !obj, not obj.!
asterite has quit [Ping timeout: 246 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/NWRj
<crystal-gh> crystal/master 3d406e0 Ary Borenszweig: Fixed a bug where a typed-def type has un underlying type that has an included generic module
<crystal-gh> crystal/master 9795e90 Ary Borenszweig: Don't wrap "default" and "ignore" signal handlers. Related to #408
ismaelga has joined #crystal-lang
bcardiff has joined #crystal-lang
waj has joined #crystal-lang
weskinner has joined #crystal-lang
waj1 has joined #crystal-lang
waj has quit [Ping timeout: 252 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/NlM5
<crystal-gh> crystal/master f3c4600 Ary Borenszweig: Signal: don't create wrapper function if a block is not a closure. Related to #408
waj has joined #crystal-lang
waj1 has quit [Ping timeout: 265 seconds]
zamith_ has quit [Read error: Connection reset by peer]
zamith_ has joined #crystal-lang
<weskinner> zamith: I've tracked the issue with http server pending down to https://github.com/manastech/crystal/blob/master/src/http/request.cr#L44
<weskinner> BufferedIO.gets seems to be getting stuck in an infinite loop
<travis-ci> manastech/crystal#1963 (master - 9795e90 : Ary Borenszweig): The build passed.
zamith__ has joined #crystal-lang
zamith_ has quit [Ping timeout: 264 seconds]
canhtak has quit [Quit: canhtak]
<weskinner> how is accept defined twice in TCPServer?
<weskinner> ahh, the yield in the second def makes it an overload I guess
asterite has joined #crystal-lang
<zamith__> yup
zamith__ is now known as zamith
<zamith> having a yield counts to the signature of a method
<travis-ci> manastech/crystal#1964 (master - f3c4600 : Ary Borenszweig): The build passed.
leafybasil has quit [Remote host closed the connection]
<weskinner> trying to debug inside of BufferedIO with puts but puts seems to be rebound? Instead of going to the console it's going into the result of io.gets?
<asterite> weskinner: puts inside an io prints to that io, use ::puts instead to refer to the top-level method that will print to STDOUT
<asterite> It's a common gotcha when debugging IO :)
<weskinner> ahh ok, thanks!
<asterite> For the http server, you can try invoking listen_fork instead of listen... but I don't know much about HTTP::Server's implementation
shama has joined #crystal-lang
zamith has quit [Ping timeout: 245 seconds]
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 245 seconds]
<asterite> weskinner: but even with that, HTTP::Sever has some pending features and things, so...
zamith has joined #crystal-lang
<weskinner> when the request tries to read from it's TCPSocket's fd io on the 2nd asset request it hangs
ismaelga has quit [Remote host closed the connection]
<asterite> weskinner: with evented io this won't be a problem anymore, but right now it is. @waj said to me that the check for keep alive that zamith was pointing must probably not be done in non-evented mode
<asterite> It was a premature, but naive, optimization on our side
<waj> yup, basically HTTP::Server is attending one request at a time, so it doesn't make sense to obey keep alives
<weskinner> I sort of follow :)
<weskinner> haven't touched the C socket api in a long time
<weskinner> where is the keep alive code you mention?
waj1 has joined #crystal-lang
waj has quit [Ping timeout: 245 seconds]
<weskinner> so it's getting stuck there?
<weskinner> asterite:
<asterite> Yes
<asterite> The "unless request.keep_alive?" must be removed
<asterite> (but we will later do it conditionally based on a compile-time flag, I guess)
<weskinner> the issue still occurs for me with that line removed
<asterite> If you curl all the urls individually, does it work?
bcardiff1 has quit [Quit: Leaving.]
<asterite> It might be that the browser doesn't close the connection, or something... I've seen chrome do this
<asterite> But... not sure
<weskinner> yep
<weskinner> curling works
<weskinner> yeah you could be right
canhtak has joined #crystal-lang
<weskinner> it's like the socket returned from accept occasionally doesn't get filled
<asterite> I think the only solution for that might be to have an http server in evented mode, but for that you'll have to wait a bit
<asterite> I wonder why it works for zamith, though... he has assets
<weskinner> he squashes them into one asset
<weskinner> which seems to never fail
<asterite> Yes, I just tried it and with two assets it hangs
ismaelga has joined #crystal-lang
<weskinner> has any work gone into switching to evented IO yet?
<zamith> yes, the problem is the second asset being served on each request
<zamith> I only ever had one
<zamith> weskinner: you cannot remove the line, just the condition, the break must still be there
<zamith> does that fix it?
<weskinner> ahh yeah that does it
<zamith> nice
<weskinner> hmm, I don't see why that's causing the io.read to block. it's all in a single thread right?
<zamith> the reason behind the issue I not sure, waj should be able to answer that better
<zamith> *I'm
bcardiff has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
asterite has quit [Quit: Page closed]
weskinner has quit [Ping timeout: 252 seconds]
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
weskinner has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
weskinner has quit [Ping timeout: 246 seconds]
weskinner has joined #crystal-lang
<crystal-gh> crystal/master fdcb5aa Ary Borenszweig: Removed MatchData::last and Process::Status::last
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/NBvT
<waj1> to fix the issue don't just remove the line…. leave the break or remove the while loop as well
weskinner_ has joined #crystal-lang
weskinner has left #crystal-lang [#crystal-lang]
leafybasil has joined #crystal-lang
<travis-ci> manastech/crystal#1965 (master - fdcb5aa : Ary Borenszweig): The build passed.
<weskinner_> waj1: how should we handle the keepalive issue for now?
<weskinner_> can we remove that test from the server loop until we move to the evented model?
waj1 has quit [Quit: Leaving.]
waj has joined #crystal-lang
<waj> Try commenting the "unless" in the http server while loop to see if that solves the issue. Leave the break.
<weskinner_> yeah that fixes it. is that something that should be merged into master right now though?
weskinner_ has quit [Ping timeout: 252 seconds]
weskinner has joined #crystal-lang
<weskinner> computer died. Not sure if you responded waj
<waj> no… I didn't. I don't know yet. I'd like to have support for keep alives even in non-evented mode
waj has quit [Quit: Leaving.]
zamith has joined #crystal-lang
<weskinner> I would think chrome would send Connection: close on the last request instead of keep-alive
<weskinner> I guess it wants the connection to stay around for requests that might be generated via javascript?
canhtak has quit [Quit: canhtak]
weskinner has quit [Quit: Leaving]
weskinner has joined #crystal-lang
<zamith> http 1.1 defaults to keep-alive
<zamith> maybe because of that
ismaelga has joined #crystal-lang