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