<jokke>
non-aristotelian: keep in mind that this is a very old article compared to crystal's age
<non-aristotelian>
jokke: Yeah I just saw that -- 2013.
<non-aristotelian>
Cool. Posted the bug-report. I see 600+ open issues. I should pick one. :)
ua has quit [Ping timeout: 246 seconds]
non-aristotelian has quit [Quit: non-aristotelian]
DTZUZO has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<FromGitter>
<dscottboggs_gitlab> Is there any way to create a function/method which is only accessible by instance methods or class methods of a particlar class or within a particular file? ⏎ ⏎ I have some private def methods that I want to access from class methods basically
<FromGitter>
<dscottboggs_gitlab> eh, I guess :nodoc:-ing them is good enough if there isn't anything
_whitelogger has joined #crystal-lang
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
DTZUZO has quit [Ping timeout: 245 seconds]
t0nyandre has joined #crystal-lang
<oprypin>
dscottboggs_gitlab, that sounds exactly like `protected`
<FromGitter>
<dscottboggs_gitlab> you can access protected from class-methods?
<oprypin>
i think it has something about "same file" or was it"same module"access
<FromGitter>
<dscottboggs_gitlab> yes, I think protected will do fine. thank you
<FromGitter>
<dscottboggs_gitlab> oh, also, you can `private def self.method` which is weird and I didn't think you'd be able to do that.
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter>
<swinSpo> does crystal not have interfaces??
<FromGitter>
<swinSpo> Yes, but then you can only satisfy one "interface"?
<FromGitter>
<Timbus> You can also use Modules with abstract defs, and `include` them into your class, if you want something more akin to a interface/trait/role.
<FromGitter>
<Timbus> Personally I feel it would be nice to decouple this functionality a little.. But Ruby
<FromGitter>
<swinSpo> @Timbus and what would be the point of the include be?
<FromGitter>
<Timbus> To .. satisfy the interface
<FromGitter>
<swinSpo> how?
<FromGitter>
<Timbus> it would error if you didnt provide the definitions
<FromGitter>
<Timbus> and your class can be tested against the Module.. `instance.is_a?(YourInterface)`
<FromGitter>
<dscottboggs_gitlab> what is `\{%` as opposed to `{%`?
<FromGitter>
<j8r> this is used to generate macro with macros
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
<jokke>
are there any plans to tighten the type checking of abstract method implementations?
<jokke>
i noticed that at least the return type isn't checked against the abstract definition
ashirase has quit [Ping timeout: 246 seconds]
ashirase has joined #crystal-lang
<FromGitter>
<swinSpo> @icyleaf what are you trying to show me?
<FromGitter>
<swinSpo> Oh the include? Yes thanks I figured that one out once i knew I can include modules :)
<jokke>
swinSpo: i usually prefer mixins over inheritance because of the obvious reasons but also because it works both with classes and structs. (you can't let a struct inherit a class or vice versa)
<FromGitter>
<vusaalab> Hey guys! is crystal good for ffmpeg processing ?
<jokke>
didn't you ask this exact question a day or so ago?
<jokke>
vusaalab: i'd say: if you're happy with shelling out, it's as good as any scripting language.
<jokke>
vusaalab: there's no libav bindings for crystal (yet) unfortunately
<FromGitter>
<vusaalab> no need binding i can create a binding
<FromGitter>
<vusaalab> but i need to now if i create a binding for that which is good for production run
<FromGitter>
<alehander42> @oprypin this is very cool the irc <=> gitter thing
<FromGitter>
<alehander42> how do you do it? clicking on the labels doesnt work like that
<jokke>
vusaalab: what do you mean? what do you expect?
<jokke>
vusaalab: libav bindings aren't trivial
<jokke>
depending on what you want to do
<jokke>
it won't run any faster just because it's crystal. the main work is being done by libav/ffmpeg anyway
<FromGitter>
<vusaalab> I want to create API for user to upload video file and it will convert to MP4
<jokke>
ok. if you write bindings, i'd be interested
<jokke>
crystal is great for web stuff so it's a good choice
moei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter>
<swinSpo> Hey, I have read through the docs regarding splats
<jokke>
on top you need to use colon instead of equals
<FromGitter>
<swinSpo> of course
<FromGitter>
<swinSpo> but then i still get
<FromGitter>
<swinSpo> instance variable '@provider' of MultiProvider was not initialized directly in all of the 'initialize' methods, rendering it nilable.
<FromGitter>
<kinxer> @swinSpo But does that reflect the behavior of the actual code? Crystal allows methods that will return an indeterminate type.
<FromGitter>
<kinxer> @cserb Could you provide some context about what you're trying to do that caused this?
<FromGitter>
<swinSpo> @kinxer what do you mean?
<FromGitter>
<sam0x17> any idea when the crystal alpine linux package will get updated to 0.27.0?
<FromGitter>
<kinxer> @swinSpo Are you proposing that every method in the docs give its return type, or just the ones that have a specific type or union that they can return? For example, you could write a method ⏎ ⏎ ```def give_back(object) ⏎ object ⏎ end``` ⏎ ⏎ I know this is an extreme example, but this method couldn't possibly have a return type in the docs. [https://gitter.i
<FromGitter>
<kinxer> @swinSpo Touche. I'd have to bow to more knowledgeable developers to say whether there's a cost (other than a visual one) to specifying all your types like that. It does make me wonder if it's feasible to include type resolution in `crystal doc`, but that might be going a bit overboard.
<FromGitter>
<kinxer> I'm assuming that EnvProvider is a subclass of Provider, but it seems like by assigning `@providers` directly you're causing it to be an array specifically composed of `EnvProvider`s, not more generally of `Provider`s.
rohitpaulk has joined #crystal-lang
<FromGitter>
<swinSpo> Your suggestion seems to work! But it is odd, considering that the type of @providers is : Array(Provider)
<FromGitter>
<kinxer> Yeah, that is odd. I wonder if that's intended behavior.