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 quit [Remote host closed the connection]
dimenus has quit [Read error: Connection reset by peer]
<andrewrk> Dimenus, HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows has 2 properties
<andrewrk> CurrentInstallFolder=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\
<andrewrk> CurrentVersion=8.0.50727
<andrewrk> the path has nothing useful to zig in it
hasen_judy has joined #zig
hasen_judy has quit [Quit: hasen_judy]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
hasen_judy has joined #zig
<hasen_judy> Just looked at the log from couple days ago https://irclog.whitequark.org/zig/2017-10-24
<hasen_judy> Sorry did not get your reply at the time andrewrk
<hasen_judy> Thanks for creating a github ticket for it :)
<andrewrk> hasen_judy, I'm about to upload a hello world demo of SDL with zig
<andrewrk> will you be around for the next 30 min or so?
<hasen_judy> awesome
<hasen_judy> yea I will be
<andrewrk> hasen_judy, got it working. uploading
<GitHub13> [zig] andrewrk pushed 2 new commits to master: https://git.io/vFfVA
<GitHub13> zig/master 5f28a9d Andrew Kelley: cleaner verbose flags and zig build prints failed command
<GitHub13> zig/master 300c83d Andrew Kelley: fix crash on field access of opaque type
_whitelogger has joined #zig
<hasen_judy> building is failing for me
<hasen_judy> I think I don't know how to update the compiler
<hasen_judy> for the compiler I just did a git pull then went into the build folder and ran `make`
<hasen_judy> Do I need to re-run the original cmake command?
<andrewrk> hasen_judy, you don't need to re-run the original cmake command but you do need to do `make install` instead of make
<hasen_judy> what if I run make then make install?
<hasen_judy> (that's what I did)
<hasen_judy> basically same error as before; just a tiny bit more verbose
<hasen_judy> note that I installed sdl2 from homebrew
<hasen_judy> and this is running on macOS Sierra 10.12.6
<hasen_judy> above link seems to have issues with long lines
<andrewrk> hasen_judy, let me try it on mac
<andrewrk> hasen_judy, I can reproduce the issue
<hasen_judy> ok
hasen_ju_ has joined #zig
<hasen_judy> thanks for confirming
hasen_ju_ has quit [Ping timeout: 252 seconds]
<GitHub141> [zig] andrewrk pushed 1 new commit to master: https://git.io/vFfKJ
<GitHub141> zig/master c7053be Andrew Kelley: better output when @cImport generates invalid zig
<andrewrk> hasen_judy, the commit I just pushed should make the error message better. now let's see if I can fix it
<hasen_judy> I pulled the latest compiler build
<hasen_judy> the only thing I see is this note 'note: redefinition of 'va_list''
<hasen_judy> sorry, incomplete paste ^
libman has joined #zig
<andrewrk> hasen_judy, this is better than the assertion failure right?
<andrewrk> now it tells you there is a compiler bug
<libman> Can't find basic install docs. Getting a "Unable to find zig lib directory. Reinstall Zig or use --zig-install-prefix" error.
<hasen_judy> I guess. I don't know what kind of message would be helpful since I don't work on the compiler.
<andrewrk> libman, what OS?
<andrewrk> did you follow the instructions from the README?
<libman> Ubuntu Linux. Yes, the `cmake; make; make install` commands from https://github.com/zig-lang/zig#release--install-build worked.
<libman> That is they produced a /opt/zig/build/zig binary
<andrewrk> libman, if you're compiling from source I recommend the debug / development build
<andrewrk> the libc error you got means you didn't configure libc correctly. try following the instructions from the debug / development section
<libman> http://ziglang.org/download/ only has Windows binaries
<andrewrk> libman, correct. I haven't gotten an ubuntu ppa up yet
<libman> Setting CMAKE_INSTALL_PREFIX / ZIG_LIBC_LIB_DIR / ZIG_LIBC_INCLUDE_DIR / ZIG_LIBC_STATIC_LIB_DIR env vars didn't help. I'm walking blind here. Terrible documentation.
libman has left #zig [#zig]
<andrewrk> libman, please be patient. this is version 0.1.1, not 1.0.0
<andrewrk> if you would like progress to go faster, you could consider donating toward the effort of funding full time work
<andrewrk> hasen_judy, after the commit I just pushed, the sdl demo works for me on macos
<GitHub128> [zig] andrewrk pushed 1 new commit to master: https://git.io/vFf6r
<GitHub128> zig/master f4ca348 Andrew Kelley: add guard to c_headers for duplicate va_list on darwin
<andrewrk> good night
<hasen_judy> andrewrk: works now! :)
<hasen_judy> this is awesome
<hasen_judy> thanks
<hasen_judy> my other zig program also works now
<hasen_judy> sdl*
<hasen_judy> I'll try to play with sdl more and report any compiler problems I encounter
<hasen_judy> good night
tiehuis has joined #zig
tiehuis has quit [Client Quit]
tiehuis has joined #zig
<GitHub174> [zig] tiehuis opened pull request #566: Improve invalid character error messages (master...issue-544) https://git.io/vFf1W
Andris_zbx has joined #zig
hasen_ju_ has joined #zig
hasen_ju_ has quit [Ping timeout: 258 seconds]
hasen_ju_ has joined #zig
arBmind has joined #zig
hasen_ju_ has quit [Ping timeout: 252 seconds]
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 252 seconds]
tiehuis has quit [Quit: WeeChat 1.9.1]
hasen_judy has quit [Quit: hasen_judy]
arBmind1 has quit [Quit: Leaving.]
arBmind has joined #zig
arBmind has quit [Client Quit]
<achamb> having an easy build system is easier to do earlier than later. It definitely is irritating dealing with the clang libraries etc.
<achamb> not sure how i can help though
<achamb> self hosted compiler will be nice one day :)
_dev_zero has quit [Remote host closed the connection]
_dev_zero has joined #zig
Benq has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
<andrewrk> achamb, are you referring to how cmake finds clang?
<andrewrk> or are you suggesting to work on improvements to the zig build system
<GitHub99> [zig] andrewrk pushed 1 new commit to master: https://git.io/vFJ08
<GitHub99> zig/master 6663638 Marc Tiehuis: Improve invalid character error messages (#566)...
<GitHub178> [zig] andrewrk closed pull request #566: Improve invalid character error messages (master...issue-544) https://git.io/vFf1W
arBmind has joined #zig
arBmind has quit [Quit: Leaving.]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
hasen_judy has joined #zig
dimenus has joined #zig
<dimenus> andrewrk: what version of MSVC do you have installed on that laptop?
<dimenus> I'm using MSVC 2017 / Win10 / Windows SDK 10
<dimenus> the v10.0 key contains a valid path to the tree which contains kernel32.lib
hasen_judy has quit [Remote host closed the connection]
<andrewrk> dimenus, MSVC 2015
<andrewrk> Win10
<dimenus> Do you have either the Windows 8 or Windows 10 sdks installed?
<andrewrk> I didn't explicitly install a windows SDK
<dimenus> ok
<andrewrk> it must have come with msvc 2015 or with windows update
<dimenus> Microsoft completely changed the installer with 2017
<dimenus> and there's a lot less bloat now
<dimenus> I'm thinking this key will work for someone who has 8.1 / 10 installed: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots
<dimenus> But I need to do a procmon trace on an older version to determine what previous versions of visual studio do for kernel32
<dimenus> or should I just go with 8.1/10 for now?
ofelas has joined #zig
<andrewrk> dimenus, I don't think I fully understand your question
<dimenus> sorry, probably misusing irc. I'm just thinking out loud.
<andrewrk> feel free to think out loud
<dimenus> I need to fire up my Win7 vm to find where kernel32 comes from on an older setup
<andrewrk> I'm at work again without my windows laptop
<dimenus> Do you use a mac in the office?
<andrewrk> linux
<andrewrk> dimenus, one idea we could have, is the compiler can have a configuration file and state
<andrewrk> and you could do something like
<andrewrk> zig find-libc e:\
<andrewrk> and it will scan e:\ looking for msvc installations. it could find any number of them
<andrewrk> zig list-libc
<andrewrk> prints all the libcs it knows about, with '*' next to the "default" one
<andrewrk> we can use the registry (do we need com? maybe not?) to seed the list initially
Andris_zbx has quit [Remote host closed the connection]
<andrewrk> zig select-libc 3
<andrewrk> (where 3 is the 3rd libc listed from zig list-libc)
<andrewrk> this would be for native builds only. for cross-compile builds you always have to give the path to libc explicitly (but maybe you could use one of the ones from the list)
<dimenus> COM is preferred for the newest versions according to Microsoft (they actually include a nuget package which I'm trying to avoid at all costs)
<andrewrk> what docs are you looking at that says COM is preferred?
<dimenus> but the registry keys are not consistent across versions, MS has changed them several times
<dimenus> halfway down under 'Product Instances'
<dimenus> CMAKE and Rust both use the COM interface for 2017
<andrewrk> good to know
<andrewrk> sounds like that's how we should do it
<dimenus> i do like the option of having the compiler be able to list the instances it finds
Benq has quit [Ping timeout: 260 seconds]
ofelas has quit [Quit: shutdown -h now]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
<andrewrk> dimenus, you know what it should be, actually. we should have an environment variable ZIG_LIBC_SEARCH_PATHS
<andrewrk> and if we had a find-libc utility, it would only help find a path
<andrewrk> it wouldn't change any state in a conf file
<dimenus> written in Zig? :)
<andrewrk> but of course :)
<dimenus> well, that would be the goal anyway
<andrewrk> I mean I think it would just be a subcommand of the compiler
<andrewrk> which will eventually be self hosted
<andrewrk> we can start now, by the way. I decided how the self-hosting will work
<andrewrk> we will always have the c++ compiler, forever, in the repo. and it has to be able to build the zig compiler.
<andrewrk> *build the self hosted compiler
<dimenus> just making sure I understand this correctly, the subcommand would invoke a separate tool, correct?
<andrewrk> I don't see a reason to put it in a different binary
<andrewrk> so the build process is: 1. compile c++ source code into zig1 compiler. 2. compile zig source code with zig1 compiler into zig2 compiler. 3. compile zig source code with zig2 compiler into zig3 compiler. zig3 compiler is the final binary
<andrewrk> it's 3 steps but it never grows beyond 3
<dimenus> what's the technical reason we need zig3?
<andrewrk> to be clear the binary will still be called "zig". I'm using zig3 to distinguish for the purposes of explaining the self hosting process. but why we need it:
<dimenus> ok, so I'll put the code to find libc/kernel32 in a separate cpp file rather than in-line within analyze.cpp
<andrewrk> zig1 is the output of c++ code. zig2 is the output of zig1 compiling zig code. zig2 is built using a different codebase than zig1
<dimenus> ah that makes sense
<andrewrk> so the c++ compiler can have bugs, that's fine, as long as it can produce a zig compiler that can produce a zig compiler that passes all the tests and doesn't have bugs :)
<andrewrk> dimenus, the libc-finding code written in c++ is not wasted, because we always will link with LLVM and clang, which means that we have to link libc, which means we have to find msvc in the c++ compiler
achamb has quit [Ping timeout: 240 seconds]
<andrewrk> although, we could use the cmake build tools to find msvc and pass that to the next step. hm.
<andrewrk> anyway whatever effort you do is not wasted because if it's solved in c++ it's easy to translate to zig later
cenomla has joined #zig
achamb has joined #zig
arBmind has joined #zig
_whitelogger has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
dimenus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 248 seconds]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
arBmind1 has quit [Quit: Leaving.]