<raz>
that's what just happened to me (confused parsed vs unparsed json vars) ;)
<raz>
obv should be more careful, but i wonder why String even has that feature. is there a legit use-case for that?
o5r has quit [Ping timeout: 240 seconds]
markmarkmark has joined #crystal-lang
_ht has quit [Remote host closed the connection]
<hightower2>
When I am in a 'case' block, is there a way to reference the thing being 'case'd? I don't have it in a variable as it comes from a method call
<hightower2>
or I need to store it in a var for that?
<FromGitter>
<Blacksmoke16> `case tmp = var`
<hightower2>
aah, of course, didn't think of it in this context, thanks
<FromGitter>
<636f7374> I suddenly wondered whether Crystal now supports ARM? (E.g. Apple A1 chip).
<FromGitter>
<636f7374> I searched Rust seems to have this problem.
<hightower2>
Hey fellows, I was thinking about https://github.com/crystallabs/event_handler and whether it would be possible to event-enable any class, rather than having to define special event classes like the existing documentation shows.
<hightower2>
And I picked some random class from Crystal and it worked: https://carc.in/#/r/a68y
<hightower2>
But, as you see explained in that paste, it fails with a segfault for Strings.
<hightower2>
Any ideas why?
<FromGitter>
<Blacksmoke16> id vote just dont do that
<hightower2>
It's just something I was playing with... would love to know why String fails
<FromGitter>
<Blacksmoke16> its prob messing with something it souldnt
<FromGitter>
<Blacksmoke16> :shrug:
<hightower2>
aha actually I see a mistake in the attempt, thanks for the discussion
<hightower2>
But it is - in the current state - not working for an obvious reason.. since IPSocket isn't a subclass of Event, the stuff isn't generated, so it fails
<hightower2>
(the macro which wades through all subclasses of Event doesn't find it)
<hightower2>
Wasn't there a request from someone to add all_includers in macro land, like there is all_subclasses? Does this exist?
<hightower2>
aha it is, looks like just `includers
<hightower2>
mm yeah got it working... I put the main code in the module, and then instead of using cls.all_subclassed, just did module.includers