RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.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
<FromGitter> <dscottboggs_gitlab> yeah it's a compile-time option
<FromGitter> <Blacksmoke16> no because they arent constants?
<FromGitter> <dscottboggs_gitlab> sorry I'm not as well versed in macros as you
<mps> ok, late is here, good night to you all
<FromGitter> <Blacksmoke16> o/
<FromGitter> <dscottboggs_gitlab> good night @mps, thank you for your contributions :)
<FromGitter> <Blacksmoke16> currently only way to access annotations is by knowing the type already
<FromGitter> <Blacksmoke16> or have some way to access the `TypeNode` for it
<FromGitter> <Blacksmoke16> but this would allow you to go anywhere and do `Annotation.annotated_types` and get an array of all types that have it applied
<mps> dscottboggs_gitlab: yw, I'm doing it for selfish reason, I like to use crystal :)
<FromGitter> <dscottboggs_gitlab> ok so what about `@type.all_subclasses.select(&.annotation(Foo))` where `Foo` is an annotation
<FromGitter> <Blacksmoke16> that would it to be a subclass of whatever `@type` is
<FromGitter> <Blacksmoke16> this allows for like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3cace20fbe911eeb7aeeb]
<FromGitter> <nsuchy> If anyone can find an issue
<FromGitter> <dscottboggs_gitlab> @Blacksmoke16 I agree, it seems weirdly obvious that you should be able to figure out which types have an annotation on them, if not of at the very least of a specific type, a list of them
<FromGitter> <Blacksmoke16> exactly :P
<FromGitter> <dscottboggs_gitlab> OOOOH I see
<FromGitter> <Blacksmoke16> hence the PR
<FromGitter> <Blacksmoke16> yea
<FromGitter> <Blacksmoke16> has its uses for sure
<FromGitter> <Blacksmoke16> originally i wanted to have athena setup like :
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3cb98c55bd14d35e6fe40]
<FromGitter> <dscottboggs_gitlab> that would be super nice, and would certainly push annotations into a really convenient position.
<FromGitter> <Blacksmoke16> but i ended up liking the subclass setup, so my `Athena::Routing::Controller.all_subclasses` workaround ended up being perfect
<FromGitter> <Blacksmoke16> for sure, prob are or use cases this would be useful
<FromGitter> <Blacksmoke16> something like `MyModel.annotated_ivars(MyAnnotation)` would be cool
<FromGitter> <Blacksmoke16> to return array of ivars with the `MyAnnotation` within `MyModel`
<FromGitter> <dscottboggs_gitlab> yup
<FromGitter> <Blacksmoke16> same idea with methods
<FromGitter> <dscottboggs_gitlab> that's what I was thinking
<FromGitter> <dscottboggs_gitlab> seems almost obvious
<FromGitter> <Blacksmoke16> havent looked into that yet tho, might do that one of these days
<FromGitter> <Blacksmoke16> @nsuchy ill scan through it
<FromGitter> <Blacksmoke16> what are you doing to get that error?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3cca81f6e900d5e33fe3a]
<FromGitter> <Blacksmoke16> looks like a mac env setup issue
<FromGitter> <dscottboggs_gitlab> Oh shit, yeah, OpenSSL on Mac is a bitch
<FromGitter> <dscottboggs_gitlab> I can't run `crystal play` on a macbook
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang/crystal/issues/6875 maybe try that?
<FromGitter> <Blacksmoke16> @dscottboggs_gitlab sadly i think im going to run into https://github.com/crystal-lang/crystal/issues/7504
<FromGitter> <Blacksmoke16> otherwise you all the tools you would need to do it are already avaliable
<FromGitter> <dscottboggs_gitlab> Hm, I hope not :/
<FromGitter> <Blacksmoke16> would have to look into it, i lucked out the types part of it turned out to be pretty straight forward
<FromGitter> <Blacksmoke16> yea prob not, dont have access to ivars at this point afaik
<FromGitter> <dscottboggs_gitlab> hm?
<FromGitter> <dscottboggs_gitlab> `@type.instance_vars`?
<FromGitter> <Blacksmoke16> doesnt work outside of methods
<FromGitter> <Blacksmoke16> is the issue
<FromGitter> <dscottboggs_gitlab> that's weird but you could just have a module included?
<FromGitter> <dscottboggs_gitlab> oh...
<FromGitter> <dscottboggs_gitlab> so like, even in the root of the module? weird
<FromGitter> <Blacksmoke16> ```class Foo ⏎ @foo : Int32 = 0 ⏎ {% pp @type.instance_vars %} # => [] ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5cb3d4ab25686a7dc330bc22]
<FromGitter> <dscottboggs_gitlab> yes I ran into that like just last night WTF
<FromGitter> <Blacksmoke16> mhm, this would allow me to do my associations the way i want them
<FromGitter> <Blacksmoke16> but currently not doable with annotations alone, would need an actual macro
<FromGitter> <nsuchy> I'm using asdf for crystal version management
<FromGitter> <nsuchy> so issues with home-brew ssl don't really apply here
<FromGitter> <nsuchy> @Blacksmoke16 you need to be connecting to a proxmox host to trigger the error
<FromGitter> <nsuchy> ```code paste, see link``` ⏎ ⏎ Example ^^^ [https://gitter.im/crystal-lang/crystal?at=5cb3d5e8a0790b29c9ba24a2]
<FromGitter> <nsuchy> should be enough to trigger the openssl failure
<FromGitter> <Blacksmoke16> sec
<FromGitter> <Blacksmoke16> yup that did it
<FromGitter> <dscottboggs_gitlab> huh.
<FromGitter> <Blacksmoke16> i have idea
<FromGitter> <nsuchy> what's the idea?
<FromGitter> <Blacksmoke16> is the server up?
<FromGitter> <nsuchy> yes
<FromGitter> <nsuchy> it's not a server issue
<FromGitter> <nsuchy> I can login fine through webui
<FromGitter> <nsuchy> I can't share credentials but those aren't needed to establish a connection and send a failed login attempt
<FromGitter> <Blacksmoke16> id look into it more but GoT is on so afk abit
<FromGitter> <nsuchy> do you think its a bug in Crest or my code?
<FromGitter> <dscottboggs_gitlab> idk I've never used Crest I'm not sure how stable it is
<FromGitter> <Blacksmoke16> see if you can get it to work using stdlib HTTP::Client
<FromGitter> <nsuchy> I opened an issue with Crest (https://github.com/mamantoha/crest/issues/118) to see what they have to say
<FromGitter> <nsuchy> Is there an alternate rest client?
<FromGitter> <nsuchy> Crest isn't a hard requirement but I want a pretty library which is easy to work with
<FromGitter> <dscottboggs_gitlab> I've never felt a need for anything more than the Stdlib's HTTP::Client, and often thought it was excessive for a stdlib
<FromGitter> <dscottboggs_gitlab> so I don't really have a recommendation
<FromGitter> <dscottboggs_gitlab> sorry
<FromGitter> <dscottboggs_gitlab> good nght, too
<FromGitter> <nsuchy> That's oay
<FromGitter> <nsuchy> Checking out https://github.com/crystal-community/cossack
<FromGitter> <nsuchy> and if that doesn't work will try standard library
<FromGitter> <nsuchy> okay so
<FromGitter> <nsuchy> there's a deeper issue here
<FromGitter> <nsuchy> with the standard library
<FromGitter> <nsuchy> I get the openssl issue
<FromGitter> <Blacksmoke16> hm
<FromGitter> <Blacksmoke16> got a gist of the code using stdlib version @nsuchy ?
<FromGitter> <Blacksmoke16> nvm
<FromGitter> <Blacksmoke16> still bet its a mac issue
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3e69820fbe911eeb85667]
<FromGitter> <Blacksmoke16> is the response i get
<FromGitter> <Blacksmoke16> @nsuchy ^
<FromGitter> <Blacksmoke16> when using what is on latest github with ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3e6d120fbe911eeb857d9]
<FromGitter> <Blacksmoke16> `Linux theStone 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux`
<FromGitter> <Blacksmoke16> so must be mac issue with crest?
<FromGitter> <nsuchy> @Blacksmoke16 https://github.com/crystal-lang/crystal/issues/7670
<FromGitter> <nsuchy> Happens with standard library
<FromGitter> <Blacksmoke16> not on linux
<FromGitter> <nsuchy> so uh any ideas on fixing?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3e82c93fb4a7dc22e6640]
<FromGitter> <Blacksmoke16> i dont know much about mac
<FromGitter> <Blacksmoke16> :/
<FromGitter> <nsuchy> that seems to of fixed the openssl errors
<FromGitter> <nsuchy> how do I turn my params into a body?
<FromGitter> <Blacksmoke16> `client.post("URL", body: {password: "psswrd"}.to_json)`
<FromGitter> <Blacksmoke16> would be one wya
<FromGitter> <nsuchy> thanks
<FromGitter> <nsuchy> okay so
<FromGitter> <nsuchy> the issue with openssl comes back at
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3ee000aad63501985ee2d]
<FromGitter> <Blacksmoke16> whats the issue
<FromGitter> <Blacksmoke16> same thing?
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3ee270aad63501985ef7b]
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> sure its not a server issue, because like
<FromGitter> <nsuchy> I'm positive
<FromGitter> <nsuchy> Ruby can login without an issue
<FromGitter> <nsuchy> Chrome and Safari using the same api can login fine
<FromGitter> <nsuchy> this is specific to crystal scripts
<FromGitter> <Blacksmoke16> remove your content type header
<FromGitter> <Blacksmoke16> for whatever reason that borks it
<FromGitter> <Blacksmoke16> i got a `506` error when including it on my rest ap
<FromGitter> <Blacksmoke16> that doesnt return a body
<FromGitter> <Blacksmoke16> which causes the read to fail since there is no body to read
<FromGitter> <Blacksmoke16> thus the `unexpected EOF`
<FromGitter> <Blacksmoke16> 💣
<FromGitter> <Blacksmoke16> @nsuchy ^
DmitryBochkarev has joined #crystal-lang
<FromGitter> <nsuchy> interesting bug
<FromGitter> <Blacksmoke16> still seems like a server issue for me, and crystal is reacting accordingly
<FromGitter> <Blacksmoke16> got ruby code that works?
<FromGitter> <Blacksmoke16> id be interested to see what it does
<FromGitter> <Blacksmoke16> lol, fair enough
<FromGitter> <Blacksmoke16> ah i dont have ruby
<FromGitter> <Blacksmoke16> rip
<FromGitter> <Blacksmoke16> this code should deff work with
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3f1f90aad63501986051f]
<FromGitter> <nsuchy> I just tried on a linux vm
<FromGitter> <nsuchy> and got the same openssl error when using the content type header
<FromGitter> <Blacksmoke16> so server issue?
<FromGitter> <nsuchy> its not a server issue when ruby scripts work and crystal don't
<FromGitter> <Blacksmoke16> does it happen in ruby if you include the header?
<FromGitter> <nsuchy> in ruby I'm using a rest client
<FromGitter> <nsuchy> so I don't have to manually set headers
<FromGitter> <Blacksmoke16> is it setting the header for you?
<FromGitter> <Blacksmoke16> i guess im just confused that i dont see anywhere that would tell the client that your sending json, thus telling it to set that header
<FromGitter> <Blacksmoke16> so i have a feeling if you actually explicitly set that header, it would be a similar issue?
<FromGitter> <nsuchy> ```code paste, see link```
<FromGitter> <nsuchy> without the header I get this error
<FromGitter> <nsuchy> I'm sending the username and password so I don't understand the issue here
<FromGitter> <Blacksmoke16> you sure you should be sending json?
<FromGitter> <Blacksmoke16> yea you should be sending `application/x-www-form-urlencoded`
<FromGitter> <Blacksmoke16> not json :P
<FromGitter> <Blacksmoke16> that would be the issue
<FromGitter> <Blacksmoke16> 415 would prob make more sense imo
<FromGitter> <nsuchy> lol
<FromGitter> <nsuchy> so
<FromGitter> <nsuchy> im an idiot
<FromGitter> <nsuchy> you're right
<FromGitter> <nsuchy> it's not supposed to be json
<FromGitter> <Blacksmoke16> :P
<FromGitter> <Blacksmoke16> coughitwasaserverissuecough
<FromGitter> <Blacksmoke16> hehe
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb3f5691f6e900d5e34f358]
<FromGitter> <nsuchy> yay
<FromGitter> <Blacksmoke16> 💯
<FromGitter> <nsuchy> @Blacksmoke16 don't make me rage
<FromGitter> <nsuchy> lol
<FromGitter> <Blacksmoke16> can prob close your issue in this case
<FromGitter> <nsuchy> ill go through and do that shortly
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <Blacksmoke16> good to see its working, wasnt too bad switching from ruby eh?
<FromGitter> <nsuchy> @Blacksmoke16 only threw three Macs out the window in the process
* FromGitter * nsuchy kidding
<FromGitter> <nsuchy> that's not even a crystal issue though
<FromGitter> <Blacksmoke16> but for real, if you have control over the server a `415 Unsupported Media Type` would have made more sense
<FromGitter> <nsuchy> it's a not understanding how the api works
<FromGitter> <nsuchy> unfortunately I don't have the ability to make server side changes
<FromGitter> <Blacksmoke16> never even heard of a `506` error till now
<FromGitter> <Blacksmoke16> lol
<FromGitter> <nsuchy> pray you never have to see it again
<FromGitter> <nsuchy> proxmox came from the depths of hell
<FromGitter> <Blacksmoke16> :S
<FromGitter> <Blacksmoke16> i guess so
<FromGitter> <nsuchy> God said let there be light, and Satan then said let there be Proxmox 😈
<FromGitter> <Blacksmoke16> you mean the `Multivac` 😉
<FromGitter> <nsuchy> 😂
teardown has joined #crystal-lang
DmitryBochkarev has quit [Ping timeout: 264 seconds]
<FromGitter> <nsuchy> Thanks @Blacksmoke16 I'm off to sleep now it's so late here on Eastern coast
<FromGitter> <nsuchy> Also thanks to @dscottboggs_gitlab, and anyone else I failed to credit :)
rohitpaulk has joined #crystal-lang
teardown has quit [Ping timeout: 264 seconds]
teardown has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
rohitpaulk has joined #crystal-lang
DmitryBochkarev has joined #crystal-lang
DmitryBochkarev_ has joined #crystal-lang
DmitryBochkarev_ has quit [Remote host closed the connection]
DmitryBochkarev has quit [Ping timeout: 252 seconds]
DmitryBochkarev has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
fanta7531 has joined #crystal-lang
ua has quit [Ping timeout: 246 seconds]
ua has joined #crystal-lang
hightower2 has joined #crystal-lang
ashirase has quit [Ping timeout: 250 seconds]
ashirase has joined #crystal-lang
<wuehlmaus> what's the best maintained gui toolkit now for crystal?
<wuehlmaus> or is the question now not relevant anymore?
<FromGitter> <r00ster91> why shouldn't it be relevant anymore?
<wuehlmaus> r00ster91: well i didn't look for a long time, so i am careful :-)
<wuehlmaus> ^ not
<wuehlmaus> s/^ not//
<FromGitter> <r00ster91> I think for now I'd take Qt or Hedron
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
alexherbo2 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
fanta7531 has quit [Quit: fanta7531]
<wuehlmaus> r00ster91: thanks for answering. I hope some others views still arrive here...
<FromGitter> <cserb> I have some HTML in my README so that title and badges are centered on Github. Is there a way to make `crystal docs` not serialize it?
<FromGitter> <dscottboggs_gitlab> good morning @wuehlmaus
<FromGitter> <dscottboggs_gitlab> I have been trying to keep the Qt repository in a working state, and have tried some basic things -- it seems to work. It *only* supports QtWidgets, *not* QtQuick
<FromGitter> <dscottboggs_gitlab> Unfortunately, I can't guarantee I'll be able to fix bugs in the Qt repo because it was created by someone else who is no longer actively working with it.
DmitryBochkarev has quit [Remote host closed the connection]
<FromGitter> <dscottboggs_gitlab> > have tried some basic things ⏎ ⏎ meaning I have gotten windows and dialogs to open but not dug deep into it
DmitryBochkarev has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
alexherbo2 is now known as alex``
<FromGitter> <TheOnlyArtz> Does Crystal have an OCR library?
<wuehlmaus> dscottboggs_gitlab: that is why i ask. i am not dependend on any gui framework but others might
<wuehlmaus> i am totally a console guy :-)
DmitryBochkarev has quit [Ping timeout: 264 seconds]
DmitryBochkarev has joined #crystal-lang
moei has joined #crystal-lang
DmitryBochkarev has quit [Ping timeout: 264 seconds]
<FromGitter> <nsuchy> Is there a predicted timeline for the 1.0 release? What can new Crystal developers do to help? Submitting merge requests to the compiler sounds intimidating. Not sure what I can do to give back to the Crystal Community.
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> PRs for undocumented modules/classes would be a good place to start
<FromGitter> <Blacksmoke16> better docs is always a win for everyone
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang/crystal/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Acommunity%3Ahelp-wanted are also some help wanted issues, can look through there
<FromGitter> <Blacksmoke16> also maybe look into contributing to shards that you like/use
<FromGitter> <nsuchy> not sure if it will help anyone else
<FromGitter> <nsuchy> my promoxs library for crystal is open source
<z64> along the lines of contributing to the shards ecosystem, you can check out https://github.com/crystal-community/crystal-libraries-needed/issues
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> @nsuchy if your rails app serving views or acting like a JSON API?
<FromGitter> <cserb> @Sija thanks for pointing that out
<FromGitter> <nsuchy> views
<FromGitter> <nsuchy> before I can begin porting it I have to get the crystal proxmox library in a reasonably working state
<FromGitter> <nsuchy> If I take a new file and wish to extend my module by adding a class how would I go about that?
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cb4a6de3ebbdc55b3c124f1]
<FromGitter> <nsuchy> how would I include the class in the top level file?
<FromGitter> <nsuchy> there will be several files and folders to essentially wrap the api into crystal methods
DmitryBochkarev has joined #crystal-lang
<FromGitter> <jwoertink> When you're documenting and link to an instance method, you can do `OtherType#method`. What's the syntax for a macro in OtherType? `OtherType.macro` ?
dannyAAM has joined #crystal-lang
dannyAAM has quit [Client Quit]
dannyAAM has joined #crystal-lang
<FromGitter> <Blacksmoke16> @nsuchy by extend, do you just mean adding something to it in a diff file?
<FromGitter> <Blacksmoke16> classes/modules can be reopened, i.e. declare the same class in two files, upon compile those classes will be merged together
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
<FromGitter> <Blacksmoke16> but yea thats how modules would be included in other types https://crystal-lang.org/reference/syntax_and_semantics/modules.html
dannyAAM has joined #crystal-lang
<FromGitter> <Blacksmoke16> @jwoertink yea prob would be fine, since they're similar to class methods in that its execution doesnt depend specifically on the current instance of `OtherType`.
<FromGitter> <jwoertink> That's what I figured. Thanks
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
DmitryBochkarev has quit [Remote host closed the connection]
DmitryBochkarev_ has joined #crystal-lang
alex``5 has joined #crystal-lang
alex`` has quit [Ping timeout: 264 seconds]
fanta7531 has joined #crystal-lang
hightower2 has quit [Read error: Connection reset by peer]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
fanta7531 has quit [Quit: fanta7531]
DmitryBochkarev_ has quit [Ping timeout: 264 seconds]
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter> <TheOnlyArtz> Is Lucky full stack?
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<Yxhuvud> What do you mean by full stack?
<FromGitter> <TheOnlyArtz> Frontend and Backend
<Yxhuvud> The framework can generate both HTML and JSON APIs. Make of that what you will. It does not provide a framework for the javascript side.
<FromGitter> <TheOnlyArtz> Alright, so I will need to use Vue/Angular/React, all of these?
<Yxhuvud> I seriously doubt you will need *all* of them. As for if you need *any*, that depends on what you are trying to achieve.
<FromGitter> <TheOnlyArtz> `/` is for or..
<FromGitter> <TheOnlyArtz> lmao
<FromGitter> <Blacksmoke16> depends on if you want server rendered like rails or separate front/back ends using json api and some js framework
<FromGitter> <Blacksmoke16> you did say `, all of these` at the end 😉
<FromGitter> <TheOnlyArtz> well
<FromGitter> <Blacksmoke16> wonder if you could use react/vue to render angular :thinking:
<FromGitter> <TheOnlyArtz> I can't even manage to use Lucky in the installation process
<FromGitter> <Blacksmoke16> are you wanting to make a json api or have it render html?
<FromGitter> <TheOnlyArtz> render
<FromGitter> <Blacksmoke16> ah, cant help you there
<FromGitter> <Blacksmoke16> amber is also a popular choice
<FromGitter> <Blacksmoke16> my framework wouldnt be real helpful, is more focused to the api side of things
<FromGitter> <TheOnlyArtz> Hm performance wise ? Lucky or Amber?
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <TheOnlyArtz> lmao
<FromGitter> <Blacksmoke16> based on https://github.com/the-benchmarker/web-frameworks there is like a less than 1ms difference
<FromGitter> <TheOnlyArtz> They both probably faster than React or Vue
<FromGitter> <TheOnlyArtz> Ruby is faster than Crystal?
<FromGitter> <TheOnlyArtz> (According to that repo)
<FromGitter> <waghanza> @TheOnlyArtz results are not yet representative
<FromGitter> <Blacksmoke16> imo the repo is good for a general idea, but its mostly rating the router. So would be easy to have a barebones app with a fast router
<FromGitter> <Blacksmoke16> vs like rails which obs does more than *just* routing
<FromGitter> <TheOnlyArtz> idk, Lucky claims to serve in nano seconds
<FromGitter> <Blacksmoke16> i.e. that rust one with `0.08 ms` thats insane
rohitpaulk has joined #crystal-lang
<FromGitter> <TheOnlyArtz> Do I have to use DBs with my applications?
<FromGitter> <TheOnlyArtz> It just looks like Lucky and Amber forces you to do so
<FromGitter> <Blacksmoke16> :shrug:
lucasb has joined #crystal-lang
<FromGitter> <Blacksmoke16> never used either much
rohitpaulk has quit [Remote host closed the connection]
<FromGitter> <r00ster91> can anyone here explain why there is such a big hype around multi-threading? Is it so much better than fibers?
<oprypin> r00ster91, 56-core CPUs exist. u can use only one of them with Crystal, that's pretty bad.
<oprypin> one of the cores, that is
<FromGitter> <kinxer> Also, it's much harder to make a single CPU core faster than it is to add more cores to a chip, so it's potentially much more cost-effective to run a multi-threaded program at a given "speed" on several lower-speed cores than it is to run its single-threaded equivalent on one much faster core.
<FromGitter> <kinxer> That is, it's "much harder" from a hardware point of view. It is generally more difficult to write a multi-threaded program than a single-threaded one.
<FromGitter> <r00ster91> ah ok, so it's mostly for speed
alex``5 has quit [Quit: The Lounge - https://thelounge.chat]
<FromGitter> <drosehn> If you're moving from ruby to crystal because your program takes too long in ruby, then you might also be very interested in having your program run on multiple CPU's at once.
<FromGitter> <drosehn> ... that depends on the program, of course. Some programs simply cannot take advantage of multiple CPU's due to the nature of the work they're doing.
<jokke> hey
<jokke> does HTTP::Client store and send cookies?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <jwoertink> @TheOnlyArtz I use Lucky with no DB.
<FromGitter> <jwoertink> It's a little configuration to do so, but it's possible
<FromGitter> <straight-shoota> jokke, no, `HTTP::Client` doesn't do that for you
<FromGitter> <straight-shoota> You need to implement a cookie jar yourself, but `HTTP::Cookies` does all the relevant HTTP interaction
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
moei has quit [Quit: Leaving...]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
Kixune has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Ping timeout: 256 seconds]
<FromGitter> <j8r> @TheOnlyArtz React and Vue less performant thab Amber and Lucky?! That's two different things
<FromGitter> <dscottboggs_gitlab> > Ruby is faster than Crystal? ⏎ ⏎ Probably a thin layer of ruby over C++/Rust?
<FromGitter> <j8r> The best, AFAIK, performance wise is to pre-render everything possible, the front (React, Vue, whatever), even images.
<FromGitter> <j8r> Then put that behind a CDN
<FromGitter> <dscottboggs_gitlab> hm, I don't think so. Also I don't like CDNs. :p
<FromGitter> <j8r> That's a different thing, but your static site will be blazing flat
<FromGitter> <j8r> *fast
<FromGitter> <dscottboggs_gitlab> once you download and render a SPA-style app the first time then updates to the page will be more fast than jumping to a whole new one and waiting for it to download again
laaron has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> (although I haven't benchmarked it I could be wrong)
<FromGitter> <j8r> I don't think so, because there are more javascript. Anyway, I was talking about compiling the site (webpack & cie) rather than on the fly à la PHP or ASP
<FromGitter> <dscottboggs_gitlab> oh I see
<FromGitter> <dscottboggs_gitlab> (I think, out of those technologies I've only worked with webpack)
laaron has quit [Client Quit]
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> imo no matter what you use its going to be fast enough
<FromGitter> <dscottboggs_gitlab> bullshit, I use nextcloud and airsonic
<FromGitter> <Blacksmoke16> js framework wise*
<FromGitter> <j8r> What I see is full React pages like Airbnb are slow :(
<FromGitter> <dscottboggs_gitlab> oh ok
<FromGitter> <dscottboggs_gitlab> The issue IMO comes in when you have a *lot* of JS/CSS to pull in in the beginning, or a lot of animations and flashy DOM manipulation
<FromGitter> <Blacksmoke16> and on connection when downloading those
<FromGitter> <Blacksmoke16> on the*
<FromGitter> <dscottboggs_gitlab> I just pulled up the AirBNB site and it loaded really nicely. The big-ass image in the background took a minute, even on my crazy-fast (for America) internet, but otherwise it was very smooth. Lemme try it on my shitty laptop -- that's the real test
<FromGitter> <Blacksmoke16> you can simulate diff networks speeds in chrome btw
<FromGitter> <Blacksmoke16> like if you were on 3/4g etc
<FromGitter> <j8r> @dscottboggs_gitlab the home is fast, that more the page when we search places, with the map
<FromGitter> <dscottboggs_gitlab> I see
<FromGitter> <0x2C6> hmmm :/ does multiple assignment in crystal work like js objects? for examle I assign an array to 3 different variables in one line ⏎ a = b = c = Array(String).new but then everything is equal to values of a
<FromGitter> <dscottboggs_gitlab> no
<FromGitter> <0x2C6> Or does it have better way to do this?
<FromGitter> <dscottboggs_gitlab> most importantly you can't do multiple assignment from an Array or other dynamically-sized type, it must be a tuple
<FromGitter> <0x2C6> so should I do something like that? ⏎ a, b = Array(String).new, Array(String).new ?
<FromGitter> <Blacksmoke16> i dont see what you're trying to do here?
<FromGitter> <Blacksmoke16> just assign both a and b to empty array of strings?
<FromGitter> <0x2C6> I want to create 2 empty arrays and assing them to 2 different variables in a single line
<FromGitter> <j8r> @0x2C6 is it what you want? https://carc.in/#/r/6qba
<FromGitter> <Blacksmoke16> then yea you'd have to do `a, b = Array(String).new, Array(String).new`
<FromGitter> <Blacksmoke16> otherwise youd get three vars that reference the same array
laaron has quit [Remote host closed the connection]
<FromGitter> <0x2C6> @j8r no this literally what I don't want :D
laaron has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> oof, yeah, the *search as I map* feature is a bit laggy @j8r. They'd be bettter off doing like google maps does where once you finish moving the map you can push a button that says "search here".
<FromGitter> <j8r> You can also do `a = Array(String).new; b = a.dup`
lucasb has quit [Quit: Connection closed for inactivity]