ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
JinReal has joined #crystal-lang
ur5us has quit [Ping timeout: 246 seconds]
ur5us has joined #crystal-lang
greenbigfrog has quit [Ping timeout: 246 seconds]
greenbigfrog has joined #crystal-lang
greenbigfrog has quit [Ping timeout: 268 seconds]
JinReal has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 255 seconds]
walez has joined #crystal-lang
greenbigfrog has joined #crystal-lang
greenbigfrog has quit [Ping timeout: 248 seconds]
greenbigfrog has joined #crystal-lang
greenbigfrog has quit [Ping timeout: 248 seconds]
ur5us has joined #crystal-lang
wowi42 has quit [Quit: Connection closed for inactivity]
greenbigfrog has joined #crystal-lang
greenbigfrog has quit [Ping timeout: 272 seconds]
ur5us has quit [Ping timeout: 255 seconds]
hightower2 has joined #crystal-lang
jmdaemon has quit [Ping timeout: 246 seconds]
irc_user has joined #crystal-lang
greenbigfrog has joined #crystal-lang
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #crystal-lang
walez___ has joined #crystal-lang
walez has quit [Ping timeout: 255 seconds]
walez___ has quit [Ping timeout: 255 seconds]
walez___ has joined #crystal-lang
walez____ has joined #crystal-lang
walez___ has quit [Ping timeout: 246 seconds]
walez____ has quit [Quit: Leaving]
walez has joined #crystal-lang
walez has quit [Ping timeout: 268 seconds]
walez has joined #crystal-lang
<SamantazFox> Hi there! Language question: what's the difference between `class Foo < Bar; end` and `class Foo; include Bar; end` ?`
<FromGitter> <Blacksmoke16> inheritance versus composition
<SamantazFox> Blacksmoke16: I understand inheritance (Foo is a subclass of Bar, all of Bar's methods/properties are available to instances of Foo) but what's composition?
<FromGitter> <Blacksmoke16> mix-in is another common name for it
<FromGitter> <Blacksmoke16> an example in the stdlib is `Comparable` you can include it into any type to allow tha type to be compared
walez has quit [Ping timeout: 276 seconds]
<FromGitter> <Blacksmoke16> if you're familiar with PHP, their `trait` concept is similar to our modules
<FromGitter> <Blacksmoke16> but our modules can also act as interfaces. I.e. you can do stuff like `obj.is_a? Comparable`
<FromGitter> <Blacksmoke16> and have overloads and such for them
<SamantazFox> Ah, hmm, I see
<SamantazFox> Composition would kinda be like inheriting from multiple classes at the same time, if I understand that correctly.
<FromGitter> <Blacksmoke16> essentiall yea?
<FromGitter> <Blacksmoke16> essentially*
<SamantazFox> Also, other side question: is there a way to monitor the memory allocations / garbage collection done by the stdlib?
<SamantazFox> I'd like to find what's leaking memory, but I don't know where to start (especially since it happens after many hours)
<FromGitter> <ober> @Blacksmoke16 so http://xpather.com/IkOIsZqV works but the same in xml.xpath fails.
ur5us has joined #crystal-lang
Sankalp has quit [Ping timeout: 248 seconds]
Sankalp has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/e0ct
<FromGitter> <ober> ty
<FromGitter> <ober> Would have never come up with that.
<FromGitter> <Blacksmoke16> yea its fairly obsure
<FromGitter> <Blacksmoke16> obscure
<FromGitter> <ober> ty sir. saved me a lot of time
<FromGitter> <ober> now I don't get to write a crappy xml parser from scratch... :(
<FromGitter> <Blacksmoke16> np
<SamantazFox> ober: you say it like it's a bad thing xD
<Ober> :P
ur5us has quit [Ping timeout: 246 seconds]
jmdaemon has joined #crystal-lang
jmiven has quit [Quit: reboot]
jmiven has joined #crystal-lang
ur5us has joined #crystal-lang