ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
hasen_judy has joined #zig
arBmind has quit [Quit: Leaving.]
hasen_judy has quit [Remote host closed the connection]
<andrewrk> dimenus, I don't see 10.0.10240.0 (or any version number) in HKLM\SOFTWARE\Microsoft\Windows Kits\InstalledRoots\
<andrewrk> In fact I searched the whole registry and I don't see this version string anywhere
<andrewrk> dimenus, also, c:\Program files (x86)\Windows Kits\10\Lib\10.0.10240.0\um doesn't exist. get_kern32_lib is wrong
<andrewrk> that folder is c:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\\um for me
<dimenus> Microsoft backported the windows 10 sdk
<dimenus> you can install it in vs2015
<dimenus> wait, it doesn't panic?
<andrewrk> I shouldn't need to install anything
<andrewrk> my hard coded patch worked without doing this windows 10 sdk install
<andrewrk> I'm fixing it
<dimenus> what do you mean? the ucrt libs do not exist in the windows 8 sdk
<dimenus> it's not a 1 to 1 translation
<andrewrk> for me ucrt is in c:\Program files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt
<andrewrk> and kernel32.lib is in c:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\\um
<dimenus> that's what the program gave you or that's what you're saying are valid paths for you?
<dimenus> if it's the latter, we need to do more work
<andrewrk> these are valid paths for me. I'm working on it
<dimenus> ah, because you have the Universal C Runtime installed I bet
<dimenus> but not the Windows 10 SDK
<andrewrk> I did whatever was the default when I installed vs2015
<dimenus> I mean we could just append all of the found paths?
<dimenus> That's how Visual Studio does it
<dimenus> I'm not sure how LLD would consider which one to grab though
<dimenus> (in my case i have the 8.1 & the 10 sdk both installed)
dimenus has quit [Quit: Leaving]
<andrewrk> got it working
dimenus has joined #zig
<andrewrk> dimenus, try the branch Dimenus-master and see if it still finds msvc2017 for you
<andrewrk> you can use something like this to see which one it used:
<andrewrk> bin\zig.exe build-exe ..\example\hello_libc.zig --library c --verbose-link
<andrewrk> dimenus, you never ended up using the COM stuff, right?
<andrewrk> oh, nvm, I see it for the vcruntime path
<dimenus> no I did, that's for vcruntime though.
<dimenus> testing now
<andrewrk> if the Dimenus-master branch is working for you, I'll merge it now
<dimenus> yep, works fine
<andrewrk> hmm it broke in appveyor though: https://ci.appveyor.com/project/andrewrk/zig-d3l86/build/1.0.504
<andrewrk> this has to pass
<andrewrk> I gotta go. I'll look at this again tomorrow
<GitHub127> [zig] andrewrk pushed 6 new commits to master: https://git.io/vFOmv
<GitHub127> zig/master 4f4da3c Andrew Kelley: wip self hosted code
<GitHub127> zig/master 4c306af Andrew Kelley: add test case for previous commit
<GitHub127> zig/master 540bac0 Andrew Kelley: Merge branch 'master' into self-hosted
<GitHub32> [zig] andrewrk pushed 1 new commit to master: https://git.io/vFOmG
<GitHub32> zig/master 25972be Andrew Kelley: fix windows build from previous commit
<andrewrk> dimenus, if you want to look at this, you can test appveyor by pushing to your pull request and then watching appveyor build the PR
<andrewrk> dimenus, you had it working before I added commits, so something I did must have made it not work on appveyor anymore. I wonder what that is.
<andrewrk> you should base your work off of Dimenus-master branch: https://github.com/zig-lang/zig/compare/Dimenus-master?expand=1
<dimenus> I'll check it out tomorrow for sure. Thanks for looking at this
hoppetosse has quit [Ping timeout: 240 seconds]
hasen_judy has joined #zig
hasen_judy_ has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
hasen_judy_ is now known as hasen_judy
pupppp has joined #zig
hasen_judy has left #zig [#zig]
tiehuis has joined #zig
cenomla has quit [Quit: cenomla]
hasen_judy has joined #zig
pupppp has quit [Read error: Connection reset by peer]
pupppp has joined #zig
hasen_judy has quit [Ping timeout: 258 seconds]
pupppp has quit [Ping timeout: 248 seconds]
pupppp has joined #zig
_dev_zero has quit [Ping timeout: 248 seconds]
_dev_zero has joined #zig
arBmind has joined #zig
<GitHub174> [zig] haferburg opened pull request #574: Enforce "\n" line endings on Windows (master...line-endings) https://git.io/vFO4S
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
pupppp has quit [Read error: Connection reset by peer]
pupppp has joined #zig
puppp has joined #zig
pupppp has quit [Ping timeout: 240 seconds]
arBmind has quit [Quit: Leaving.]
arBmind has joined #zig
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 240 seconds]
tiehuis has quit [Quit: WeeChat 1.9.1]
puppp has quit [Ping timeout: 255 seconds]
puppp has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
puppp has quit [Ping timeout: 248 seconds]
puppp has joined #zig
hasen_judy has joined #zig
arBmind has joined #zig
arBmind1 has quit [Ping timeout: 248 seconds]
dimenus has quit [Ping timeout: 240 seconds]
hasen_judy has quit [Remote host closed the connection]
dimenus has joined #zig
hoppetosse has joined #zig
puppp has quit [Ping timeout: 248 seconds]
hasen_judy has joined #zig
<GitHub31> [zig] andrewrk pushed 1 new commit to master: https://git.io/vF3eT
<GitHub31> zig/master b35689b Andreas Haferburg: Enforce "\n" line endings on Windows (#574)...
<GitHub118> [zig] andrewrk closed pull request #574: Enforce "\n" line endings on Windows (master...line-endings) https://git.io/vFO4S
puppp has joined #zig
hasen_judy has quit [Remote host closed the connection]
hasen_judy has joined #zig
hasen_judy has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
hasen_judy has joined #zig
arBmind has joined #zig
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 252 seconds]
hasen_judy has quit [Remote host closed the connection]
puppp has quit [Ping timeout: 258 seconds]
puppp has joined #zig
arBmind1 has quit [Quit: Leaving.]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
<dimenus> andrewrk: if I run the test that the appveyor failed on, it asserts in LLVM. The top Zig function is: ZigLLVMTargetMachineEmitToFile
<andrewrk> we don't support llvm assertions because of a bug in llvm.
<andrewrk> however it is fixed in llvm master branch, so when they release a new version we can go back to having llvm assertion support
<dimenus> it's a different assert, and I get it in master as well
<dimenus> Assertion failed: !isa<DIType>(Scope) && "shouldn't make a namespace scope for a type", file F:\code\tools\llvm\lib\CodeGen\AsmPrinter\CodeViewDebug.cpp, line 263
<andrewrk> ah yes I'm still working on that one
<dimenus> was this caused by something merged into master yesterday?
<andrewrk> no
<andrewrk> I think it's been a long standing issue, and llvm master added a new assert that caught it
<andrewrk> I don't know how difficult it's going to be to fix, it could be trivial
<andrewrk> I haven't had a chance to look at it yet
<dimenus> hmmm, am i using appveyor wrong then?
<dimenus> trying to troubleshoot the test that failed yesterday when you merged Dimenus-master
<andrewrk> dimenus, here's one where I added --verbose-link
<andrewrk> scroll up to just before the tests run
<andrewrk> I think I might know the problem
<andrewrk> dimenus, in link.cpp, we create a child CodeGen and set values to match the parent
<andrewrk> wait, never mind
<dimenus> the path is wrong for vcruntime
<andrewrk> which one?
<andrewrk> oh, this one: -LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\
<andrewrk> it's missing the part after that
<dimenus> yep
<dimenus> i've got it, give me a second
<dimenus> andrewrk: does buf_resize(buf, num) expect the 'num' value to be the terminator position?
<dimenus> or the end of the string?
<andrewrk> buf_ptr(buf)[buf_len(buf)] == 0
<dimenus> yeah it's an off by one error
<dimenus> RegQueryValueExA returns the value including the null terminator
<andrewrk> I see
<dimenus> and when I was setting the length explicitly, that worked
<dimenus> because the length really includes the null terminator
<andrewrk> ok, still use buf_resize but subtract 1 from the length
<dimenus> but buf_resize() really wants the real length of the string
<dimenus> yep
<andrewrk> yes
<andrewrk> nice find
<dimenus> ok, changes pushed
<dimenus> hopefully that builds/satisfies everything
<dimenus> not sure what your philosphy on comments is. I try not to comment much, only when its harder to reason about something.
<dimenus> it's always easier to reason about code if you just wrote it a few days ago ;)
<andrewrk> if the code is clear, it's fine
<GitHub199> [zig] andrewrk pushed 1 new commit to master: https://git.io/vF3MA
<GitHub199> zig/master 38f05d4 Dimenus: WIN32: Linking with the CRT at runtime. (#570)...
<GitHub54> [zig] andrewrk closed pull request #570: WIN32: Linking with the CRT at runtime. (master...master) https://git.io/vFqwC
<andrewrk> congrats dimenus
<dimenus> thanks
<dimenus> note to self, create PRs from non-master next time
<dimenus> this is really my first exposure to git too
<andrewrk> really impressive work
<dimenus> btw, this should close #539 as well
<dimenus> I think I want to look into #515
<andrewrk> ah that should be fun
<andrewrk> you're really taking on the difficult issues, ha
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
<andrewrk> dimenus, that issue requires a design proposal: the c-style var args syntax
_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
<dimenus> hmm, maybe I should go after more low hanging fruit then
<dimenus> also, why do we have to specify that a string is a 'c string' when passed into a c function?
<dimenus> shouldn't zig be able to coerce that into the appropriate type?
<dimenus> eg c.puts("hello from libc");
<andrewrk> a byte array literal in zig is, e.g. [11]u8
<andrewrk> what c.puts wants is a null terminated &u8
<GitHub49> [zig] andrewrk pushed 1 new commit to master: https://git.io/vF3di
<GitHub49> zig/master f7837f4 Andrew Kelley: bump build_runner allocator to use 30 MB
<andrewrk> dimenus, what project would you (eventually) like to create using zig? this could help me suggest an issue you could work on to help toward that goal
<dimenus> i'm working on a sheepshead (card game) in pure C
<dimenus> so I started on libc because I wanted to work on opengl/gl3w
<dimenus> and LoadLibraryA was failing
<andrewrk> dimenus, you could help haferburg with this: https://github.com/zig-lang/zig/issues/576
<andrewrk> does your sheepshead game use glfw, sdl, or other?
hasen_judy has joined #zig
<andrewrk> oh, gl3w
<dimenus> glfw/glf3w
<dimenus> gl3w = opengl loader
<dimenus> not to be confused with glfw
<dimenus> lol
hasen_judy has quit [Ping timeout: 252 seconds]
<dimenus> andrewrk: is there any easy way to print a typename?
<dimenus> hah, i'm sorry for that one :(
<andrewrk> no worries
<dimenus> one more question, is there any easy way to ignore return values? I like that zig makes you handle them by default
<dimenus> but sometimes I just don't care when a function returns a failure
dimenus has quit [Quit: Leaving]
<andrewrk> _ = foo()
<andrewrk> that's for a non-error
<andrewrk> if it's an error: foo() %% {}
<andrewrk> that's to ignore the error.
<andrewrk> if you're saying, assert that it will never be an error: %%foo()
hasen_judy has joined #zig
dimenus has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
hasen_judy has joined #zig