ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
Human_G33k has quit [Quit: Leaving]
jua_ has quit [Quit: Leaving]
sorcus has quit [Ping timeout: 252 seconds]
blackbeard420 has joined #crystal-lang
<hightower2> Looks like a shorthand way to obtain the color-enabled string (the wrapper object)?
snsei has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
<FromGitter> <Blacksmoke16> but whats the point? afaik you cant alter the string
return0e has joined #crystal-lang
<FromGitter> <Blacksmoke16> so you get a colorize::Object object for an empty string? :shrug:
<hightower2> I see this in examples:
<hightower2> samples/pretty_json.cr: with_color.bold.surround(@output) do ... end
<FromGitter> <Blacksmoke16> ah yea `#surround` would make it more useful
snsei has quit [Ping timeout: 240 seconds]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 276 seconds]
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 250 seconds]
snsei has joined #crystal-lang
_whitelogger has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
return0e_ has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
_whitelogger has joined #crystal-lang
duane has quit [Ping timeout: 276 seconds]
snsei has joined #crystal-lang
ht_ has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e_ has joined #crystal-lang
ht_ has quit [Quit: ht_]
snsei has joined #crystal-lang
snsei has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
sorcus has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
snsei has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
DTZUZO has quit [Ping timeout: 246 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Remote host closed the connection]
snsei has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 246 seconds]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 276 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 245 seconds]
DTZUZO has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
DTZUZO has quit [Ping timeout: 276 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
blassin has quit [Quit: The Lounge - https://thelounge.chat]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
DTZUZO has joined #crystal-lang
blassin has joined #crystal-lang
DTZUZO has quit [Ping timeout: 265 seconds]
<hightower2> "<Blacksmoke16> i also wish you could have reusable function in macro land" <-- I second that proposal :)
DTZUZO has joined #crystal-lang
<hightower2> Hey folks could you clarify why am I getting this: https://play.crystal-lang.org/#/r/826g
<hightower2> Basically I would want 'c' to be TypeNode and call .subclasses() on it.
<hightower2> But for reason unclear to me it doesn't work
<FromGitter> <tenebrousedge> why not `subclasses.map {|c| c.subclasses }` ? does that work in macro-land?
DTZUZO has quit [Ping timeout: 250 seconds]
<hightower2> That seems to work, although I'd have to somehow handle the recursion differently then
<hightower2> as this will give me just one level of subclasses for each, unless I add a little bit more to it
<hightower2> fg
<FromGitter> <tenebrousedge> well, so would your previous code?
DTZUZO has joined #crystal-lang
<hightower2> well yes and no, I think my code would keep pushing new items to the list, and by the time for() was done it would have all of them
<FromGitter> <Blacksmoke16> Can't you just use all_subclasses
<hightower2> fabulous, thanks!
<hightower2> hm, this opens the next issue, this line:
<hightower2> subcl.methods.find(&.name.==("initialize"))
<hightower2> finds nothing for subclasses which don't define their own initialize
<hightower2> any ideas how this could be solved?
DTZUZO has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> Try name.stringify
<hightower2> Same result. I think the issue is that the initialize() is literally not there
<FromGitter> <Blacksmoke16> Ah, hm is the subclass abstract?
<hightower2> no, just class Sub < Parent
<FromGitter> <Blacksmoke16> Is it coming from a parent?
<hightower2> yes, parent has it, subclass not
<FromGitter> <Blacksmoke16> Gotcha
<FromGitter> <Blacksmoke16> What happens if you make the parent abstract
<hightower2> The toplevel parent is already abstract. You mean to try making the immediate parent abstract?
<hightower2> From what I see, apparently same result (even if I make immediate parent abstract)
<FromGitter> <Blacksmoke16> Gotcha
<hightower2> is there a function which gives immediate parent of a class?
<hightower2> if so, in case of a missing initialize I could recurse to the top searching for one
<hightower2> Or maybe use some call which finds the appropriate initialize through inheritance? (If this is known at the time when macro runs?)
<hightower2> when "macro finished" runs*
<hightower2> it's seems it's superclass()
<hightower2> src/compiler/crystal/types.cr is a treasure trove
<hightower2> well, superclass and parents.. since I need to loop up to the top, parents seems the best way to do it
<FromGitter> <Blacksmoke16> What happens if you wrap your logic in a macro finished?
<hightower2> it already is
<FromGitter> <Blacksmoke16> Ah ok
<hightower2> Got it, the final code I used is:
<hightower2> now it would be great if there could be last touch made to it to end the for() when it finds the initialize, and possibly to reduce the first search for initialize and subsequent loop into one...
<FromGitter> <Blacksmoke16> Nice one
<hightower2> is there a way to break a for loop on first find?
<hightower2> (within macros)
<FromGitter> <Blacksmoke16> not that i know of
<hightower2> Blacksmoke16 also I had another idea in mind... Didn't try it out but at first glance it seemed it could work... like, currently we rely on a macro which finds the event subclasses and in each of them it creates an aeeay _events_{{e.name}} : Array(Proc(args, Bool)).
<hightower2> I was thinking, how about if the creation of an event would just push the event and type/args to some ArrayLiteral or HashLiteral inside macros
<hightower2> and then inside macro finished,
<hightower2> we created a NamedTuple of { EventName: Array(Proc(args, Bool)) }
snsei has joined #crystal-lang
<hightower2> this would limit the number of events to 300 (the current max size of tuples?), but it seems it would allow to move most of the event functions outside of macros into regular crystal then
<hightower2> s/aeeay/array/
<FromGitter> <tenebrousedge> can't you do like `::EventHandler::Event.all_subclasses.find {|e| e.methods.concat(e.ancestors.map(&.methods)).find(&.name.==("initialize") }`
<hightower2> Undefined macro method ArrayLiteral#concat
<hightower2> I think there is no way with ArrayLiterals to add array to array, and there is no flatten! to call later
<hightower2> (From browsing some macro code I think it can only add one element at a time to an arrayliteral)
<FromGitter> <tenebrousedge> there's `ArrayLiteral#+`
<hightower2> mm, I tried it, told be it can't do OpAssign. Let me check again
<hightower2> It seems to me the behavior is [] + [1] = [[1]] instead of [1]
<hightower2> (With ArrayLiteral#+)
<FromGitter> <tenebrousedge> that's weird. That's not what the docs imply
<hightower2> Let me tyr
<hightower2> try*
<hightower2> hmm, seems to work.. what I see is when I use +, then in the loop I get ArrayLiteral instead of TypeNode, that's why I assumed it added the whole array
<hightower2> let me check in more detail
<hightower2> ah yes the issue is that `ancestors.map(&.methods)` returns [ [...], [...], [...] ]
<hightower2> so even when first array is removed, the inner ones remain
<FromGitter> <tenebrousedge> and there's no flatten or reduce :/
<FromGitter> <Blacksmoke16> iirc reduce is coming in .32
<FromGitter> <tenebrousedge> well thank meows for that
<FromGitter> <tenebrousedge> it's bizarre to not have it, TBH
<hightower2> yeah
<FromGitter> <tenebrousedge> it's the most primitive of the higher order iterators (aside from `each`)
<FromGitter> <Blacksmoke16> hightower2: i actually been thinking of a way to handle it without procs
<FromGitter> <Blacksmoke16> plan has kinda evolved since ☝️ November 22, 2019 6:19 PM (https://gitter.im/crystal-lang/crystal?at=5dd86d109860605489602fec)
<FromGitter> <Blacksmoke16> plan is to do like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5dd93fdd9d72cd02b32efb59]
<FromGitter> <Blacksmoke16> dispatcher would have an events hash like `Hash(Event.class, Array(Listener))`
<FromGitter> <Blacksmoke16> using `#call` would allow you to still add proc listeners at runtime tho
<FromGitter> <Blacksmoke16> will see how it goes :p
<hightower2> Great, I've been trying to follow your comments about progress on this
snsei has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
duane has joined #crystal-lang
sagax has quit [Ping timeout: 265 seconds]
sagax has joined #crystal-lang
sorcus has quit [Ping timeout: 245 seconds]
duane has quit [Ping timeout: 240 seconds]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
snsei has joined #crystal-lang
DTZUZO has quit [Ping timeout: 246 seconds]
<FromGitter> <Blacksmoke16> hm that might not work as well as i thought :/
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5dd95fec4517d002b2dce955]
<FromGitter> <Blacksmoke16> not smart enough to know the values in the hash will be fine, prob due to it being a hash and the type is a union
<FromGitter> <Blacksmoke16> suppose i could use separate hashes for each event type?
<FromGitter> <tenebrousedge> that seems like a strange idea
<FromGitter> <Blacksmoke16> i agree
<FromGitter> <Blacksmoke16> any better ideas? :p
<FromGitter> <Blacksmoke16> or maybe make the hash values some sort of "container"
<FromGitter> <tenebrousedge> are you familiar with redux and how it works?
<FromGitter> <Blacksmoke16> not really
<FromGitter> <tenebrousedge> it's short
<FromGitter> <tenebrousedge> similar: https://www.jamasoftware.com/blog/lets-write-redux/
<FromGitter> <tenebrousedge> I'm not sure how analogous the example is
<FromGitter> <Blacksmoke16> hmm
snsei has quit [Ping timeout: 265 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 246 seconds]
DTZUZO has joined #crystal-lang
<FromGitter> <Blacksmoke16> either way i dont think i can use a hash
<FromGitter> <tenebrousedge> I think listeners should be in an array, yes
sorcus has joined #crystal-lang
<FromGitter> <Blacksmoke16> hash makes it nice since you can do like `@events[event.class]` but the value is a union which breaks everything
<FromGitter> <tenebrousedge> but they should probably also have a consistent input and output type
<FromGitter> <Blacksmoke16> they do, is always `def call(event : ExceptionEvent, dispatcher : AED::EventDispatcherInterface) : Nil`
<FromGitter> <tenebrousedge> so where does the error come from?
<FromGitter> <Blacksmoke16> there can be multiple `#call` methods with a diff type on the first argument
<FromGitter> <Blacksmoke16> so if one listener doesn't listen on that event, you get the error
<FromGitter> <Blacksmoke16> `def call(event, dispatcher : EventDispatcherInterface) : Nil; end` adding this to the parent `Listener` could work...
<FromGitter> <tenebrousedge> that's exactly what I was thinking
<FromGitter> <Blacksmoke16> make the compiler happy and not a big deal since it'll never get called
<FromGitter> <Blacksmoke16> ill take it
<raz> how do i convert a Digest::MD5 to an integer? my old ruby trick of Digest::MD5.hexdigest.to_i(16) doesn't work in crystal :,(
<FromGitter> <tenebrousedge> did you try `to_i16` ?
teardown has joined #crystal-lang
<raz> Invalid Int16: acbd18db4cc2f85cedef654fccc4a4d8 (ArgumentError)
<FromGitter> <Blacksmoke16> prob needs added https://crystal-lang.org/api/master/Digest/MD5.html
<FromGitter> <Blacksmoke16> doesnt look like there are any methods to do that atm
<raz> i'll also be happy about a more longwinded way to convert that hex string back to an int
<raz> these conversions are a bit over my hea
<raz> d
<FromGitter> <tenebrousedge> well, to be fair, it seems that it's not that `to_i` doesn't work, it's that the resulting number is too large
<FromGitter> <tenebrousedge> what are you trying to do?
<raz> generate a postgres lock id which has to be a 64bit number
<FromGitter> <Blacksmoke16> `to_i64`?
<FromGitter> <Blacksmoke16> nvm
<FromGitter> <tenebrousedge> so just any 64 bit number?
<FromGitter> <tenebrousedge> well, may as well use a hash algo I suppose
<raz> still getting that argumentError for Digest::MD5.hexdigest(id).to_i64
<raz> well, that's what i'm trying to do. to use a hash algo :D
<raz> oh wait... md5 is longer than 64bits
<FromGitter> <tenebrousedge> right
<FromGitter> <tenebrousedge> did you try `id.hash` ?
<FromGitter> <tenebrousedge> because that would seem to produce the result you want
<raz> Digest::MD5.hexdigest(id)[0..14].to_i64(16)
<raz> that works!
<FromGitter> <tenebrousedge> I mean, yes, but Crystal has object hashing built-in
<raz> would that hash be stable (same output for same input string) till the end of the universe, tho?
<FromGitter> <tenebrousedge> no, only for the same object
<raz> i'll stick with md5 then ;)
<FromGitter> <tenebrousedge> k
duane has joined #crystal-lang
teardown has quit [Ping timeout: 265 seconds]
<FromGitter> <asterite> also `hash` changes from run to run
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
snsei has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 246 seconds]
<FromGitter> <christopherzimmerman> Design question: I'm leaning towards not importing every method by default as part of module, and having additional imports to add functionality to my core class. ⏎ ⏎ So for example: ⏎ ⏎ ```require "bottle/linalg" ⏎ require "bottle/fft"``` ... [https://gitter.im/crystal-lang/crystal?at=5dd98601b010e62276593543]
<FromGitter> <Blacksmoke16> What's the reasoning for not just including it by default?
<FromGitter> <j8r> it is intuitive if there are `Bottle::Linalg` and `Bottle::Ftt` modules
snsei has quit [Ping timeout: 240 seconds]
<FromGitter> <christopherzimmerman> I guess I don't have a great reason. No harm in having them all on the class.
<FromGitter> <tenebrousedge> I mean, including additional modules doesn't incur much runtime cost if they're not used, right?
<FromGitter> <christopherzimmerman> I assume the compiler would take care of that yea.
<FromGitter> <j8r> yes, if not used, not included at all
<FromGitter> <Daniel-Worrall> It would only *slightly* increase compile time
<FromGitter> <Daniel-Worrall> probably by an immersurable amount unless you were requiring every shard under the sun
<FromGitter> <christopherzimmerman> @konovod any plans to continue work on linalg?
<FromGitter> <kingsleyh> this is ball in action: https://asciinema.org/a/277155
<FromGitter> <lbarasti> I might have stumbled upon a `Channel#select` issue, CC: @bcardiff @waj @firejox ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ raises `Unhandled exception in spawn: BUG: Fiber was awaken from select but no action was activated (Exception)` ... [https://gitter.im/crystal-lang/crystal?at=5dd99b031bf5192e6691135c]
<FromGitter> <manveru> @kingsleyh i use nix for that :)
<FromGitter> <Blacksmoke16> @lbarasti i think thats fixed in master
<FromGitter> <Blacksmoke16> at least i dont get an exception when running it against master
<FromGitter> <lbarasti> Thanks @Blacksmoke16, that's brilliant
<FromGitter> <lbarasti> When is 0.32 scheduled for?
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang/crystal/pull/8509 prob next week or so?
<FromGitter> <lbarasti> 😍
<FromGitter> <Blacksmoke16> interestingly enough i dont get an error on `0.31.1` either
<FromGitter> <kingsleyh> @manveru ball is just a super simple manager with almost no options
<FromGitter> <lbarasti> I'm on 0.31.1, so is the play snippet shared above
<FromGitter> <Blacksmoke16> mac?
<FromGitter> <lbarasti> @Blacksmoke16 yes, mac locally
<FromGitter> <Blacksmoke16> moment
<FromGitter> <j8r> I prefer to compile it on my own
<FromGitter> <lbarasti> BTW, would be great to get this documentation PR in before the release cut https://github.com/crystal-lang/crystal/pull/8356, I don't know if you have the power @Blacksmoke16
<FromGitter> <Blacksmoke16> i do not
<FromGitter> <j8r> @kingsleyh we don't need to be root to install Crystal
<FromGitter> <kingsleyh> @j8r it just uses the official installer which asks for root during install
<FromGitter> <lbarasti> > this is ball in action: https://asciinema.org/a/277155 ⏎ ⏎ @kingsleyh looking good!
<FromGitter> <Blacksmoke16> @lbarasti i actually dont get that on mac either
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <Blacksmoke16> oh wait i missed some code
<FromGitter> <kingsleyh> will there be any big breaking changes in 0.32 ?
<FromGitter> <Blacksmoke16> go read the changelog and see 😉
<FromGitter> <j8r> @kingsleyh ho ok, that's just a wrapper
<FromGitter> <kingsleyh> yup just a simple wrapper
<FromGitter> <lbarasti> Lots of exciting channel related fixes @kingsleyh
<FromGitter> <Blacksmoke16> yea i get the correct text on master
<FromGitter> <Blacksmoke16> so 👍
<FromGitter> <lbarasti> thanks for checking @Blacksmoke16
<FromGitter> <kingsleyh> where is the changelog for 0.32
<FromGitter> <kingsleyh> ah thanks
<FromGitter> <lbarasti> @kingsleyh would be super useful if `ball` could install the latest master commit, too
<FromGitter> <lbarasti> (I guess any commit to master, while you're at it)
<FromGitter> <watzon> Woo I'm ready for 0.32.0
<FromGitter> <watzon> 100th Crystal release. On Github anyway.
<FromGitter> <j8r> What's the purpose of `String#partition`, returning a Tuple containing the searched string in the miiddle? I don't get it
<FromGitter> <j8r> I always found this annoying
<FromGitter> <tenebrousedge> why annoying?
<FromGitter> <tenebrousedge> I don't have an immediate use for it, but it could be more convenient than a regex with capture groups
<FromGitter> <j8r> because I just want what's before and after the searched string/char
<FromGitter> <j8r> Yes I just seen it can be used with regexes
<FromGitter> <tenebrousedge> so `a, _, b = "...".partition`
<FromGitter> <tenebrousedge> or you could use `split`
<FromGitter> <j8r> yes, I always use this `_`
<FromGitter> <tenebrousedge> but `split` returns `Array` and not `Tuple`, I guess
<FromGitter> <j8r> exactly
<FromGitter> <j8r> I suppose the `Tuple(String, String, String)` for all `partition` methods is for consistency with the regex overload
<FromGitter> <tenebrousedge> but you can still do `first, last = "abc".split(/b/)`
snsei has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
snsei has quit [Ping timeout: 252 seconds]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5dd9abae5b3db9548adc4f38]
<FromGitter> <Blacksmoke16> is how it turned out hightower2
<FromGitter> <Blacksmoke16> the value in the subed events represents the priority, higher the number the sooner that listener would be executed
<FromGitter> <Blacksmoke16> now need to do the docs and wrap up tests/final polish
<FromGitter> <Blacksmoke16> and address any feedback ^ (if anyone has any)...
duane has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
<hightower2> cool!
<hightower2> I just finished work on event_handler and released 0.10.0. It adds support for subclassing, channels, and waiting for events
<FromGitter> <Blacksmoke16> waiting for events/
<FromGitter> <Blacksmoke16> ?*
<FromGitter> <Blacksmoke16> does it spawn a fiber or?
<hightower2> yes, it uses channels in the background
<FromGitter> <Blacksmoke16> neat
<hightower2> or rather, for fibers - yes or no, if you already have two fibers you can get it going without creating any additional ones
<FromGitter> <Daniel-Worrall> hightower2 why do you have the procs return a bool? Couldn't you just use nil (or any other return?)
<hightower2> Well, initially I wanted to use a bool so that, if you execute handlers synchronously, you could look at the return value of emit() and see if all handlers "succeeded" or not
<hightower2> However, I've been playing with the idea of potentially allowing any return value, and also having a variant of emit() which does not just return a true/false but gathers all return values and returns them in a list or tuple
<hightower2> However I think bool is not too distracting, because even if it was set to return nil, you'd still have to write "nil" at end of handlers instead of "true"
<hightower2> One simplification could sure be that any return value is simply converted to a true/false implicitly, so one wouldn't have to pay attention to return a bool if not really interested in return values
<hightower2> I'll add it to the todo, thanks
<hightower2> Speaking of which, how do you suggest I approach the idea of returning any (or rather, not having to care about return value)? One idea I have so far is that, since handlers are currently automatically wrapped into wrapper objects, the "call" on the wrapper object could take any return value from the handler and simply !! it before returning
<hightower2> However, I think this would still require providing some explicit Proc(..., ReturnType) for the inner/actual handler, which could be inconvenient
<FromGitter> <Blacksmoke16> i think im more in favor of having the listeners mutate the event obj
<hightower2> This would then mandate the return type on the per-event level?
<FromGitter> <Blacksmoke16> i mean is there really any use case to return something in the first place?
<hightower2> well, I thought it'd be nice to have this true/false status in case all handlers execute synchronously, but I'm not hung up on sticking to this
<hightower2> Is there a way to supress the return value? Or somehow ignore it?
<hightower2> If the Proc was defined to return NoneType, wouldn't this force ending all procs with 'nil'?
<FromGitter> <Blacksmoke16> pretty sure if you type the proc to return `Nil`, it'll return nil even if the last value is not nil
<hightower2> ooh, very cool then
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang/crystal/issues/7698 which is kinda a bug...
<FromGitter> <Blacksmoke16> 😐
<hightower2> ouch
<hightower2> Blacksmoke16 actually this idea of mutating the event for return values is fabulous. It would allow the handlers to return nil always, and if someone cared about return values they could implement them via properties on the event, requiring no special support from the core
<FromGitter> <Blacksmoke16> indeed
<FromGitter> <Blacksmoke16> example of that would be how i plan to use it in athena
<FromGitter> <Blacksmoke16> have a like `HttpEvent` that has references to the request/response
<FromGitter> <Blacksmoke16> listeners mutate them by adding headers etc
<hightower2> fabulous, I'm gonna switch to Nil returns right now
<FromGitter> <Blacksmoke16> like say for CORs, or rendering errors
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <Blacksmoke16> is a much better approach than the `HTTP::Handler` setup i have now tbh
<FromGitter> <j8r> How can I deactivate auto flush for STDOUT in master?
<FromGitter> <Blacksmoke16> isnt it like `STDOUT.sync = false`?
<hightower2> But using nils... when dealing with blocks I do/would have to end with nil so that when blocks are converted to Procs the signature matches, right? Or is there any way to force ignore of the return value?
<FromGitter> <Blacksmoke16> ☝️ November 23, 2019 6:23 PM (https://gitter.im/crystal-lang/crystal?at=5dd9bf8a55bbed7ade32ce3a)
<hightower2> mm, must be some other error then, need to look in more detail
snsei has joined #crystal-lang
<hightower2> Eh yes, it works for Procs, but not when I have blocks received with &handler : \{{e.id}} -> Nil
<FromGitter> <Blacksmoke16> might just have to require them to do like ⏎ ⏎ ``` ... ⏎ nil ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5dd9c696d2c92c2275e4e867]
<FromGitter> <Blacksmoke16> :shrug:
<hightower2> yes, yes, this is what I meant that I'd have to specify nil in some cases... Or well, I seem to remember I could dump the whole body of blocks within macros with {{block.body}}, so maybe I could just create my own block with dumped body, and just added 'nil' at the end
<FromGitter> <Blacksmoke16> probably