ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
arBmind has quit [Quit: Leaving.]
<andrewrk> dimenus, assertion fixed and pushed. llvm6 branch passes all tests with llvm built in debug mode
<GitHub71> [zig] andrewrk pushed 1 new commit to master: https://git.io/vFZQv
<GitHub71> zig/master dc8b011 Andrew Kelley: fix incorrect debug info for empty structs...
<dimenus> very nice
<dimenus> does the IR looks similar now?
_dev_zero has quit [Ping timeout: 248 seconds]
_dev_zero has joined #zig
_whitelogger has joined #zig
<dimenus> building libpng on windows =|
<dimenus> even with their janky CRT, I prefer mingw
<andrewrk> dimenus, yes it does
<andrewrk> I think depending on libpng in the tetris game was a bad decision. too hard on windows
<andrewrk> I'd like to get a pure zig png library going
<andrewrk> anyone who is working on a project using zig: if you leave me a note here it would be helpful: https://www.reddit.com/r/Zig/comments/7agvvf/folks_who_are_working_on_projects_in_zig_what_are/
<GitHub62> [zig] andrewrk pushed 1 new commit to master: https://git.io/vFZby
<GitHub62> zig/master a31b23c Andrew Kelley: more compile-time type reflection...
pupppp has joined #zig
PV_ has quit [Ping timeout: 260 seconds]
tiehuis has joined #zig
arBmind has joined #zig
<GitHub146> [zig] tiehuis opened pull request #580: Add emit command-line option (master...emit-addition) https://git.io/vFneX
arBmind has quit [Quit: Leaving.]
cenomla has quit [Quit: cenomla]
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
puppp has joined #zig
pupppp has quit [Ping timeout: 260 seconds]
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
arBmind has joined #zig
arBmind has quit [Ping timeout: 240 seconds]
arBmind has joined #zig
tiehuis has quit [Quit: WeeChat 1.9.1]
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
puppp has quit [Ping timeout: 248 seconds]
puppp has joined #zig
<GitHub194> [zig] andrewrk closed pull request #580: Add emit command-line option (master...emit-addition) https://git.io/vFneX
<GitHub110> [zig] andrewrk pushed 1 new commit to master: https://git.io/vFngp
<GitHub110> zig/master 795703a Marc Tiehuis: Add emit command-line option (#580)...
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
puppp has quit [Ping timeout: 240 seconds]
puppp has joined #zig
<ltr_> zig working in llvm6 means not working in llvm5?
<ltr_> with*
<andrewrk> ltr_, it's a branch
<andrewrk> master branch works with llvm5, llvm6 branch works with llvm master
<ltr_> i mean if zig would work with llvm 5.0 and llvm 6.0 eventually
<andrewrk> ltr_, no, we're always going to track the latest release of LLVM. if you want an older LLVM, use an older zig
<andrewrk> that's the idea
<ltr_> cool
dimenus_ has joined #zig
dimenus is now known as Guest327
dimenus_ has left #zig ["Leaving"]
dimenus_ has joined #zig
dimenus_ has left #zig ["Leaving"]
dimenus has joined #zig
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
arBmind has quit [Quit: Leaving.]
puppp has quit [Quit: puppp]
arBmind has joined #zig
cenomla has joined #zig
arBmind has quit [Quit: Leaving.]
<dimenus> andrewrk: figured out that GLFW parsing issue @haferburg is having
<dimenus> line endings....
<dimenus> i was going nuts because i couldn't replicate it at first, but I have unix line endings setup in sublime text on .h/.c files
<dimenus> but i cracked open a hex editor and found it
<andrewrk> oh wow
<andrewrk> dimenus, good find
<andrewrk> the c tokenizer should support \r\n
<dimenus> does anything else generate a carriage return?
<dimenus> is it safe to consider '\r' the end of a macro as well?
<andrewrk> I believe so. I'm trying to find the C specification
<andrewrk> found it. it just says "the new-line character"
<andrewrk> dimenus, I just read the spec, apparently it's implementation defined what a "newline" is in C
<andrewrk> this is so silly
<andrewrk> we'll just accept \r\n as well as \n
<dimenus> c_import is always going to be text
<dimenus> so it's not like w're ignoring a rogue 0xD
<andrewrk> yeah
<andrewrk> anyway, great find dimenus. are you working on a fix?
<dimenus> will be in a bit
tiehuis has joined #zig
PV_ has joined #zig
<PV_> I have question about Zig equivalent of conditional compilation in C:
<PV_> struct xyz { int x;
<PV_> #ifdef FOO
<PV_> int y;
<PV_> #endid
<PV_> } ;
<PV_> ...
<PV_> #ifdef FOO
<PV_> val.y = 1;
<PV_> #endif
<PV_> I tried this in Zig:
<PV_> const FOO : bool = true;
<PV_> const xyz = struct { x : i32,
<PV_> if (FOO) y : i32;
<PV_> }
<PV_> but then the compiler complains about the "if".
<GitHub22> [zig] Dimenus opened pull request #581: Add support for windows line endings with c macros (master...line_endings) https://git.io/vFcKN
<tiehuis> i'd try this strategy: https://clbin.com/aEXIW
<tiehuis> Don't believe you can use if statements in that way since they act as an expression, but you don't want an expression there but a declaration of y
<tiehuis> giving a void type should be compiled out and have no overhead
<PV_> @tiehus: this compiles, but it feels cumbersome. Imagine structure with dozen of conditionally compiled members (say collected runtime statistics for an allocator).
<PV_> Using comptime if was something I expected to work.
<GitHub189> [zig] haferburg opened pull request #582: Allow Windows line endings (master...line-endings2) https://git.io/vFcP3
<GitHub10> [zig] Dimenus opened pull request #583: Win32 libc runtime fixes. (master...libc_runtime) https://git.io/vFcPX
<tiehuis> you can do all that inline with a struct for multiple members if you want to have more brevity
<PV_> I tried the suggested struct, it works, but still. Was the "conditional compilation by comptime if" considered and rejected?
<tiehuis> i can't recall on the top of my head
<tiehuis> in some ways it does make sense there, considering it is allowed at the top-level, but I suppose it would need to be considered against the existing way
dimenus has quit [Ping timeout: 248 seconds]
<GitHub179> [zig] andrewrk closed pull request #583: Win32 libc runtime fixes. (master...libc_runtime) https://git.io/vFcPX
<GitHub135> [zig] andrewrk pushed 2 new commits to master: https://git.io/vFcMp
<GitHub135> zig/master d4c1ed9 Andrew Kelley: Merge pull request #583 from Dimenus/libc_runtime...
<GitHub135> zig/master 1890760 dimenus: Windows libc & static libc are located in the same dir which is already covered by msvc_lib_dir
<GitHub101> [zig] andrewrk closed pull request #581: Add support for windows line endings with c macros within a c_import. (master...line_endings) https://git.io/vFcKN
<GitHub66> [zig] andrewrk pushed 2 new commits to master: https://git.io/vFcDb
<GitHub66> zig/master 75afe73 Andrew Kelley: Merge pull request #581 from Dimenus/line_endings...
<GitHub66> zig/master 1ef6cb1 dimenus: Add support for windows line endings with c macros
<GitHub46> [zig] andrewrk closed pull request #582: Allow Windows line endings (master...line-endings2) https://git.io/vFcP3
<andrewrk> hi tiehuis
<tiehuis> hi
<andrewrk> hmm I'm still getting "no compilers found" in your compiler-explorer fork
<tiehuis> running `make LANG=zig` and adjusted the path in etc/config?
<andrewrk> ah, I needed the LANG=zig
<tiehuis> yeah, it took me a while to figure out how to set the compiler I wanted
<tiehuis> by default it uses the C++ system compiler
<tiehuis> although the paths are probably configured specifically for linux so may now have picked anything up
<andrewrk> hmm it says compilation failed with no other output
<tiehuis> click the bottom warning symbol of sorts
<andrewrk> oh I need to set options
<andrewrk> ahh there's the stderr!
<tiehuis> you'll also want to use the binary output `11010` option
<andrewrk> ahh
<tiehuis> since I haven't yet added the assembly emitting and need to adjust its output filename properly
<tiehuis> the main stub I added isn't working completely so you will need to add your own
<andrewrk> I'll work on https://github.com/zig-lang/zig/issues/462 which should clean up some of the extra symbols in the output
<tiehuis> awesome, it'd be cool if we could easily differentiate our symbols vs the stdlib/compiler ones
<andrewrk> oh, or we could just compile with optimizations
<tiehuis> I added some filtering of them but it doesn't hide all of them
<tiehuis> that would help, the generated asm with --release-fast is pretty lean and usually not too bad
<tiehuis> oh nice, that looks better than mine
<andrewrk> hmm I didn't have to implement the panic function either
<tiehuis> yeah, just exporting seems to generate good stuff