RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
akaiiro has joined #crystal-lang
bds has joined #crystal-lang
akaiiro7 has joined #crystal-lang
akaiiro has quit [Read error: Connection reset by peer]
bds has quit [Ping timeout: 252 seconds]
akaiiro7 has quit [Ping timeout: 246 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
<FromGitter> <girng> i'm going to just use puts and gets instead of read_bytes and see if the delay is there
zorp_ has quit [Ping timeout: 272 seconds]
<FromGitter> <girng> ok just tested it with puts and gets, same exact thing. hmm i wonder what could be causing this
baweaver is now known as baweaver_away
Vexatos has quit [Ping timeout: 252 seconds]
RX14 has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter> <ninetailschris> https://carc.in/#/r/4v86 Any reason why I can access the nested array?
<FromGitter> <newtonapple> @ninetailschris u have to use `a[0][1].as(Array)[0]`
<FromGitter> <newtonapple> that's how i read it anyway.
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
ashirase has quit [Ping timeout: 260 seconds]
ashirase has joined #crystal-lang
DTZUZO has joined #crystal-lang
zorp_ has joined #crystal-lang
<FromGitter> <codenoid> :( it's too hard, to find crystaller in southeast asia
<FromGitter> <j8r> You can enventually find Rubyists to convert @codenoid 😁
<FromGitter> <codenoid> it's hard to find available and skilled Rubyists too :(
<FromGitter> <asterite> codenoid where are you from?
<FromGitter> <codenoid> @asterite indonesia
<FromGitter> <j8r> @codenoid what the most common dev skills around?
<FromGitter> <codenoid> PHP
<FromGitter> <j8r> meh... other topic, I've found a way to follow redirections :D `HTTP::Client.follow("http://redd.it").get` . I'll send a PR
<FromGitter> <j8r> I don't know what specs I can add to test redirections
<FromGitter> <j8r> My implementation may not be really clean, but nice on the API side. We'll see on the PR
Yxhuvud has quit [Remote host closed the connection]
return0e has quit [Ping timeout: 244 seconds]
return0e has joined #crystal-lang
ua_ has quit [Ping timeout: 240 seconds]
sagax has quit [Read error: Connection reset by peer]
Yxhuvud has joined #crystal-lang
bds has joined #crystal-lang
<FromGitter> <asterite> j8r: following redirects is very easy. The problem is how to design it in a flexible way (you don't always want to follow redirects automatically, I think). I don't think a PR will be accepted just as is without a previous discussion (which exists: #6011)
<RX14> if i break the windows linker now what am I meant to do
<FromGitter> <asterite> Welcome to compiler development, where anything can happen :-)
<RX14> yeah well I don't even have the sourcecode to this compiler :P
<RX14> "a heap has been corrupted"
<RX14> in ntdll
ua has joined #crystal-lang
<RX14> well time to try clang-cl
DTZUZO has quit [Ping timeout: 272 seconds]
<RX14> i just accidentally cross-compiled the compiler because process_spec depends on it
bds has quit [Ping timeout: 240 seconds]
<RX14> and cross-compilng anything with a macro run is still broken :(
<FromGitter> <j8r> Thanks @asterite I'll do a POC branch before submiting it as a PR, and add a message in the discussion
<RX14> lol just shoving {{ @type }} into {% if flag?() %} macros in constructors to make ivar type inference work correctly
oz has quit [*.net *.split]
avdi has quit [*.net *.split]
andersh has quit [*.net *.split]
f1refly has quit [*.net *.split]
Guest47999 has joined #crystal-lang
f1refly has joined #crystal-lang
<RX14> and my exception handling still has bugs :C
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
bds has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
<FromGitter> <Blacksmoke16> how would you handle catching an exception and trying it again, Ruby had the `retry` keword
<FromGitter> <j8r> You could put the code in a method and rexecute it
akaiiro7 has joined #crystal-lang
<oprypin> Blacksmoke16, a loop.
<FromGitter> <Sija> @Blacksmoke16 if u need sth more fancy I made https://github.com/Sija/retriable.cr
<FromGitter> <Sija> but for simple retry it might be an overkill
bds has quit [Ping timeout: 250 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
<FromGitter> <girng> is tcp's nagle aglorithm supposed to be disabled on the server or the socket??
<FromGitter> <girng> because it's in the docs for tcpsocket, and for TCPServer and not sure. hell, i'll just do it on both to make sure
DTZUZO has joined #crystal-lang
<FromGitter> <girng> ok. @opyrpin i disabled nagles algorithm on both client and server. and getting response times of 60-71ms average through TCP ping, and the ICMP ping to that server is 43-55MS
<FromGitter> <girng> way better than before, right? seems normal range?
<FromGitter> <Blacksmoke16> @Sija neat, might have to look into that, thanks
return0xe has joined #crystal-lang
return0e has quit [Ping timeout: 240 seconds]
<FromGitter> <girng> wait WTF. nagle algorithm can be enabled by the client?
<FromGitter> <girng> that's such crap. i don't want clients to be able to change the way my server communicates
<dom96> Maybe you should just use UDP?
<FromGitter> <girng> i guess it's their fault if they enable nagle, they'll get higher response times (just tested it). so whatever rofl. i'm going to have it disabled with my game by default. if people want to hack they'll just get worse response times idc.
<FromGitter> <girng> @dom96 ya. im going to use udp for player movement data i think
akaiiro7 has quit [Remote host closed the connection]
<FromGitter> <j8r> Dumb question what's the difference between `self.new` and `initialize`? `self.new` avoid allocations?
<oprypin> j8r, `def self.new(stuff); result = self.allocate(); result.initialize(stuff); return result`
<oprypin> (except u cant actually call initialize but the language does it)
<FromGitter> <j8r> so its better to have one initialize, that `self.new` can call, instead of having several initializes overloads calling the "main" initialize
<FromGitter> <Sija> usually you'd specify one `initialize` and several `self.new` overloads (if needed)
commavir has quit [Quit: leaving]
commavir has joined #crystal-lang
<oprypin> j8r, they usually serve a different purpose. the important thing to note is that `initialize` cannot call any other method, which significantly hampers code reuse. that's why you sometimes have to rely on `self.new`. but other than that, yes, just `def initialize`.
Vexatos has joined #crystal-lang
hightower2 has quit [Ping timeout: 240 seconds]
<FromGitter> <girng> what is difference between declarative and imperative for example here (https://github.com/godotengine/godot/issues/19602#issuecomment-417875273) i always see it get used a lot
<FromGitter> <girng> can sum1 plz give me a code example in crystal of the difference would help a lot ;)
baweaver_away is now known as baweaver
<oprypin> girng, search the terms in google.
hightower2 has joined #crystal-lang
<FromGitter> <j8r> @girng declarative = ~ configuration, imperative =~ code
<FromGitter> <girng> so a method is declarative, and the code inside the method block = imperative?
<FromGitter> <girng> correct?
<FromGitter> <ninetailschris> You don't think he has google it?
<FromGitter> <girng> i googled and reading this https://codeburst.io/declarative-vs-imperative-programming-a8a7c93d9ad2
<FromGitter> <girng> i'm just trying to appluy what i read to crystal code
<FromGitter> <girng> so i can fully understand
<FromGitter> <ninetailschris> Yea, that was what I thought. Just thought his reply was weird is all.
<FromGitter> <girng> it's fine, oprypin is rough w/ me but he's far smarter andi ask dumb questions sometimes so it's understandable lol
<FromGitter> <Sija> :D
<FromGitter> <Sija> wow @oprypin, when did u get snatched into Google?
<FromGitter> <Sija> working for the intelligence, that’s where bright minds end up these days...