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> PV_, have a look through the standard library. search for ": var"
<PV_> OK, thanks.
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 240 seconds]
cenomla has quit [Ping timeout: 248 seconds]
arBmind1 has quit [Quit: Leaving.]
cenomla has joined #zig
<andrewrk> I'm going to live stream a talk called "Software Should Be Perfect" in 25 minutes
<andrewrk> starting now; https://www.twitch.tv/superjoe30
tiehuis has quit [Quit: WeeChat 1.9.1]
cenomla has quit [Quit: cenomla]
arBmind has joined #zig
jfo has joined #zig
<jfo> hi can anyone tell me how to output llvm ir? I am trying `zig build-exe --emit llvm-ir fn.zig` but getting an error:
<jfo> Undefined symbol: C entry: _main
<jfo> symbol(s) not found
<jfo> warning: -sdk_version is required when emitting min version load command. Setting sdk version to match provided min version
jfo has quit [Ping timeout: 248 seconds]
jfo has joined #zig
<andrewrk> jfo, can I see your fn.zig file
ofelas has joined #zig
<redj> hey andrewrk, I'm curious, where can I see that "Software Should Be Perfect" talk?
<andrewrk> redj, I messed up trying to record it, and twitch didn't save the vod. so I'll have to re-record it
<redj> oh no :(
jfo has quit [Ping timeout: 248 seconds]
jfo has joined #zig
<jfo> andrewrk: pub fn main() -> %void { }
<andrewrk> hm it works for me
<jfo> you get llvmir out of it?
<andrewrk> yes
<andrewrk> it makes fn.ll
<jfo> andrewrk: well idk then
<jfo> hmm
<andrewrk> jfo, if you don't do the --emit argument, what happens?
<jfo> andrewrk: produces an executable as normal
<andrewrk> I'll try it on macos
<jfo> cool lmk what it does!
<andrewrk> you can also use --verbose-llvm-ir
<andrewrk> I get the same thing on my macos
<andrewrk> same thing as you
<andrewrk> --verbose-llvm-ir works though
sparris has joined #zig
<sparris> I miss tuples (or similar features like pairs/triples) in zig but I got excited when I saw test/cases/misc.zig : "// TODO arg tuple". Does this mean that support for tuples are planned?
<andrewrk> sparris, that's just talking about @typeId(@typeOf(args)) for something like fn(args: ...)
<andrewrk> tuples aren't ruled out. we might allow multi-assignment and multi-return from blocks
<sparris> I understand that tuples might complicate the language, there seem to be some discussion about it in swift (by Slava Pestov for example). Is there another "recommended" way for this? I am thinking of introducing a struct for each type combination that I need to return.
<jfo> oh interesting let me try
<andrewrk> sparris, yes that is the recommended way, using a struct
<andrewrk> if the use case becomes awkward, and you file an issue showing some awkward code, that would be good justification for zig to add tuples
<jfo> andrewrk: I get https://gist.github.com/jfo/a944eb297ebca5b9da5b65063146de0d sent to stderr, is that as expected?
<sparris> Got it, thanks.
<andrewrk> jfo, yep
<andrewrk> jfo, if you want simpler IR I suggest using --release-fast
<andrewrk> and then look at the ; ModuleID = 'hello' one post-optimization
ofelas has quit [Quit: shutdown -h now]
jfo has quit [Ping timeout: 268 seconds]
jfo has joined #zig
cenomla has joined #zig
cenomla has quit [Read error: Connection reset by peer]
cenomla_ has joined #zig