maxpert has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter>
<pawandubey> So does Crystal not support type Polymorphism? If I declare a variable to be an array of Super type, it seems that I cant add elements of a subtype to it?
<FromGitter>
<pawandubey> Or maybe I am missing something very obvious
<FromGitter>
<pawandubey> Hmm, seems like it's actually only that If `U < T` then `Array(U)` is not a subtype of `Array(T)`
<FromGitter>
<faustinoaq> I think we need to compare apples vs apples: ⏎ ⏎ Amber/Kemalyst is full, then it should be compared with other full frameworks:
<FromGitter>
<bararchy> BTW , it could be writing to socket and not file , same error text
<FromGitter>
<drujensen> your right, its sockets
balduin has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<FromGitter>
<drujensen> so @elorest and I are getting about a 25% reduction using amber vs raw crystal on a 64 core system.
<FromGitter>
<krypton97> early morning here, did you guys find the potential issue?
<FromGitter>
<drujensen> this is expected considering the routing and middleware we are using in amber.
<FromGitter>
<drujensen> no, we can’t replicate the issue
<FromGitter>
<drujensen> we are getting ~1m req per sec using Amber and ~1.3m req per sec using Crystal Raw
<FromGitter>
<drujensen> we are seeing the socket issues for both if we bump up the concurrency
<FromGitter>
<drujensen> but I don’t think this is the issue
<FromGitter>
<krypton97> How is kemal doing?
<FromGitter>
<krypton97> same issues?
<FromGitter>
<drujensen> kemal/kemalyst/amber are all pretty much =
<FromGitter>
<drujensen> kemal is going to be slightly faster
<FromGitter>
<drujensen> or should be. .:-)
snsei has joined #crystal-lang
<FromGitter>
<krypton97> hehe. We should include raze to that techempower benchmark to see if it's gets the pipe issue. But if it's build the same as kemal, might be pointless
<FromGitter>
<drujensen> yeah, its doing the same as kemal/kemalyst
<FromGitter>
<drujensen> handlers are exactly the same
<FromGitter>
<drujensen> might be just copied
<FromGitter>
<drujensen> anyway, still haven’t tracked down why the benchmarks are slow
<FromGitter>
<drujensen> going to bed
rumenzu has joined #crystal-lang
<FromGitter>
<krypton97> here's early morning:). Have a nice sleep;)
<FromGitter>
<drujensen> thx
<FromGitter>
<bararchy> Are they testing with wrk ?
voloyev has joined #crystal-lang
maxpert has joined #crystal-lang
<FromGitter>
<sdogruyol> Morning everyone
<vegai>
hello
maxpert has quit []
rohitpaulk has quit [Ping timeout: 240 seconds]
mark_66 has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
snsei has quit [Remote host closed the connection]
flaviodesousa has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<Groogy>
Morning @sdogruyol!
<Groogy>
also I hate it, my IRC client can't autocomplete the FromGitter names since those names aren't a user in the channel xD
claudiuinberlin has quit [Client Quit]
<FromGitter>
<sdogruyol> morning @Groogy
<FromGitter>
<sdogruyol> i don't like it too :D
claudiuinberlin has joined #crystal-lang
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
alex`` has joined #crystal-lang
alex`` has quit [Client Quit]
alex`` has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter>
<sdogruyol> does casting `as(String)` e.g have a performance penalty?
<FromGitter>
<bararchy> The better question is does `.as(String)` faster then `.to_s`
Tuxified has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<Svenskunganka> Seems like Crystal does much worse for the tests that needs to hit the database, and much better for the JSON Serialization and Plain Text tests. Perhaps there is a bottleneck with the will/pg shard?
<FromGitter>
<Svenskunganka> Crystal does well for the Plain Text and JSON Serialization benchmarks, but much worse for the others; Single query, Multiple queries, Fortunes and Data updates
<txdv>
how is netty so fast
<txdv>
i guess the sql drivers are bad or something
<FromGitter>
<Svenskunganka> The only database driver implementation for the benchmark is Postgres. But there is a crystal/crystal-mysql driver
<txdv>
postgres is usually faster
<FromGitter>
<krypton97> yep
<FromGitter>
<Svenskunganka> The driver or the database?
<FromGitter>
<krypton97> lol. He is talking in general
<txdv>
the driver
<FromGitter>
<Svenskunganka> hmm
<txdv>
plaintext beats the shit out of a lot of others
<txdv>
and the source code is not hard to follow in crystal compared to some competitors
<FromGitter>
<Svenskunganka> yea, and crystal does not have parallelism yet either
<FromGitter>
<Svenskunganka> atm I think it's spawning one process per core via a `.sh` script
<FromGitter>
<Svenskunganka> The latency for the plaintext is pretty odd though, averaging at 313.5 ms
<FromGitter>
<krypton97> any workaround for inserting nested fields in an empty array?
<FromGitter>
<bararchy> Anyone from crystal-lang-tools here ?
<FromGitter>
<bararchy> @tsunderbug or @keplersj ?
<FromGitter>
<bew> @krypton97 what do you mean?
<FromGitter>
<cevarief> > Crystal does well for the Plain Text and JSON Serialization benchmarks, but much worse for the others; Single query, Multiple queries, Fortunes and Data updates ⏎ ⏎ Yes, It needs db driver optimization
<FromGitter>
<krypton97> @bew I've an empty array where I wanna push parsed graphql fields. Sometimes I get nested hashes/named tupples and won't match the array format..
<FromGitter>
<bew> I think you need to have an array of the correct type to push what you want, or you need to convert the nested stuff into the array format you defined.. What's the type of your array?
<FromGitter>
<krypton97> [] of Array(Hash(String,..))
<FromGitter>
<krypton97> The size of the field is based on the user's query
<FromGitter>
<krypton97> That's not gonna work, have to find a workaraound
<FromGitter>
<bew> I think you need a union of all possible things you can put in your hash, and use this resulting type as hash value
<FromGitter>
<krypton97> Ouch, don't wanna go this way
<FromGitter>
<krypton97> Since it will parse a graphql query
<FromGitter>
<bew> or wrap what you can have in a type hierarchy, and use the top parent type in the hash?
<FromGitter>
<krypton97> I'll handle it, thanks
claudiuinberlin has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter>
<bararchy> a few hours before, I get a no method for nil error ⏎ so I ask the other dev, what the return type is for this method ? String | Nil ?
<FromGitter>
<bararchy> and hes like ... dude what ?
<FromGitter>
<kazzkiq> They're generally small videos, would take no more than one hour to do (besides presentation), and would be a great approach in terms of marketing
<FromGitter>
<kazzkiq> Perhaps Crystal core devs could work in something like that, addressing common concerns and questions about the language in every talk.
<FromGitter>
<kazzkiq> And we, as community could help by paying for those hours... It generates knowledge, its good for the marketing, and also has financial advantages for core devs
<FromGitter>
<opensas> I mean, I had the same issue compiling with --release with latest ubuntu release, there are a couple of tickets in gh, seems to be a known issue, at least in ubuntu