<FromGitter>
<mniak> I'm doing well. I got to know crystal last week and I'm hypnotized!
<FromGitter>
<mniak> So I'm doing very well
<FromGitter>
<Blacksmoke16> what does the `::` represent when in front of a class name/
<FromGitter>
<Blacksmoke16> like `::Nil`
<FromGitter>
<dscottboggs_gitlab> that means it's part of the top-level namespace
<FromGitter>
<dscottboggs_gitlab> incase you had a custom Nil class that would get discovered before ::Nil
<FromGitter>
<Blacksmoke16> π thanks
<FromGitter>
<dscottboggs_gitlab> `::` In general is used to denote that something is a part of something else, be it a class or a module.
<FromGitter>
<dscottboggs_gitlab> np
marmotini_ has quit [Ping timeout: 252 seconds]
<FromGitter>
<Blacksmoke16> is there a way to inherit method doc from a parent?
<FromGitter>
<Blacksmoke16> i.e. if i have an abstract class with an abstract def that i put the comment on, that all subclasses would have the same comment
<FromGitter>
<dscottboggs_gitlab> @Blacksmoke16 ack I knew I'd get one in one of those haha thanks
<FromGitter>
<dscottboggs_gitlab> how are you just trying this?
<FromGitter>
<Blacksmoke16> pull down your branch and try to compile crystal
<FromGitter>
<Blacksmoke16> is prob related to `@type.constants.find { |cnst| cnst === @const }.try &.doc` since this can return Nil when it should only return a `Crystal::Doc::Type`
<FromGitter>
<dscottboggs_gitlab> oh, I thought that was nillable
<FromGitter>
<Blacksmoke16> ` getter type : Crystal::Type` naw looks like its not
<FromGitter>
<dscottboggs_gitlab> I'll take another look at it a little while later or tomorrow. thanks.
<FromGitter>
<dscottboggs_gitlab> I haven't yet compiled my own crysta
<FromGitter>
<Blacksmoke16> er wait think that was the wrong ivar, but yea it cant be nil, or at least needs to be checked if its nil or not
<FromGitter>
<Blacksmoke16> might help :p
<FromGitter>
<Blacksmoke16> np
<FromGitter>
<Blacksmoke16> am sure will have some comments from others on your PR, thanks for taking this up, will be quite handy when its all done
<FromGitter>
<sdzyba> @vladfaust not sure about relationships between Stripe and Crystal, but they're investing a lot to implement a type checker for Ruby. Maybe worth spreading information about Crystal among Stripe devs
<livcd>
sdzyba: are you sure it's a lot ?
<livcd>
is not it just couple of devs ?
<FromGitter>
<Heaven31415> I found some info, it was built by 3 ppl, you can check it here: https://sorbet.run/
<FromGitter>
<sdzyba> A couple of professional devs sounds a lot to me :)
<FromGitter>
<Heaven31415> A message from them which appeared in May of this year, stated that they worked for 9 nine on it (at that time, so it's probably over a year now)
marmotini_ has joined #crystal-lang
<FromGitter>
<sdzyba> If they spent the same resources on Crystal development the impact might be very significant
marmotini_ has quit [Ping timeout: 240 seconds]
<FromGitter>
<anicholson> π
<FromGitter>
<anicholson> I'm having a bit of frustration with ECR at the moment
<FromGitter>
<anicholson> I have a shard that uses ECR to render a default error message to a String
<FromGitter>
<anicholson> but when I attempt to compile a project that's using that shard, the compile fails because the ECR macro can't find the right file.
<FromGitter>
<anicholson> It doesn't appear that I can use `File.join(__DIR__, "error_template.ecr")` in the macro call
<FromGitter>
<anicholson> how can I get around this issue?
<FromGitter>
<mjbunink> Hi all, does Crystal have openGl bindings or 2d/3d shards yet?
<FromGitter>
<fridgerator> also searches for "2d" and "3d" turn up results
<FromGitter>
<vladfaust> @anicholson use the path assuming it's called from an application requiring that shard. E.g. `"myshard/templates/error.ecr"`. It will be untestable though. To avoid this, you can set up macro variable, which would change the path in the compile time to something like `"../src/myshard/src/templates/error.ecr"`
<FromGitter>
<vladfaust> Also IIRC there was an issue regarding to `File.join` in macros
<FromGitter>
<vladfaust> Guys, if you can afford it, take a look at my Patreon. I misplanned my time and now have a financial gap between my next project (crystal-based and promoting it) and present time. I'm not sure I'll be able to pay for my apartment this month π Thanks! https://www.patreon.com/vladfaust
nekocentral has joined #crystal-lang
<nekocentral>
what would be the best way to convert this command to a crystal thing
<FromGitter>
<Heaven31415> Damn , a new @asterite PR, you need to see it!
<FromGitter>
<fridgerator> 1) o
<FromGitter>
<fridgerator> slowly becoming java
<FromGitter>
<fridgerator> j/k
<FromGitter>
<straight-shoota> xD
<FromGitter>
<bmulvihill> bundle install
<FromGitter>
<proyb6> Today I just found Mint Language has an interesting docs β https://www.mint-lang.com/
<FromGitter>
<proyb6> In the project and run ```mint doc``` will give you a handy view on relevant APIs it used, I though Crystal should have this built in feature for any projects!
<FromGitter>
<proyb6> ```mint doc``` is a documentation server
Vexatos has joined #crystal-lang
<FromGitter>
<bajro17> I find simplest tree implementation
<FromGitter>
<bajro17> but there is Node(T)
<FromGitter>
<bajro17> when I initialize tree I pass symbol like parameter (Symbol)
<FromGitter>
<bajro17> can I avoid this and to all time be symbol because I want only use that
<FromGitter>
<vladfaust> Mention this issue so it has attention of the core team. I need this one as well
<FromGitter>
<Blacksmoke16> would be handy
<FromGitter>
<schoening> Hey how does crystal deal with requiring files with classes that have the same name? β Would I have to wrap them in a separate file and import that?
<FromGitter>
<straight-shoota> @schoening Crystal has a global namespace. You can't have two classes with the same name.
<Yxhuvud>
The normal way to avoid it is to wrap them in module or class namespaces though
<FromGitter>
<schoening> Ok :) yeah thats the SO answer I saw on Ruby with the same issue
<FromGitter>
<j8r> @Heaven31415 yes, it seems he is in a good mood :)
<FromGitter>
<j8r> Is it possible to raise an exception without the backtrace, to avoid the perfomance overhead of dumping the stack?
<FromGitter>
<bew> Not builtin
<FromGitter>
<Blacksmoke16> any good recommendations for hosting the generated crystal docs for a given repo?
<FromGitter>
<Blacksmoke16> github pages maybe?
<FromGitter>
<bew> @j8r you could make your own raise method that doesn't attach a callstack to the exception object being raised (not sure how this would last
<FromGitter>
<bew> @Blacksmoke16 yes gh pages is good
<FromGitter>
<Blacksmoke16> there any setup that needs to be done? or just point it to the docs/ directory?
<FromGitter>
<bew> No idea, i remember reading a post or comment somewhere where bcardiff was explaining how to do that
<FromGitter>
<Blacksmoke16> π I'll play around with it
<FromGitter>
<Blacksmoke16> Thanks
<FromGitter>
<j8r> Too bad this isn't this builtin @bew . This will help for performance. Actually everything panic :| I may open an issue on this
<FromGitter>
<bew> It's not a lot of code, Exception is made in a way where the callstack is optional
<FromGitter>
<bew> But indeed, a `callstack: false` to `raise` would make things simpler
<FromGitter>
<bew> @j8r also, when you don't have a callstack attached, it might be nice to have at least the file:line of where the exception was raised
<FromGitter>
<bew> the `@callstack` ivar of `Exception` can be nil
<FromGitter>
<j8r> Hum thats the callstack property? For example when parsing, or index out of bound, the callstack is useless
<FromGitter>
<j8r> Or may be not always useful
<FromGitter>
<bew> how do you decide when it's useless?
<FromGitter>
<j8r> If i do a begin rescur that rescue another exception, I won't see the backtrace
<FromGitter>
<j8r> 1) of the first one
<FromGitter>
<bew> i don't get it, can you give an exemple?
<FromGitter>
<j8r> I parse a file, rescue when the parsing fails, then raise that it fails, rescue in the build and raise that the parse fails etc
<FromGitter>
<j8r> I just want to know the first callstack, when the parsing fails
<FromGitter>
<bew> do you know `cause` argument of `Exception` ?
<FromGitter>
<bew> (btw there is missing doc about it..)
<FromGitter>
<bew> it allows you to see the 2 traces
<FromGitter>
<bew> the 1st and 2nd exception
<FromGitter>
<j8r> I'll create my own exception without callstack. Thanks @bew !
<FromGitter>
<bew> ok sorry for not understanding exactly
<FromGitter>
<j8r> The point is: i create exceptions, we know exactly why it fails: no need to dump the stack. For example: "myfile.tgz: download timeout"
<FromGitter>
<j8r> Or for the file parsing case: "unknown command: echo"
<FromGitter>
<Blacksmoke16> z64, cheers ill take a look
<FromGitter>
<m-o-e> undefined method 'each' for YAML::Any hummm
<FromGitter>
<Blacksmoke16> gotta do `as_a` to tell it it should be an array
<FromGitter>
<m-o-e> ohhhh
<FromGitter>
<m-o-e> @blacksmoke16 thanks!
<FromGitter>
<Blacksmoke16> np, would be `Array(YAML::Any)`
<FromGitter>
<bew> @j8r yeah maybe make an issue about that, would be interesting
<FromGitter>
<j8r> Before asking i was reading some infos about how Rust and Swift handle exceptions β they use a custom type, and of course panic is still there to raise the stack
<FromGitter>
<faustinoaq> Hi crystal community, I'm back, I had taken a long break π I'll continue with some collaborations in my favorite repos π
<FromGitter>
<bew> \o/ @faustinoaq
<FromGitter>
<j8r> Welcome back @faustinoaq !
<FromGitter>
<faustinoaq> Yeah, feels nice to be here again :)
<FromGitter>
<fridgerator> hey @faustinoaq
<FromGitter>
<jwoertink> Welcome back @faustinoaq π
marmotini_ has quit [Ping timeout: 244 seconds]
<FromGitter>
<bajro17> I have question for what is used $1
non-aristotelian has quit [Quit: non-aristotelian]
<FromGitter>
<anicholson> > @anicholson use the path assuming it's called from an application requiring that shard. E.g. `"myshard/templates/error.ecr"`. It will be untestable though. To avoid this, you can set up macro variable, which would change the path in the compile time to something like `"../src/myshard/src/templates/error.ecr"` β β @vladfaust that feels really gross. I think I'm just going to pull the template into the