jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.9.1 | Fund Crystals development: http://is.gd/X7PRtI | 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
fowlduck has joined #crystal-lang
dylanmei has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
olek_poz has quit [Ping timeout: 246 seconds]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
slash_nick is now known as slash_kick
akaiiro has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
daveshah has joined #crystal-lang
daveshah has quit [Client Quit]
daveshah has joined #crystal-lang
fowlduck has joined #crystal-lang
slash_kick is now known as slash_nick
slash_nick is now known as slash_kick
fowlduck has quit [Remote host closed the connection]
dylanmei has quit [Quit: ZZZzzz…]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
waterlin1 has joined #crystal-lang
waterlink has quit [Ping timeout: 246 seconds]
fowlduck has joined #crystal-lang
daveshah has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 260 seconds]
fowlduck has quit [Remote host closed the connection]
dylanmei has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
dylanmei has quit [Client Quit]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 255 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
buggs has quit [Ping timeout: 240 seconds]
fowlduck has joined #crystal-lang
buggs has joined #crystal-lang
waterlin1 has quit [Ping timeout: 265 seconds]
fowlduck has quit [Remote host closed the connection]
Philpax_ has joined #crystal-lang
fowlduck has joined #crystal-lang
Philpax has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
dylanmei has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
n1ftyn8_ has quit [Ping timeout: 240 seconds]
n1ftyn8_ has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 240 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
dylanmei has quit [Quit: ZZZzzz…]
meatchicken has quit [Quit: Leaving]
fowlduck has joined #crystal-lang
trapped has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
olek_poz has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
gour has joined #crystal-lang
fowlduck has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
lokulin has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
<crystal-gh> [crystal] sdogruyol opened pull request #1958: Remove HTTP.listen_fork (master...master) http://git.io/v0bJA
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
olek_poz has quit [Ping timeout: 246 seconds]
fowlduck has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 265 seconds]
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
fowlduck has quit [Remote host closed the connection]
olek_poz has joined #crystal-lang
fowlduck has joined #crystal-lang
Philpax_ has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
Philpax_ has joined #crystal-lang
fowlduck has joined #crystal-lang
<gour> morning, how does writing of (multi-platform) desktop gui apps fit with crystal's language goals?
fowlduck has quit [Remote host closed the connection]
<jhass> gour: given we're backed by LLVM, in theory, supporting every platform LLVM supports is possibl
<jhass> e
fowlduck has joined #crystal-lang
<jhass> though things like emscripten are less feasible due to the dependence on libevent etc
Philpax__ has joined #crystal-lang
Philpax_ has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
daveshah has joined #crystal-lang
daveshah has quit [Ping timeout: 246 seconds]
sdogruyol has joined #crystal-lang
fowlduck has joined #crystal-lang
<gour> jhass: what about practice? any interest for gui apps within community?
<sdogruyol> hey all
<jhass> gour: I've toyed a bit with a gobject-introspection binding
<jhass> there's a cocoa binding or two
<jhass> haven't noticed a QT one yet
<sdogruyol> gour: there's hoop https://github.com/hoopcr/hoop
fowlduck has quit [Remote host closed the connection]
* gour is running linux (debian)
fowlduck has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
fowlduck has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
gour has left #crystal-lang ["WeeChat 1.3"]
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
sdogruyol has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
sdogruyol has quit [Ping timeout: 256 seconds]
fowlduck has joined #crystal-lang
sdogruyol has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
luislavena has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
daveshah has joined #crystal-lang
fowlduck has joined #crystal-lang
daveshah has quit [Ping timeout: 272 seconds]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
daveshah has joined #crystal-lang
fowlduck has joined #crystal-lang
daveshah has quit [Ping timeout: 260 seconds]
akaiiro has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
ssvb has joined #crystal-lang
sdogruyo_ has joined #crystal-lang
dylanmei has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
olek_poz has quit [Ping timeout: 246 seconds]
fowlduck has joined #crystal-lang
sdogruyo_ has quit [Quit: Leaving...]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
FLOOR_9_ has joined #crystal-lang
fowlduck has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax__ has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
waterlink has joined #crystal-lang
Philpax_ has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
daveshah has joined #crystal-lang
imperator has joined #crystal-lang
fowlduck has joined #crystal-lang
daveshah has quit [Ping timeout: 240 seconds]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
dylanmei has quit [Client Quit]
FLOOR_9_ has quit [Remote host closed the connection]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/v0AVQ
<crystal-gh> crystal/master 768c081 Ary Borenszweig: Fixed #1960: make `parallel` work with nil values
<crystal-gh> crystal/master 1c193d3 Ary Borenszweig: Fixed #1959: incorrect ASTNode#to_s for infix operators
fowlduck has joined #crystal-lang
<travis-ci> manastech/crystal#1c193d3 (master - Fixed #1959: incorrect ASTNode#to_s for infix operators): The build has errored. https://travis-ci.org/manastech/crystal/builds/97711073
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
waterlink has quit [Ping timeout: 256 seconds]
daveshah has joined #crystal-lang
fowlduck has joined #crystal-lang
daveshah has quit [Ping timeout: 260 seconds]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
olek_poz has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
FLOOR_9_ has joined #crystal-lang
fowlduck has joined #crystal-lang
<FLOOR_9_> does anyone by change have experience with tcp framing?
<FLOOR_9_> i made a tcpserver before, in both Ruby, Nodejs and now in crystal
<ytti> shoot
<FLOOR_9_> and because tcp is a streaming protocol, you have to have delimiters
<FLOOR_9_> ytti: do you have experience with zeromq?
<ytti> no, but i know of it
<ytti> i'm not sure what you mena by delimiters
<FLOOR_9_> indicators to use , with messages so you know the end of a stream, beginning
<FLOOR_9_> with tcp
pawnbox has joined #crystal-lang
<FLOOR_9_> because with a tcp server, the messages can get pretty scrambled
<FLOOR_9_> what is an easy way of framing in tcp?
<FLOOR_9_> there is no zeromq lib for crystal not yet, so , i quess i have to stick to tcp sockets
<FLOOR_9_> ytti: i don't know if you have experience with tcp sockets and framing?
pawnbox has quit [Ping timeout: 272 seconds]
fowlduck has quit [Remote host closed the connection]
<ytti> sorry, it's not something i've done, so my solution might be arbitrarily bad
<FLOOR_9_> ok
<ytti> but i would just read into buffer, until specific code is found
<ytti> or perhaps i'd do TLV based protocol
<ytti> and read until length
<FLOOR_9_> yeah there 2 common approaches , length prefix and read the whole length of the stream till delimiter is found
<FLOOR_9_> problem is, when the prefix or the delimiter itself is cut, have to deal with another problem
waterlink has joined #crystal-lang
fowlduck has joined #crystal-lang
<FLOOR_9_> so it sounds like i need to write my own protocol
<jhass> or do a lib for an existing one
<FLOOR_9_> well it's for a really specific small case, over lan, i don't know if i have the experience enough to write a lib
<FLOOR_9_> would love to, but i am really new to crystal, and no experience with C, could be a problem :)
<jhass> you have if you have enough to make up a reliable protocol on your onw
<FLOOR_9_> i have more experience in networking than with programming, that's why i can cook up a simple protocol
<FLOOR_9_> but for it to be effecient and reliable is another thing hahahah
<FLOOR_9_> best case scenario , we have both programmers that have experience with zeromq and networking people together
<FLOOR_9_> to give you an example, zeromq benchmarks in ruby show 400.000 messages per second over pub/sub
<FLOOR_9_> on the same machine, zeromq pub/sub for node shows 60.000 , nanomsg beats zeromq in node.
<FLOOR_9_> but i am running it to the limits of my understanding of programming, Kernel stuff,
<FLOOR_9_> and just to clarify, the zeroMQ benchmarks in C show 1 milliion messages per second
fowlduck has quit [Remote host closed the connection]
<FLOOR_9_> but we are talking about messages in some bytes in size, not KB
<FLOOR_9_> and on the TCP layer, so it has to go through the NIC stack, in contrast to IPC which can be even faster
<FLOOR_9_> but i don't doubt that you already know that jhass :)
<FLOOR_9_> because i see you are one of the contributors to the unix_server.cr
<jhass> well, also look at what I "contributed"
dylanmei has joined #crystal-lang
<FLOOR_9_> ah yeah i see what you mean, you mean you renamed the cast to new
fowlduck has joined #crystal-lang
dylanmei has quit [Read error: Connection reset by peer]
<FLOOR_9_> so now i am really in the dark on your experience with hhahahah
dylanmei has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
<FLOOR_9_> ytti: delimiters used by the http protocol : https://theamiableapi.files.wordpress.com/2012/03/message.png
fowlduck has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
fowlduck has quit [Remote host closed the connection]
<FLOOR_9_> funny thing tho, that old guy in that youtube vid : "The internet is not something you just dump something on, its not a big truck. It's a series of tubes" was correct
<ytti> TLV is super easy to parse
<ytti> compared to some ascii thingy
<ytti> and more efficient too
<FLOOR_9_> i'm looking into that now
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
<FLOOR_9_> hey there sdogruyol
<sdogruyol> hey
<FLOOR_9_> i did my benchmarking , not all complete , but raising the file descriptor limit doesn't improve your kemal
<FLOOR_9_> if i try to lower the limit tho, i get a max file descriptor error, so it's a good indication when it reaches it top
<FLOOR_9_> so far with 9999 in ulimit -n with wrk and kemal, it doesn't give that error
<sdogruyol> that's good to hear
<FLOOR_9_> also i haven't tested http pipelining yet, don't know if you have implanted it?
<sdogruyol> you mean keep-alive?
<FLOOR_9_> no http pipelining does require keep alive
<FLOOR_9_> but it's sending multiple http over 1 stream
<FLOOR_9_> most browser today have it disabled, but like nodejs enables it by default
<FLOOR_9_> you can test it with wrk with: wrk -s luascript http://localhost:8080 -- 10
<sdogruyol> i havent implemented anything related to that but i'm sure that i've seen keep-alive in Crystal's HTTP::Request implementation
<FLOOR_9_> 10 stands for the number of pipelined requests
<FLOOR_9_> let me check right now if crystal http server supports it natively , one moment
fowlduck has joined #crystal-lang
<FLOOR_9_> no it does not
<FLOOR_9_> but i am running 0.6.1 here atm, you can check with a simple echo command
<FLOOR_9_> echo -en "GET / HTTP/1.1\r\nHost: fropl.com\r\n\r\nGET / HTTP/1.1\r\nHost: fropl.com\r\n\r\n" | nc localhost 80
<FLOOR_9_> if it supports http pipelining, it shows 2 http responses instead of 1
trapped has joined #crystal-lang
<sdogruyol> 0.6.1 0f what?
<sdogruyol> Crystal?
<FLOOR_9_> crystal version
<FLOOR_9_> yes
<sdogruyol> that's too old
<FLOOR_9_> for you kemal i had the latest version tho
<FLOOR_9_> but right now i am testing on a different machine
luislavena has quit [Quit: Leaving]
<FLOOR_9_> can you maybe test your http server with the echo command?
<FLOOR_9_> i'm interested to know if it supports it
fowlduck has quit [Remote host closed the connection]
sdogruyol has quit [Remote host closed the connection]
dylanmei has joined #crystal-lang
fowlduck has joined #crystal-lang
akaiiro has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/v0pu5
<crystal-gh> crystal/master fbf66dd Ary Borenszweig: Some more Array docs
<crystal-gh> crystal/master 045eaa1 Ary Borenszweig: Fixed a couple of formatter bugs
Philpax_ has joined #crystal-lang
<travis-ci> manastech/crystal#045eaa1 (master - Fixed a couple of formatter bugs): The build has errored. https://travis-ci.org/manastech/crystal/builds/97758630
Philpax__ has joined #crystal-lang
fowlduck has joined #crystal-lang
<travis-ci> manastech/crystal#045eaa1 (master - Fixed a couple of formatter bugs): The build has errored. https://travis-ci.org/manastech/crystal/builds/97758630
Philpax_ has quit [Ping timeout: 256 seconds]
imperator has left #crystal-lang ["Leaving"]
fowlduck has quit [Remote host closed the connection]
dylanmei has quit [Quit: ZZZzzz…]
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden closed pull request #1958: Improve HTTP::Server (master...master) http://git.io/v0bJA
pawnbox has quit [Ping timeout: 265 seconds]
fowlduck has quit [Remote host closed the connection]
<travis-ci> manastech/crystal#1f96534 (master - Merge pull request #1958 from sdogruyol/master): The build has errored. https://travis-ci.org/manastech/crystal/builds/97764299
<DeBot> https://github.com/manastech/crystal/pull/1958 (Improve HTTP::Server)
<BlaXpirit> hmm how can I combine .all? and .each_cons ?
FLOOR_9_ has quit []
<BlaXpirit> >> [1,2,3].each_cons(2).all? { |a| a[0]+1 == a[1] }
fowlduck has joined #crystal-lang
<DeBot> BlaXpirit: # => true - https://carc.in/#/r/oit
<BlaXpirit> >> [1,3,2].each_cons(2).all? { |a| a[0]+1 == a[1] }
<DeBot> BlaXpirit: # => false - https://carc.in/#/r/oiu
<BlaXpirit> how does this work if there is no iterator?
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
<asterite> BlaXpirit: what do you mean with "if there is no iterator"?
olek_poz has quit [Ping timeout: 246 seconds]
<BlaXpirit> asterite, I mean each_cons does not return an object that has a method `all?`
<asterite> Oh, it returns an Iterator, which includes Enumerable
<BlaXpirit> where does it return an Iterator?
<asterite> Oh, well, it's actually that Array includes Iterable, which defines it. That calls `each.cons(2)`, and `cons` is defined on Iterator
pawnbox has quit [Ping timeout: 246 seconds]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
<travis-ci> manastech/crystal#1f96534 (master - Merge pull request #1958 from sdogruyol/master): The build has errored. https://travis-ci.org/manastech/crystal/builds/97764299
<DeBot> https://github.com/manastech/crystal/pull/1958 (Improve HTTP::Server)
fowlduck has quit [Remote host closed the connection]
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]