ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.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
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)`
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <faustinoaq> > there is no reason for kemal to be this different than crystal ⏎ ⏎ @drujensen Maybe https://github.com/TechEmpower/FrameworkBenchmarks/pull/2926 wasn't in Preview 2
rohitpaulk has joined #crystal-lang
sp4rrow has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<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> <faustinoaq> Kemal is micro, then it should be compared with other micro frameworks:
rohitpaulk has joined #crystal-lang
<FromGitter> <picatz> 👍
<FromGitter> <codenoid> agree
<FromGitter> <faustinoaq> Crystal as raw, should be compared with other raw implementations: (well, no the first but between gigants)
snsei has quit [Remote host closed the connection]
<FromGitter> <drujensen> @faustinoaq thanks for showing that but I’m still convinced we should be getting around 2m req per second
<FromGitter> <picatz> 👍 to that too.
<FromGitter> <faustinoaq> Yes, I'm convinced too. I think we need to find the perfect configuration for that.
<FromGitter> <drujensen> working with @elorest on a 64 core system as we speak
<FromGitter> <faustinoaq> Hey @drujensen I found so many `Error writing file: Broken pipe (Errno)` here http://tfb-logs.techempower.com/round-15/preview-2/kemalyst/out.txt
<FromGitter> <faustinoaq> What that's mean?
<FromGitter> <drujensen> @faustinoaq interesting. didn’t know you could see the raw results.
<FromGitter> <faustinoaq> Yeah, the same for kemal http://tfb-logs.techempower.com/round-15/preview-2/kemal/out.txt
<FromGitter> <faustinoaq> But `crystal-raw` is clean http://tfb-logs.techempower.com/round-15/preview-2/crystal-raw/out.txt and doesn't show these errors .
<FromGitter> <faustinoaq> Also seems Amber results are here 👉 http://tfb-logs.techempower.com/round-15/preview-2/amber/
<FromGitter> <drujensen> yeah, not sure why they didn’t show up in the site
<FromGitter> <faustinoaq> > ... on a 32 core system, we were getting almost a million requests per second ⏎ ⏎ @drujensen now I understand you
<FromGitter> <faustinoaq> > this is showing ~100K per second on a 64 core system ⏎ ⏎ Is a 80 core system 😅
<FromGitter> <drujensen> @faustinoaq exactly
<FromGitter> <faustinoaq> Seems very strange
<FromGitter> <faustinoaq> @drujensen but the amout of amber/kemal/kemalyst/crystal processes was 80 as we expected 👇
<FromGitter> <drujensen> yeah
<FromGitter> <drujensen> so its something else blocking - fileio
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <faustinoaq> Perhaps, 👆 this huge amount of errors is the clue.
<FromGitter> <drujensen> yeah
<FromGitter> <faustinoaq> The same errors are shown in Kemalyst and Kemal logs, but not Crystal
<FromGitter> <drujensen> yup
<FromGitter> <drujensen> and writing file
<FromGitter> <drujensen> is that blocking?
snsei has joined #crystal-lang
<FromGitter> <faustinoaq> I think so, if it's, we just found the bottleneck
<FromGitter> <drujensen> 👍
<FromGitter> <drujensen> need to find out what is trying to write to files
<FromGitter> <bararchy> Cool finds guys
<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?
<txdv> didnt techempower release new results?
<txdv> what is the link for the preview results?
<txdv> crystal my boy so fast
<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> <Svenskunganka> While the JSON serialization latency averages at 0.5 ms
<txdv> that is odd
<txdv> but all the top entries have high response time
<txdv> look at netty
<txdv> tokio-minhttp
<FromGitter> <Svenskunganka> Yea, probably some problems not related to Crystal on that test. But it's preliminary
<FromGitter> <bew> @sdogruyol @bararchy no penalty, `.as(String)` is compile time information for the compiler, while `.to_s` is at runtime!
<txdv> every single one which is has more throughput than crystal has an higher response time
<txdv> coincidence? i think not
<FromGitter> <Svenskunganka> ⃤
bmcginty has quit [Ping timeout: 240 seconds]
<txdv> is crystals regex editor different?
bmcginty has joined #crystal-lang
<txdv> webassembly + crystal
<txdv> hmmm
<txdv> that will be tasty
<FromGitter> <Svenskunganka> @veelenga https://regex101.com/ is pretty good
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 240 seconds]
ShalokShalom_ is now known as ShalokShalom
Qchmqs__ has joined #crystal-lang
Qchmqs__ is now known as Qchmqs
<jokke> Groogy: me too
<Groogy> Huh?
<Groogy> oh on the autocomplete
alex`` has quit [Quit: WeeChat 1.9]
rohitpaulk has quit [Ping timeout: 240 seconds]
<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> can you carcin an example?
<FromGitter> <krypton97> *around
<FromGitter> <krypton97> k
<FromGitter> <krypton97> https://carc.in/#/r/2o4d
<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> <bararchy> XD
<FromGitter> <bararchy> Crystal \ Ruby context switching hahha
<FromGitter> <faustinoaq> XD
<FromGitter> <bararchy> Crystal -> "Teaching proper ruby programming sinse 2005"
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <faustinoaq> > Anyone from crystal-lang-tools here ? ⏎ ⏎ Was you asking for intellij-idea plugin?
<FromGitter> <bararchy> Yeha
<FromGitter> <bararchy> need some help with it
rohitpaulk has joined #crystal-lang
<FromGitter> <faustinoaq> I haven't been able to install it yet, Intellij idea 2017.2.2 shows me an error, I'm using this zip file (https://github.com/crystal-lang-tools/intellij-crystal/issues/1#issuecomment-320493153)
<Groogy> In our internal chat people arguing about how much they either love or hate auto
<Groogy> so I said "Oh boy you haven't seen nothing yet"
<Groogy> and showed them a bit of Crystal code
<FromGitter> <bararchy> Groogy XD
<FromGitter> <bararchy> @faustinoaq So were in the same boat
<FromGitter> <bararchy> I'm trying to install it on RubyMine but it should be the same no ?
Qchmqs has quit [Quit: Konversation terminated!]
<FromGitter> <faustinoaq> I think so
<Groogy> lol I killed the conversation xD
<Groogy> think people can't believe it
_4d47 has joined #crystal-lang
<FromGitter> <bararchy> Groogy You showcase ego ? ;)
<FromGitter> <mverzilli> show them this: https://crystal-lang.org/2015/04/01/auto.html
<Groogy> haha no I just talked about the compile error for nil
<Groogy> i.e the biggest benefit imo
<FromGitter> <sdogruyol> 💯
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <bararchy> btw, do we need "security issues mailing list" ?
<FromGitter> <bararchy> or some closed off place to publish seciruty issues for Crystal ?
<FromGitter> <faustinoaq> https://crystal-lang.org/community/
<FromGitter> <faustinoaq> @bararchy 👆
<FromGitter> <bararchy> Cool
<FromGitter> <bararchy> I guess this should be there -> https://github.com/crystal-lang/crystal/issues/2817
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
claudiuinberlin has quit [Client Quit]
claudiuinberlin has joined #crystal-lang
claudiuinberlin has quit [Client Quit]
voloyev has quit [Quit: WeeChat 1.9]
<FromGitter> <codenoid> when crystal team live in dev.to ?
<FromGitter> <codenoid> 5/09/17 here
<FromGitter> <Svenskunganka> @codenoid 20:00 - 22:00 GMT+2 for me. If you have a Google account, you can click this link (http://www.google.com/calendar/event?action=TEMPLATE&dates=20170906T180000Z%2F20170906T200000Z&text=Crystal%20Lang%20Team%20AMA%20on%20dev.to&location=https%3A%2F%2Fdev.to%2Ft%2Fama&details=Don%27t%20miss%20the%20Crystal%20Lang%20Team%27s%20AMA%20on%20dev.to!%20%20Head%20to%20https%3A%2F%2Fdev.to%2Ft%2Fama) and
<FromGitter> ... see what time it is in your timezone.
claudiuinberlin has joined #crystal-lang
<FromGitter> <codenoid> tomorrow, thank @Svenskunganka , 📺
<FromGitter> <mgarciaisaia> It's in 27 hours :P
<FromGitter> <mgarciaisaia> Dev.to's #ama page has a Calendar link: https://dev.to/t/ama
<FromGitter> <codenoid> ^^ 🍟 👍
mark_66 has quit [Read error: Connection reset by peer]
rohitpaulk has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
hightower3 has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower4 has quit [Ping timeout: 240 seconds]
Tuxified has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower4 has joined #crystal-lang
<Yxhuvud> Groogy: funnily enough, I find the compile error for nilable variables being the nicest coming from a ruby background as well
<FromGitter> <sdogruyol> Well
<FromGitter> <sdogruyol> For me ⏎ 1 - Union Types ⏎ 2 - Compile Time
<FromGitter> <sdogruyol> <3
hightower3 has quit [Ping timeout: 255 seconds]
<Yxhuvud> well, the nilable checks is mostly a nice consequence of how union types are implemented.
rohitpaulk has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
Tuxified has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tuxified has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
rumenzu has quit []
<FromGitter> <bararchy> Will it be recorded somehow ? I would love to watch it but not sure I can live
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <kazzkiq> I was thinking... how hard would it be to create youtube talks about Crystal? Some examples: ⏎ https://www.youtube.com/watch?v=L_rCbMze2PMhttps://www.youtube.com/watch?v=kD0j2BwgF7c
<FromGitter> <sdogruyol> Not that hard
<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
ishahnaz has joined #crystal-lang
ishahnaz has quit [Client Quit]
Gasher^ has joined #crystal-lang
<Gasher^> hello everyone! I'm getting the following error when trying to compile a file with --release: https://gist.github.com/anonymous/6ece029872b075d6cff54de9e2e11e43
<FromGitter> <krypton97> --no-debug
<FromGitter> <krypton97> this should be fixed
<FromGitter> <krypton97> or at least make the compiler specifies to use --no-debug instead
<Gasher^> thanks a lot @krypton97
<Gasher^> is it an issue or is the compiler configured not to use debugging when using release??
<FromGitter> <krypton97> no issues
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
snsei has joined #crystal-lang
<oprypin> Gasher^, broken compiler release due to compiling on one ancient distro and running on another ancient distro
<FromGitter> <sdogruyol> :D
<Gasher^> well, I am using it on an unsupported distro actually xD
snsei has quit [Ping timeout: 246 seconds]
claudiuinberlin has joined #crystal-lang
<oprypin> u seeing this? https://github.com/
<oprypin> > Access to CSS stylesheet at 'https://assets-cdn.github.com/assets/frameworks-9e1db7aa5e35573e7a01331c4afc4d3df80c21f118c6c727900d5e032e7dd7b4.css' from origin 'https://github.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://github.com' is therefore not allowed access. The response had HTTP status code 404.
<RX14> yes
<RX14> everyone is oprypin
<oprypin> yep
<RX14> started ~10m ago
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<wmoxam> GH css is back :D
Tuxified has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] jhass closed pull request #4921: Changed IO.read_line to return String rather than String? (master...fix-io-read_line-return-type) https://git.io/v50xe
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> crystal-lang/crystal#78ced25 (master - Merge pull request #4921 from Sija/fix-io-read_line-return-type): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/272180888
<crystal-gh> [crystal] mverzilli closed pull request #4927: Macros: try call for unknown var (master...feature/macro-call-no-parentheses) https://git.io/v5uSe
sp4rrow has joined #crystal-lang
Gasher^ is now known as Gasher
claudiuinberlin has joined #crystal-lang
sp4rrow has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#4ee74ae (master - Macros: try call for unknown var): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/272191983
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<travis-ci> crystal-lang/crystal#78ced25 (master - Merge pull request #4921 from Sija/fix-io-read_line-return-type): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/272180888
pleiosaur has joined #crystal-lang
Tuxified has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> crystal-lang/crystal#78ced25 (master - Merge pull request #4921 from Sija/fix-io-read_line-return-type): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/272180888
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
<travis-ci> crystal-lang/crystal#4ee74ae (master - Macros: try call for unknown var): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/272191983
Gasher^ has joined #crystal-lang
Gasher has quit [Ping timeout: 240 seconds]
<FromGitter> <opensas> @krypton97 agree, had the same issue, the --no-debug should be documented somewhere
<oprypin> opensas, it is in `crystal build --help`
<FromGitter> <codenoid> hi, can I get a link for this bridge bot (bot repo) ?
<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
<FromGitter> <codenoid> thank @oprypin
<FromGitter> <opensas> here's the issue, and my suggestion for documenting it: https://github.com/crystal-lang/crystal/issues/4719#issuecomment-326178245