ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<andrewrk>
don't be scared of the parameters. you just call output(context, "text")
<andrewrk>
you can thank MajorLag2 for this functionality
<winksaville>
txs
<winksaville>
MajorLag2: And txs to you for adding custom fmt!
wilsonk has quit [Read error: Connection reset by peer]
<winksaville>
I've asked questions that didn't get answered here, probably because they were lost amongst the other posts. There is a ziglang@googlegroups.com should I post over there?
<andrewrk>
sure
<andrewrk>
you can also repeat your questions periodically
<winksaville>
I have, but I feel like I'm being a nag :) Should we add a link to it on ziglang.org?
<winksaville>
I'll add a PR to github ziglang/www.ziglang.org
<andrewrk>
we also don't have a link to the subreddit on the home page
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristate has quit [Remote host closed the connection]
davr0s has joined #zig
<ofelas>
andrewrk: thanks
Bas_ has joined #zig
zolk3ri has quit [Remote host closed the connection]
bheads_ has joined #zig
bheads__ has quit [Ping timeout: 256 seconds]
<unique_id>
I don't expect this to be the case, but is there something like __LINE__?
Bas_ has quit [Ping timeout: 252 seconds]
<andrewrk>
unique_id, no. I was thinking about adding a builtin function for obtaining a comptime struct which contains things like line, column, source file, etc
<andrewrk>
I think I'd like to remove `this` in favor of builtin functions
<andrewrk>
unique_id, oh, there is one really nice thing you can do
<andrewrk>
I haven't tried this yet, but capture @returnAddress() and store the resulting usize somewhere. that points to a point in your binary that you can then map back to source with std.debug.printSourceAtAddress
<andrewrk>
that's what error return traces do internally
<andrewrk>
the nice thing about this is you can do it at runtime - capture locations of various things and then only print them if something goes wrong
<andrewrk>
we could also have a function std.debug.captureStackTrace where you give it a # of frames to capture, and then you can later free it or print it
<andrewrk>
if you pick some low number like 4, it's actually a pretty cheap operation
<andrewrk>
all the hard problems to do this stuff is solved, what's missing is some glue code / convenience API
<ofelas>
would that work on a stripped executable?
<andrewrk>
no
<andrewrk>
but you could store the addresses/stack traces somewhere, retrieve them later, and then map them to your debug info
<unique_id>
printSourceAtAddress is private :) - I really don't need this functionality atm
<andrewrk>
right, that's what I mean about glue code
<unique_id>
how do I run/write tests that depend on linked in 3rd party libraries, atm I'm getting undefined symbol errors
<andrewrk>
--library foo should work for the test command
<unique_id>
yeah it works
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]