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
<FromGitter> <mattrberry> Is it possible to get the type of the `method_missing` call args at compile-time? Looking at the docs and the source it seems like it's not, but I want to make sure I'm not missing anything
<FromGitter> <mattrberry> Currently looking to do something fun like ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ to allow you to do things like `shader.foo = 0.5` or `shader.bar = false` [https://gitter.im/crystal-lang/crystal?at=61073e316ccf813819ed3aca]
<FromGitter> <mattrberry> I could just have method overloads for the acceptable types that allow me to do `shader.set(:foo, 0.5)`, but I thought it would be fun to mess around with the method_missing macro since I haven't done that before
<FromGitter> <Blacksmoke16> wouldn't be easier to just have multiple entrypoint files that do this kinda stuff
<FromGitter> <Blacksmoke16> \cc @ryanprior:matrix.org
<FromGitter> <ryanprior:matrix.org> @Blacksmoke16: that's what I decided to do for now :)
<FromGitter> <mattrberry> @ryanprior:matrix.org This might be bad, but this is how I do something like python's `if __name__ == "__main__"`: `unless PROGRAM_NAME.includes?("crystal-run-spec")`
<FromGitter> <mattrberry> I just check if the program name includes `crystal-run-spec`
<FromGitter> <mattrberry> Then don't run the application code when it's under test
<FromGitter> <ryanprior:matrix.org> Thank you @mattrberry that might be helpful =D
<FromGitter> <ryanprior:matrix.org> Separately: when using the DB module, is there a way to get it to print the query strings it sends, for debugging purposes?
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #crystal-lang
avane has joined #crystal-lang
ua_ has quit [Excess Flood]
ua_ has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<raz> ryanprior: `Log.builder.bind "db.*", :debug, backend`
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #crystal-lang
Guest3216 has joined #crystal-lang
Guest3216 has quit [Client Quit]
winger has joined #crystal-lang
winger has quit [Read error: Connection reset by peer]
ur5us has joined #crystal-lang
sorcus has quit [Quit: WeeChat 3.2]
sorcus has joined #crystal-lang
ur5us has quit [Ping timeout: 272 seconds]
ua_ has quit [Ping timeout: 258 seconds]
ur5us has joined #crystal-lang
ur5us_ has joined #crystal-lang
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has quit [Ping timeout: 245 seconds]
ua_ has joined #crystal-lang
_whitelogger has joined #crystal-lang
ua_ has quit [Ping timeout: 272 seconds]
ur5us_ has joined #crystal-lang
ua_ has joined #crystal-lang
<FromGitter> <manveru:matrix.org> is there some way to convert an `Array(String)` into `Pointer(Pointer(UInt8))` easily?
<FromGitter> <Blacksmoke16> `pointerof(array.to_unsafe)`?
<FromGitter> <manveru:matrix.org> unfortunately that's not valid :)
<FromGitter> <Blacksmoke16> ```arr_ptr = arr.to_unsafe ⏎ pointerof(arr_ptr)``` [https://gitter.im/crystal-lang/crystal?at=61087fbcd8381a2a83a6f8a0]
<FromGitter> <manveru:matrix.org> the best i've found is `a.map(&.to_unsafe).to_unsafe`
<FromGitter> <manveru:matrix.org> ah, ok