ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
Ichorio_ has quit [Quit: Leaving]
steveno_ has joined #zig
<jacobdufault> Is there good way to initialize the members of a nested arraylist, ie, ArrayList(ArrayList(i32))? For example, https://paste.ubuntu.com/p/2k2FjdcjvH/
<jacobdufault> I can use `insert`, but I'm hoping to use the for loop variant
return0e_ has joined #zig
return0e has quit [Ping timeout: 256 seconds]
<jacobdufault> andrewrk: I spent some time searching for the issue re 'pub' not being required, would you mind linking me to it?
davr0s has joined #zig
steveno_ has quit [Quit: Leaving]
noonien has quit [Quit: Connection closed for inactivity]
<MajorLag> andrewrk: it's really nice having lld finally tell me why it's failing.
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Client Quit]
<MajorLag> And it looks like I can link with MinGW64 libs now, so that's cool. Can be free of MSVC. Weird thing though, when I use SDL2 that was distributed with my MinGW64 in C, it is compiled completely static. When I use it with Zig it insists on having the DLL. Not sure what that's all about.
<MajorLag> ...ok, I think this might be a Zig issue. "lld: warning: ignoring unknown argument: -lSDL2main". So it isn't actually doing the linking, it only appeared to work because I still had the extern fn's declared like they were dll.
<andrewrk> MajorLag: it'll be a couple days before I can work on this, but it should be a pretty straightforward update to link statically against SDL. The --static arg might already work.
<MajorLag> I was using static. The error above is when I pass target-environ as gnu. If I leave it msvc I think it might actually be linking statically but the resulting exe just immediately crashes.
<MajorLag> It's not a big deal. I've got pretty much all of win32 api working now so I can get single-executable games built using that.
<MajorLag> So don't feel like you have to rush something on my account.]
<andrewrk> MajorLag: cool, thanks, good to know. I'll test linking against SDL with environ msvc and try to debug the runtime crash. Btw did you do --library c when you linked against SDL?
<andrewrk> In addition to the --library SDL arguments
<MajorLag> from what I can tell, with mingw you link against libmingw32. there is no libc.a or libstdc.a
<MajorLag> To get it to link with msvc environ, I linked against: libSDL2main, libSDL2, libm, libdinput8, libdxguid, libdxerr8, libuser32, libgdi32, libwinmm, libimm32, libole32, liboleaut32, libshell32, libversion, libuuid, libmsvcrt (oh, I guess this is libc), libkernel32, libadvapi32, libmingw32, and libmingwex
<MajorLag> I've been up too long, brain ain't working so great anymore
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noonien has joined #zig
davr0s has joined #zig
davr0s has quit [Ping timeout: 256 seconds]
Hejsil has joined #zig
<andrewrk> jacobdufault, I don't have a link handy. If you didn't find it in a search, feel free to file a new issue. Worst case scenario, it's a duplicate, and now someone searching for the same thing as you will find it
<jacobdufault> will do, thx
<jacobdufault> any plans for a leak checker in std?
<jacobdufault> even something simple like an allocator that verifies the same number of malloc/free calls
<andrewrk> jacobdufault: yes. So far we have std.debug.FailingAllocator which does what you said and returns error.OutOfMemory after N allocations to help with testing
<andrewrk> But a leak checking allocator could do a lot more - such as capture a stack trace at every allocation and then print them when leaks are detected
davr0s has joined #zig
<andrewrk> has anybody played with async/await yet? I haven't had a chance to
hoppetosse has joined #zig
hoppetosse has quit [Ping timeout: 256 seconds]
Hejsil has quit [Read error: Connection reset by peer]
rain1 has joined #zig
hoppetosse has joined #zig
_0joshuaolson1 has joined #zig
<_0joshuaolson1> Hi, I'm trying to build zig (master). I get a CMake error on Fedora:
<_0joshuaolson1> CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: CLANG_INCLUDE_DIRS
<_0joshuaolson1> I have the clang libs
_0joshuaolson1 has left #zig [#zig]
<GitHub119> [zig] 0joshuaolson1 opened pull request #807: Fix Linux gcc requirement (master...patch-1) https://git.io/vAHDw
<GitHub194> [zig] andrewrk closed pull request #807: Fix Linux gcc requirement (master...patch-1) https://git.io/vAHDw
<GitHub190> [zig] andrewrk pushed 1 new commit to master: https://git.io/vAHDF
<GitHub190> zig/master db18d38 Joshua Olson: Fix Linux gcc requirement (#807)...
Tobba has quit [Ping timeout: 252 seconds]
<GitHub137> [zig] bscheinman closed pull request #791: Add support for event loop and basic network listeners, and a general-purpose memory allocator (master...gpalloc_squash) https://git.io/vAwcq
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eena is now known as meena
_0joshuaolson1 has joined #zig
<_0joshuaolson1> Apparently I left too soon, sorry (i.e. andrewrk). zig master's readme says I need the clang library, but Fedora's clang-libs has dynamic and static libs without an include path. Can I compile zig with g++ and still fulfill the CMake script's requirements?
<_0joshuaolson1> *I mean include files, not path.
<andrewrk> _0joshuaolson1, I'm not sure I understand the question
<andrewrk> does fedora have llvm 5.0.1 libs and clang 5.0.1 libs?
<andrewrk> looks like it does
<_0joshuaolson1> Yes.
<andrewrk> what is your cmake output?
<_0joshuaolson1> Just a sec.
<_0joshuaolson1> Configuring zig version 0.1.1.101b774 -- Could NOT find LLVM (missing: LLVM_INCLUDE_DIRS) -- Could NOT find CLANG (missing: CLANG_INCLUDE_DIRS) CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: CLANG_INCLUDE_DIRS (ADVANCED) used as include directory in directory /home/xenox/zig used as include dir
<_0joshuaolson1> That messed up formatting...
<_0joshuaolson1> I don't have or want clang the binary, since that might override the use of g++ with the cc/c++ commands?
<_0joshuaolson1> *nvm, but am I making sense?
<_0joshuaolson1> Thanks
<andrewrk> you should be able to install both without changing the defaultt
<_0joshuaolson1> Should we make another PR for the readme, then?
<andrewrk> what's wrong with the readme?
<_0joshuaolson1> This could get fragile - who knows when a Sabayon/Gentoo user will come along or whatever
<andrewrk> I'm guessing there's a separate package that has the headers and libraries, and you need to install that
<_0joshuaolson1> The readme says I need the clang and llvm libraries. I do.
<andrewrk> if you don't trust your system package manager, then install from source
<_0joshuaolson1> CMake is looking for more than the libraries, apparently, for the stage 1 build to work.
<_0joshuaolson1> The 'fragile' comment was about how specific to make requirements so this doesn't happen to someone else.
<andrewrk> if there's a package that provides `llvm-config` I think that would solve your issue
<_0joshuaolson1> Huh, Fedora doesn't have it. THere's devel and static versions of llvm.
<andrewrk> _0joshuaolson1, let me send you a diff to try
<_0joshuaolson1> *thumbs up*, also installing llvm now (separate from llvm-libs)
<andrewrk> _0joshuaolson1, try this: https://clbin.com/oLNzv
<_0joshuaolson1> I'm slow.
<_0joshuaolson1> Dang it, copied it wrong. Take 2
<_0joshuaolson1> The output is the same.
<_0joshuaolson1> What's core.h from?
<_0joshuaolson1> Duh, zig
<andrewrk> no, it's from LLVM
<_0joshuaolson1> ?
<andrewrk> look for Core.h on your system in /usr/include
<_0joshuaolson1> grep shows I don't have it.
<andrewrk> you would need to use find, not grep
<andrewrk> find /usr/include -name Core.h
<andrewrk> if you don't have it, then you don't have LLVM libraries installed
hopppetosse has joined #zig
<_0joshuaolson1> Fedora's llvm-libs doesn't have include files - it has .so's and .a's
<_0joshuaolson1> And yeah, no core.h
<_0joshuaolson1> I'll keep looking for packages that might have it.
hoppetosse has quit [Ping timeout: 260 seconds]
<andrewrk> it takes a couple hours