soveran has quit [Remote host closed the connection]
<RX14>
BlaXpirit, lol compiler segfault
tomchapi_ has joined #crystal-lang
tomchapin has quit [Ping timeout: 244 seconds]
<Papierkorb>
BlaXpirit: tbh I expected your first paste to work. Open an issue for it?
<Papierkorb>
expected to work in a user-sense, no idea about compiler internals
<BlaXpirit>
Papierkorb, it's quite obvious why it doesnt work - because the initialize method gets "instantiated" only for the base class and has no reason to change for the subclass
dome22xl has joined #crystal-lang
dome22xl is now known as puppetpies
<puppetpies>
has anyone got 0.18.7 installed ?
<puppetpies>
i've currently got 0.18.6 at present and i've found something weird
<BlaXpirit>
puppetpies, https://carc.in has 0.18.7 installed
<puppetpies>
The only difference weirdly is the end; end this correct ?
<puppetpies>
i see
<BlaXpirit>
puppetpies, no, like I just said, i renamed the class below to B so it's actually a different class, and not intermixing the methods of the existing A class
bew78 has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<BlaXpirit>
seems like setting instance variables behaves totally crazy inside class method
<puppetpies>
i don't its anything that anyone would use anyway.
<BlaXpirit>
yeah, it breaks as it's supposed to if you actually try to use such a class method. but if you just define and don't use it, it messes up other things
<puppetpies>
on another note how is creating an initialize method in a struct different to creating one in a class ?
<BlaXpirit>
puppetpies, well it's the same, but the difference lies just outside of the initialize method
<puppetpies>
ok interesting it seems when declaring one in struct the compiler wants you to define your local variables as instance variables confused
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<BlaXpirit>
puppetpies, I don't think that's the case. something else may be affecting the situation.
<puppetpies>
i was using a record i don't how that affects things
<BlaXpirit>
puppetpies, well probably significantly
<BlaXpirit>
in my opinion, record became almost useless since crystal 0.16
<puppetpies>
Well you can create your own structs anyway really i guess
<BlaXpirit>
instead of writing 'struct Name; property ...' you write 'record Name, ... do' big whoop
<puppetpies>
:)
<BlaXpirit>
puppetpies, are you planning to report the bug you found? else i will
<Yxhuvud>
well, they are redundant now that there are proper tuples
<puppetpies>
You report it i find to many
<BlaXpirit>
Papierkorb, oh wow, regarding the example you replied to earlier - ruby agrees with crystal :<
<Papierkorb>
... I'm surprised I never tried that in ruby
<BlaXpirit>
how do ruby programmers live without that?
<Papierkorb>
I never needed it but it already annoys me
<BlaXpirit>
i mean what's the alternative?
<Papierkorb>
def foo; FOO; end
<BlaXpirit>
Papierkorb, adding that to each class that changes the value?
<Papierkorb>
I didn't claim it to be nice
<Yxhuvud>
well, there is always self.class::FOO
<BlaXpirit>
Yxhuvud, that does not work
<BlaXpirit>
:: must be preceded by a constant
<BlaXpirit>
maybe you meant in ruby
<BlaXpirit>
{% begin %}{{@type.id}}::FOO{% end %} works ...
<Yxhuvud>
I did.
<Papierkorb>
BlaXpirit: you could put that into a macro I think
<Papierkorb>
and then use it like the_value = const(FOO)
<BlaXpirit>
:|
<Papierkorb>
Forget that, that won't help you either
soveran has quit [Remote host closed the connection]