ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
atk has quit [Quit: Well this is unexpected.]
JinShil has joined #zig
atk has joined #zig
rom1504 has quit [Quit: WeeChat 1.0.1]
quc has quit [Ping timeout: 264 seconds]
quc has joined #zig
hoppetosse has quit [Ping timeout: 260 seconds]
mahmudov has quit [Remote host closed the connection]
xtreak has joined #zig
xtreak has quit [Read error: Connection reset by peer]
xtreak has joined #zig
wilsonk has quit [Ping timeout: 276 seconds]
hryx has joined #zig
<hryx> Nice job @andrewrk!!
wilsonk has joined #zig
qazo has joined #zig
hoppetosse has joined #zig
xtreak has quit [Remote host closed the connection]
JinShil has quit [Quit: Leaving]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
xtreak has joined #zig
zolk3ri has joined #zig
davr0s has joined #zig
quc has quit [Ping timeout: 260 seconds]
hoppetosse has quit [Ping timeout: 248 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hryx has quit [Quit: Leaving]
davr0s has joined #zig
hoppetosse has joined #zig
stratact has quit [Quit: Leaving]
<bheads_> stage2 hello world!? Nice
xtreak has quit []
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qazo has quit [Quit: Page closed]
bheads__ has joined #zig
bheads_ has quit [Ping timeout: 244 seconds]
xtreak has joined #zig
Tobba has quit [Ping timeout: 244 seconds]
eena has joined #zig
l1x has quit [Ping timeout: 256 seconds]
jzelinskie has quit [Ping timeout: 256 seconds]
atk has quit [Ping timeout: 256 seconds]
meena has quit [Ping timeout: 256 seconds]
occivink has quit [Ping timeout: 256 seconds]
jzelinskie has joined #zig
l1x has joined #zig
jzelinskie has quit [Changing host]
jzelinskie has joined #zig
jzelinskie has joined #zig
atk has joined #zig
atk has quit [Changing host]
atk has joined #zig
occivink has joined #zig
winksaville has quit [Ping timeout: 252 seconds]
winksaville has joined #zig
davr0s has joined #zig
xtreak has quit [Remote host closed the connection]
<andrewrk> ofelas, congrats on working deflate/inflate
<winksaville> Is there a way to "extend" std/fmt dynamically to be able print non-primitive types?
Tobba has joined #zig
winksaville has left #zig [#zig]
winksaville has joined #zig
<andrewrk> winksaville, yes, you can define a format function on your struct or union
<andrewrk> pub fn format( self: Int, comptime fmt: []const u8, context: var, comptime FmtError: type, output: fn (@typeOf(context), []const u8) FmtError!void,) FmtError!void
<andrewrk> where `Int` is your type
<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
<winksaville> k, I'll add that too
eena is now known as meena
<andrewrk> thanks
kristate has joined #zig
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…]
davr0s has joined #zig
hoppetosse has quit [Ping timeout: 268 seconds]
hoppetosse has joined #zig
wilsonk has joined #zig
bheads__ has joined #zig
bheads_ has quit [Ping timeout: 256 seconds]