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
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 272 seconds]
<SamantazFox> Blacksmoke16: Ok, thanks!
<SamantazFox> rjnienaber: Ah, yes, indeed, I want to keep the backtrace, as this will be given to the end user if something fails!
<FromGitter> <Blacksmoke16> id also suggest using that `cause` exception property
<FromGitter> <Blacksmoke16> then you can keep a reference to the original exception
<SamantazFox> Noted, ty :)
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
Sankalp has quit [Ping timeout: 250 seconds]
Sankalp has joined #crystal-lang
fifr_ has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us has quit [Quit: Leaving]
jmdaemon has quit [Ping timeout: 272 seconds]
<FromGitter> <ym418_twitter> Two independent specs seem to interfere. Does someone tell me why? ⏎ I have two specs below: ⏎ ⏎ 1) spec/domain/c*v*e/id_spec.cr ⏎ 2) spec/domain/c*w*e/id_spec.cr ... [https://gitter.im/crystal-lang/crystal?at=6356823ccd9a8436d1304ba2]
greenbigfrog has quit [Ping timeout: 260 seconds]
greenbigfrog has joined #crystal-lang
Starfoxxes has quit [Ping timeout: 252 seconds]
Starfoxxes has joined #crystal-lang
jhass[m] has quit [Quit: Bridge terminating on SIGTERM]
jhass[m] has joined #crystal-lang
_ht has joined #crystal-lang
jmdaemon has joined #crystal-lang
_ht has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
olbat has quit [*.net *.split]
riza has quit [*.net *.split]
riza has joined #crystal-lang
olbat has joined #crystal-lang
olbat has quit [Changing host]
olbat has joined #crystal-lang
<FromGitter> <moe:busyloop.net> brrr, i really hope crystal adds `throws` at some point
* FromGitter * moe:busyloop.net fixes yet another spurious exception bubbling up from the guts of stdlib
<SamantazFox> Is it only me, or there is an offset between the function name and the filename in the exception backtrace?
<FromGitter> <Blacksmoke16> afaik in some cases the trace may be a bit wonky due to inlining and stuff
<SamantazFox> inlining ?
<FromGitter> <Blacksmoke16> like if you do something like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=63570b67cf41c67a5cc7ff15]
<FromGitter> <Blacksmoke16> LLVM could change the method calls into essentially just `pp 1 + 2`
<SamantazFox> Ah, I see
<SamantazFox> Btw, is there something to see what's fed to LLVM?
<SamantazFox> or at least some code pretty late in the compilation (e.g after ECR and macros being expanded)?
<SamantazFox> That would be really cool to debug
<FromGitter> <Blacksmoke16> you can see what LLVM sees
<FromGitter> <Blacksmoke16> `--emit [asm|obj|llvm-bc|llvm-ir] Comma separated list of types of output for the compiler to emit`
<SamantazFox> Cool! Ty!
<FromGitter> <Blacksmoke16> https://godbolt.org/z/qcYfGjEYW this site is also pretty cool
<FromGitter> <Blacksmoke16> can see in this example it basically reduces the whole program to a single value of `13`
<SamantazFox> mmh, *nods*
<SamantazFox> Though, figuring out some of the bugs I'm getting is gonna be harder than expected lol
<SamantazFox> I'm betting on `--release` to be broken again
<FromGitter> <Blacksmoke16> my understanding is `--release --no-debug` is what makes it hard
<FromGitter> <Blacksmoke16> a release build with `--debug` should be able to rebuild the trace id think?
<SamantazFox> it indeed builds a trace (See the error I've linked above)
<SamantazFox> but the error doesn't make sense, as the function where this error happens have enforced data types
<SamantazFox> I can't reproduce without `--release`, so I'm compiling again and we'll see
<SamantazFox> (Why do I always encounter weird edge cases, lol)
<FromGitter> <Blacksmoke16> crazy complex code? :P
<FromGitter> <Blacksmoke16> if i had to guess, that error is due to the underlying `JSON::Any`containing an array and not a hash as it expects
<FromGitter> <Blacksmoke16> er well thats exactly what is happening, but the question is why
<SamantazFox> crazy complex code? :P <- yeaaaah <_<
<SamantazFox> Also handling and trasversing large unknown data structures is hard
<SamantazFox> Ok, managed to get it to work in release mode!
<SamantazFox> I've retrieved the source structure for analysis.
<FromGitter> <Blacksmoke16> Nice one!
<SamantazFox> Damn it, the whole data structure changed D:
<SamantazFox> Welp, I'm good to start over :c
<FromGitter> <Blacksmoke16> That would do it