<FromGitter>
<straight-shoota> Currently each instance of `HTTP::Client` uses exactly one socket for communication. So it's easy to mix up several requests-response-cycles when executed concurrently
<FromGitter>
<straight-shoota> But I guess as long as the request/response data is small and fits into the buffer, a fiber switch in between a cycle might be relatively rare.
<FromGitter>
<straight-shoota> @Souravgoswami I think `%w(\\)` should be a valid literal. That's likely a bug. Please open an issue!
<FromGitter>
<Blacksmoke16> yea the response is pretty small
livcd has quit [Quit: Lost terminal]
<FromGitter>
<Blacksmoke16> wish there was a class exec method that accepts a `HTTP::Request`
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
alexherbo2 has joined #crystal-lang
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Remote host closed the connection]
<Yxhuvud>
No activity at all for half a day? Have the gitter bridge died again?
<FromGitter>
<tenebrousedge> no, it's working
<FromGitter>
<Souravgoswami> Yeah, just read that!
<FromGitter>
<Souravgoswami> By the way guys, it's bad that step enumerator is 1/4th x slower than while loop! :C
<FromGitter>
<Souravgoswami> I was telling my college pal that crystal is faster than his favourite programming language, weirdly Java! ⏎ ⏎ He proved me wrong, java took 0.7 second (after compilation) while crystal took 3 seconds
<FromGitter>
<tenebrousedge> it's hard to write accurate benchmarks, and you should generally not write code based on microbenchmarks
<FromGitter>
<Souravgoswami> Now after replacing the step loop with while loop, crystal takes 0.5 seconds
<FromGitter>
<Souravgoswami> Actually I have done many benchmarks using step , times, upto, downto, map, each enumerators they are 4x slower in Ruby... Same for crystal!
<FromGitter>
<tenebrousedge> that's nice
<FromGitter>
<Souravgoswami> Because of the block, probably?
<Yxhuvud>
Do you run your tests with --release?
<FromGitter>
<tenebrousedge> it's easy to write bad benchmarks
<FromGitter>
<Souravgoswami> Hi @FromIRC , nope!
<FromGitter>
<Souravgoswami> :D
<FromGitter>
<christopherzimmerman> I’ve run into the same issues with benchmarks and iterators
<Yxhuvud>
What results do you get if you add that flag?
<FromGitter>
<christopherzimmerman> The built in benchmark is awful
<FromGitter>
<Daniel-Worrall> Benchmarks should always be run in --release
<FromGitter>
<christopherzimmerman> And it closures lots of variables that really make the results inaccurate for small measurements
<FromGitter>
<Souravgoswami> If you talk about that prime, step loops makes the thing 10x slower!
<FromGitter>
<tenebrousedge> yes, the built in benchmark is an extremely blunt instrument
<FromGitter>
<Souravgoswami> Better just use Time!
<FromGitter>
<christopherzimmerman> Make sure you include ALL setup code inside the block to avoid closures, and measure the setup costs independently as well to factor them out
<FromGitter>
<Souravgoswami> Sure, but that doesn't make step any equivalent to while loop!
<FromGitter>
<Souravgoswami> I have been using while for tests where perf matters... I didn't hope that step() will make it 10x slower though... It got worse perf than java with step()...
<hightower4>
Hey if a module defines some initialize functions, are they not carried over automatically to a class that includes the module?
<FromGitter>
<tenebrousedge> it works
<hightower4>
Strange. I have a case where it's telling me it can't find the matching initialize, yet if I define the same one and just call 'super', it works.
<FromGitter>
<tenebrousedge> do you have a minimal example?
<hightower4>
just creating one
alexherbo2 has joined #crystal-lang
alexherbo2 is now known as alex```
<hightower4>
works when extracted; need to look into it some more
<FromGitter>
<tenebrousedge> :plus1:
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter>
<kingsleyh> hey - how can I get the month as a String from Time.utc? can't find it anywhere in the docs - time.month gives an Int32 - but I want the name of the month e.g. January
<FromGitter>
<kingsleyh> I thought something would exist already that provides this
<FromGitter>
<Daniel-Worrall> `.to_s`
<FromGitter>
<Daniel-Worrall> or use `Time::Format`
<hightower4>
Ah I see what the issue is... I had a couple overloads. But overloads only work based on argument types and not argument names. So when I had two methods, initialize(path : String) and initialize(builtin : String), one of these overrode the other.
<hightower4>
is this expected/accepted behavior?
<FromGitter>
<tenebrousedge> yes
<FromGitter>
<tenebrousedge> it figures out which method you're after based on the types
<FromGitter>
<kingsleyh> Thanks people :)
<hightower4>
sync
<hightower4>
fg
<hightower4>
hm hm.. yeah, I'll need to figure something out here
<FromGitter>
<Souravgoswami> Any idea why I am getting the error? ⏎ ⏎ Can't also use clang
<FromGitter>
<Blacksmoke16> im pretty sure it supports 32 bit systems just not via snap, maybe its something they could enable?
ht_ has quit [Quit: ht_]
<FromGitter>
<Souravgoswami> My ArchLinux is 64 bit where I am running the command. ⏎ ⏎ On linux mint, the same thing happens after copying the .o file