<FromGitter>
<bararchy> "but it's too fat for some purpose" XD
<FromGitter>
<bararchy> lol @sdogruyol you'r Kemal is so fat it needs 0.01 sec to boot !
<FromGitter>
<bararchy> btw, how comes there is such a different between Kemal and router_cr ?
<FromGitter>
<sdogruyol> lol
<FromGitter>
<sdogruyol> it's not doing the same thing as Kemal
<FromGitter>
<sdogruyol> less features :P
<FromGitter>
<sdogruyol> it also uses radix though
<FromGitter>
<bararchy> Also, what exactly are the things getting tested here ? ⏎ "Measuring response times for each framework" , response time for what ? a single request ? a max out of 10k concurrent connections ?
<FromGitter>
<sdogruyol> not sure about that
rumenzu has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter>
<codenoid> btw my routercr sometime is broke, not like my kemal
rohitpaulk has quit [Ping timeout: 246 seconds]
Qchmqs__ has joined #crystal-lang
Qchmqs__ is now known as Qchmqs
<FromGitter>
<krypton97> @sdogruyol in the kemal source code, the static handler is not disabled
<FromGitter>
<krypton97> for that benchmark
<FromGitter>
<krypton97> In case it would affect
rohitpaulk has joined #crystal-lang
<Groogy>
hmm do anyone have some benchmarks they trust on Lua performance compared to like C++ and Crystal?
bmcginty has quit [Ping timeout: 252 seconds]
bmcginty has joined #crystal-lang
<FromGitter>
<Fanna1119> @GetRektByMe never mind missed something out of my question :D
<FromGitter>
<krypton97> Groovy, what's so special about LUA:)? I know they use it in AAA industry if I'm not wrong
<FromGitter>
<jose-rodrigues> @krypton97 it's supposed to bes the fastest script language
<FromGitter>
<jose-rodrigues> And it works great with c++
<FromGitter>
<jose-rodrigues> besides that I don't see why it's special
<Groogy>
Lua*, it's a name
<Groogy>
it's used in a game I'm gonna be alpha tester for
<Groogy>
so you can code stuff in the game
<Groogy>
so just want to know how limiting the performance is
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 252 seconds]
maxpert has joined #crystal-lang
maxpert has quit [Ping timeout: 248 seconds]
_4d47 has joined #crystal-lang
<FromGitter>
<jose-rodrigues> @Groovy From all the benchmarks I've seen it's similar to JS. (I can't affirm they are legit)
<FromGitter>
<krypton97> I've always thought that JS is the fastest scripted language lol
<FromGitter>
<krypton97> BTW, is here someone working with bitcoins? I've got some and I dont know if I should stack them or covert them
<FromGitter>
<krypton97> From what I've read it'll keep growing but that's speculations ofc
<FromGitter>
<sdogruyol> @krypton97 it affects
<FromGitter>
<sdogruyol> Disabling static file improves kemal performance
<livcd>
krypton97: well those $$$ invested in Chrome and v8 have to show somewhere no?
<livcd>
krypton97: btcs. It depends. Do you need $ right now ? My friend had 50btcs. Sold 30 when it was 400 and paid for his car. Saved 20 to this day.
<FromGitter>
<krypton97> I'll submit a pool reqiest disabling the static handler
<FromGitter>
<krypton97> @livcd I'ma stack them for now. I remember I read that js was written in just 10 days lol
<FromGitter>
<krypton97> Es6 makes it much better though
rohitpaulk has quit [Ping timeout: 252 seconds]
<livcd>
krypton97: JS feels very weird to me I can't get used to it even with the syntactic sugare with ES6. prototypes and inheritance and the rest remains
rohitpaulk has joined #crystal-lang
<FromGitter>
<krypton97> es6 makes it even weird with templatates strings, proxies and so on :)
<livcd>
it's sad to see js to be that popular
<FromGitter>
<krypton97> wait no no no,
<FromGitter>
<krypton97> U can code on desktop, mobile and browser with js
<FromGitter>
<krypton97> Things like react-native makes it more and more cool
<FromGitter>
<krypton97> and despite that, there's a lot of well paid node.js/frontend jobs
<livcd>
I get it I just do not enjoy JS and it's sad to see it used for everything everywhere
<crystal-gh>
[crystal] ZeWebDev opened pull request #4925: Process markdown in block quotes (master...master) https://git.io/v5uU3
<livcd>
it is really admirable for him to say something like that
maxpert has joined #crystal-lang
alex``` has quit [Quit: WeeChat 1.9]
alex`` has quit [Quit: WeeChat 1.9]
maxpert has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
Philpax__ has joined #crystal-lang
DTZUZO has joined #crystal-lang
sz0 has joined #crystal-lang
<FromGitter>
<codenoid> I do not know, if not yet understand the problem (like his), or how, obviously I have edited this file several times https://goo.gl/rPd7Yc :/
rohitpaulk has joined #crystal-lang
<FromGitter>
<krypton97> what's the equivalent of js `slice(begin, end)` method in crystal
<FromGitter>
<krypton97> ?
<FromGitter>
<krypton97> nvm
<FromGitter>
<krypton97> string[start..end-1] works like a charm
<txdv>
its like ruby
<FromGitter>
<krypton97> well thanks, but no ruby background
<FromGitter>
<krypton97> not even python :P
<txdv>
what is your background?
<txdv>
mine is dark and very abstract
<Groogy>
my background is a picasso painting
<FromGitter>
<krypton97> ctx.Background()
<FromGitter>
<krypton97> if you're familiar with go
<FromGitter>
<krypton97> jokes aside, I've started with c++ and got into node.js, go and crystal now
<FromGitter>
<sdogruyol> Interesting
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter>
<krypton97> still using node on frontend
<FromGitter>
<krypton97> npm is great
Philpax__ has quit [Ping timeout: 260 seconds]
<txdv>
isn't bower like the npm for frontend stuff
<FromGitter>
<crisward> bower was so 2014. Actually that's js all over.
<FromGitter>
<crisward> Also JS->crystal on back end
<FromGitter>
<crisward> Actually I've gone js->coffee->crystal on backend and js->coffee->ts on front end
Gasher has joined #crystal-lang
<Gasher>
hello, how to check if a function is defined?
<FromGitter>
<crisward> I'm guessing it won't compile if it doesn't exist. Do you mean a method on a object?
<FromGitter>
<krypton97> try catch block with ensure rescu
<FromGitter>
<krypton97> I've checked raze and doesn't seem to have port reuse by default and got ranked #2
<FromGitter>
<drujensen> he is not providing specs for his benchmark
<FromGitter>
<drujensen> so its hard to say if it will affect them
<FromGitter>
<bararchy> ```code paste, see link```
<FromGitter>
<bararchy> Oh ...
<FromGitter>
<bararchy> the kernel performs some "special magic" for SO_REUSEPORT sockets that isn't found in other operating systems: For UDP sockets, it tries to distribute datagrams evenly, for TCP listening sockets, it tries to distribute incoming connect requests (those accepted by calling accept()) evenly across all the sockets that share the same address and port combination. Thus an application can easily open the same port
<FromGitter>
... in multiple child processes and then use SO_REUSEPORT to get a very inexpensive load balancing.
<FromGitter>
<krypton97> I worry more about the haircut I got than those benchmakrs :). Just forget about that techempower crap, seeing node.js being better than a compiled language tells me all I need bout that site
<FromGitter>
<luislavena> perhaps the bottleneck is the DB driver itself
<FromGitter>
<drujensen> ok, I will look at Amber and Kemal to see what happened with them. we must be doing something wrong
<RX14>
yeah
<RX14>
the DB driver needs optimisation
<RX14>
@drujensen yeah making a framework ;)
<RX14>
you can't have your cake and eat it
<FromGitter>
<luislavena> Perhaps the issue is the connection pool, I remember having some minor details with that when doing some testing last year (getting older)
<RX14>
once you start piling a framework on you're nturally going to have bad performance
<FromGitter>
<sdogruyol> the cake is a lie
<FromGitter>
<sdogruyol> @RX14
<RX14>
well worse performance
<RX14>
kemal and amber can do a *lot* better
<FromGitter>
<drujensen> yes they can
<FromGitter>
<drujensen> any help is appreciated. We should be close to crystal speed
<FromGitter>
<sdogruyol> I'm curious to see when native parallelism lands in Crystal
<FromGitter>
<sdogruyol> hope we don't go way down in these benchmarks
<RX14>
well
<RX14>
go-prefork is the only go higher than us in the tests
<FromGitter>
<luislavena> @sdogruyol native parallelism might introduce %age of slowdown
<RX14>
and it does that by doing what we do
<RX14>
preforking and using the same socket
<RX14>
instead of their native goroutines
<FromGitter>
<sdogruyol> yeah
<FromGitter>
<luislavena> Question, are the tests using `nproc --all` as total number? or doing N-1?
<RX14>
it launches nproc --all crystal processes
<RX14>
which actually I think is too many
ShalokShalom has quit [Ping timeout: 248 seconds]
<RX14>
since the GC is multithreaded there will be a lot of context switching from that
<RX14>
maybe i should experiment with GC_NPROCS
<FromGitter>
<drujensen> it launches one extra thread for GC, correct?
<RX14>
many
<RX14>
and with 64 processes and 64 cores
<FromGitter>
<drujensen> ah, didn’t know that
<RX14>
it probably isn;t pretty
rumenzu has quit []
<FromGitter>
<drujensen> at crystal code camp they made it sound like it was one
<FromGitter>
<drujensen> which wouldn’t tax context switching at all
<FromGitter>
<drujensen> how many threads are launched by GC?
<FromGitter>
<sdogruyol> nope GC is multithreaded @drujensen
<FromGitter>
<drujensen> that makes a huge difference
<FromGitter>
<drujensen> I didn’t realize that
<RX14>
actually
<FromGitter>
<drujensen> is it unmanaged threads?
<RX14>
it's limited to 16 threads
<FromGitter>
<drujensen> or a pool
<FromGitter>
<drujensen> 👍
<RX14>
well it's a pool of 16 thread for the GC per process
<RX14>
and we have 64 processes
<FromGitter>
<drujensen> ouch
<FromGitter>
<drujensen> ok, I see your concern with context switching now
<FromGitter>
<drujensen> that starts to add up
<FromGitter>
<drujensen> is it configurable?
<RX14>
yes
<RX14>
but kinda hard to test
<RX14>
without a crazy machine like theirs
<RX14>
with like 64 cores
<FromGitter>
<drujensen> right
ShalokShalom has joined #crystal-lang
<FromGitter>
<drujensen> is there a reason the GC needs 16 threads? How does it deal with blocking?
<FromGitter>
<drujensen> nvm, I guess its time to look at source code
rohitpaulk has quit [Ping timeout: 264 seconds]
<Yxhuvud>
I don't know if the gc needs all threads, but it probably blocks all execution on all threads.
<Yxhuvud>
ie stop the world. ok if you only care about throughput, but crappy for latency dependent tasks.
<FromGitter>
<drujensen> right, it seems like it would be a global block so not sure what the 16 threads would be doing.
chamar has quit [Read error: Connection reset by peer]
<FromGitter>
<drujensen> there is no reason for kemal to be this different than crystal. I would love to find out why.
flaviodesousa has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter>
<drujensen> when we ran amber on a 32 core system, we were getting almost a million requests per second
<FromGitter>
<drujensen> this is showing ~100K per second on a 64 core system
<FromGitter>
<drujensen> I was expecting close to 2 million per second
maxpert has joined #crystal-lang
sifi has quit [Quit: WeeChat 1.9]
maxpert has quit [Ping timeout: 248 seconds]
<FromGitter>
<krypton97> Trashe
<FromGitter>
<krypton97> Trashempower*
<FromGitter>
<krypton97> I've run a lot of benchmarks, idk where they got those poor results
jplatte has quit [*.net *.split]
byteflame has quit [*.net *.split]
justinmcp has quit [Write error: Broken pipe]
Yxhuvud has quit [Write error: Broken pipe]
Yxhuvud has joined #crystal-lang
justinmcp has joined #crystal-lang
daemonwrangler has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #crystal-lang
daemonwrangler has joined #crystal-lang
byteflame has joined #crystal-lang
jplatte has joined #crystal-lang
<crystal-gh>
[crystal] asterite opened pull request #4927: Macros: try call for unknown var (master...feature/macro-call-no-parentheses) https://git.io/v5uSe
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maxpert has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
maxpert has quit [Ping timeout: 240 seconds]
snsei has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]