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: 258 seconds]
cenomla has quit [Quit: cenomla]
hasen_judy has joined #zig
hasen_judy has quit [Quit: hasen_judy]
dimenus has joined #zig
hasen_judy has joined #zig
dimenus has quit [Read error: Connection reset by peer]
hasen_ju_ has joined #zig
hasen_ju_ has quit [Ping timeout: 246 seconds]
<GitHub33> [zig] andrewrk pushed 2 new commits to master: https://git.io/vdpbF
<GitHub33> zig/master 643ab90 Andrew Kelley: add maximum value for @setAlignStack
<GitHub33> zig/master d7e28f9 Andrew Kelley: remove CXX ABI workaround...
cenomla has joined #zig
hasen_judy has quit [Quit: hasen_judy]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
cenomla has quit [Quit: cenomla]
pupp has joined #zig
<pupp> example of a function pointer?
hasen_judy has joined #zig
pupp has quit [Ping timeout: 246 seconds]
tiehuis has joined #zig
<andrewrk> the docs were there all along
<andrewrk> I just forgot
pupp has joined #zig
pupp has quit [Ping timeout: 240 seconds]
pupp has joined #zig
<Elronnd> latest aur build is dead?
<Elronnd> "/usr/bin/ld: cannot find -ltinfo"
<tiehuis> oh, did i miss a dependency
<tiehuis> one second, can you try something for me
<tiehuis> is this the zig-git or zig aur package?
<tankfeeder> tiehuis:
<tankfeeder> zig-git aur
<tiehuis> i updated that before to link tinfo and curses but i have probably forgotten to add the dependency for tinfo
<tiehuis> i thought curses provided it but it doesn't seem to be the case
<tankfeeder> i wrote you email
<tankfeeder> with link to error
<tiehuis> yes, i did fix that
<tankfeeder> i will try in 20mins
<tiehuis> Elronnd: If you could install `libtinfo` from the aur and let me know if that works that'd be helpful
<tiehuis> oh wait, don't do that
<tiehuis> the latest ncurses package supposedly provides libtinfo anyway, so maybe just to an pacman -Syu first
hasen_ju_ has joined #zig
hasen_ju_ has quit [Ping timeout: 258 seconds]
<hasen_judy> I'm on the other laptop right now
<hasen_judy> (sorry my other laptop is also randomly joining and leaving)
<tankfeeder> tiehuis: failed
<hasen_judy> zig build-exe fails with: Assertion failed: (!node->owner->c_import_node), function add_node_error, file /Users/hasen/tmp/zig/src/analyze.cpp, line 32.
pupp has quit [Read error: Connection reset by peer]
pupp has joined #zig
<tiehuis> tankfeeder: can you remove the existing pkg directory and try rebuilding from scratch
<tiehuis> also, have you updated every packaged recently with pacman -Syu?
<tankfeeder> yes, updated
<tankfeeder> doing rebuild
<tankfeeder> build done, testing
<tankfeeder> so, issue closed.
<tiehuis> i expect that curses issue will be fixed sometime since I think it arose from the recent update to the ncurses package
tiehuis has quit [Quit: WeeChat 1.9.1]
puppp has joined #zig
pupp has quit [Ping timeout: 240 seconds]
puppp has quit [Ping timeout: 260 seconds]
puppp has joined #zig
hasen_judy has quit [Quit: hasen_judy]
hasen_judy has joined #zig
hasen_judy has quit [Quit: hasen_judy]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 255 seconds]
hasen_judy has joined #zig
cenomla has joined #zig
hasen_judy has quit [Remote host closed the connection]
pupp has joined #zig
puppp has quit [Ping timeout: 248 seconds]
dimenus has joined #zig
<andrewrk> pupp, did you see my message?
<pupp> yes
_dev_zero has quit [Quit: reboot]
<andrewrk> hasen_judy: this happens when the @cImport generated invalid zig code. I'll need to reproduce this and find out why this is happening
hasen_judy has joined #zig
<andrewrk> also you should try to use only 1 @cImport block if you can
hasen_judy has quit [Remote host closed the connection]
_dev_zero has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Remote host closed the connection]
cenomla has quit [Quit: cenomla]
hasen_judy has joined #zig
cenomla has joined #zig
hasen_judy has quit [Ping timeout: 258 seconds]
benq has joined #zig
benq has quit [Client Quit]
_dev_zero has quit [Ping timeout: 248 seconds]
_dev_zero has joined #zig
cenomla has quit [Quit: cenomla]
<dimenus> hey andrewrk, I have to include a bunch of extra declarations for COM classes, is there a particular file you'd like me to put that in?
<dimenus> header file is about 900 lines
<dimenus> (but written by Microsoft)
<andrewrk> dimenus, just try to isolate it so that only 1 cpp file has to include it, so it doesn't bog down our compile time
steveno has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 246 seconds]
redj has quit [Ping timeout: 248 seconds]
<steveno> how exactly does one run the test suite on posix?
<steveno> i tried " bin/zig build --build-file ../build.zig test" mimicing the windows instructions but that fails for me
<andrewrk> steveno, the readme instructions should work
<andrewrk> what error do you get?
<steveno> make coverage is not a target
<steveno> i'm missing lcov. hold on.
<steveno> nope. still coverage is still not a target
<steveno> nevermind. ignore me.
<andrewrk> steveno, tests working now?
radens has left #zig ["WeeChat 1.0.1"]
<steveno> well, no, but I don't think it's zig's fault
<steveno> i forgot to add -DZIG_TEST_COVERAGE=ON to my cmake command
<andrewrk> I don't think you want test coverage on
<andrewrk> I think you want the steps under the "Debug / Development Build"
<andrewrk> and nothing else
<steveno> OHH
<steveno> "./zig build --build-file ../build.zig test" runs the test suite!?!?
<andrewrk> steveno, yes, the tests are self-hosted
<steveno> i did not get that from the readme. my bad.
<andrewrk> when the whole compiler is self-hosted, it will be `zig build` from the root dir - the weird command is because the build process is partially c++, partially zig
hasen_judy has joined #zig
* steveno schooled
<andrewrk> I mean, if you're confused it's because the instructions are confusing. sorry about that
<andrewrk> hasen_judy, did you get my reply?
hasen_judy has quit [Ping timeout: 258 seconds]
<GitHub112> [zig] scurest opened pull request #563: Improved printing for floats (master...float-printing) https://git.io/vdjwT
redj has joined #zig
<steveno> finally got it working. 301 tests passed!
<steveno> should I be concerned it was "Unable to determine libc lib path."?
<andrewrk> steveno, what os are you on?
<andrewrk> zig is configured without knowing where libc is, and I'm guessing you probably want to use c libraries
<dimenus> andrewrk, I seem to have either found a bug with ZigList or am just misunderstanding the purpose of 'buf_alloc_fixed'
<dimenus> it resizes the array as exected, but it also sets the length (which I would interpret as the number of chars in the buffer) to the assigned length
<dimenus> rather than 0
<dimenus> capacity is then added to the length, so the buffer ends up being way larger than expected with a bunch of debugger initialized data ;)
<andrewrk> dimenus, yeah Buf/ZigList are made to have amortized O(log2(N)) append operation
<andrewrk> that's probably the wrong data structure for a lot of things, it could be optimized
<andrewrk> dimenus, you may notice we also don't free memory anywhere in the compiler
<andrewrk> I'm planning for the self hosted version to have proper memory management and concurrency and all that good stuff
<dimenus> i can work around it by just not using buff_alloc_fixed for now as the regular buff_alloc sets length appropriately (because it passes 0 to buff_alloc_fixed)
pupp has quit [Read error: Connection reset by peer]
pupp has joined #zig
<andrewrk> dimenus, it's still going to have the extra capacity when you add it to the buf though. how much memory are you putting in there?
<dimenus> MAX_PATH (260 on windows 10)
<andrewrk> dimenus, just use buf_alloc_fixed, the extra capacity is negligible
<dimenus> it's not the capacity that's the issue, it sets the length to the wrong value
<dimenus> so when you append(), it's to the middle of the buffer
<dimenus> not the beginning
<andrewrk> dimenus, hmm you should use buf_len for the length
<andrewrk> it's used everywhere; I don't think it's wrong
<andrewrk> I guess this is what I get for not using private:
<andrewrk> pretend Buf::list is private
<dimenus> hah, will do
steveno has quit [Quit: steveno]
<dimenus> hmm, probably just understanding it wrong then. I think of it like 'alloc and ensure capacity', is that wrong?
<andrewrk> dimenus, that is correct
<andrewrk> it ensures a capacity in memory, but the "length" of the buffer is independent of the capacity
<andrewrk> and the 0 byte is after the length
<andrewrk> so if you pass, e.g. buf_ptr(buf) to a win32 api, it's going to look for the null byte and find it in the correct position
Benj has joined #zig
<Benj> zw
Benj is now known as Guest72714
<Guest72714> Hello … I understand zig uses LLVM. Is it also partly self hosting (in terms of its compiler)?
<andrewrk> Guest72714, the tests are all self hosted
<Guest72714> The compiler is written in c++? (from quick look at the source)
<andrewrk> Guest72714, yes
<dimenus> ok, so I have msvc working through both COM and the registry
<dimenus> now on to kernel32...
<dimenus> which apparently does not have a consistent key or interface
<dimenus> thanks again microsoft
dimenus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Guest72714> Thanks.
Guest72714 has quit [Quit: Page closed]
ryan_ has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]