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
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #crystal-lang
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #crystal-lang
ejjfunky has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
sagax has quit [Quit: Konversation terminated!]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 245 seconds]
waleee has quit [Ping timeout: 256 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 272 seconds]
ua__ has quit [Ping timeout: 272 seconds]
ua__ has joined #crystal-lang
waleee has joined #crystal-lang
hightower2 has joined #crystal-lang
<hightower2> Hey what was the original reason for preferring naming classes like JSON::SerializableError instead of JSON:Error::Serializable?
<hightower2> ::*
<FromGitter> <Blacksmoke16> prob just shorter names
<FromGitter> <raw-bin> Hi. Is it possible to force an abort from within a macro hook (`finished` in particular). A call to `abort` doesn't work with an undefined macro method complaint.
<FromGitter> <Blacksmoke16> nope, best you could do is like `raise ""`
<FromGitter> <raw-bin> What I'm looking for is a way to abort the compilation.
<FromGitter> <Blacksmoke16> whats the use case?
<FromGitter> <raw-bin> Thanks @Blacksmoke16! (As always!). The use case is being able to check whether a derived class instance implements a bunch of methods defined in the parent class.
<FromGitter> <raw-bin> I realise that using abstract classes and abstract methods is the 'right' way to do this but that lands me into another problem.
<FromGitter> <Blacksmoke16> id use `raise` with an error message sayings whats wrong
<FromGitter> <raw-bin> That should work. Thanks.
<FromGitter> <Blacksmoke16> but yea, whats the other problem?
<FromGitter> <raw-bin> Thanks for asking! So I have an abstract class A which specifies an abstract method M. The intent is typical: Make sure that all classes derived from A implement M. There are also derived classes B and C, both derived from A. Now, I wanted to create a Hash(String, A) in the hope that I could use it to insert instances B or C. Crystal doesn't allow this because Hashes need concrete types as parameters.
<FromGitter> <raw-bin> There's a fair chance my fundamentals are wrong! I'm a n00b.
<FromGitter> <Blacksmoke16> pretty sure that should work just fine
<FromGitter> <Blacksmoke16> got a playground link or something of what you want not working?
<FromGitter> <raw-bin> Let me put something simple together.
<FromGitter> <raw-bin> Ok. I don't know what I did just yesterday but its working now! https://play.crystal-lang.org/#/r/cu6x
<hightower2> forming/asking a question makes more than 50% of the solution :)
<FromGitter> <Blacksmoke16> 👍 cool, i thought it would
<FromGitter> <raw-bin> Thank you so much @Blacksmoke16 and totally agree @hightower2!
<FromGitter> <Blacksmoke16> np
ejjfunky has quit [Ping timeout: 272 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 240 seconds]
notzmv has quit [Ping timeout: 256 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 256 seconds]
taupiqueur has joined #crystal-lang
taupiqueur_ has joined #crystal-lang
taupiqueur has quit [Ping timeout: 268 seconds]
taupiqueur_ has quit [Ping timeout: 256 seconds]
hightower2 has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
notzmv has joined #crystal-lang
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]