<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>
<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>
<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>
<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>
<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>
<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>
<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` ?
<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
<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> 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
<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
<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>
<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]