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
hasen_judy has quit [Ping timeout: 255 seconds]
<andrewrk> puppp: I'll add docs for that tonight and link you to them
_whitelogger has joined #zig
cenomla has joined #zig
hasen_judy has joined #zig
<dimenus> I wonder how Rust searches for the msbuild tools
hasen_judy has quit [Ping timeout: 258 seconds]
<andrewrk> dimenus, good point. I never looked that up
<andrewrk> where do you have msvc installed to?
<dimenus> nothing funky I spose, just a non-system drive
<dimenus> E:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\lib\x64
<dimenus> andrewrk, rustup detects it so I'm sure it's in there
<andrewrk> dimenus, interesting, good to know
<andrewrk> maybe I'll pop in to the rust-dev irc channel
<andrewrk> looks like there's a registry key
cenomla has quit [Quit: cenomla]
<dimenus> cool, yeah that definitely has the root tree in my case
<andrewrk> dimenus, yep, good find. I'll do that as part of #539
<dimenus> that was a bit old. Microsoft published their own native tool, but it looks like quite a bit of code: https://github.com/Microsoft/vswhere
dimenus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
dimenus has joined #zig
puppp has quit [Ping timeout: 240 seconds]
dimenus has left #zig [#zig]
_whitelogger has joined #zig
puppp has joined #zig
_whitelogger has joined #zig
achambe has joined #zig
<achambe> Hi there
<achambe> andrewrk: I noticed you use nix, what do you have in your configuration.nix to be able to build zig? I'm relatively new to nix, I have clang and cmake, but the libraries are not installed it seems.
<achambe> another question I have, I seem to have read about a c to zig tool
<achambe> but can't find the code
<achambe> am I wrong about that existing?
puppp has quit [Quit: puppp]
achamb has joined #zig
achambe has quit [Quit: Page closed]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
hasen_judy has joined #zig
tiehuis has quit [Quit: WeeChat 1.9.1]
hasen_ju_ has joined #zig
hasen_ju_ has quit [Ping timeout: 246 seconds]
hasen_judy has quit [Quit: hasen_judy]
Kiwii_ has joined #zig
<Kiwii_> Hi !
Kiwii_ has quit [Ping timeout: 260 seconds]
cenomla has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
<andrewrk> hi achamb
<andrewrk> I have a file ~/env/zig.nix and when I build zig I create a nix shell like this: nix-shell ~/env/zig.nix
<andrewrk> achamb, try this: zig parsec --verbose some-file.c
<andrewrk> it's still under development, but it can understand most prototypes and some source translation
<andrewrk> here are some examples of what it understands: https://github.com/zig-lang/zig/blob/master/test/parsec.zig
hasen_judy has joined #zig
<hasen_judy> I'm trying to build a minimal sdl2 program
<hasen_judy> The compiler is giving me an error in including SDL2/SDL.h because AvailabilityMacros.h is not found
<andrewrk> hasen_judy, maybe you need to pass a -isystem argument, or if you are using zig build, addCIncludePath
<hasen_judy> ok, I'll look into addCIncludePath
<andrewrk> hasen_judy, hmm I think zig build is missing some API for this
<hasen_judy> hm, I think I found the path for AvailabilityMacros using the locate command
<hasen_judy> so I added it
<hasen_judy> b.addCIncludePath("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/");
<hasen_judy> but now it says:
<hasen_judy> note: 'stdio.h' file not found
<andrewrk> interesting, we should already have the include path for stdio.h
<andrewrk> but it might give us a clue to manually add that path too
<hasen_judy> FWIW I'm trying the barest minimum code
<andrewrk> yeah I don't think anyone got SDL working out of the box yet
<andrewrk> maybe we should add the framework paths automatically?
<hasen_judy> build.zig: https://hastebin.com/asipaxilod.cpp
<hasen_judy> zig version: 0.1.1.c1642355
<hasen_judy> Earlier today I got the tetris thing working on another mac
<hasen_judy> so I got surprised with the stdio not found just now
<andrewrk> hasen_judy, I'll try getting SDL to work on my mac later tonight and iron out the kinks
<andrewrk> I'm not sure why stdio.h wouldn't be found
<hasen_judy> anyway, I'm trying to run tetris on this mac as well
<hasen_judy> installing dependencies from brew
<hasen_judy> first, libepoxy
<hasen_judy> hm, still getting errors about things that should be standard, I think
<andrewrk> hasen_judy, frameworks?
<hasen_judy> I'm not sure what I have to do to get the right frameworks
<hasen_judy> never actually worked on a C/C++ project on this machine
<hasen_judy> although I managed to get the zig compiler to build
<hasen_judy> so arguably some form of C library is there somewhere
<andrewrk> I think it's not finding libc headers
<hasen_judy> trying `xcode-select --install`
<andrewrk> where is e.g. stdlib.h?
<hasen_judy> even though I have an impression I did run that a long time ago
<hasen_judy> hm, appears to be in places like: /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/stdlib.h
<hasen_judy> or /usr/local/Cellar/llvm/5.0.0/include/c++/v1/stdlib.h
dimenus has joined #zig
<andrewrk> you should be able to add one of those directories
<andrewrk> usually you don't have to because zig is configured with the path hard coded
<hasen_judy> yea I'm not sure what's going on
<dimenus> andrewrk: do you think it's better to add msvc detection in zig code or in the compiler itself?
<andrewrk> dimenus, zig compiler should detect msvc
<hasen_judy> how about this error? https://hastebin.com/olitidiban.rb
<hasen_judy> inttypes.h:30:15: note: 'inttypes.h'
<hasen_judy> ^ file not found
<andrewrk> I think that's the same thing, can't find inttypes.h from libc
<hasen_judy> ok, I was confused because the file itself is inttypes.hs
<hasen_judy> the error is in /Users/hasenj/lib/zig/include/inttypes.h
<hasen_judy> but the line is #include_next (which I've never seen before)
<andrewrk> hasen_judy, right. clang/zig ship with inttypes.h which include inttypes.h from libc
<hasen_judy> got it
<andrewrk> zig is copying clang's behavior here since we use clang to import .h files
<andrewrk> hasen_judy, ideally you would give zig the path to the libc that was used to compile SDL
<andrewrk> which looks like it was with homebrew
<andrewrk> I'm confused why you don't have stdlib.h in /usr/include
<hasen_judy> for some reason I'm getting ls: /usr/include: No such file or directory
<andrewrk> that seems very odd
<hasen_judy> yes
<hasen_judy> I'll try rebooting - just in case
hasen_judy has quit [Remote host closed the connection]
hasen_judy has joined #zig
<tankfeeder> failed on archlinux
<tankfeeder> recreate zig pkg
<tankfeeder> # zig version
<tankfeeder> 0.0.0.4e2a5e6b
<tankfeeder> ^^^ last version.
<hasen_judy> still not /usr/include
<hasen_judy> googling a bit, it seems the folder does not exist on mac
<andrewrk> hasen_judy, which macos version? did you upgrade to high sierra?
<hasen_judy> I didn't no update, it's just sierra 10.12.5
<hasen_judy> did not upgrade *
<andrewrk> that's the same as my macbook
<dimenus> tankfeeder: your zig version is actually zig version 0.1.1.c1642355
<andrewrk> tankfeeder, hmm. looks like it needs to -lcurses
<dimenus> what version of llvm/clang are you using?
<tankfeeder> dimenus: llvm 5
<tankfeeder> always worked
<tankfeeder> tieus did zig-git on archlinux
<andrewrk> tankfeeder, llvm-config --system-libs
<andrewrk> does it include -lcurses ?
<tankfeeder> andrewrk: empty output
<andrewrk> I think this is a bug in llvm. We can workaround by adding -lcurses in the AUR
<tankfeeder> yeap
<tankfeeder> i have to ping tiehuis
<tankfeeder> tiehuis pinged.
<achamb> ffsdfsf
<achamb> thank you!
hasen_judy has quit [Remote host closed the connection]
dimenus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
dimenus has joined #zig
dimenus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
cenomla has quit [Quit: cenomla]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 258 seconds]
dimenus has joined #zig
<dimenus> andrewrk: sorry to keep asking about msvc, but are you thinking we'll query the registry or go the full route of rust (COM interface)
<andrewrk> dimenus, whatever way is the most correct
<andrewrk> and reliably
<andrewrk> *reliable
<dimenus> com is probably the most correct, time to learn com I guess
<andrewrk> dimenus, godspeed
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 255 seconds]
steveno has joined #zig
steveno has quit [Quit: steveno]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 258 seconds]
dimenus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hasen_judy has joined #zig
hasen_judy has quit [Remote host closed the connection]
cenomla has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Remote host closed the connection]