ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
steveno_ has joined #zig
zesterer has joined #zig
steveno_ has quit [Remote host closed the connection]
zesterer has quit [Quit: zesterer]
zesterer has joined #zig
zesterer has quit [Remote host closed the connection]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
Ichorio 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
heakins has quit [Ping timeout: 260 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ofelas has quit [Ping timeout: 264 seconds]
ofelas has joined #zig
<achambe>
So, anyone have any applications they are writing in zig? or is it still early days
<Aequus>
Err, using -DCMAKE_PREFIX_PATH didn't work, I get a silly error saying file INSTALL cannot copy file "..." to "/usr/local/bin/zig" even though I don't want it to install to /usr/local, that's why I set it in the first place... When I manually edit cmake_install.cmake and change /usr/local to the prefix I want, it installs it there, but trying to compile anything with Zig, it tells me that it cannot find zig
<Aequus>
lib directory and to reinstall or use --zig-install-prefix, but when I pass --zig-install-prefix=PREFIX, it says invalid argument. Any ideas as to how I can install and use Zig properly from PREFIX?
<Aequus>
Also when I run "make install", it says "Install configuration: "Debug"", how do I change it to release, if possible?
<Aequus>
I know how to workaround the issue, but I want to do it the proper way. :P
<Aequus>
Funnily enough it attempts to install the libembedded_lld_*.a to the PREFIX, but not the zig executable.
<Aequus>
Actually nevermind, my problem was that I used = after --zig-install-prefix. >.>
<Aequus>
Well it also says found LLVM and CLANG, so I dunno.
<tiehuis>
these are all statically linked so you shouldn't have any particular issues
<tiehuis>
i was having that issue show up in arch when building from source, what is your os/distro?
<Aequus>
arch
<tiehuis>
you can install the package the aur and that should work
<tiehuis>
i had to add a patch to the build step to get around this particular issue
<Aequus>
Ah, all right. Thanks. :)
<tiehuis>
as it seems libclang doesn't provide .a files for static linking so when building it finds the libclang.so and llvm.a files and there is an issue when dynamically linking libclang but statically linking llvm
<Aequus>
tiehuis: Heh, the only reason I wanted Release is because I thought it'd disable dumping a core when the .zig file I'm trying to build doesn't exist. Any ideas?
<Aequus>
This:
<Aequus>
unable to open './hello.zig': file not found
<Aequus>
Aborted (core dumped)
<tiehuis>
aur does a release build, if you wanted to do manually however, you should just be able to modify your CMakeLists.txt with this patch:
<Aequus>
I probably have it enabled, but I thought it wouldn't dump a core with Release (and that patch), and I'm not sure if it's normal behavior from zig. I should probably disable automatic core dumps though.
<tiehuis>
i don't get core dumps even with a debug build
<tiehuis>
it should be an os dependent thing and not visible a zig thing i believe
<Aequus>
Yeah but why would it abort when it could just gracefully exit having not found the source file? I thought it was a Debug/Release thing where with Debug it would abort, and with Release it would just exit or something.
davr0s has joined #zig
arBmind has joined #zig
<tiehuis>
it shouldn't really, let me make an issue and i can change that tomorrow
<tiehuis>
actually, i'll just do this now
<tiehuis>
there are actually a few things to consider with how this interacts with tests so it's not a completely trivial change
tiehuis has quit [Quit: WeeChat 2.1]
noonien has joined #zig
<Aequus>
LOL, I told my friend about Zig, I made the claim Zig's comptime is epic and generates optimized/better ASM, and he didn't believe so he gave me an example of gcd written in C, told me to write it in Zig, and also told me the optimal ASM would be "foo: movl $120, %eax ret". GCC and Clang transformed the tail recursion into a loop and then inlined it, but didn't precompute the result, etc... whereas what I did
<Aequus>
was: copy his code (could have translate-c'd it) add comptime params, then do: "zig build-obj gcd.zig --release-fast --emit asm" and the result was exactly the optimal asm! I guess I convinced him... He was too lazy to bother with the talk that mentioned it so had to do it this way. :D
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<achambe>
Yeah, the comptime feature is really something I want to explore
<andrewrk>
Aequus, unless you're trying to hack on the compiler itself, you can use the statically linked CI build of master branch