jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.18.7 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 265 seconds]
<crystal-gh> [crystal] grosser opened pull request #3246: OptionParser: parse arguments from shorflag if it is only referenced … (master...grosser/short-arg) https://git.io/viOC7
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
onethirtyfive has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
<crystal-gh> [crystal] grosser opened pull request #3247: OptionParser: make flag addition code simpler and faster (master...grosser/fast-string) https://git.io/viO4g
<crystal-gh> [crystal] will opened pull request #3248: Array.new(size, &block) accepts UInt32, other Ints (master...uintarraynew) https://git.io/viO4K
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
kulelu88 has quit [Quit: Leaving]
willl has joined #crystal-lang
triangles has joined #crystal-lang
onethirtyfive has joined #crystal-lang
_whitelogger has joined #crystal-lang
bungoman has joined #crystal-lang
pawnbox has joined #crystal-lang
gour has joined #crystal-lang
<gour> morning
<gour> Crystal's scores in https://github.com/kostya/benchmarks look impressive
<FromGitter> <sdogruyol> Yeah.
gour has left #crystal-lang ["Leaving"]
<FromGitter> <gour> everyone is on gitter these days...
<FromGitter> <sdogruyol> Isn't that a good thing
<FromGitter> <gour> well, i still have a need for old IRC, while those bridges do not work well, actually it seems that Slack's one is even better
<FromGitter> <sdogruyol> I see your point
<FromGitter> <gour> btw, how do you see Crystal as lang for desktop gui apps? it seems it's more suitable for web apps?
<BlaXpirit> gour, that would be amazing but there seems to be very little interest. no Windows support and no major GUI library ported
<FromGitter> <gour> recently i was looking at [Spry](http://sprylang.org/) language which is going to use [ui](https://github.com/andlabs/ui) as GUI lib
<BlaXpirit> k
<BlaXpirit> it seems like there is no way to extract the expression from a 'Not' node :(
<BlaXpirit> >> macro test(exp); {{exp.exp}}; end; test(!5)
<DeBot> BlaXpirit: undefined macro method 'Not#exp' - https://carc.in/#/r/18g6
trapped has joined #crystal-lang
<dom96> gour: you've been searching for the best GUI to use for years now, maybe it's time you wrote your own?
<FromGitter> <sdogruyol> Lol
Nik736 has joined #crystal-lang
triangles2 has joined #crystal-lang
triangles has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
ponga has joined #crystal-lang
bew78 has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 250 seconds]
tomchapi_ has joined #crystal-lang
tomchapin has quit [Ping timeout: 265 seconds]
bew78 has quit [Ping timeout: 258 seconds]
trapped has quit [Read error: Connection reset by peer]
matp has quit [Remote host closed the connection]
mini-me_ has joined #crystal-lang
<mini-me_> hello
<FromGitter> <sdogruyol> hey
<mini-me_> hey sdog! lol what a coincedence
<mini-me_> i was looking at your project Kemal
<FromGitter> <sdogruyol> great
<mini-me_> 10 minutes ago
<mini-me_> i am trying to make an http api, i come from Ruby
<FromGitter> <sdogruyol> yeah, it should be simple enough if you're a Rubyist
<mini-me_> and just the very basics, i know a bit about socket programming
<mini-me_> where i am stuck is this: i want to retrieve a string from the socket, then send it out to REDIS
<FromGitter> <sdogruyol> that's simple
<mini-me_> from your example, i used spawn for every server.accept
<mini-me_> this is working fine, and no problems.
<FromGitter> <sdogruyol> do you have any gist to share?
<mini-me_> no sorry, i don't yet have a github account
<mini-me_> i am planning on it tho
<FromGitter> <sdogruyol> ugh
<FromGitter> <sdogruyol> a gist would be very helpful
<mini-me_> hm
<FromGitter> <sdogruyol> have you checked https://github.com/f/kemal-react-chat it would give you a good idea about sockets
<FromGitter> <sdogruyol> it's a chat app built with Kemal and React
<mini-me_> yes is came across it, it mainly uses websockets?
<FromGitter> <sdogruyol> yeah
<FromGitter> <sdogruyol> so here's how you receive messages from client and use it https://github.com/f/kemal-react-chat/blob/master/src/app.cr#L16-L21
<mini-me_> yes i see, but i first want it to work with basic http
<FromGitter> <sdogruyol> that's also simple, isnt it?
<mini-me_> yes, i have some socket, http experience with ruby, that's why i am trying http
<FromGitter> <sdogruyol> okay
<mini-me_> later on i want to implent websocket support, but still not there yet
matp has joined #crystal-lang
<FromGitter> <sdogruyol> i see
<mini-me_> if i want to make an http request inside the socket callback, do i have to use another spawn inside it?
<FromGitter> <sdogruyol> well, if you don't want to block the socket client
<FromGitter> <sdogruyol> you should use another spawn
<mini-me_> aha yeah i was thinking along the same line
<FromGitter> <sdogruyol> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57cc1f526efec7117ca6f237]
<FromGitter> <sdogruyol> something like this should be ok
<mini-me_> aha! and if the client was dependend on that callback, i don't have to use a spawn
<mini-me_> because the other requests are also spawns, so non-blocking
<FromGitter> <sdogruyol> yeah
<mini-me_> that's really cool
<FromGitter> <sdogruyol> well, it's all about your architecture
<mini-me_> yeah it's a simple http api that gets data from redis
<FromGitter> <sdogruyol> furthermore you can use Channel's to sync
<mini-me_> with channel's i have less experience
<FromGitter> <sdogruyol> you can get a good idea here
<mini-me_> it's the data stream between fibers i read
<FromGitter> <sdogruyol> it's really enlightening once you grok
<mini-me_> grok?
<FromGitter> <sdogruyol> understand*
<mini-me_> ah, do i have to use channels in the code example you gave me
<FromGitter> <sdogruyol> not necessarily
<FromGitter> <sdogruyol> but if you want to sync two fibers
<FromGitter> <sdogruyol> you should
<mini-me_> aha
<mini-me_> but the more i use fibers in a socket callback, the more complex it gets right
<mini-me_> and adds latency
<FromGitter> <sdogruyol> well
<FromGitter> <sdogruyol> it definitely adds some overhead but it's nonblocking so
<FromGitter> <sdogruyol> Fibers are cheap to create
<FromGitter> <sdogruyol> even thousands of them are OK
<mini-me_> it reminds me of a bidirectional pipe
<FromGitter> <sdogruyol> yeah
aldum has left #crystal-lang [#crystal-lang]
<mini-me_> do you know of a way to capture all errno errors?
<mini-me_> without the program crashing
<mini-me_> i use this in my ruby socket program
<mini-me_> or capture all main errors without crashing?
<mini-me_> i don't know if you implent something that in your program, i can't find it
<mini-me_> yes i see
<mini-me_> but is there a way to capture a main program crash?
* mini-me_ searching through my ruby code
unshadow has joined #crystal-lang
<mini-me_> or is this not possible?
g3funk is now known as braidn
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/viOSz
<crystal-gh> crystal/master fad767c Ary Borenszweig: Merge pull request #3248 from will/uintarraynew...
<crystal-gh> crystal/master c0debf9 Will Leinweber: Array.new(size, &block) accepts UInt32
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/viOSV
<crystal-gh> crystal/master 33111b2 Ary Borenszweig: Compiler: fixed a few issues with tuples, unions and downcasting. Fixes #3132
<crystal-gh> crystal/master 7b7380d Ary Borenszweig: Compiler: fixed macro hooks for generic types. Fixes #3250
<travis-ci> crystal-lang/crystal#fad767c (master - Merge pull request #3248 from will/uintarraynew): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/157457097
<DeBot> https://github.com/crystal-lang/crystal/pull/3248 (Array.new(size, &block) accepts UInt32, other Ints)
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<travis-ci> crystal-lang/crystal#33111b2 (master - Compiler: fixed a few issues with tuples, unions and downcasting. Fixes #3132): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/157457273
<DeBot> https://github.com/crystal-lang/crystal/issues/3132 (crash when redefining Tuple)
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
<mini-me_> a very good day , and thank you sdog!
mini-me_ has left #crystal-lang [#crystal-lang]
<FromGitter> <sdogruyol> Thanks a lot
Ven_ has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
mkl0501 has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
daekano has quit [Ping timeout: 250 seconds]
matp has quit [Ping timeout: 276 seconds]
Liothen has quit [Ping timeout: 276 seconds]
matp has joined #crystal-lang
mkl0501 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
daekano has joined #crystal-lang
Liothen has joined #crystal-lang
Liothen has quit [Changing host]
Liothen has joined #crystal-lang
Yxhuvud has quit [Ping timeout: 260 seconds]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
unshadow has quit [Quit: leaving]
<crystal-gh> [crystal] kostya opened pull request #3254: add Box#box (master...box) https://git.io/viOAg
bungoman has quit [Read error: Connection reset by peer]
bungoman has joined #crystal-lang
bungoman has quit [Max SendQ exceeded]
Yxhuvud has joined #crystal-lang
Nik736 has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
x0f_ is now known as x0f
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<Yxhuvud> Hmm. Is it intentional to not have a default handler for C-c C-c that exit the program?
<BlaXpirit> Yxhuvud, i don't understand
<Yxhuvud> well a default handler to whatever interrupt is usually generated for C-c C-c. That would be SIGINT, perhaps?
<BlaXpirit> Yxhuvud, nothing is done against it. i've been able to interrupt just fine.
<Yxhuvud> hmm. seems it handles SIGQUIT but not SIGQUIT by quitting.
<Yxhuvud> the second sigquit shoudl be sigint.
coderobe has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
steenuil has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
ssvb has quit [Ping timeout: 276 seconds]
Philpax has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
ssvb has joined #crystal-lang
Philpax has joined #crystal-lang
<RX14> whyy is unbuffered_read private
<RX14> i'm trying to use an inotify file descriptor for fucks sake
<RX14> i can't read 8192 bytes
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]